[Interest] QML readTransaction tx.executeSql SELECT is returning rowsAffected=1
Jason H
jhihn at gmx.com
Fri Jun 10 19:12:09 CEST 2016
I *think* I'm on to something. It looks like Qt re-uses the rs object and just updates the fields as needed. What is also happening is the insert statement is: inserting '' values (0-length strings) , which Qt is converting to nulls.
sqlite> .nullvalue #
sqlite> select rowid, * from responses;
1|2016-06-10 17:00:01|post|#|login|#|#|0|#|server1 -- Qt
2|2016-06-10 17:03:38|post||login||||0|#|server1 -- SQLite shell
Row 1 is from Qt's insert, row 2 is from SQLite's shell. As you can see, the Qt one contains # (my null value) and the shell statement contains zero-length strings. I need a way to make sure Qt does not clobber the zero-length strings to nulls.
Also I've noticed that Qt will only insert nulls if it is `undefined`, and not just `null`.
More information about the Interest
mailing list