Commit Graph

7 Commits

Author SHA1 Message Date
Marco Bubke
7785a3a651 Sqlite: Move result count to class declaration
It move the magic number of column results to the sql statement
and improves the mock a little bit.

Change-Id: I101067444cf27ec5dea0c72de7fd484a7e8710f0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-26 12:24:37 +00:00
Marco Bubke
06866c3ee9 Sqlite: Use a more efficient update hook
Change-Id: Ic6df1f4ba6b914c7751faf7cf89083fa50a92793
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-09 14:48:27 +00:00
Marco Bubke
22c33fb859 Sqlite: Improve LastChangedRowId
Change-Id: I2fe559d4b40f93561e44eb138119416291dc7d41
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:09:20 +00:00
Marco Bubke
64cbffe959 UnitTests: Fix LastChangedRowId
Change-Id: I538d068168488eee2662618dede598135c45e396
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:08:55 +00:00
Marco Bubke
55d1f6b46e Sqlite: Relax LastChangedRowId
Change-Id: Ibc4637ebafd4c0cdedfcea5c52da5025435bc4ab
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:11:02 +02:00
Marco Bubke
a86fd58e40 Sqlite: Improve LastChangedRowId
Sometimes we want not only the row id from one table but two or three.

Change-Id: I6d5444a71ecbfe6c1af8073be80b04932ea9268d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-14 09:14:35 +00:00
Marco Bubke
a4b00a7742 Sqlite: Add update hook and use it to get the last changed id
Sqlite has a function to get the last inserted rowid but very often you
want to get the updated rowid too.

Change-Id: Ie276a5039682813ad16597433996a2959f54d9ba
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-12 13:05:57 +00:00