From: Mike Bayer Date: Mon, 25 Jul 2005 02:53:34 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~847 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab2b061c5e3a093e29229efa64c1cea88b26c4fa;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- 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