Open feanil opened 2 years ago
@pudo any thoughts on this? I bump into this pretty much every time I use your beloved library (thanks!).
NB: to those looking for a workaround, this is what I currently do:
table.insert({"a": [{'begin': '20230321T151700', 'end': '20230321T161800'}]}, types={"a": db.types.json})
It forces the a
column to be recognised as json
.
Before this change, if you had a list of data, it would be inferred as text type. Then when we try to insert data, we would get the following error:
sqlite3.InterfaceError: Error binding parameter 4 - probably unsupported type.
Handling lists as JSON type resolves this error.