]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
table reflection will default to SLString. default filename added to be :memory:.
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Dec 2005 05:19:10 +0000 (05:19 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Dec 2005 05:19:10 +0000 (05:19 +0000)
lib/sqlalchemy/databases/sqlite.py

index de9acc17c13ca96d0051943288699490d507c8f0..1a00c555bc1a4153cd8414c97b0ac5c676556020 100644 (file)
@@ -98,7 +98,7 @@ def descriptor():
     
 class SQLiteSQLEngine(ansisql.ANSISQLEngine):
     def __init__(self, opts, **params):
-        self.filename = opts.pop('filename')
+        self.filename = opts.pop('filename', ':memory:')
         self.opts = opts or {}
         params['poolclass'] = sqlalchemy.pool.SingletonThreadPool
         ansisql.ANSISQLEngine.__init__(self, **params)
@@ -140,7 +140,7 @@ class SQLiteSQLEngine(ansisql.ANSISQLEngine):
             args = match.group(2)
             
             #print "coltype: " + repr(coltype) + " args: " + repr(args)
-            coltype = pragma_names[coltype]
+            coltype = pragma_names.get(coltype, SLString)
             if args is not None:
                 args = re.findall(r'(\d+)', args)
                 #print "args! " +repr(args)