On 8/4/06, Mario Frasca <[EMAIL PROTECTED]> wrote:
nice. if I was just working inside of SQL and was only interested in printing the values, it would probably be fine. my problem is that I'm co-author of a python library (http://ibo.sourceforge.net) on top of various db-api2 interface libraries to three or four db engines (four, if I can include sqlite). one of the problems consists in writing and retrieving datetime data to the database. the dynamic typing of sqlite is not a problem, actually it fits quite good with the strong dynamic typing system of Python... but then, when I write to just any field a value which is a date, I would like to get back a value which is a date, not a string or a floating point number. the same goes for a datetime and a timedelta, which are each a separate type in python...
You need to get the column declared type and convert it to the type you want based on that.
would it be difficult, or simply impossible, to implement these types in sqlite?
I think the question here is if the developpers want to do it. It wasn't pacific the inclusion of datetime support in sqlite, so adding one more type it's probably a litle more difficult (remember sqlite is an embeded SQL engine, which aims for a small size and low memory footprint). You can always add a ticket for it, as a new feature, and see how it goes ;-) Regards, ~Nuno Lucas