diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-19 23:02:45 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-19 23:02:45 +0000 |
commit | 9cccdfb0fdd54e4a254842e0f68cd41a33912776 (patch) | |
tree | 9e669d4f04f2d2bca531ce016f62ee2d88ec68ab /lib/sqlalchemy/databases/sqlite.py | |
parent | 16ef52392c55341ae94edfca5e4feafe216844a4 (diff) | |
download | sqlalchemy-9cccdfb0fdd54e4a254842e0f68cd41a33912776.tar.gz |
removed the "create_execution_context()" method from dialects and replaced
with a more succinct "dialect.execution_ctx_cls" member
Diffstat (limited to 'lib/sqlalchemy/databases/sqlite.py')
-rw-r--r-- | lib/sqlalchemy/databases/sqlite.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 4226baf5a..6eabca1a9 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -407,9 +407,6 @@ class SQLiteDialect(default.DefaultDialect): def type_descriptor(self, typeobj): return sqltypes.adapt_type(typeobj, colspecs) - def create_execution_context(self, connection, **kwargs): - return SQLiteExecutionContext(self, connection, **kwargs) - def is_disconnect(self, e): return isinstance(e, self.dbapi.ProgrammingError) and "Cannot operate on a closed database." in str(e) @@ -590,19 +587,6 @@ class SQLiteSchemaGenerator(compiler.SchemaGenerator): colspec += " NOT NULL" return colspec - # this doesnt seem to be needed, although i suspect older versions of sqlite might still - # not directly support composite primary keys - #def visit_primary_key_constraint(self, constraint): - # if len(constraint) > 1: - # self.append(", \n") - # # put all PRIMARY KEYS in a UNIQUE index - # self.append("\tUNIQUE (%s)" % string.join([c.name for c in constraint],', ')) - # else: - # super(SQLiteSchemaGenerator, self).visit_primary_key_constraint(constraint) - -class SQLiteSchemaDropper(compiler.SchemaDropper): - pass - class SQLiteIdentifierPreparer(compiler.IdentifierPreparer): reserved_words = set([ 'add', 'after', 'all', 'alter', 'analyze', 'and', 'as', 'asc', @@ -631,5 +615,5 @@ dialect = SQLiteDialect dialect.poolclass = pool.SingletonThreadPool dialect.statement_compiler = SQLiteCompiler dialect.schemagenerator = SQLiteSchemaGenerator -dialect.schemadropper = SQLiteSchemaDropper dialect.preparer = SQLiteIdentifierPreparer +dialect.execution_ctx_cls = SQLiteExecutionContext
\ No newline at end of file |