Hackfut Security File Manager
Current Path:
/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm
opt
/
alt
/
python27
/
lib64
/
python2.7
/
site-packages
/
sqlalchemy
/
orm
/
📁
..
📄
__init__.py
(7.9 KB)
📄
__init__.pyc
(9.31 KB)
📄
__init__.pyo
(9.31 KB)
📄
attributes.py
(55.94 KB)
📄
attributes.pyc
(55.59 KB)
📄
attributes.pyo
(55.32 KB)
📄
base.py
(14.32 KB)
📄
base.pyc
(15.11 KB)
📄
base.pyo
(15.11 KB)
📄
collections.py
(51.18 KB)
📄
collections.pyc
(62.31 KB)
📄
collections.pyo
(62.1 KB)
📄
dependency.py
(45.11 KB)
📄
dependency.pyc
(28.68 KB)
📄
dependency.pyo
(28.59 KB)
📄
deprecated_interfaces.py
(17.83 KB)
📄
deprecated_interfaces.pyc
(21.11 KB)
📄
deprecated_interfaces.pyo
(21.11 KB)
📄
descriptor_props.py
(24.95 KB)
📄
descriptor_props.pyc
(28.1 KB)
📄
descriptor_props.pyo
(28.1 KB)
📄
dynamic.py
(12.84 KB)
📄
dynamic.pyc
(14.42 KB)
📄
dynamic.pyo
(14.42 KB)
📄
evaluator.py
(4.7 KB)
📄
evaluator.pyc
(7.19 KB)
📄
evaluator.pyo
(7.19 KB)
📄
events.py
(83.09 KB)
📄
events.pyc
(91.58 KB)
📄
events.pyo
(91.58 KB)
📄
exc.py
(5.31 KB)
📄
exc.pyc
(7.75 KB)
📄
exc.pyo
(7.75 KB)
📄
identity.py
(10.01 KB)
📄
identity.pyc
(14.76 KB)
📄
identity.pyo
(14.76 KB)
📄
instrumentation.py
(17.1 KB)
📄
instrumentation.pyc
(20.65 KB)
📄
instrumentation.pyo
(20.57 KB)
📄
interfaces.py
(21.56 KB)
📄
interfaces.pyc
(26.11 KB)
📄
interfaces.pyo
(26.11 KB)
📄
loading.py
(25.29 KB)
📄
loading.pyc
(15.28 KB)
📄
loading.pyo
(15.28 KB)
📄
mapper.py
(116.54 KB)
📄
mapper.pyc
(92.81 KB)
📄
mapper.pyo
(92.66 KB)
📄
path_registry.py
(7.57 KB)
📄
path_registry.pyc
(12.58 KB)
📄
path_registry.pyo
(12.58 KB)
📄
persistence.py
(52.41 KB)
📄
persistence.pyc
(41.25 KB)
📄
persistence.pyo
(41.25 KB)
📄
properties.py
(10.21 KB)
📄
properties.pyc
(11.3 KB)
📄
properties.pyo
(11.3 KB)
📄
query.py
(150.98 KB)
📄
query.pyc
(143.06 KB)
📄
query.pyo
(143.02 KB)
📄
relationships.py
(115.47 KB)
📄
relationships.pyc
(100.36 KB)
📄
relationships.pyo
(100.33 KB)
📄
scoping.py
(6.27 KB)
📄
scoping.pyc
(7.5 KB)
📄
scoping.pyo
(7.5 KB)
📄
session.py
(117.07 KB)
📄
session.pyc
(110.77 KB)
📄
session.pyo
(110.6 KB)
📄
state.py
(26.85 KB)
📄
state.pyc
(28.61 KB)
📄
state.pyo
(28.61 KB)
📄
strategies.py
(60.93 KB)
📄
strategies.pyc
(45.88 KB)
📄
strategies.pyo
(45.54 KB)
📄
strategy_options.py
(35.07 KB)
📄
strategy_options.pyc
(36.87 KB)
📄
strategy_options.pyo
(36.87 KB)
📄
sync.py
(5.32 KB)
📄
sync.pyc
(4.48 KB)
📄
sync.pyo
(4.48 KB)
📄
unitofwork.py
(23.43 KB)
📄
unitofwork.pyc
(23.57 KB)
📄
unitofwork.pyo
(23.49 KB)
📄
util.py
(37.64 KB)
📄
util.pyc
(38.09 KB)
📄
util.pyo
(37.94 KB)
Editing: sync.py
# orm/sync.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used for copying data between instances based on join conditions. """ from . import exc, util as orm_util, attributes def populate(source, source_mapper, dest, dest_mapper, synchronize_pairs, uowcommit, flag_cascaded_pks): source_dict = source.dict dest_dict = dest.dict for l, r in synchronize_pairs: try: # inline of source_mapper._get_state_attr_by_column prop = source_mapper._columntoproperty[l] value = source.manager[prop.key].impl.get(source, source_dict, attributes.PASSIVE_OFF) except exc.UnmappedColumnError: _raise_col_to_prop(False, source_mapper, l, dest_mapper, r) try: # inline of dest_mapper._set_state_attr_by_column prop = dest_mapper._columntoproperty[r] dest.manager[prop.key].impl.set(dest, dest_dict, value, None) except exc.UnmappedColumnError: _raise_col_to_prop(True, source_mapper, l, dest_mapper, r) # technically the "r.primary_key" check isn't # needed here, but we check for this condition to limit # how often this logic is invoked for memory/performance # reasons, since we only need this info for a primary key # destination. if flag_cascaded_pks and l.primary_key and \ r.primary_key and \ r.references(l): uowcommit.attributes[("pk_cascaded", dest, r)] = True def bulk_populate_inherit_keys( source_dict, source_mapper, synchronize_pairs): # a simplified version of populate() used by bulk insert mode for l, r in synchronize_pairs: try: prop = source_mapper._columntoproperty[l] value = source_dict[prop.key] except exc.UnmappedColumnError: _raise_col_to_prop(False, source_mapper, l, source_mapper, r) try: prop = source_mapper._columntoproperty[r] source_dict[prop.key] = value except exc.UnmappedColumnError: _raise_col_to_prop(True, source_mapper, l, source_mapper, r) def clear(dest, dest_mapper, synchronize_pairs): for l, r in synchronize_pairs: if r.primary_key and \ dest_mapper._get_state_attr_by_column( dest, dest.dict, r) not in orm_util._none_set: raise AssertionError( "Dependency rule tried to blank-out primary key " "column '%s' on instance '%s'" % (r, orm_util.state_str(dest)) ) try: dest_mapper._set_state_attr_by_column(dest, dest.dict, r, None) except exc.UnmappedColumnError: _raise_col_to_prop(True, None, l, dest_mapper, r) def update(source, source_mapper, dest, old_prefix, synchronize_pairs): for l, r in synchronize_pairs: try: oldvalue = source_mapper._get_committed_attr_by_column( source.obj(), l) value = source_mapper._get_state_attr_by_column( source, source.dict, l, passive=attributes.PASSIVE_OFF) except exc.UnmappedColumnError: _raise_col_to_prop(False, source_mapper, l, None, r) dest[r.key] = value dest[old_prefix + r.key] = oldvalue def populate_dict(source, source_mapper, dict_, synchronize_pairs): for l, r in synchronize_pairs: try: value = source_mapper._get_state_attr_by_column( source, source.dict, l, passive=attributes.PASSIVE_OFF) except exc.UnmappedColumnError: _raise_col_to_prop(False, source_mapper, l, None, r) dict_[r.key] = value def source_modified(uowcommit, source, source_mapper, synchronize_pairs): """return true if the source object has changes from an old to a new value on the given synchronize pairs """ for l, r in synchronize_pairs: try: prop = source_mapper._columntoproperty[l] except exc.UnmappedColumnError: _raise_col_to_prop(False, source_mapper, l, None, r) history = uowcommit.get_attribute_history( source, prop.key, attributes.PASSIVE_NO_INITIALIZE) if bool(history.deleted): return True else: return False def _raise_col_to_prop(isdest, source_mapper, source_column, dest_mapper, dest_column): if isdest: raise exc.UnmappedColumnError( "Can't execute sync rule for " "destination column '%s'; mapper '%s' does not map " "this column. Try using an explicit `foreign_keys` " "collection which does not include this column (or use " "a viewonly=True relation)." % (dest_column, dest_mapper)) else: raise exc.UnmappedColumnError( "Can't execute sync rule for " "source column '%s'; mapper '%s' does not map this " "column. Try using an explicit `foreign_keys` " "collection which does not include destination column " "'%s' (or use a viewonly=True relation)." % (source_column, source_mapper, dest_column))
Upload File
Create Folder