In sqlite3 there is this table:
create table t(d double)
In python, the code is:
sqlite3.register_converter('double', Decimal)
...
for d, in connection.execute('select d from t limit 1'):
print type(d)
The printed result is: <type 'float'>
Any idea why?
connect to the database using the optional argument:
detect_types=sqlite3.PARSE_DECLTYPES
ie:
conn = sqlite3.connect('database.db', detect_types=sqlite3.PARSE_DECLTYPES)
then continue as you have. It should work.
see: