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
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 739 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInFirst_E

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

Definition at line 738 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 740 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 742 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInNext_E

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

Definition at line 741 of file sqlite3_overload_sq3.h.

◆ Sq3ValueVtabInNext_e

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

Definition at line 743 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 145 of file Sq3ValueC_sq3.h.

145 {
146 SQ3_INSTANCE_HDL(pVal);
147 *ppOut = NULL;
148 sqlite3_value* ppOut_val = NULL;
149 enum Sq3ErrorE errVal = (enum Sq3ErrorE)sqlite3_vtab_in_first(pVal->nat, &ppOut_val);
150 *ppOut = Sq3ValueC_ObjNew(ppOut_val);
151 Sq3ErrorE_Check(pVal, errVal);
152 return MK_OK;
153 error:
154 return MK_ERROR;
155 }
MK_ERROR
MK_OK
Sq3ErrorE
Result Codes.
#define Sq3ErrorE_Check(sq3_hdl, PROC)
check on a tclsq3lite error and convert into a tclsq3lite error …
#define SQ3_INSTANCE_HDL(x)
static MK_ARTIFICIAL SQ3_VAL Sq3ValueC_ObjNew(sqlite3_value *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
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 158 of file Sq3ValueC_sq3.h.

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

◆ Sq3ValueVtabInNextP()

enum MkErrorE Sq3ValueVtabInNextP ( SQ3_VAL pVal,
SQ3_VAL * ppOut )

Non-inline replacement for Sq3ValueVtabInNext