summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-11-18 20:44:20 +0000
committerJason Kirtland <jek@discorporate.us>2007-11-18 20:44:20 +0000
commitf96a514f4321782dee41c3a4f6f6c43e4d9c12e0 (patch)
tree90f91d530114eca1c34e8798c3078321e3335587 /lib/sqlalchemy/databases/mysql.py
parentd3f6ae2332a546967469eb2953a080537dff68c6 (diff)
downloadsqlalchemy-f96a514f4321782dee41c3a4f6f6c43e4d9c12e0.tar.gz
Tests for mysql casts and a couple adjustments.
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 441c099a2..39bfc0bea 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -565,7 +565,7 @@ class MSTinyInteger(MSInteger):
return self._extend("TINYINT")
-class MSSmallInteger(sqltypes.Smallinteger, _NumericType):
+class MSSmallInteger(sqltypes.Smallinteger, MSInteger):
"""MySQL SMALLINTEGER type."""
def __init__(self, length=None, **kw):
@@ -585,7 +585,7 @@ class MSSmallInteger(sqltypes.Smallinteger, _NumericType):
self.length = length
_NumericType.__init__(self, **kw)
- sqltypes.Smallinteger.__init__(self, length)
+ sqltypes.SmallInteger.__init__(self, length)
def get_col_spec(self):
if self.length is not None:
@@ -1846,12 +1846,12 @@ class MySQLCompiler(compiler.DefaultCompiler):
return 'UNSIGNED INTEGER'
else:
return 'SIGNED INTEGER'
- elif isinstance(type_, (MSChar, MSDecimal, MSDateTime,
- MSDate, MSTime)):
+ elif isinstance(type_, (MSDecimal, MSDateTime, MSDate, MSTime)):
return type_.get_col_spec()
- elif isinstance(type_, (MSText, MSNChar, MSNVarChar)):
+ elif isinstance(type_, MSText):
return 'CHAR'
- elif type(type_) is MSString:
+ elif (isinstance(type_, _StringType) and not
+ isinstance(type_, (MSEnum, MSSet))):
if getattr(type_, 'length'):
return 'CHAR(%s)' % type_.length
else: