From 7f360074771ec455ae0eb3242e2945d7850398df Mon Sep 17 00:00:00 2001 From: Roger Demetrescu Date: Fri, 12 Oct 2007 12:53:33 +0000 Subject: firebird: Fixed reflection for Integer and Numeric (after introducing Float column type). Need to review 'column_func' from reflecttable() and write some unit tests... --- lib/sqlalchemy/databases/firebird.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/databases/firebird.py') diff --git a/lib/sqlalchemy/databases/firebird.py b/lib/sqlalchemy/databases/firebird.py index a427c7220..71c2d3df0 100644 --- a/lib/sqlalchemy/databases/firebird.py +++ b/lib/sqlalchemy/databases/firebird.py @@ -223,7 +223,7 @@ class FBDialect(default.DefaultDialect): column_func = { 14 : lambda r: sqltypes.String(r['FLEN']), # TEXT 7 : lambda r: sqltypes.Integer(), # SHORT - 8 : lambda r: sqltypes.Integer(), # LONG + 8 : lambda r: r['FPREC']==0 and sqltypes.Integer() or sqltypes.Numeric(precision=r['FPREC'], length=r['FSCALE'] * -1), #INT or NUMERIC 9 : lambda r: sqltypes.Float(), # QUAD 10 : lambda r: sqltypes.Float(), # FLOAT 27 : lambda r: sqltypes.Float(), # DOUBLE -- cgit v1.2.1