theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3StmtC_def_sq3.h
Go to the documentation of this file.
1
9/* LABEL-START */
10#pragma once
11
12#include "LibSq3Lite_sq3.h"
13/* LABEL-END */
14
16
17// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
18
19// external
25
26// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
27
28// MARK_C ==================================================================
29
34
36struct Sq3StmtS {
37 // BEGIN-Sq3StmtS-super - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
38
39 union {
40 struct MkObjectS obj; // instance-base MkObjectS
42
43 // END-Sq3StmtS-super - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
44
45 // BEGIN-Sq3StmtS-native - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
46
48
49 // END-Sq3StmtS-native - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
50
56};
57
58// MARK_D ==================================================================
59// BEGIN-Sq3StmtS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
60
64 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
65
66// Signature --------------------------------------------------------------
69
70 #define Sq3StmtC_SIGNATURE (MkObjectC_SIGNATURE ^ (19u<<10))
71 #define Sq3StmtC_MASK (((1u<<22)-1)<<10)
72
74
75// CompileTimeCast --------------------------------------------------------------
78
79 #define Sq3StmtC_X2stmt(x) (x)
80 #define Sq3StmtC_X2obj(x) MkOBJ(x)
81
83
84// TypeDef --------------------------------------------------------------
87
89 __parser__(ignore) typedef struct Sq3StmtS Sq3StmtCR;
91 __parser__(ignore) typedef const struct Sq3StmtS Sq3StmtCNR;
95 #define Sq3StmtC_T ( (struct MkTypeDefS *) (Sq3StmtC_TT) )
97 #define Sq3StmtST Sq3StmtC_T
99 #define Sq3StmtSTT (MkTYP(Sq3StmtST))
101 #define Sq3StmtC_type SQ3_STMT
103 #define Sq3StmtCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
105 #define Sq3StmtCTT_X(instance) (MkOBJ_R(instance).type)
107 #define Sq3StmtCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
109 #define Sq3StmtC_NS SQ3
111 #define Sq3StmtCTT Sq3StmtCTT
113 #define Sq3StmtCT ( (struct MkTypeDefS *) Sq3StmtCTT )
114
116
117// TypeCheck --------------------------------------------------------------
120
121 #pragma GCC diagnostic push
122 #pragma GCC diagnostic ignored "-Wattributes"
123
126 __parser__(class=Sq3StmtC,static,hide)
129 return MkSanitizeCheck(Sq3StmtC,mng);
130 }
131
134 __parser__(class=Sq3StmtC,static,hide)
137 return MkSanitizeCheckO(Sq3StmtC,obj);
138 }
139
140 #pragma GCC diagnostic pop
141 #define Sq3StmtC_Check(mng) Sq3StmtCheck(mng)
142
144
145// RunTimeCast --------------------------------------------------------------
148
150 __parser__(class=Sq3StmtC,hide,static)
151 META_ATTRIBUTE_SANITIZE
154 return (Sq3StmtCheck(mng) ? (SQ3_STMT)mng : NULL);
155 }
156
158 __parser__(class=Sq3StmtC,hide,static)
159 META_ATTRIBUTE_SANITIZE
162 return (Sq3StmtCheck(mng) ? (SQ3_STMTN)mng : NULL);
163 }
164
166 #define Sq3StmtRaise(_stmt) if (!_MkCheckX(Sq3StmtC,_stmt)) { \
167 MkErrorSetC_1E("'Sq3StmtC' hdl is NULL"); \
168 goto error ; \
169 }
170
172 #define Sq3STMT_R(x) (*(x)).super.stmt
174 #define Sq3STMT(x) (&Sq3STMT_R(x))
175
177
180// Sq3StmtC_Class_Define_C_API
181
182// END-Sq3StmtS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
183
185
186// MARK_C ==================================================================
187
190#define Sq3GetStmtFromNat(_nat) SQ3_SET_T(Sq3StmtC,some_api__hook,_nat)
191
192// =========================================================================
193// BEGIN-Sq3StmtS-Export - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
194
197
200
201__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=Sq3StmtC);
202
205__parser__(internal)
208 return Sq3GetStmtFromNat(hdl);
209}
210
212__parser__(internal)
215 return Sq3GetStmtFromNat(hdl);
216}
217
233__parser__(class-overload=MkObjectHandleGet)
237 SQ3_STMT const stmt __parser__(null-allowed)
238) {
239 return MkObjectHandleGet(stmt?MkOBJ(stmt):NULL);
240}
241
250__parser__(flags=new)
254 MK_HDL const netHdl
255) {
256 return Sq3Stmt(MkObjectHandleResolve(netHdl));
257}
258
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})
282
284
286// Class export & import
287
291 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=Sq3StmtC,null-return-allow)
294 return (SQ3_STMT)MK_NULL;
295 }
297// Sq3StmtC - Misc - function
298
300// Sq3StmtC_Class_C_API
301
302// END-Sq3StmtS-Export - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
303
304// =========================================================================
305// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
306
311
312__parser__push__(doc-name=Introspection,doc-index=Class,class=Sq3StmtC,no-rpc,null-return-allow,flags=new);
313
321
325 MK_INSTANCE_HDL(stmt);
326 return (SQ3_STMT)Sq3StmtC_X2obj(stmt)->obj_protect.next;
327}
328
332 MK_INSTANCE_HDL(stmt);
333 return (SQ3_STMT)Sq3StmtC_X2obj(stmt)->obj_protect.prev;
334}
335
337
340// Sq3StmtC_Class_C_API
341
342// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
343
tag: nhi1-release-250425
#define BEGIN_SQ3_C_DECLS
#define END_SQ3_C_DECLS
#define MK_DECL
#define mk_inline
#define MK_ARTIFICIAL
#define MK_NULL
#define __parser__pop__
#define __parser__push__(...)
#define __parser__(...)
const MK_PTRB * MK_MNGN
const MK_STRB * MK_STRN
MK_PTRB * MK_MNG
int32_t MK_HDL
#define MkSanitizeCheck(_root, _m)
#define MkSanitizeCheckO(_root, _o)
#define MkObjectHandleResolve(...)
#define MkObjectHandleGet(...)
#define MkOBJ(x)
#define MK_ATTR_STATIC
#define MK_ATTR_RT_INSTANCE
#define MK_ATTR_INSTANCE
#define MkThreadLocal
#define MK_PARSER_RT
#define MK_PARSER_RT_ONLY
#define MK_ATTR_RT_STATIC
#define MkRtSetup_NULL
#define MK_INSTANCE_HDL(x)
static MK_OBJ MkTypeInstances(MK_TYP const typ)
#define SQ3_EXTERN_DATA
#define SQ3_STATIC_RT
#define Sq3GetStmtFromNat(_nat)
helper for Sq3StmtC_ObjNew …
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 Sq3StmtPrev(SQ3_STMT const stmt)
get previous 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 Sq3StmtHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a Sq3StmtC from netHdl or null if invalid…
static SQ3_STMT Sq3StmtGetNull(void)
Null-Slot - return a Sq3StmtC typed NULL instance …
static MK_ARTIFICIAL SQ3_STMT Sq3StmtC_ObjNew(sqlite3_stmt *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
static SQ3_STMT Sq3StmtInstances_RT(MK_RT mkrt)
get head-instance from linked-list of Sq3StmtS type …
static SQ3_STMTN Sq3StmtN(MK_MNGN mng)
(const) cast a unknown-object into an Sq3StmtS pointer or NULL if not possible
static bool Sq3StmtCheckO(MK_OBJN obj)
check Sq3StmtS -> MkObjectS::signature …
static SQ3_STMT Sq3Stmt(MK_MNG mng)
cast a unknown-object into an Sq3StmtS pointer or NULL if not possible
__thread MK_TYP Sq3StmtC_TT
class as MkTypeDefS-class-type …
#define Sq3StmtC_X2obj(x)
static bool Sq3StmtCheck(MK_MNGN mng)
check Sq3StmtS -> MkObjectS::signature …
struct sqlite3_stmt sqlite3_stmt
Struct to represent the data of the Sq3StmtC …
union Sq3StmtS::@3 super
struct MkObjectS obj
sqlite3_stmt * nat
internal - link between Sq3StmtS and native library
MK_STRN pzTail
The non compiled sql-statement from Sq3StmtPrepareV2 and Sq3StmtPrepareV3 …