Contact: fumanchu@aminus.org

Log in as guest/geniusql to create tickets

Changeset 164

Show
Ignore:
Timestamp:
09/10/07 23:06:22
Author:
fumanchu
Message:

Some MySQL 5.0.3+ fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/geniusql/providers/mysql.py

    r163 r164  
    147147class DECIMAL503(DECIMAL): 
    148148    max_precision = 64 
     149    synonyms = ['DECIMAL', 'DEC', 'NUMERIC'] 
     150     
     151    def ddl(self): 
     152        """Return the type for use in CREATE or ALTER statements.""" 
     153        return "DECIMAL(%s)" % self.precision 
    149154 
    150155class DECIMAL505(DECIMAL): 
    151156    max_precision = 65 
     157    synonyms = ['DECIMAL', 'DEC', 'NUMERIC'] 
     158     
     159    def ddl(self): 
     160        """Return the type for use in CREATE or ALTER statements.""" 
     161        return "DECIMAL(%s)" % self.precision 
    152162 
    153163 
     
    194204    # of 65,532 bytes." 
    195205    max_bytes = 65535 
     206    synonyms = ['VARCHAR'] 
     207     
     208    def ddl(self): 
     209        """Return the type for use in CREATE or ALTER statements.""" 
     210        return "VARCHAR(%s)" % self.bytes 
    196211 
    197212 
     
    211226    # of 65,532 bytes." 
    212227    max_bytes = 65535 
     228    synonyms = ['VARBINARY'] 
     229     
     230    def ddl(self): 
     231        """Return the type for use in CREATE or ALTER statements.""" 
     232        return "VARBINARY(%s)" % self.bytes 
    213233 
    214234