MonetDBLite-Python icon indicating copy to clipboard operation
MonetDBLite-Python copied to clipboard

SQL Decimal type does not work correctly

Open kutsurak opened this issue 6 years ago • 0 comments

Querying inserted decimals does not return correct results. The problem is probably in insert.

>>> import monetdblite as mdbl
>>> c = mdbl.make_connection('/tmp/tstdb')
>>> c.set_autocommit(True)
>>> cc = c.cursor()
>>> cc.execute("CREATE TABLE v (f decimal(3,2))")
0
>>> cc.insert('v', {'f': [1.3]})
>>> cc.execute('select * from v')
1
>>> cc.fetchall()
[[0.01]]

The result should be [[1.3]].

kutsurak avatar May 20 '19 16:05 kutsurak