[Sqlalchemy-tickets] [sqlalchemy] #2764: Make sqlite handle BIGINT
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-06-24 04:31:42
|
#2764: Make sqlite handle BIGINT
-------------------------+-----------------------------------------
Reporter: rstuart4133 | Owner: zzzeek
Type: enhancement | Status: new
Priority: low | Milestone:
Component: sqlite | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
-------------------------+-----------------------------------------
Consider this example:
{{{
Python 2.7.3 (default, Jan 2 2013, 13:56:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Debug helper loaded. Type "print(D.__doc__)" for help.
>>> import sqlalchemy as s
>>> c = s.create_engine("sqlite:///:memory:")
>>> c = s.create_engine("sqlite:///:memory:").connect()
>>> m = s.MetaData(bind=c)
>>> x = s.Table("x", m, s.Column("x", s.types.BIGINT, nullable=False))
>>> x.create()
>>> m1 = s.MetaData(bind=c)
>>> xx = s.Table('x', m1, autoload=True)
/usr/lib/python2.7/dist-packages/sqlalchemy/engine/reflection.py:47:
SAWarning: Did not recognize type 'BIGINT' of column 'x'
ret = fn(self, con, *args, **kw)
>>>
}}}
Sqlalchemy should be able to parse the metadata of tables it creates. The
warning message demonstrates it can't for BIGINT's. The attached patch
fixes it.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2764>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|