From: Mike Bayer Date: Sat, 30 Sep 2006 03:10:21 +0000 (+0000) Subject: - doc edit X-Git-Tag: rel_0_3_0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c19b41b603d53741f1f0e911fbba95c6667a7a3;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - doc edit - i have no idea what a SynonymProperty was supposed to be for --- diff --git a/doc/build/content/dbengine.txt b/doc/build/content/dbengine.txt index a68b94de58..fdde68fdae 100644 --- a/doc/build/content/dbengine.txt +++ b/doc/build/content/dbengine.txt @@ -106,7 +106,7 @@ Example of a manual invocation of `pool.QueuePool` (which is the pool instance u def getconn(): return MySQLdb.connect(user='ed', dbname='mydb') - engine = create_engine('mysql', pool=pool.QueuePool(getconn, pool_size=20, max_overflow=40)) + engine = create_engine('mysql://', pool=pool.QueuePool(getconn, pool_size=20, max_overflow=40)) * pool_size=5 : the number of connections to keep open inside the connection pool. This used with `QueuePool` as well as `SingletonThreadPool` as of 0.2.7. * max_overflow=10 : the number of connections to allow in "overflow", that is connections that can be opened above and beyond the initial five. this is only used with `QueuePool`. diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 24225bd6d3..e7dff0f0ff 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -12,7 +12,7 @@ import query as querylib import session as sessionlib import weakref -__all__ = ['Mapper', 'MapperExtension', 'class_mapper', 'object_mapper', 'SynonymProperty', 'EXT_PASS'] +__all__ = ['Mapper', 'MapperExtension', 'class_mapper', 'object_mapper', 'EXT_PASS'] # a dictionary mapping classes to their primary mappers mapper_registry = weakref.WeakKeyDictionary() @@ -1240,17 +1240,6 @@ class MapperProperty(object): at the class level. otherwise we have to set attribute behavior on a per-instance level.""" return self.inherits is None and self.parent._is_primary_mapper() -class SynonymProperty(MapperProperty): - """a marker object used by query.select_by to allow a property name to refer to another. - - this object may be expanded in the future.""" - def __init__(self, name): - self.name = name - def execute(self, session, instance, row, identitykey, imap, isnew): - pass - def copy(self): - return SynonymProperty(self.name) - class MapperOption(object): """describes a modification to a Mapper in the context of making a copy of it. This is used to assist in the prototype pattern used by mapper.options().""" diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index db497bc37f..a317435e8a 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -122,8 +122,6 @@ class Query(object): seen.add(mapper_) if mapper_.props.has_key(key): prop = mapper_.props[key] - if isinstance(prop, mapper.SynonymProperty): - prop = mapper_.props[prop.name] if isinstance(prop, properties.PropertyLoader): keys.insert(0, prop.key) return prop