]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 24 Sep 2005 05:24:58 +0000 (05:24 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 24 Sep 2005 05:24:58 +0000 (05:24 +0000)
lib/sqlalchemy/databases/sqlite.py

index 71866a5e1cc52ec3679c725999038b67c42c56cc..24494d8a08f13ce56fcdc658b9041d65fb267366 100644 (file)
@@ -104,8 +104,8 @@ class SQLiteSQLEngine(ansisql.ANSISQLEngine):
     def dbapi(self):
         return sqlite
 
-    def columnimpl(self, column):
-        return SQLiteColumnImpl(column)
+    def schemagenerator(self, proxy, **params):
+        return SQLiteSchemaGenerator(proxy, **params)
 
     def reflecttable(self, table):
         c = self.execute("PRAGMA table_info(" + table.name + ")", {})
@@ -141,13 +141,14 @@ class SQLiteCompiler(ansisql.ANSICompiler):
     pass
 
 
-class SQLiteColumnImpl(sql.ColumnSelectable):
-    def get_specification(self):
-        colspec = self.name + " " + self.column.type.get_col_spec()
-        if not self.column.nullable:
+class SQLiteSchemaGenerator(ansisql.ANSISchemaGenerator):
+    def get_column_specification(self, column):
+        colspec = column.name + " " + column.column.type.get_col_spec()
+        if not column.column.nullable:
             colspec += " NOT NULL"
-        if self.column.primary_key:
+        if column.column.primary_key:
             colspec += " PRIMARY KEY"
-        if self.column.foreign_key:
-            colspec += " REFERENCES %s(%s)" % (self.column.foreign_key.column.table.name, self.column.foreign_key.column.name) 
+        if column.column.foreign_key:
+            colspec += " REFERENCES %s(%s)" % (column.column.foreign_key.column.table.name, column.column.foreign_key.column.name) 
         return colspec
+