Add interrupt method

This commit is contained in:
Blottiere Paul 2018-01-30 09:14:05 +00:00
parent cf53a4cb14
commit 86d66c73a9
2 changed files with 12 additions and 0 deletions

View File

@ -66,6 +66,17 @@ QgsScopedSqlite::~QgsScopedSqlite()
sqlite3 *QgsScopedSqlite::get() const { return db_; }
bool QgsScopedSqlite::interrupt()
{
bool rc = false;
if ( db_ )
{
sqlite3_interrupt( db_ );
rc = true;
}
return rc;
}
sqlite3 *QgsScopedSqlite::release()
{
sqlite3 *pp = db_;

View File

@ -40,6 +40,7 @@ class QgsScopedSqlite
QgsScopedSqlite &operator=( QgsScopedSqlite &other );
~QgsScopedSqlite();
bool interrupt();
sqlite3 *get() const;
sqlite3 *release();
void reset( sqlite3 *db );