Contact: fumanchu@aminus.org

Log in as guest/geniusql to create tickets

Changeset 286

Show
Ignore:
Timestamp:
01/06/10 18:38:58
Author:
lakin
Message:

Fumanchu says he's fine with this patch - although trying to introspect things in sqlite3 is somewhat dangerous as date types could be stored as strings, text or real.

Files:

Legend:

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

    r278 r286  
    201201    #   in the current implementation." 
    202202    _bytes = max_bytes = 2 ** 30 
    203     synonyms = ['NUMERIC', 'VARCHAR', 'CHAR', 'DATETIME', 'DATE', 'TIME', 'DECIMAL'] 
     203    synonyms = ['NUMERIC', 'VARCHAR', 'CHAR', 'DECIMAL'] 
    204204     
    205205    default_adapters = dbtypes.TEXT.default_adapters.copy() 
     
    211211                             None: SQLite_Pickler(), 
    212212                             }) 
     213 
     214class DATETIME(dbtypes.SQL92TIMESTAMP): 
     215    """ 
     216    A date and time. 
     217    """ 
     218 
     219class DATE(dbtypes.SQL92DATE): 
     220    """A calendar date (year, month, day).""" 
     221 
     222class TIME(dbtypes.SQL92TIME): 
     223    """A time of day.""" 
     224    pass 
    213225 
    214226 
     
    265277        'varchar': [TEXT], 
    266278        'bool': [INTEGER], 
    267         'datetime': [TEXT], 
    268         'date': [TEXT], 
    269         'time': [TEXT], 
     279        'datetime': [DATETIME], 
     280        'date': [DATE], 
     281        'time': [TIME], 
    270282        'timedelta': [], 
    271283        'other': [],