summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/sqlite.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2005-12-16 07:18:27 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2005-12-16 07:18:27 +0000
commit6cdba110a49b701e36f93d82e8772d1909385175 (patch)
treec1b96732b7e8241db9d5a2262676db140d9f7030 /lib/sqlalchemy/databases/sqlite.py
parent1f30247e22a4a3a14eb7f57261e289cc26e61bf3 (diff)
downloadsqlalchemy-6cdba110a49b701e36f93d82e8772d1909385175.tar.gz
factored "sequence" execution in postgres in oracle to be generalized to the SQLEngine, to also allow space for "defaults" that may be constants, python functions, or SQL functions/statements
Sequence schema object extends from a more generic "Default" object ANSICompiled can convert positinal params back to a dictionary, but the whole issue of parameters and how the engine executes compiled objects with parameters should be revisited mysql has fixes for its "rowid_column" being hidden else it screws up some query construction, also will not use AUTOINCREMENT unless the column is Integer
Diffstat (limited to 'lib/sqlalchemy/databases/sqlite.py')
-rw-r--r--lib/sqlalchemy/databases/sqlite.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py
index fc85d92ac..a70f65d2a 100644
--- a/lib/sqlalchemy/databases/sqlite.py
+++ b/lib/sqlalchemy/databases/sqlite.py
@@ -108,10 +108,10 @@ class SQLiteSQLEngine(ansisql.ANSISQLEngine):
params['poolclass'] = sqlalchemy.pool.SingletonThreadPool
ansisql.ANSISQLEngine.__init__(self, **params)
- def post_exec(self, connection, cursor, statement, parameters, echo = None, compiled = None, **kwargs):
+ def post_exec(self, proxy, statement, parameters, compiled = None, **kwargs):
if compiled is None: return
if getattr(compiled, "isinsert", False):
- self.context.last_inserted_ids = [cursor.lastrowid]
+ self.context.last_inserted_ids = [proxy().lastrowid]
def type_descriptor(self, typeobj):
return sqltypes.adapt_type(typeobj, colspecs)
@@ -230,3 +230,4 @@ class SQLiteSchemaGenerator(ansisql.ANSISchemaGenerator):
self.append("\n)\n\n")
self.execute()
+