forked from qt-creator/qt-creator
Sqlite: Improve transaction by inversion of control
Using a callable makes it possible to omit the commit call. It is now called by the withDeferredTransaction and withImmediateTransaction function. Change-Id: I9b7bfa7e32f269fe8fcba2fe5e1218e73f5846d1 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
SqliteReadStatementMockBase::SqliteReadStatementMockBase(Utils::SmallStringView sqlStatement,
|
||||
SqliteDatabaseMock &databaseMock)
|
||||
: sqlStatement(sqlStatement)
|
||||
, databaseMock(databaseMock)
|
||||
{
|
||||
databaseMock.prepare(sqlStatement);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user