theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3ValueC_Vtab_C_API

Sq3ValueC - work with the virtual-file-systemMore...

+ Collaboration diagram for Sq3ValueC_Vtab_C_API:

Functions

static enum MkErrorE Sq3ValueVtabInFirst (SQ3_VAL pVal, SQ3_VAL *ppOut)
 Find all elements on the right-hand side of an IN constraint …
 
static enum MkErrorE Sq3ValueVtabInNext (SQ3_VAL pVal, SQ3_VAL *ppOut)
 Find all elements on the right-hand side of an IN constraint …
 

Sq3ValueC - Sq3ValueC_Vtab_C_API - function

enum MkErrorE Sq3ValueVtabInFirstP (SQ3_VAL pVal, SQ3_VAL *ppOut)
 Non-inline replacement for Sq3ValueVtabInFirst
 
enum MkErrorE Sq3ValueVtabInNextP (SQ3_VAL pVal, SQ3_VAL *ppOut)
 Non-inline replacement for Sq3ValueVtabInNext
 

Sq3ValueC - Sq3ValueC_Vtab_C_API - overload

#define Sq3ValueVtabInFirst_E(...)
 
#define Sq3ValueVtabInFirst_C(...)
 
#define Sq3ValueVtabInFirst_e(...)
 
#define Sq3ValueVtabInNext_E(...)
 
#define Sq3ValueVtabInNext_C(...)
 
#define Sq3ValueVtabInNext_e(...)
 

Detailed Description

Sq3ValueC - work with the virtual-file-system

Macro Definition Documentation

◆ Sq3ValueVtabInFirst_C

#define Sq3ValueVtabInFirst_C ( ...)
Value:
if (MkErrorCheckI(Sq3ValueVtabInFirst(__VA_ARGS__)))
static enum MkErrorE Sq3ValueVtabInFirst(SQ3_VAL pVal, SQ3_VAL *ppOut)
Find all elements on the right-hand side of an IN constraint …

Definition at line 736 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInFirst_E

#define Sq3ValueVtabInFirst_E ( ...)
Value:
MkErrorCheck(Sq3ValueVtabInFirst(__VA_ARGS__))

Definition at line 735 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInFirst_e

#define Sq3ValueVtabInFirst_e ( ...)
Value:
MK_EMBEDDED(SQ3_VAL,Sq3ValueVtabInFirst,__VA_ARGS__)
Struct to represent the data of the Sq3ValueC …

Definition at line 737 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInNext_C

#define Sq3ValueVtabInNext_C ( ...)
Value:
if (MkErrorCheckI(Sq3ValueVtabInNext(__VA_ARGS__)))
static enum MkErrorE Sq3ValueVtabInNext(SQ3_VAL pVal, SQ3_VAL *ppOut)
Find all elements on the right-hand side of an IN constraint …

Definition at line 739 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInNext_E

#define Sq3ValueVtabInNext_E ( ...)
Value:
MkErrorCheck(Sq3ValueVtabInNext(__VA_ARGS__))

Definition at line 738 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInNext_e

#define Sq3ValueVtabInNext_e ( ...)
Value:
MK_EMBEDDED(SQ3_VAL,Sq3ValueVtabInNext,__VA_ARGS__)

Definition at line 740 of file sqlite3_overload_sq3.h.

Function Documentation

◆ Sq3ValueVtabInFirst()

static enum MkErrorE Sq3ValueVtabInFirst ( SQ3_VAL pVal,
SQ3_VAL * ppOut )
inlinestatic

Find all elements on the right-hand side of an IN constraint …

These interfaces are only useful from within the xFilter() method of a virtual table implementation. The result of invoking these interfaces from any other context is undefined and probably harmful.

The X parameter in a call to Sq3ValueVtabInFirst(X,P) or Sq3ValueVtabInNext(X,P) should be one of the parameters to the xFilter method which invokes these routines, and specifically a parameter that was previously selected for all-at-once IN constraint processing use the sqlite3_vtab_in () interface in the xBestIndex method. If the X parameter is not an xFilter argument that was selected for all-at-once IN constraint processing, then these routines return SQ3_RESULT_ERROR.

Use these routines to access all values on the right-hand side of the IN constraint using code like the following:

   for(rc=sqlite3_vtab_in_first(pList, &pVal);
       rc==SQ3_RESULT_OK && pVal;
       rc=sqlite3_vtab_in_next(pList, &pVal)
   ){
     // do something with pVal
   }
   if( rc!=SQ3_RESULT_OK ){
     // an error has occurred
   }

On success, the Sq3ValueVtabInFirst(X,P) and Sq3ValueVtabInNext(X,P) routines return SQ3_RESULT_OK and set *P to point to the first or next value on the RHS of the IN constraint. If there are no more values on the right hand side of the IN constraint, then *P is set to NULL and these routines return SQ3_RESULT_DONE. The return value might be some other value, such as SQ3_RESULT_NOMEM, in the event of a malfunction.

The *ppOut values returned by these routines are only valid until the next call to either of these routines or until the end of the xFilter method from which these routines were called. If the virtual table implementation needs to retain the *ppOut values for longer, it must make copies. The *ppOut values are protected.

Reference code from sqlite3:

#define SQLITE_API
SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal, sqlite3_value **ppOut)
SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut)
struct sqlite3_value sqlite3_value

Definition at line 142 of file Sq3ValueC_sq3.h.

142 {
143 SQ3_INSTANCE_HDL(pVal);
144 *ppOut = NULL;
145 sqlite3_value* ppOut_val = NULL;
146 enum Sq3ErrorE errVal = (enum Sq3ErrorE)sqlite3_vtab_in_first(pVal->nat, &ppOut_val);
147 *ppOut = Sq3ValueC_ObjNew(ppOut_val);
148 Sq3ErrorE_Check(pVal, errVal);
149 return MK_OK;
150 error:
151 return MK_ERROR;
152 }
#define Sq3ValueC_ObjNew(nat)
MK_ERROR
MK_OK
Sq3ErrorE
Result Codes.
#define Sq3ErrorE_Check(sq3_hdl, PROC)
check on a atlsq3lite error and convert into a atlsq3lite error …
#define SQ3_INSTANCE_HDL(x)
sqlite3_value * nat
internal - link between Sq3ValueS and native library
+ Here is the caller graph for this function:

◆ Sq3ValueVtabInFirstP()

enum MkErrorE Sq3ValueVtabInFirstP ( SQ3_VAL pVal,
SQ3_VAL * ppOut )

Non-inline replacement for Sq3ValueVtabInFirst

◆ Sq3ValueVtabInNext()

static enum MkErrorE Sq3ValueVtabInNext ( SQ3_VAL pVal,
SQ3_VAL * ppOut )
inlinestatic

Find all elements on the right-hand side of an IN constraint …

read more at 'Sq3ValueVtabInFirst'

Definition at line 155 of file Sq3ValueC_sq3.h.

155 {
156 SQ3_INSTANCE_HDL(pVal);
157 *ppOut = NULL;
158 sqlite3_value* ppOut_val = NULL;
159 enum Sq3ErrorE errVal = (enum Sq3ErrorE)sqlite3_vtab_in_next(pVal->nat, &ppOut_val);
160 *ppOut = Sq3ValueC_ObjNew(ppOut_val);
161 Sq3ErrorE_Check(pVal, errVal);
162 return MK_OK;
163 error:
164 return MK_ERROR;
165 }
+ Here is the caller graph for this function:

◆ Sq3ValueVtabInNextP()

enum MkErrorE Sq3ValueVtabInNextP ( SQ3_VAL pVal,
SQ3_VAL * ppOut )

Non-inline replacement for Sq3ValueVtabInNext