theSq3Lite 10.0
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 nil 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 190 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 579 of file sqlite3_overload_sq3.h.

◆ Sq3StmtHandleGet_NULL

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

Definition at line 578 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 nil if invalid…

Definition at line 575 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 nil with an error set.
  • If netHdl is 0 than nil is returned and the upper-code decide how to deal with it.
  • Sq3StmtHandleResolve return an valid SQ3_STMT or nil if the netHdl is invalid or the underlying object has already been deleted.
    • If a nil 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 268 of file Sq3StmtC_def_sq3.h.

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

◆ Sq3StmtHandleResolve_NULL

#define Sq3StmtHandleResolve_NULL ( ...)
Value:

Definition at line 574 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 590 of file sqlite3_overload_sq3.h.

◆ Sq3StmtInstances_NULL

#define Sq3StmtInstances_NULL ( )
Value:

Definition at line 589 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 362 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 365 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 368 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 213 of file Sq3StmtC_def_sq3.h.

213 {
215 return Sq3GetStmtFromNat(hdl);
216}
#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 206 of file Sq3StmtC_def_sq3.h.

206 {
208 return Sq3GetStmtFromNat(hdl);
209}
+ 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 293 of file Sq3StmtC_def_sq3.h.

293 {
294 return (SQ3_STMT)MK_NULL;
295 }
#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 235 of file Sq3StmtC_def_sq3.h.

238 {
239 return MkObjectHandleGet(stmt?MkOBJ(stmt):NULL);
240}
#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 nil 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 nil if netHdl is invalid

Definition at line 252 of file Sq3StmtC_def_sq3.h.

255 {
256 return Sq3Stmt(MkObjectHandleResolve(netHdl));
257}
#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 317 of file Sq3StmtC_def_sq3.h.

317 {
320}
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 324 of file Sq3StmtC_def_sq3.h.

324 {
325 MK_INSTANCE_HDL(stmt);
326 return (SQ3_STMT)Sq3StmtC_X2obj(stmt)->obj_protect.next;
327}
#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 331 of file Sq3StmtC_def_sq3.h.

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

◆ Sq3StmtPrevP()

SQ3_STMT Sq3StmtPrevP ( SQ3_STMT const stmt)

Non-inline replacement for Sq3StmtPrev