From 6f60e768837f6b91a75dc2d62dbd215471bf09f7 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 24 Aug 2008 19:52:54 +0000 Subject: - The 'length' argument to all Numeric types has been renamed to 'scale'. 'length' is deprecated and is still accepted with a warning. [ticket:827] - The 'length' argument to MSInteger, MSBigInteger, MSTinyInteger, MSSmallInteger and MSYear has been renamed to 'display_width'. [ticket:827] - mysql._Numeric now consumes 'unsigned' and 'zerofill' from the given kw, so that the same kw can be passed along to Numeric and allow the 'length' deprecation logic to still take effect - added testlib.engines.all_dialects() to return a dialect for every db module - informix added to sqlalchemy.databases.__all__. Since other "experimental" dbs like access and sybase are there, informix should be as well. --- lib/sqlalchemy/databases/sybase.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/databases/sybase.py') diff --git a/lib/sqlalchemy/databases/sybase.py b/lib/sqlalchemy/databases/sybase.py index aea77f8bf..5c64ec1ae 100644 --- a/lib/sqlalchemy/databases/sybase.py +++ b/lib/sqlalchemy/databases/sybase.py @@ -168,18 +168,18 @@ class SybaseTypeError(sqltypes.TypeEngine): class SybaseNumeric(sqltypes.Numeric): def get_col_spec(self): - if self.length is None: + if self.scale is None: if self.precision is None: return "NUMERIC" else: return "NUMERIC(%(precision)s)" % {'precision' : self.precision} else: - return "NUMERIC(%(precision)s, %(length)s)" % {'precision': self.precision, 'length' : self.length} + return "NUMERIC(%(precision)s, %(scale)s)" % {'precision': self.precision, 'scale' : self.scale} class SybaseFloat(sqltypes.FLOAT, SybaseNumeric): - def __init__(self, precision = 10, asdecimal = False, length = 2, **kwargs): + def __init__(self, precision = 10, asdecimal = False, scale = 2, **kwargs): super(sqltypes.FLOAT, self).__init__(precision, asdecimal, **kwargs) - self.length = length + self.scale = scale def get_col_spec(self): # if asdecimal is True, handle same way as SybaseNumeric -- cgit v1.2.1