diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-01-01 21:08:22 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-01-01 21:08:22 +0000 |
commit | 705f308452b0741747c27ee4edcd75f2ec0e6ae8 (patch) | |
tree | 9f23719ca0098f8d5a933aefc86a8abe32509f80 /lib/sqlalchemy/engine.py | |
parent | 943bb0b0e08fec9bc0ccc784a4dd154783031e8d (diff) | |
download | sqlalchemy-705f308452b0741747c27ee4edcd75f2ec0e6ae8.tar.gz |
rowid_column becomes more like the "order by column". 'default_ordering' flag sent to create_engine enables whether or not the rowid_column on a Table will be None or not. mappers/relations will by default use the rowid_column for ordering if its not None, else theres no default ordering.
still should better define 'default_ordering'/'rowid_column' relationship since its a little kludgy.
Diffstat (limited to 'lib/sqlalchemy/engine.py')
-rw-r--r-- | lib/sqlalchemy/engine.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py index f3cc8efad..68cf08931 100644 --- a/lib/sqlalchemy/engine.py +++ b/lib/sqlalchemy/engine.py @@ -161,7 +161,7 @@ class SQLEngine(schema.SchemaEngine): SQLEngines are constructed via the create_engine() function inside this package. """ - def __init__(self, pool = None, echo = False, logger = None, **params): + def __init__(self, pool=None, echo=False, logger=None, default_ordering=False, **params): """constructs a new SQLEngine. SQLEngines should be constructed via the create_engine() function which will construct the appropriate subclass of SQLEngine.""" # get a handle on the connection pool via the connect arguments @@ -172,6 +172,7 @@ class SQLEngine(schema.SchemaEngine): self._pool = sqlalchemy.pool.manage(self.dbapi(), **params).get_pool(*cargs, **cparams) else: self._pool = pool + self.default_ordering=default_ordering self.echo = echo self.context = util.ThreadLocal(raiseerror=False) self.tables = {} @@ -258,7 +259,7 @@ class SQLEngine(schema.SchemaEngine): raise NotImplementedError() def rowid_column_name(self): - """returns the ROWID column name for this engine.""" + """returns the ROWID column name for this engine, or None if the engine cant/wont support OID/ROWID.""" return "oid" def supports_sane_rowcount(self): |