mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
Add interrupt method
This commit is contained in:
parent
cf53a4cb14
commit
86d66c73a9
@ -66,6 +66,17 @@ QgsScopedSqlite::~QgsScopedSqlite()
|
|||||||
|
|
||||||
sqlite3 *QgsScopedSqlite::get() const { return db_; }
|
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 *QgsScopedSqlite::release()
|
||||||
{
|
{
|
||||||
sqlite3 *pp = db_;
|
sqlite3 *pp = db_;
|
||||||
|
@ -40,6 +40,7 @@ class QgsScopedSqlite
|
|||||||
QgsScopedSqlite &operator=( QgsScopedSqlite &other );
|
QgsScopedSqlite &operator=( QgsScopedSqlite &other );
|
||||||
~QgsScopedSqlite();
|
~QgsScopedSqlite();
|
||||||
|
|
||||||
|
bool interrupt();
|
||||||
sqlite3 *get() const;
|
sqlite3 *get() const;
|
||||||
sqlite3 *release();
|
sqlite3 *release();
|
||||||
void reset( sqlite3 *db );
|
void reset( sqlite3 *db );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user