theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
Sq3LiteC_Query_C_API

Sq3LiteC - work with a queryMore...

+ Collaboration diagram for Sq3LiteC_Query_C_API:

Functions

static void Sq3LiteInterrupt (SQ3_LITE sq3lite)
 Interrupt A Long-Running Query …
 
static MK_BOOL Sq3LiteIsInterrupted (SQ3_LITE sq3lite)
 Interrupt A Long-Running Query …
 

Sq3LiteC - Sq3LiteC_Query_C_API - function

void Sq3LiteInterruptP (SQ3_LITE sq3lite)
 Non-inline replacement for Sq3LiteInterrupt
 
MK_BOOL Sq3LiteIsInterruptedP (SQ3_LITE sq3lite)
 Non-inline replacement for Sq3LiteIsInterrupted
 

Detailed Description

Sq3LiteC - work with a query

Function Documentation

◆ Sq3LiteInterrupt()

static void Sq3LiteInterrupt ( SQ3_LITE sq3lite)
inlinestatic

Interrupt A Long-Running Query …

This function causes any pending database operation to abort and return at its earliest opportunity. This routine is typically called in response to a user action such as pressing "Cancel" or Ctrl-C where the user wants a long query operation to halt immediately.

It is safe to call this routine from a thread different from the thread that is currently running the database operation. But it is not safe to call this routine with a database connection that is closed or might close before Sq3LiteInterrupt() returns.

If an SQL operation is very nearly finished at the time when Sq3LiteInterrupt() is called, then it might not have an opportunity to be interrupted and might continue to completion.

An SQL operation that is interrupted will return SQ3_RESULT_INTERRUPT. If the interrupted SQL operation is an INSERT, UPDATE, or DELETE that is inside an explicit transaction, then the entire transaction will be rolled back automatically.

The Sq3LiteInterrupt(D) call is in effect until all currently running SQL statements on database connection D complete. Any new SQL statements that are started after the Sq3LiteInterrupt() call and before the running statement count reaches zero are interrupted as if they had been running prior to the Sq3LiteInterrupt() call. New SQL statements that are started after the running statement count reaches zero are not effected by the Sq3LiteInterrupt(). A call to Sq3LiteInterrupt(D) that occurs when there are no running SQL statements is a no-op and has no effect on SQL statements that are started after the Sq3LiteInterrupt() call returns.

The Sq3LiteIsInterrupted (D) interface can be used to determine whether or not an interrupt is currently in effect for database connection D. It returns 1 if an interrupt is currently in effect, or 0 otherwise.

Reference code from sqlite3:

struct sqlite3 sqlite3
#define SQLITE_API
SQLITE_API int sqlite3_is_interrupted(sqlite3 *)
SQLITE_API void sqlite3_interrupt(sqlite3 *)

Definition at line 485 of file Sq3LiteC_sq3.h.

485 {
486 SQ3_INSTANCE_HDL(sq3lite);
487 sqlite3_interrupt(sq3lite->nat);
488 }
#define SQ3_INSTANCE_HDL(x)
sqlite3 * nat
internal - link between Sq3LiteS and native library
+ Here is the caller graph for this function:

◆ Sq3LiteInterruptP()

void Sq3LiteInterruptP ( SQ3_LITE sq3lite)

Non-inline replacement for Sq3LiteInterrupt

◆ Sq3LiteIsInterrupted()

static MK_BOOL Sq3LiteIsInterrupted ( SQ3_LITE sq3lite)
inlinestatic

Interrupt A Long-Running Query …

read more at 'Sq3LiteInterrupt'

Definition at line 491 of file Sq3LiteC_sq3.h.

491 {
492 SQ3_INSTANCE_HDL(sq3lite);
493 return (MK_BOOL)sqlite3_is_interrupted(sq3lite->nat);
494 }
bool MK_BOOL
+ Here is the caller graph for this function:

◆ Sq3LiteIsInterruptedP()

MK_BOOL Sq3LiteIsInterruptedP ( SQ3_LITE sq3lite)

Non-inline replacement for Sq3LiteIsInterrupted