Closed forgotPassword closed 4 months ago
Well, it seems BindValueFromJS
checks if the value is number/string and calls sqlite3_bind_double/sqlite3_bind_text. I guess if want to avoid ambiguity can call parseInt first.
alternatively you can trust sqlite to do the correct thing, and check with select typeof(column)..
to see how the value was saved.
Hello,
I have a DB column set as INTEGER, and my Javascript data is (validated) integers as strings. Should I parseInt(str) beforehand? Does it matter to
better-sqlite3
? What is the proper/performant way? Thanks!