summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-09-07 17:58:47 +0000
committerJason Kirtland <jek@discorporate.us>2007-09-07 17:58:47 +0000
commit07181033700fd1e52efc017a0dd9c45eb23e95d7 (patch)
tree4318a6e4bd6b742a7694b777dcb6770890db623d /lib/sqlalchemy/databases/mysql.py
parent64b0267d280f8990f0551f7308e954427f1de625 (diff)
downloadsqlalchemy-07181033700fd1e52efc017a0dd9c45eb23e95d7.tar.gz
Fixed repr() of mysql floats [ticket:775]
Added repr testing to mysql dialect
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 8bbe8b683..9eba2abdb 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -403,16 +403,15 @@ class MSFloat(sqltypes.Float, _NumericType):
underlying database API, which continue to be numeric.
"""
- if length is not None:
- self.length=length
+ self.length = length
_NumericType.__init__(self, **kw)
sqltypes.Float.__init__(self, precision, asdecimal=asdecimal)
def get_col_spec(self):
if hasattr(self, 'length') and self.length is not None:
- return self._extend("FLOAT(%(precision)s, %(length)s)" % {'precision': self.precision, 'length' : self.length})
+ return self._extend("FLOAT(%s, %s)" % (self.precision, self.length))
elif self.precision is not None:
- return self._extend("FLOAT(%(precision)s)" % {'precision': self.precision})
+ return self._extend("FLOAT(%s)" % (self.precision,))
else:
return self._extend("FLOAT")