From: Mike Bayer Date: Thu, 1 Dec 2005 05:19:10 +0000 (+0000) Subject: table reflection will default to SLString. default filename added to be :memory:. X-Git-Tag: rel_0_1_0~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a1098f831a0f9b3f9a01fa5cd2a46789b533a61;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git table reflection will default to SLString. default filename added to be :memory:. --- 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)