From 6cdba110a49b701e36f93d82e8772d1909385175 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 16 Dec 2005 07:18:27 +0000 Subject: 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 --- lib/sqlalchemy/databases/sqlite.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/databases/sqlite.py') 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() + -- cgit v1.2.1