From 180d3741997c1471b9199334d6076e45cd581d62 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 17 Oct 2006 02:03:00 +0000 Subject: reorganizing classnames a bit, flagging "private" classes in the sql package, getting the generated docs to look a little nicer. fixes to extensions, sqlsoup etc. to be compatible with recent API tweaks --- lib/sqlalchemy/engine/base.py | 6 +++--- lib/sqlalchemy/engine/strategies.py | 4 ++-- lib/sqlalchemy/engine/threadlocal.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 1af957f74..e348b19ee 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -383,8 +383,8 @@ class Transaction(object): if self.__parent is self: self.__connection._commit_impl() self.__is_active = False - -class ComposedSQLEngine(sql.Engine, Connectable): + +class Engine(sql.Executor, Connectable): """ Connects a ConnectionProvider, a Dialect and a CompilerFactory together to provide a default implementation of SchemaEngine. @@ -415,7 +415,7 @@ class ComposedSQLEngine(sql.Engine, Connectable): connection.close() def _func(self): - return sql.FunctionGenerator(self) + return sql._FunctionGenerator(self) func = property(_func) def text(self, text, *args, **kwargs): """returns a sql.text() object for performing literal queries.""" diff --git a/lib/sqlalchemy/engine/strategies.py b/lib/sqlalchemy/engine/strategies.py index e401591b2..fe30aeb8d 100644 --- a/lib/sqlalchemy/engine/strategies.py +++ b/lib/sqlalchemy/engine/strategies.py @@ -11,7 +11,7 @@ strategies = {} class EngineStrategy(object): """defines a function that receives input arguments and produces an instance of sql.Engine, typically - an instance sqlalchemy.engine.base.ComposedSQLEngine or a subclass.""" + an instance sqlalchemy.engine.base.Engine or a subclass.""" def __init__(self, name): """construct a new EngineStrategy object and sets it in the list of available strategies under this name.""" @@ -55,7 +55,7 @@ class PlainEngineStrategy(DefaultEngineStrategy): def get_pool_provider(self, dialect, url, **poolargs): return default.PoolConnectionProvider(dialect, url, **poolargs) def get_engine(self, provider, dialect, **kwargs): - return base.ComposedSQLEngine(provider, dialect, **kwargs) + return base.Engine(provider, dialect, **kwargs) PlainEngineStrategy() class ThreadLocalEngineStrategy(DefaultEngineStrategy): diff --git a/lib/sqlalchemy/engine/threadlocal.py b/lib/sqlalchemy/engine/threadlocal.py index d86828716..a04e8edbe 100644 --- a/lib/sqlalchemy/engine/threadlocal.py +++ b/lib/sqlalchemy/engine/threadlocal.py @@ -83,14 +83,14 @@ class TLTransaction(base.Transaction): def rollback(self): self.connection.session.rollback() -class TLEngine(base.ComposedSQLEngine): - """a ComposedSQLEngine that includes support for thread-local managed transactions. This engine +class TLEngine(base.Engine): + """an Engine that includes support for thread-local managed transactions. This engine is better suited to be used with threadlocal Pool object.""" def __init__(self, *args, **kwargs): """the TLEngine relies upon the ConnectionProvider having "threadlocal" behavior, so that once a connection is checked out for the current thread, you get that same connection repeatedly.""" - base.ComposedSQLEngine.__init__(self, *args, **kwargs) + super(TLEngine, self).__init__(*args, **kwargs) self.context = util.ThreadLocal() def raw_connection(self): """returns a DBAPI connection.""" -- cgit v1.2.1