Sqlite: Extend database

lastInsertedRowId() function was added and more test are now under test.

Change-Id: I02bf11dbab29654dbff9f2cad8c13c0c4d15e3be
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2017-09-21 11:33:26 +02:00
parent fc231309e8
commit 816a9175be
5 changed files with 59 additions and 21 deletions

View File

@@ -73,13 +73,25 @@ public:
void setOpenMode(OpenMode openMode);
OpenMode openMode() const;
int changesCount();
int totalChangesCount();
void execute(Utils::SmallStringView sqlStatement);
DatabaseBackend &backend();
int64_t lastInsertedRowId() const
{
return m_databaseBackend.lastInsertedRowId();
}
int changesCount()
{
return m_databaseBackend.changesCount();
}
int totalChangesCount()
{
return m_databaseBackend.totalChangesCount();
}
private:
void initializeTables();
std::mutex &databaseMutex() { return m_databaseMutex; }