From 662bd40300e1f55a60cb5055293e96f7a50a78ea Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 26 Jun 2006 20:15:54 +0000 Subject: [PATCH] cursor() method on ConnectionFairy allows db-specific extension arguments to be propigated [ticket:221] --- CHANGES | 2 ++ lib/sqlalchemy/pool.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 62b8a0dedc..1f94c6eee7 100644 --- a/CHANGES +++ b/CHANGES @@ -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 0a5b5ca2a7..006328d7dc 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): -- 2.47.2