diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-06-26 20:15:54 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-06-26 20:15:54 +0000 |
commit | 662bd40300e1f55a60cb5055293e96f7a50a78ea (patch) | |
tree | a9fecc42a954dd0c4be8d7b57f3b3ddaa5022279 | |
parent | a635e96b6cd529ed44899b860065f446dcb2722c (diff) | |
download | sqlalchemy-662bd40300e1f55a60cb5055293e96f7a50a78ea.tar.gz |
cursor() method on ConnectionFairy allows db-specific extension
arguments to be propigated [ticket:221]
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/pool.py | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -28,6 +28,8 @@ then returns its connection to the Queue via the the put() method, causing a reentrant hang unless threading.RLock is used. - postgres will not place SERIAL keyword on a primary key column if it has a foreign key constraint +- cursor() method on ConnectionFairy allows db-specific extension +arguments to be propigated [ticket:221] 0.2.3 - overhaul to mapper compilation to be deferred. this allows mappers diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py index 0a5b5ca2a..006328d7d 100644 --- a/lib/sqlalchemy/pool.py +++ b/lib/sqlalchemy/pool.py @@ -141,8 +141,8 @@ class ConnectionFairy(object): self.connection.rollback() self.connection = None self.pool.return_invalid() - def cursor(self): - return CursorFairy(self, self.connection.cursor()) + def cursor(self, *args, **kwargs): + return CursorFairy(self, self.connection.cursor(*args, **kwargs)) def __getattr__(self, key): return getattr(self.connection, key) def checkout(self): |