From 977e86dc9be38d9f8a16e1f17141486b0f84a43a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 5 Nov 2007 17:18:21 +0000 Subject: - 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 --- lib/sqlalchemy/util.py | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'lib/sqlalchemy/util.py') 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) -- cgit v1.2.1