diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-15 12:44:37 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-15 12:44:37 -0500 |
| commit | 5a832a49e37ca9259fbad286335367927d0ec60e (patch) | |
| tree | 2654979a0c3fdb048588850276e827d93df450e5 /lib/sqlalchemy/dialects/mysql/base.py | |
| parent | bff2f6f3fbb0450cb9d0d09a25845a437c3df85e (diff) | |
| download | sqlalchemy-5a832a49e37ca9259fbad286335367927d0ec60e.tar.gz | |
- an approach I like better, remove most adapt() methods and use a generic
copier
- mssql reflection fix, but this will come in again from the tip merge
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 5c3289bfb..528e94965 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -233,17 +233,11 @@ SET_RE = re.compile( class _NumericType(object): """Base for MySQL numeric types.""" - def __init__(self, **kw): - self.unsigned = kw.pop('unsigned', False) - self.zerofill = kw.pop('zerofill', False) + def __init__(self, unsigned=False, zerofill=False, **kw): + self.unsigned = unsigned + self.zerofill = zerofill super(_NumericType, self).__init__(**kw) - def adapt(self, typeimpl, **kw): - return super(_NumericType, self).adapt( - typeimpl, - unsigned=self.unsigned, - zerofill=self.zerofill) - class _FloatType(_NumericType, sqltypes.Float): def __init__(self, precision=None, scale=None, asdecimal=True, **kw): if isinstance(self, (REAL, DOUBLE)) and \ @@ -263,11 +257,6 @@ class _IntegerType(_NumericType, sqltypes.Integer): self.display_width = display_width super(_IntegerType, self).__init__(**kw) - def adapt(self, typeimpl, **kw): - return super(_IntegerType, self).adapt( - typeimpl, - display_width=self.display_width) - class _StringType(sqltypes.String): """Base for MySQL string types.""" @@ -288,17 +277,6 @@ class _StringType(sqltypes.String): self.national = national super(_StringType, self).__init__(**kw) - def adapt(self, typeimpl, **kw): - return super(_StringType, self).adapt( - typeimpl, - charset=self.charset, - collation=self.collation, - ascii=self.ascii, - binary=self.binary, - national=self.national, - **kw - ) - def __repr__(self): attributes = inspect.getargspec(self.__init__)[0][1:] attributes.extend(inspect.getargspec(_StringType.__init__)[0][1:]) |
