mysql reflection misses double type
Issue #106
resolved
MySQL supports double datatype. While performing reflection, it is recognized as MSString (default) which is obviously wrong.
Comments (4)
-
Account Deleted -
Account Deleted I'm not sure how this
Numeric
type without precision is going to work in other parts of the library (or on different engines if this is possible to happen). Do we need another base type? -
Account Deleted I also found lack of support for
tinyint
. To enable it add:'tinyint' : MSSmallInteger,
into
ischema_names
dict. -
repo owner - changed status to resolved
thanks for the patch...committed in changeset:1124
- Log in to comment
I choose
sqltypes.Numeric
as base type forMSDouble
but it doesn't seem perfectly right. I could be wrong, but I assumed thatNumeric
is supposed to be "exact" fixed-point number. If this is not the case thanNumeric
is good base.MySQL manual says that
DOUBLE
has the following syntax:It can be created without any precision, so I tweaked
__init__
a little bit. It containsraise
statement, with most likely the wrong exception type. We should probably raise something different.This patch also contains a fix for
FLOAT
datatype which in MySQL doesn't have precision. To quote mysql manual:So, if we got
FLOAT
from "DESCRIBE tablename" it means justFLOAT
notFLOAT(10)
. ThisFLOAT(10)
could actally mean something different to some other database.