Sqlite: Add callback method

Sometimes it is better to have a callback instead of returning a container.
The call has to manage the state if an exception is called but otherwise
it will reduce the memory footprint. There will be to a RETURNING
to Sqlite which will read back values as you write.

Change-Id: I7eb49850e2c76f883a03277b31c5e713e9774c92
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2021-02-10 15:25:00 +01:00
parent 2197eeb4aa
commit 18fe4233f8
6 changed files with 126 additions and 3 deletions

View File

@@ -34,9 +34,10 @@ class SQLITE_EXPORT ReadStatement final : protected StatementImplementation<Base
public:
explicit ReadStatement(Utils::SmallStringView sqlStatement, Database &database);
using StatementImplementation::readCallback;
using StatementImplementation::toValue;
using StatementImplementation::value;
using StatementImplementation::values;
using StatementImplementation::toValue;
protected:
void checkIsReadOnlyStatement();