]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 25 Jul 2005 02:53:34 +0000 (02:53 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 25 Jul 2005 02:53:34 +0000 (02:53 +0000)
lib/sqlalchemy/engine.py

index bfa1e2535579ea4535152117c7ffca2d7689a36c..ff9a588b96e80b37ce6e4fb656b5c174c9a2e597 100644 (file)
@@ -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