Float doesh't take length as argument, but does checks in mysql.py

Issue #484 resolved
Former user created an issue

class MSFloat(sqltypes.Float): def init(self, precision=10, length=None, **kw): if length is not None: self.length=length self.unsigned = 'unsigned' in kw self.zerofill = 'zerofill' in kw

.. however, in types.py, Float() type wont take a length variable. Only precision is taken, thus there seems to be no way to send a length argument in.

Should be a trivial fix.

thanks.

-- Ram Yalamanchili

Comments (2)

  1. Mike Bayer repo owner

    why not use MSFloat directly (or better yet, go platform-independent and just use Numeric)? the MySQL types have tons of extra bells and whistles that are not part of the SQL standard (they were contributed by a user some months ago). id rather not pollute the base types with all of MySQL's non-standard options. for example, "float(x, y)" throws an error on postgres, because they follow the sql standard.

    http://www.postgresql.org/docs/8.1/interactive/datatype.html#DATATYPE-FLOAT

  2. Log in to comment