diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-05 17:18:21 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-05 17:18:21 +0000 |
commit | 977e86dc9be38d9f8a16e1f17141486b0f84a43a (patch) | |
tree | f2e8b84ef056515e1deabe7fbcc88792d096c066 /lib/sqlalchemy/util.py | |
parent | 43498def132cbe40d4e7fed1dc51418263fb5d22 (diff) | |
download | sqlalchemy-977e86dc9be38d9f8a16e1f17141486b0f84a43a.tar.gz |
- base_columns on ColumnElement becomes a list; as usual, because columns in CompoundSelects
may extend from more than one root column.
- keys_ok argument from corresponding_column() removed. no more name-based matching of columns anywhere.
- DictDecorator is gone. all row translators provided by orm.util.create_row_adapter(). Mapper
and contains_alias() cache the adapters on target mapper to avoid re-computation of adapters.
- create_row_adapter() accepts an "equivalent_columns" map as produced by Mapper, so that
row adapters can take join conditions into account (as usual again, to help with the CompoundSelects
produced by polymorphic_union).
- simplified TableSingleton to just provide lookup; moved all initialization into Table.
- the "properties" accessor on Mapper is removed; it now throws an informative
exception explaining the usage of mapper.get_property() and
mapper.iterate_properties
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r-- | lib/sqlalchemy/util.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 9ad7e113c..e8c34b513 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -409,27 +409,6 @@ except ImportError: def __setattr__(self, key, value): self._tdict[(thread.get_ident(), key)] = value -class DictDecorator(dict): - """A Dictionary that delegates items not found to a second wrapped dictionary.""" - - def __init__(self, decorate): - self.decorate = decorate - - def __getitem__(self, key): - try: - return dict.__getitem__(self, key) - except KeyError: - return self.decorate[key] - - def __contains__(self, key): - return dict.__contains__(self, key) or key in self.decorate - - def has_key(self, key): - return key in self - - def __repr__(self): - return dict.__repr__(self) + repr(self.decorate) - class OrderedSet(Set): def __init__(self, d=None): Set.__init__(self) |