You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the object has a prototype of anything other than Object.prototype or null, then it is considered some kind of class instance rather than a plain object. The error you're receiving is to prevent you from trying to bind types that don't exist in SQLite, such as Date, etc.
Turns out the field that was throwing the error was a boolean, which in my object is either true or false. I was under the impression (from the sqlite docs) that true would automatically equate to 1 and false to 0.
Ah yes, I didn't notice that you had booleans. This was was a conscious design choice so that inserting and selecting data from SQLite have a symmetrical interface. For example, we could convert booleans to 1 and 0, but then users might expect it to go the other way around too, which is impossible.
Help wanted please!
I have an array of objects, objects are in this form:
My statement:
I've attempted to even insert just one of the objects from the array
arr[0]
but are constantly getting this error :
TypeError: SQLite3 can only bind numbers, strings, bigints, buffers, and null
I can successfully insert just the values like -
So I'm not sure what is wrong with my object (or statement) that it's throwing the error.
The text was updated successfully, but these errors were encountered: