sqlite3 takes a peculiar approach to datatypes. There are four core datatypes: INTEGER, REAL, TEXT, BLOB. But you can define database fields however you like, and there's a sort of type-inferencing which goes on. On top of that, pysqlite2 employs adapters to convert to native Python datatypes, supplying two as default -- date & timestamp -- but allowing you to define your own.
What this means is that you can expect pretty much anything imaginable in the datatype section of a sqlite column definition. Just to stop my programs falling over because they use BIT or DATETIME fields, I've tweaked the sqlite.py code very slightly to fall back to the text type if it can't match against any other datatype. The next step might be to recognise a variety of common datatypes (eg BIT, DATETIME) and alias them to those already recognised. I'm happy to put that together. Goodness knows what the final solution would have to be, given that you can have absolutely any data-type, including user-defined ones. Patch attached against Subversion r664 TJG ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
sqlalchemy-datatype.patch
Description: sqlalchemy-datatype.patch

