forked from qt-creator/qt-creator
Sqlite: Cleanup Sqlite
We don't need the threading anymore, so we removed it. The indexer will be run in its thread anyway, so an extra thread makes the code only more complicated. And we added namespaces. Change-Id: Ibcba306324763285cf653c28bb08122345e5f8da Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -40,12 +40,14 @@
|
||||
struct sqlite3_stmt;
|
||||
struct sqlite3;
|
||||
|
||||
namespace Sqlite {
|
||||
|
||||
class SQLITE_EXPORT SqliteStatement
|
||||
{
|
||||
protected:
|
||||
explicit SqliteStatement(const Utf8String &sqlStatementUtf8);
|
||||
|
||||
static void deleteCompiledStatement(sqlite3_stmt *compiledStatement);
|
||||
static void deleteCompiledStatement(sqlite3_stmt *m_compiledStatement);
|
||||
|
||||
bool next() const;
|
||||
void step() const;
|
||||
@@ -120,9 +122,11 @@ protected:
|
||||
QString columnName(int column) const;
|
||||
|
||||
private:
|
||||
std::unique_ptr<sqlite3_stmt, void (*)(sqlite3_stmt*)> compiledStatement;
|
||||
Utf8StringVector bindingColumnNames_;
|
||||
int bindingParameterCount;
|
||||
int columnCount_;
|
||||
mutable bool isReadyToFetchValues;
|
||||
std::unique_ptr<sqlite3_stmt, void (*)(sqlite3_stmt*)> m_compiledStatement;
|
||||
Utf8StringVector m_bindingColumnNames;
|
||||
int m_bindingParameterCount;
|
||||
int m_columnCount;
|
||||
mutable bool m_isReadyToFetchValues;
|
||||
};
|
||||
|
||||
} // namespace Sqlite
|
||||
|
||||
Reference in New Issue
Block a user