The BindParameterCount is checked at compile time and then again for
the construction of the statement. So we provide an early error instead of
an some error later or even stranger behavior.
Change-Id: I860ca1f78645c222ae1accf5c7a469c77befc3bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Sometimes it is really hard to trace if sqlite statement is called
outside of a database connection lock. So we know throw an exception
in the unit test. So we get failing tests.
Change-Id: I71485b9473075751a2fb771ce7e2954e28d8413e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Sometimes it is handy to return a range so you can break in a for range
loop. So you can now write:
for (auto [key, value] :
statement.range<std::tuple<long long, std::string>>()) {
values.push_back(value);
if (value == Tuple{"foo", 23.3, 2})
break;
}
for (auto [key, value] :
statement.rangeWithTransaction<std::tuple<long long, std::string>>()) {
values.push_back(value);
if (value == Tuple{"foo", 23.3, 2})
break;
}
It will only step over the statement to the break. So you don't fetch
not used values anymore. The second version will add a transaction
around the range.
But be careful. The range is view to the statement. Holding it longer or
reusing it can lead to strange behavior because the state of the
statement is changing.
Change-Id: I90191f7da5a015c7d8077d5bc428655a2b53246c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
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>
The image cache is saving images and icon of this images in a sqlite
database. If there are no images they are generated in the backgound.
The icons are fetched by item library.
Task-number: QDS-2782
Task-number: QDS-2783
Task-number: QDS-2858
Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>