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
Sq3StmtC_Class_C_API

Sq3StmtC - define the class … More...

+ Collaboration diagram for Sq3StmtC_Class_C_API:

Topics

 Sq3StmtC_Class_Define_C_API
 Sq3StmtC - low level definition, access and cast …
 

Macros

#define Sq3GetStmtFromNat(_nat)
 helper for Sq3StmtC_ObjNew
 

Typedefs

typedef struct Sq3StmtSSQ3_STMT
 class-shortcut for struct Sq3StmtS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3StmtSSQ3_STMTN
 class-shortcut for const struct Sq3StmtS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3StmtS SQ3_STMTR
 reference-shortcut for struct Sq3StmtS, all shortcut using the XX_YYYR syntax (only for public API) …
 

Sq3StmtC - Export - inline - interact with an external software

static MK_ARTIFICIAL SQ3_STMT Sq3StmtC_ObjNew (sqlite3_stmt *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static SQ3_STMT Sq3StmtC_ObjCreate (sqlite3_stmt *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static MK_HDL Sq3StmtHandleGet_RT (MK_RT mkrt, SQ3_STMT const stmt)
 Handle-Get-Slot - returns a export-hdl to the Sq3StmtC useable for external storage
 
static SQ3_STMT Sq3StmtHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a Sq3StmtC from netHdl or "MK_NULL" if invalid…
 
#define Sq3StmtHandleResolve_e(netHdl)
 wrapper for Sq3StmtHandleResolve with error-handline
 

Sq3StmtC - Misc - function - unspecified functions to perform different tasks

static SQ3_STMT Sq3StmtGetNull (void)
 Null-Slot - return a Sq3StmtC typed NULL instance …
 

Sq3StmtC - Introspection - inline - access to all instances created by class starting with the last one

static SQ3_STMT Sq3StmtInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of Sq3StmtS type …
 
static SQ3_STMT Sq3StmtNext (SQ3_STMT const stmt)
 get next instance from linked-list of Sq3StmtS type
 
static SQ3_STMT Sq3StmtPrev (SQ3_STMT const stmt)
 get previous instance from linked-list of Sq3StmtS type
 

Sq3StmtC - Export - function

SQ3_STMT Sq3StmtHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for Sq3StmtHandleResolve
 
MK_HDL Sq3StmtHandleGetP (MK_RT mkrt, SQ3_STMT const stmt)
 Non-inline replacement for Sq3StmtHandleGet
 

Sq3StmtC - Introspection - function

SQ3_STMT Sq3StmtNextP (SQ3_STMT const stmt)
 Non-inline replacement for Sq3StmtNext
 
SQ3_STMT Sq3StmtPrevP (SQ3_STMT const stmt)
 Non-inline replacement for Sq3StmtPrev
 
SQ3_STMT Sq3StmtInstancesP (MK_RT mkrt)
 Non-inline replacement for Sq3StmtInstances
 

Sq3StmtC - Misc - function

SQ3_STMT Sq3StmtGetNullP (void)
 Non-inline replacement for Sq3StmtGetNull
 

Sq3StmtC - Export - overload

#define Sq3StmtHandleResolve_NULL(...)
 
#define Sq3StmtHandleResolve(...)
 
#define Sq3StmtHandleGet_NULL(...)
 
#define Sq3StmtHandleGet(...)
 

Sq3StmtC - Introspection - overload

#define Sq3StmtInstances_NULL()
 
#define Sq3StmtInstances()
 

Detailed Description

Sq3StmtC - define the class …

Macro Definition Documentation

◆ Sq3GetStmtFromNat

#define Sq3GetStmtFromNat ( _nat)
Value:
SQ3_SET_T(Sq3StmtC,some_api__hook,_nat)
#define SQ3_SET_T(_cls, _hook, _nat)

helper for Sq3StmtC_ObjNew

Definition at line 193 of file Sq3StmtC_def_sq3.h.

◆ Sq3StmtHandleGet

#define Sq3StmtHandleGet ( ...)
Value:
#define MK_RT_CALL
static MK_HDL Sq3StmtHandleGet_RT(MK_RT mkrt, SQ3_STMT const stmt)
Handle-Get-Slot - returns a export-hdl to the Sq3StmtC useable for external storage

Definition at line 582 of file sqlite3_overload_sq3.h.

◆ Sq3StmtHandleGet_NULL

#define Sq3StmtHandleGet_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 581 of file sqlite3_overload_sq3.h.

◆ Sq3StmtHandleResolve

#define Sq3StmtHandleResolve ( ...)
Value:
static SQ3_STMT Sq3StmtHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a Sq3StmtC from netHdl or "MK_NULL" if invalid…

Definition at line 578 of file sqlite3_overload_sq3.h.

◆ Sq3StmtHandleResolve_e

#define Sq3StmtHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
SQ3_STMT tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=Sq3StmtHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'Sq3StmtC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
int32_t MK_HDL
#define Sq3StmtHandleResolve(...)
Struct to represent the data of the Sq3StmtC …

wrapper for Sq3StmtHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid SQ3_STMT or "MK_NULL" with an error set.
  • If netHdl is 0 than "MK_NULL" is returned and the upper-code decide how to deal with it.
  • Sq3StmtHandleResolve return an valid SQ3_STMT or "MK_NULL" if the netHdl is invalid or the underlying object has already been deleted.
    • If a "MK_NULL" is returned than an error-message is created and a jump to the label error is done.
    • If a SQ3_STMT is returned than the netHdl is valid.

Definition at line 271 of file Sq3StmtC_def_sq3.h.

271#define Sq3StmtHandleResolve_e(netHdl) ({ \
272 MK_HDL tmpHdl=netHdl; \
273 SQ3_STMT tmp; \
274 if (tmpHdl==0) { \
275 tmp=NULL; \
276 } else { \
277 tmp=Sq3StmtHandleResolve(tmpHdl); \
278 if (tmp==NULL) { \
279 MkErrorSetC_1_NULL("ERROR: 'Sq3StmtC' handle is 'NULL'"); \
280 goto error; \
281 }; \
282 }; \
283 tmp; \
284})

◆ Sq3StmtHandleResolve_NULL

#define Sq3StmtHandleResolve_NULL ( ...)
Value:

Definition at line 577 of file sqlite3_overload_sq3.h.

◆ Sq3StmtInstances

#define Sq3StmtInstances ( )
Value:
#define MK_RT_CALL_ONLY
static SQ3_STMT Sq3StmtInstances_RT(MK_RT mkrt)
get head-instance from linked-list of Sq3StmtS type …

Definition at line 593 of file sqlite3_overload_sq3.h.

◆ Sq3StmtInstances_NULL

#define Sq3StmtInstances_NULL ( )
Value:

Definition at line 592 of file sqlite3_overload_sq3.h.

Typedef Documentation

◆ SQ3_STMT

typedef struct Sq3StmtS* SQ3_STMT

class-shortcut for struct Sq3StmtS *, all shortcut using the XX_YYY syntax (only for public API) …

Definition at line 365 of file LibSq3Lite_sq3.h.

◆ SQ3_STMTN

typedef const struct Sq3StmtS* SQ3_STMTN

class-shortcut for const struct Sq3StmtS *, all const shortcut using the XX_YYYC syntax (only for public API) …

Definition at line 368 of file LibSq3Lite_sq3.h.

◆ SQ3_STMTR

typedef struct Sq3StmtS SQ3_STMTR

reference-shortcut for struct Sq3StmtS, all shortcut using the XX_YYYR syntax (only for public API) …

Definition at line 371 of file LibSq3Lite_sq3.h.

Function Documentation

◆ Sq3StmtC_ObjCreate()

static SQ3_STMT Sq3StmtC_ObjCreate ( sqlite3_stmt * hdl)
inlinestatic

return Programming-Language-Micro-Kernel (PLMK) instance from native hdl

Definition at line 216 of file Sq3StmtC_def_sq3.h.

216 {
218 return Sq3GetStmtFromNat(hdl);
219}
#define MkRtSetup_NULL
#define Sq3GetStmtFromNat(_nat)
helper for Sq3StmtC_ObjNew …
+ Here is the caller graph for this function:

◆ Sq3StmtC_ObjNew()

static MK_ARTIFICIAL SQ3_STMT Sq3StmtC_ObjNew ( sqlite3_stmt * hdl)
inlinestatic

return Programming-Language-Micro-Kernel (PLMK) instance from native hdl

Definition at line 209 of file Sq3StmtC_def_sq3.h.

209 {
211 return Sq3GetStmtFromNat(hdl);
212}
+ Here is the caller graph for this function:

◆ Sq3StmtGetNull()

static SQ3_STMT Sq3StmtGetNull ( void )
inlinestatic

Null-Slot - return a Sq3StmtC typed NULL instance …

Definition at line 296 of file Sq3StmtC_def_sq3.h.

296 {
297 return (SQ3_STMT)MK_NULL;
298 }
#define MK_NULL
+ Here is the caller graph for this function:

◆ Sq3StmtGetNullP()

SQ3_STMT Sq3StmtGetNullP ( void )

Non-inline replacement for Sq3StmtGetNull

◆ Sq3StmtHandleGet_RT()

static MK_HDL Sq3StmtHandleGet_RT ( MK_RT mkrt,
SQ3_STMT const stmt )
inlinestatic

Handle-Get-Slot - returns a export-hdl to the Sq3StmtC useable for external storage

The export-hdl is a reference to an instance that can be stored in software and converted back into an instance using the Sq3StmtHandleResolve.

By default, the export-hdl is initialized to "0", which is equivalent to does not exist. This function returns a non-zero and unique export-hdl that is recreated if necessary.

The export-hdl is only valid until the Programming-Language-Micro-Kernel (PLMK) ends.

example: The export-hdl is used in rpc to identify an object across the network.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]stmtProgramming-Language-Micro-Kernel (PLMK) instance from sqlite3_stmt
Returns
the required export-hdl

Definition at line 238 of file Sq3StmtC_def_sq3.h.

241 {
242 return MkObjectHandleGet(stmt?MkOBJ(stmt):NULL);
243}
#define MkObjectHandleGet(...)
#define MkOBJ(x)

◆ Sq3StmtHandleGetP()

MK_HDL Sq3StmtHandleGetP ( MK_RT mkrt,
SQ3_STMT const stmt )

Non-inline replacement for Sq3StmtHandleGet

◆ Sq3StmtHandleResolve_RT()

static SQ3_STMT Sq3StmtHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

Handle-Resolve-Slot - return a Sq3StmtC from netHdl or "MK_NULL" if invalid…

The Sq3StmtHandleResolve undo the Sq3StmtHandleGet and is intended to export a unique identifer into external code not belonging to the Programming-Language-Micro-Kernel (PLMK).

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]netHdlhandle former exported with Sq3StmtHandleGet
Returns
the required handle or "MK_NULL" if netHdl is invalid

Definition at line 255 of file Sq3StmtC_def_sq3.h.

258 {
259 return Sq3Stmt(MkObjectHandleResolve(netHdl));
260}
#define MkObjectHandleResolve(...)
static SQ3_STMT Sq3Stmt(MK_MNG mng)
cast a unknown-object into an Sq3StmtS pointer or NULL if not possible

◆ Sq3StmtHandleResolveP()

SQ3_STMT Sq3StmtHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for Sq3StmtHandleResolve

◆ Sq3StmtInstances_RT()

static SQ3_STMT Sq3StmtInstances_RT ( MK_RT mkrt)
inlinestatic

get head-instance from linked-list of Sq3StmtS type …

The head-instance is the last instance created.

Definition at line 320 of file Sq3StmtC_def_sq3.h.

320 {
323}
static MK_OBJ MkTypeInstances(MK_TYP const typ)
#define SQ3_STATIC_RT
__thread MK_TYP Sq3StmtC_TT
class as MkTypeDefS-class-type …

◆ Sq3StmtInstancesP()

SQ3_STMT Sq3StmtInstancesP ( MK_RT mkrt)

Non-inline replacement for Sq3StmtInstances

◆ Sq3StmtNext()

static SQ3_STMT Sq3StmtNext ( SQ3_STMT const stmt)
inlinestatic

get next instance from linked-list of Sq3StmtS type

Definition at line 327 of file Sq3StmtC_def_sq3.h.

327 {
328 MK_INSTANCE_HDL(stmt);
329 return (SQ3_STMT)Sq3StmtC_X2obj(stmt)->obj_protect.next;
330}
#define MK_INSTANCE_HDL(x)
#define Sq3StmtC_X2obj(x)
+ Here is the caller graph for this function:

◆ Sq3StmtNextP()

SQ3_STMT Sq3StmtNextP ( SQ3_STMT const stmt)

Non-inline replacement for Sq3StmtNext

◆ Sq3StmtPrev()

static SQ3_STMT Sq3StmtPrev ( SQ3_STMT const stmt)
inlinestatic

get previous instance from linked-list of Sq3StmtS type

Definition at line 334 of file Sq3StmtC_def_sq3.h.

334 {
335 MK_INSTANCE_HDL(stmt);
336 return (SQ3_STMT)Sq3StmtC_X2obj(stmt)->obj_protect.prev;
337}
+ Here is the caller graph for this function:

◆ Sq3StmtPrevP()

SQ3_STMT Sq3StmtPrevP ( SQ3_STMT const stmt)

Non-inline replacement for Sq3StmtPrev