[Interest] LocalStorage inserting NULLs

Jason H jhihn at gmx.com
Thu May 12 16:27:19 CEST 2016


I'm not sure if this is a Qt thing, a LocalStorage thing, or what.

But I realized that anytime I submit a null ( tx.executeSql("INSERT INTO table (val) VALUES(?)", [null]) ) what I actually get in the database is "". This is confirmed by "SELECT val, typeof(val) FROM table", which retuns "||text". I expected it to be "||null". It seems I only get nulls when I submit 'undefined'. 

Is this the database driver squashing nulls to "", or is it me "doing it wrong(tm)". I've used JS PostgreSQL divers that inserted null when I gave it null.
 




More information about the Interest mailing list