diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-05-30 20:24:08 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-05-30 20:24:08 -0400 |
| commit | 9bab63b69341bf9d89a30de2f624644b55afc6e9 (patch) | |
| tree | b1c0a4956a743ba208a0c2cf506b9fcc634ac82d /lib/sqlalchemy/pool.py | |
| parent | a19e403010804ad25260a96e5f38e0894c1d72af (diff) | |
| download | sqlalchemy-9bab63b69341bf9d89a30de2f624644b55afc6e9.tar.gz | |
- Pool classes will reuse the same "pool_logging_name" setting
after a dispose() occurs.
- Engine gains an "execution_options" argument and
update_execution_options() method, which will apply to
all connections generated by this engine.
- Added more aggressive caching to the mapper's usage of
UPDATE, INSERT, and DELETE expressions. Assuming the
statement has no per-object SQL expressions attached,
the expression objects are cached by the mapper after
the first create, and their compiled form is stored
persistently in a cache dictionary for the duration of
the related Engine.
- change #3 required change #1 so that we could test
a set of mappers operating over the course of many engines without
memory usage increase.
Diffstat (limited to 'lib/sqlalchemy/pool.py')
| -rw-r--r-- | lib/sqlalchemy/pool.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py index ef1323892..a802668a1 100644 --- a/lib/sqlalchemy/pool.py +++ b/lib/sqlalchemy/pool.py @@ -109,7 +109,10 @@ class Pool(log.Identified): """ if logging_name: - self.logging_name = logging_name + self.logging_name = self._orig_logging_name = logging_name + else: + self._orig_logging_name = None + self.logger = log.instance_logger(self, echoflag=echo) self._threadconns = threading.local() self._creator = creator @@ -498,6 +501,7 @@ class SingletonThreadPool(Pool): pool_size=self.size, recycle=self._recycle, echo=self.echo, + logging_name=self._orig_logging_name, use_threadlocal=self._use_threadlocal, listeners=self.listeners) @@ -624,6 +628,7 @@ class QueuePool(Pool): return QueuePool(self._creator, pool_size=self._pool.maxsize, max_overflow=self._max_overflow, timeout=self._timeout, recycle=self._recycle, echo=self.echo, + logging_name=self._orig_logging_name, use_threadlocal=self._use_threadlocal, listeners=self.listeners) def do_return_conn(self, conn): @@ -730,6 +735,7 @@ class NullPool(Pool): return NullPool(self._creator, recycle=self._recycle, echo=self.echo, + logging_name=self._orig_logging_name, use_threadlocal=self._use_threadlocal, listeners=self.listeners) @@ -770,6 +776,7 @@ class StaticPool(Pool): use_threadlocal=self._use_threadlocal, reset_on_return=self._reset_on_return, echo=self.echo, + logging_name=self._orig_logging_name, listeners=self.listeners) def create_connection(self): @@ -819,6 +826,7 @@ class AssertionPool(Pool): def recreate(self): self.logger.info("Pool recreating") return AssertionPool(self._creator, echo=self.echo, + logging_name=self._orig_logging_name, listeners=self.listeners) def do_get(self): |
