From ab2b061c5e3a093e29229efa64c1cea88b26c4fa Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 25 Jul 2005 02:53:34 +0000 Subject: [PATCH] --- lib/sqlalchemy/engine.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py index bfa1e25355..ff9a588b96 100644 --- a/lib/sqlalchemy/engine.py +++ b/lib/sqlalchemy/engine.py @@ -68,6 +68,11 @@ class SQLEngine(schema.SchemaEngine): def columnimpl(self, column): return sql.ColumnSelectable(column) + def last_inserted_ids(self): + """returns a thread-local map of the generated primary keys corresponding to the most recent + insert statement. keys are the names of columns.""" + raise NotImplementedError() + def connect_args(self): raise NotImplementedError() @@ -126,12 +131,11 @@ class SQLEngine(schema.SchemaEngine): if connection is None: poolconn = self.connection() c = poolconn.cursor() - c.execute(statement, parameters) - return c else: c = connection.cursor() - c.execute(statement, parameters) - return c + + c.execute(statement, parameters) + return c def log(self, msg): print msg -- 2.47.2