SWIGEXPORT void JNICALL Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1interrupt(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  sqlite3 *arg1 = (sqlite3 *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(sqlite3 **)&jarg1; 
  sqlite3_interrupt(arg1);
}
Beispiel #2
0
 ~SQLConn()
 {
     if (conn)
     {
         sqlite3_interrupt(conn);
         sqlite3_close(conn);
     }
 }
Beispiel #3
0
/* call-seq: interrupt
 *
 * Interrupts the currently executing operation, causing it to abort.
 */
static VALUE interrupt(VALUE self)
{
  sqlite3RubyPtr ctx;
  Data_Get_Struct(self, sqlite3Ruby, ctx);
  REQUIRE_OPEN_DB(ctx);

  sqlite3_interrupt(ctx->db);

  return self;
}
Beispiel #4
0
/*
** This routine runs when the user presses Ctrl-C
*/
static void interrupt_handler(int NotUsed)
{
    NotUsed = NotUsed;
    _rpmsqlSeenInterrupt = 1;
#if defined(WITH_SQLITE)
    if (_rpmsqlI && _rpmsqlI->I) {
	sqlite3 * db = (sqlite3 *) _rpmsqlI->I;
	sqlite3_interrupt(db);
    }
#endif
}
Beispiel #5
0
void SQLiteDatabase::interrupt()
{
    m_interrupted = true;
    while (!m_lockingMutex.tryLock()) {
        MutexLocker locker(m_databaseClosingMutex);
        if (!m_db)
            return;
        sqlite3_interrupt(m_db);
        yield();
    }

    m_lockingMutex.unlock();
}
void RowLoader::cancel ()
{
    std::unique_lock<std::mutex> lk(m);

    if(pDb)
        sqlite3_interrupt(pDb.get());

    if(current_task)
        current_task->cancel = true;

    next_task = nullptr;
    cv.notify_all();
}
void RowLoader::triggerFetch (int token, size_t row_begin, size_t row_end)
{
    std::unique_lock<std::mutex> lk(m);

    if(pDb) {
        if(!row_counter.valid() || row_counter.wait_for(std::chrono::seconds(0)) == std::future_status::ready) {
            // only if row count is complete, we can safely interrupt SQLite to speed up cancellation
            sqlite3_interrupt(pDb.get());
        }
    }

    if(current_task)
        current_task->cancel = true;

    nosync_ensureDbAccess();

    // (forget a possibly already existing "next task")
    next_task.reset(new Task{ *this, token, row_begin, row_end });

    lk.unlock();
    cv.notify_all();
}
Beispiel #8
0
void SqliteDataset::interrupt() {
  sqlite3_interrupt(handle());
}
Beispiel #9
0
	void CloseDB()
	{
		sqlite3_interrupt(conn);
		sqlite3_close(conn);
	}
Beispiel #10
0
void SQLiteDatabase::interrupt()
{
    LockHolder locker(m_databaseClosingMutex);
    if (m_db)
        sqlite3_interrupt(m_db);
}
void SqlDatabase::interrupt() { sqlite3_interrupt(mpDB); }
Beispiel #12
0
DLL_FUNCTION(void) BU_SQLite_Interrupt(sqlite3* db) {
#pragma comment(linker, "/EXPORT:BU_SQLite_Interrupt=_BU_SQLite_Interrupt@4")
	return sqlite3_interrupt(db);
}
Beispiel #13
0
 void Connection::interrupt()
 {
     sqlite3_interrupt(_db);
 }
Beispiel #14
0
void QSQLiteDriver::sqlite_interrupt()
{
    sqlite3_interrupt(d->access);
}
Beispiel #15
0
__declspec(dllexport) void WINAPI sqlite3_interrupt_interop(sqlite3 *db)
{
  sqlite3_interrupt(db);
}
void QueryMessagesThread::interrupt()
{
	ThreadWindows::interrupt();
	sqlite3_interrupt(sqLiteDatabase);
}
Beispiel #17
0
	void Connection::Interrupt() {
		if (nullptr != db_) {
			sqlite3_interrupt(db_);
		}
	}