Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle list type as JSON. #392

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

feanil
Copy link

@feanil feanil commented Jan 19, 2022

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.

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.
@abulte
Copy link

abulte commented Mar 22, 2023

@pudo any thoughts on this? I bump into this pretty much every time I use your beloved library (thanks!).

@abulte
Copy link

abulte commented Mar 22, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants