From 2a1098f831a0f9b3f9a01fa5cd2a46789b533a61 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 1 Dec 2005 05:19:10 +0000 Subject: [PATCH] table reflection will default to SLString. default filename added to be :memory:. --- lib/sqlalchemy/databases/sqlite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index de9acc17c1..1a00c555bc 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -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) -- 2.47.2