theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3StmtC_atl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "Sq3StmtC_atl.c"
12
14
15#define OT_CLASS asq3rt->AtlSq3StmtC
16#define OT_NULL asq3rt->AtlSq3StmtC_MK_NULL
17#define OT_CLASS_NAME "Sq3StmtC"
18
19#define SELF2HDL(O) Sq3Stmt(VAL2MNG(O))
20
21// LNG: class
22// -> moved to LibSq3Lite_atl.h → OT_SQ3_RT_S → AtlSq3LiteCTT;
23
24// META: ObjNew feature: called to return a new or an already existing ATL-SELF-Object
25// -> moved to LibSq3Lite_atl.h → Sq3LiteC_ObjNew
26
27// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
28static MK_PTR NS(Sq3StmtC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
29 SETUP_asq3rt(env);
30 return AtomMake(obj,OT_CLASS,NULL,NULL,env);
31}
32
33// META: called if MkObj must be destroyed and if the SELF is still alive → goal: destroy the SELF
34static void NS(Sq3StmtC_selfDelete) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
35 OT_SELF_T selfO = selfP;
36 SETUP_asq3rt(env);
37 MK(AtomDeleteHard) (OT_MK_CALL selfO);
38}
39
40// META: called to destroy link from SELF to META
41static void NS(Sq3StmtC_selfUnlink) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
42 OT_SELF_T selfO = selfP;
43 SETUP_asq3rt(env);
44 return MK(AtomUnlink) (OT_MK_CALL selfO);
45}
46
47#define OT_SETUP_hdl SetupHdlFromMetaData_2(SQ3_STMT)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(SQ3_STMT)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(SQ3_STMT)
50#define OT_SETUP_hdl_constr SetupHdlConstr(Sq3StmtC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(Sq3StmtC)
53
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,Sq3StmtC_X2obj(x),asq3rt))
55
56// initialize the ATL and META class specific object
57#define ClassInit \
58 /* if not already done, initialize NEW META type */ \
59 if (Sq3StmtCTT == NULL) Sq3StmtCTT = Sq3StmtSTT; \
60 \
61 /* protect against double call */ \
62 if (Sq3StmtCTT->selfCreate == NS(Sq3StmtC_selfCreate)) return MK_OK; \
63 \
64 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
65 Sq3StmtCTT->selfCreate = NS(Sq3StmtC_selfCreate); \
66 Sq3StmtCTT->selfDelete = NS(Sq3StmtC_selfDelete); \
67 Sq3StmtCTT->selfUnlink = NS(Sq3StmtC_selfUnlink); \
68 \
69 /* create the ATL-class */ \
70 OT_CLASS = AltClassDef(Sq3StmtCTT,&asq3rt->AtlSq3StmtC_NS); \
71 if (OT_CLASS == NULL) goto error; \
72 OT_REF_INCR(OT_CLASS); \
73 \
74 /* create the ATL static Methods */ \
75 check_LNG(AtlUnknownSetup (NS(sOtClassDef),asq3rt)) goto error; \
76 \
77 /* create the ATL instance Methods */ \
78 check_LNG(AtlUnknownSetup (NS(sInstanceDef),asq3rt)) goto error; \
79 \
80 /* after class was modified, recompile the class */ \
81 RL_init(2, recompile, RL_T(0,RecompileN)); RL_O(1,OT_CLASS) ; \
82 int retI = RL_EvalEx(0); \
83 if (retI != TCL_OK) return retI; \
84 \
85 /* define the "NULL" object */ \
86 OT_NULL = AtomCreateNULL(OT_CLASS, "::Sq3StmtC::MK_NULL", (MK_PTR)asq3rt); \
87 if (OT_NULL == NULL) goto error; \
88 OT_REF_INCR(OT_NULL);
89/* LABEL-END */
90
91// BEGIN-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
92
93// doc-key: Sq3StmtC,Sq3Stmt,sCo,func
94#define CTOR_doc "Sq3StmtC [Sq3StmtC::CTOR db:Sq3LiteC zSql:string]"
95#define PrepareV2_doc "Sq3StmtC [Sq3StmtC::PrepareV2 db:Sq3LiteC zSql:string]"
96#define PrepareV3_doc "Sq3StmtC [Sq3StmtC::PrepareV3 db:Sq3LiteC zSql:string ?prepFlags:Sq3PrepareEF=SQ3_PREPARE_NO?]"
97
98// doc-key: Sq3StmtC,Sq3Stmt,sc_,func
99#define GetNull_doc "Sq3StmtC [Sq3StmtC::GetNull]"
100#define HandleResolve_doc "Sq3StmtC [Sq3StmtC::HandleResolve netHdl:MK_HDL]"
101#define Instances_doc "Sq3StmtC [Sq3StmtC::Instances]"
102#define NextStmt_doc "Sq3StmtC [Sq3StmtC::NextStmt pDb:Sq3LiteC ?pStmt:Sq3StmtC=NULL?]"
103
104// doc-key: Sq3StmtC,Sq3Stmt,oc_,func
105#define ColumnValue_doc "Sq3ValueC [Sq3StmtC::ColumnValue $sq3stmt iCol:int32]"
106#define DbHandle_doc "Sq3LiteC [Sq3StmtC::DbHandle $sq3stmt]"
107#define Next_doc "Sq3StmtC [Sq3StmtC::Next $stmt]"
108#define Prev_doc "Sq3StmtC [Sq3StmtC::Prev $stmt]"
109
110// doc-key: Sq3StmtC,Sq3Stmt,om_,func
111#define BindBlob_doc "Sq3StmtC::BindBlob $sq3stmt pos:int32 blob:binary"
112#define BindDouble_doc "Sq3StmtC::BindDouble $sq3stmt arg1:int32 arg2:double"
113#define BindInt_doc "Sq3StmtC::BindInt $sq3stmt arg1:int32 arg2:int32"
114#define BindInt64_doc "Sq3StmtC::BindInt64 $sq3stmt arg1:int32 arg2:int64"
115#define BindNull_doc "Sq3StmtC::BindNull $sq3stmt arg1:int32"
116#define BindParameterCount_doc "Sq3StmtC::BindParameterCount $sq3stmt"
117#define BindParameterIndex_doc "Sq3StmtC::BindParameterIndex $sq3stmt zName:string"
118#define BindParameterName_doc "string [Sq3StmtC::BindParameterName $sq3stmt arg1:int32]"
119#define BindText_doc "Sq3StmtC::BindText $sq3stmt pos:int32 text:string"
120#define BindValue_doc "Sq3StmtC::BindValue $sq3stmt arg1:int32 arg2:Sq3ValueC"
121#define BindZeroblob_doc "Sq3StmtC::BindZeroblob $sq3stmt arg1:int32 n:int32"
122#define BindZeroblob64_doc "Sq3StmtC::BindZeroblob64 $sq3stmt arg1:int32 arg2:int64"
123#define Busy_doc "Sq3StmtC::Busy $sq3stmt"
124#define ClearBindings_doc "Sq3StmtC::ClearBindings $sq3stmt"
125#define ColumnBlob_doc "binary [Sq3StmtC::ColumnBlob $sq3stmt iCol:int32]"
126#define ColumnBytes_doc "int32 [Sq3StmtC::ColumnBytes $sq3stmt iCol:int32]"
127#define ColumnCount_doc "int32 [Sq3StmtC::ColumnCount $pStmt]"
128#define ColumnDouble_doc "double [Sq3StmtC::ColumnDouble $sq3stmt iCol:int32]"
129#define ColumnInt_doc "int32 [Sq3StmtC::ColumnInt $sq3stmt iCol:int32]"
130#define ColumnInt64_doc "int64 [Sq3StmtC::ColumnInt64 $sq3stmt iCol:int32]"
131#define ColumnName_doc "string [Sq3StmtC::ColumnName $sq3stmt N:int32]"
132#define ColumnText_doc "string [Sq3StmtC::ColumnText $sq3stmt iCol:int32]"
133#define ColumnType_doc "Sq3TypeE [Sq3StmtC::ColumnType $sq3stmt iCol:int32]"
134#define DataCount_doc "Sq3StmtC::DataCount $pStmt"
135#define ExpandedSql_doc "string [Sq3StmtC::ExpandedSql $pStmt]"
136#define Explain_doc "Sq3StmtC::Explain $pStmt eMode:int32"
137#define Finalize_doc "Sq3StmtC::Finalize $pStmt"
138#define GetPzTail_doc "string [Sq3StmtC::GetPzTail $sq3stmt]"
139// skip class-overload: HandleGet → MkObjectHandleGet
140#define IsExplain_doc "Sq3StmtC::IsExplain $pStmt"
141// skip class-overload: Log → MkObjectLog
142#define Readonly_doc "Sq3StmtC::Readonly $pStmt"
143#define Reset_doc "Sq3StmtC::Reset $pStmt"
144#define Sql_doc "string [Sq3StmtC::Sql $pStmt]"
145#define Status_doc "Sq3StmtC::Status $sq3stmt op:Sq3StmtStatusE resetFlg:bool"
146
147// doc-key: Sq3StmtC,Sq3Stmt,omo,func
148#define Step_doc "Sq3ErrorE [Sq3StmtC::Step $sq3stmt]"
149
150// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
151
152/*****************************************************************************/
153/* */
154/* O B J E C T */
155/* */
156/*****************************************************************************/
157
158// BEGIN-Sq3StmtC - created by 'atl_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
159
163
164// doc-key: Sq3StmtC,Sq3StmtC-Bind,om_
165
167static OT_ProcRet NS(Sq3StmtC_BindBlob) (Sq3StmtC_ARGS) {
170 MK_I32 pos = 0;
172 MkBinaryR blob = {0};
175 MkErrorC_Check(hdl,Sq3StmtBindBlob (hdl, pos, blob));
177 goto end;
178 error:
180 end:
182}
183
185static OT_ProcRet NS(Sq3StmtC_BindDouble) (Sq3StmtC_ARGS) {
188 MK_I32 arg1 = 0;
190 MK_DBL arg2 = 0;
193 MkErrorC_Check(hdl,Sq3StmtBindDouble (hdl, arg1, arg2));
195 goto end;
196 error:
198 end:
200}
201
203static OT_ProcRet NS(Sq3StmtC_BindInt) (Sq3StmtC_ARGS) {
206 MK_I32 arg1 = 0;
208 MK_I32 arg2 = 0;
211 MkErrorC_Check(hdl,Sq3StmtBindInt (hdl, arg1, arg2));
213 goto end;
214 error:
216 end:
218}
219
221static OT_ProcRet NS(Sq3StmtC_BindInt64) (Sq3StmtC_ARGS) {
224 MK_I32 arg1 = 0;
226 MK_I64 arg2 = 0;
229 MkErrorC_Check(hdl,Sq3StmtBindInt64 (hdl, arg1, arg2));
231 goto end;
232 error:
234 end:
236}
237
239static OT_ProcRet NS(Sq3StmtC_BindNull) (Sq3StmtC_ARGS) {
242 MK_I32 arg1 = 0;
245 MkErrorC_Check(hdl,Sq3StmtBindNull (hdl, arg1));
247 goto end;
248 error:
250 end:
252}
253
255static OT_ProcRet NS(Sq3StmtC_BindParameterCount) (Sq3StmtC_ARGS) {
261 goto end;
262 error:
264 end:
266}
267
269static OT_ProcRet NS(Sq3StmtC_BindParameterIndex) (Sq3StmtC_ARGS) {
272 MK_STRN zName = 0;
277 goto end;
278 error:
280 end:
282}
283
285static OT_ProcRet NS(Sq3StmtC_BindParameterName) (Sq3StmtC_ARGS) {
288 MK_I32 arg1 = 0;
292 goto end;
293 error:
295 end:
297}
298
300static OT_ProcRet NS(Sq3StmtC_BindText) (Sq3StmtC_ARGS) {
303 MK_I32 pos = 0;
305 MkStringR text = {0};
308 MkErrorC_Check(hdl,Sq3StmtBindText (hdl, pos, text));
310 goto end;
311 error:
313 end:
315}
316
318static OT_ProcRet NS(Sq3StmtC_BindValue) (Sq3StmtC_ARGS) {
321 MK_I32 arg1 = 0;
323 SQ3_VALN arg2 = 0;
326 MkErrorC_Check(hdl,Sq3StmtBindValue (hdl, arg1, arg2));
328 goto end;
329 error:
331 end:
333}
334
336static OT_ProcRet NS(Sq3StmtC_BindZeroblob) (Sq3StmtC_ARGS) {
339 MK_I32 arg1 = 0;
341 MK_I32 n = 0;
344 MkErrorC_Check(hdl,Sq3StmtBindZeroblob (hdl, arg1, n));
346 goto end;
347 error:
349 end:
351}
352
354static OT_ProcRet NS(Sq3StmtC_BindZeroblob64) (Sq3StmtC_ARGS) {
357 MK_I32 arg1 = 0;
359 MK_I64 arg2 = 0;
362 MkErrorC_Check(hdl,Sq3StmtBindZeroblob64 (hdl, arg1, arg2));
364 goto end;
365 error:
367 end:
369}
370
372// Sq3StmtC_Bind_ATL_API
373
377
378// doc-key: Sq3StmtC,Sq3StmtC-Class-Export,sc_
379
381static OT_ProcRet NS(Sq3StmtC_HandleResolve) (OtClass_ARGS) {
384 MK_HDL netHdl = 0;
387 SQ3_STMT retVal = Sq3StmtHandleResolve (netHdl);
388 OT_retObj_SET_STMT(retVal);
389 goto end;
390 error:
392 end:
394}
395
396// doc-key: Sq3StmtC,Sq3StmtC-Class-Export,om_
397
398// skip on class-overload: Sq3StmtHandleGet → MkObjectHandleGet
400static OT_ProcRet NS(Sq3StmtC_HandleGet) (Sq3StmtC_ARGS) {OT_ERROR_LNG_RETURN;}
401
403// Sq3StmtC_Class_ATL_API
404
408
409// doc-key: Sq3StmtC,Sq3StmtC-Class-Introspection,oc_
410
412static OT_ProcRet NS(Sq3StmtC_Next) (Sq3StmtC_ARGS) {
416 SQ3_STMT retVal = Sq3StmtNext (hdl);
417 OT_retObj_SET_STMT(retVal);
418 goto end;
419 error:
421 end:
423}
424
426static OT_ProcRet NS(Sq3StmtC_Prev) (Sq3StmtC_ARGS) {
430 SQ3_STMT retVal = Sq3StmtPrev (hdl);
431 OT_retObj_SET_STMT(retVal);
432 goto end;
433 error:
435 end:
437}
438
439// doc-key: Sq3StmtC,Sq3StmtC-Class-Introspection,sc_
440
442static OT_ProcRet NS(Sq3StmtC_Instances) (OtClass_ARGS) {
446 SQ3_STMT retVal = Sq3StmtInstances ();
447 OT_retObj_SET_STMT(retVal);
448 goto end;
449 error:
451 end:
453}
454
456// Sq3StmtC_Class_ATL_API
457
461
462// doc-key: Sq3StmtC,Sq3StmtC-Class-Misc,sc_
463
465static OT_ProcRet NS(Sq3StmtC_GetNull) (OtClass_ARGS) {
469 SQ3_STMT retVal = Sq3StmtGetNull ();
470 OT_retObj_SET_STMT(retVal);
471 goto end;
472 error:
474 end:
476}
477
479// Sq3StmtC_Class_ATL_API
480
484
485// doc-key: Sq3StmtC,Sq3StmtC-Column,oc_
486
488static OT_ProcRet NS(Sq3StmtC_ColumnValue) (Sq3StmtC_ARGS) {
491 MK_I32 iCol = 0;
494 SQ3_VAL retVal = Sq3StmtColumnValue (hdl, iCol);
495 OT_retObj_SET_VAL(retVal);
496 goto end;
497 error:
499 end:
501}
502
503// doc-key: Sq3StmtC,Sq3StmtC-Column,om_
504
506static OT_ProcRet NS(Sq3StmtC_ColumnBlob) (Sq3StmtC_ARGS) {
509 MK_I32 iCol = 0;
512 MkBinaryR retVal = Sq3StmtColumnBlob (hdl, iCol);
514 goto end;
515 error:
517 end:
519}
520
522static OT_ProcRet NS(Sq3StmtC_ColumnBytes) (Sq3StmtC_ARGS) {
525 MK_I32 iCol = 0;
529 goto end;
530 error:
532 end:
534}
535
537static OT_ProcRet NS(Sq3StmtC_ColumnCount) (Sq3StmtC_ARGS) {
542 goto end;
543 error:
545 end:
547}
548
550static OT_ProcRet NS(Sq3StmtC_ColumnDouble) (Sq3StmtC_ARGS) {
553 MK_I32 iCol = 0;
557 goto end;
558 error:
560 end:
562}
563
565static OT_ProcRet NS(Sq3StmtC_ColumnInt) (Sq3StmtC_ARGS) {
568 MK_I32 iCol = 0;
572 goto end;
573 error:
575 end:
577}
578
580static OT_ProcRet NS(Sq3StmtC_ColumnInt64) (Sq3StmtC_ARGS) {
583 MK_I32 iCol = 0;
587 goto end;
588 error:
590 end:
592}
593
595static OT_ProcRet NS(Sq3StmtC_ColumnName) (Sq3StmtC_ARGS) {
598 MK_I32 N = 0;
602 goto end;
603 error:
605 end:
607}
608
610static OT_ProcRet NS(Sq3StmtC_ColumnText) (Sq3StmtC_ARGS) {
613 MK_I32 iCol = 0;
616 MkStringR retVal = Sq3StmtColumnText (hdl, iCol);
618 goto end;
619 error:
621 end:
623}
624
626static OT_ProcRet NS(Sq3StmtC_ColumnType) (Sq3StmtC_ARGS) {
629 MK_I32 iCol = 0;
633 goto end;
634 error:
636 end:
638}
639
641// Sq3StmtC_Column_ATL_API
642
646
647// doc-key: Sq3StmtC,Sq3StmtC-Info,oc_
648
650static OT_ProcRet NS(Sq3StmtC_DbHandle) (Sq3StmtC_ARGS) {
654 SQ3_LITE retVal = Sq3StmtDbHandle (hdl);
655 OT_retObj_SET_LITE(retVal);
656 goto end;
657 error:
659 end:
661}
662
663// doc-key: Sq3StmtC,Sq3StmtC-Info,om_
664
666static OT_ProcRet NS(Sq3StmtC_Busy) (Sq3StmtC_ARGS) {
670 MkErrorC_Check(hdl,Sq3StmtBusy (hdl));
672 goto end;
673 error:
675 end:
677}
678
680static OT_ProcRet NS(Sq3StmtC_DataCount) (Sq3StmtC_ARGS) {
686 goto end;
687 error:
689 end:
691}
692
694static OT_ProcRet NS(Sq3StmtC_IsExplain) (Sq3StmtC_ARGS) {
700 goto end;
701 error:
703 end:
705}
706
707// skip on class-overload: Sq3StmtLog → MkObjectLog
710
712static OT_ProcRet NS(Sq3StmtC_Readonly) (Sq3StmtC_ARGS) {
718 goto end;
719 error:
721 end:
723}
724
726static OT_ProcRet NS(Sq3StmtC_Status) (Sq3StmtC_ARGS) {
729 enum Sq3StmtStatusE op = 0;
731 MK_BOOL resetFlg = 0;
734 MkErrorC_Check(hdl,Sq3StmtStatus (hdl, op, resetFlg));
736 goto end;
737 error:
739 end:
741}
742
744// Sq3StmtC_Info_ATL_API
745
749
750// doc-key: Sq3StmtC,Sq3StmtC-Misc,sc_
751
753static OT_ProcRet NS(Sq3StmtC_NextStmt) (OtClass_ARGS) {
756 SQ3_LITE pDb = 0;
758 SQ3_STMT pStmt = NULL;
761 SQ3_STMT retVal = Sq3StmtNextStmt (pDb, pStmt);
762 OT_retObj_SET_STMT(retVal);
763 goto end;
764 error:
766 end:
768}
769
770// doc-key: Sq3StmtC,Sq3StmtC-Misc,om_
771
773static OT_ProcRet NS(Sq3StmtC_ClearBindings) (Sq3StmtC_ARGS) {
779 goto end;
780 error:
782 end:
784}
785
787static OT_ProcRet NS(Sq3StmtC_Explain) (Sq3StmtC_ARGS) {
790 MK_I32 eMode = 0;
793 MkErrorC_Check(hdl,Sq3StmtExplain (hdl, eMode));
795 goto end;
796 error:
798 end:
800}
801
803static OT_ProcRet NS(Sq3StmtC_Reset) (Sq3StmtC_ARGS) {
807 MkErrorC_Check(hdl,Sq3StmtReset (hdl));
809 goto end;
810 error:
812 end:
814}
815
816// doc-key: Sq3StmtC,Sq3StmtC-Misc,omo
817
819static OT_ProcRet NS(Sq3StmtC_Step) (Sq3StmtC_ARGS) {
823 enum Sq3ErrorE retCode;
824 MkErrorC_Check(hdl,Sq3StmtStep (hdl, &retCode));
825 OT_retObj_SET(OT_NEW_Sq3_enum_OBJ(ErrorE,retCode));
826 goto end;
827 error:
829 end:
831}
832
834// Sq3StmtC_Misc_ATL_API
835
839
840// doc-key: Sq3StmtC,Sq3StmtC-Sql,om_
841
843static OT_ProcRet NS(Sq3StmtC_ExpandedSql) (Sq3StmtC_ARGS) {
848 goto end;
849 error:
851 end:
853}
854
856static OT_ProcRet NS(Sq3StmtC_GetPzTail) (Sq3StmtC_ARGS) {
861 goto end;
862 error:
864 end:
866}
867
869static OT_ProcRet NS(Sq3StmtC_Sql) (Sq3StmtC_ARGS) {
874 goto end;
875 error:
877 end:
879}
880
882// Sq3StmtC_Sql_ATL_API
883
887
888// doc-key: Sq3StmtC,Sq3StmtC-TOR,sCo
889
891static OT_ProcRet NS(Sq3StmtC_CTOR) (CONSTR_ARGS) {
894 SQ3_LITE db = 0;
896 MkStringR zSql = {0};
898 SQ3_STMT ppStmt;
899 MkErrorC_Check(db,Sq3StmtPrepareV2 (db, zSql, &ppStmt));
900 OT_CONSTRUCTOR_POST(ppStmt)
901 OT_retObj_CONSTR(ppStmt);
902 goto end;
903 error:
905 end:
907}
908
910static OT_ProcRet NS(Sq3StmtC_PrepareV2) (OtClass_ARGS) {
913 SQ3_LITE db = 0;
915 MkStringR zSql = {0};
918 SQ3_STMT ppStmt;
919 MkErrorC_Check(db,Sq3StmtPrepareV2 (db, zSql, &ppStmt));
920 OT_CONSTRUCTOR_POST(ppStmt)
921 OT_retObj_SET_STMT(ppStmt);
922 goto end;
923 error:
925 end:
927}
928
930static OT_ProcRet NS(Sq3StmtC_PrepareV3) (OtClass_ARGS) {
933 SQ3_LITE db = 0;
935 MkStringR zSql = {0};
937 enum Sq3PrepareEF prepFlags = SQ3_PREPARE_NO;
940 SQ3_STMT ppStmt;
941 MkErrorC_Check(db,Sq3StmtPrepareV3 (db, zSql, prepFlags, &ppStmt));
942 OT_retObj_SET_STMT(ppStmt);
943 goto end;
944 error:
946 end:
948}
949
950// doc-key: Sq3StmtC,Sq3StmtC-TOR,om_
951
953static OT_ProcRet NS(Sq3StmtC_Finalize) (Sq3StmtC_ARGS) {
959 goto end;
960 error:
962 end:
964}
965
967// Sq3StmtC_TOR_ATL_API
968
969// END-Sq3StmtC - created by 'atl_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
970
971// ---------------------------------------------------------------------------------------
972
973static const OtObjProcDefS NS(sOtClassDef)[] = {
974 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
975
976 // doc-key: Sq3StmtC,Sq3Stmt,sCo
977 { "::Sq3StmtC::PrepareV2" , NS(Sq3StmtC_PrepareV2) },
978 { "::Sq3StmtC::PrepareV3" , NS(Sq3StmtC_PrepareV3) },
979
980 // doc-key: Sq3StmtC,Sq3Stmt,sc_
981 { "::Sq3StmtC::GetNull" , NS(Sq3StmtC_GetNull) },
982 { "::Sq3StmtC::HandleResolve" , NS(Sq3StmtC_HandleResolve) },
983 { "::Sq3StmtC::Instances" , NS(Sq3StmtC_Instances) },
984 { "::Sq3StmtC::NextStmt" , NS(Sq3StmtC_NextStmt) },
985
986 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
987 { NULL }
988};
989
990// ---------------------------------------------------------------------------------------
991
992static const OtObjProcDefS NS(sInstanceDef)[] = {
993 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
994
995 // doc-key: Sq3StmtC,Sq3Stmt,oC_
996 { "::Sq3StmtC::Sq3StmtC" , NS(Sq3StmtC_CTOR) },
997
998 // doc-key: Sq3StmtC,Sq3Stmt,oc_
999 { "::Sq3StmtC::ColumnValue" , NS(Sq3StmtC_ColumnValue) },
1000 { "::Sq3StmtC::DbHandle" , NS(Sq3StmtC_DbHandle) },
1001 { "::Sq3StmtC::Next" , NS(Sq3StmtC_Next) },
1002 { "::Sq3StmtC::Prev" , NS(Sq3StmtC_Prev) },
1003
1004 // doc-key: Sq3StmtC,Sq3Stmt,om_
1005 { "::Sq3StmtC::BindBlob" , NS(Sq3StmtC_BindBlob) },
1006 { "::Sq3StmtC::BindDouble" , NS(Sq3StmtC_BindDouble) },
1007 { "::Sq3StmtC::BindInt" , NS(Sq3StmtC_BindInt) },
1008 { "::Sq3StmtC::BindInt64" , NS(Sq3StmtC_BindInt64) },
1009 { "::Sq3StmtC::BindNull" , NS(Sq3StmtC_BindNull) },
1010 { "::Sq3StmtC::BindParameterCount" , NS(Sq3StmtC_BindParameterCount) },
1011 { "::Sq3StmtC::BindParameterIndex" , NS(Sq3StmtC_BindParameterIndex) },
1012 { "::Sq3StmtC::BindParameterName" , NS(Sq3StmtC_BindParameterName) },
1013 { "::Sq3StmtC::BindText" , NS(Sq3StmtC_BindText) },
1014 { "::Sq3StmtC::BindValue" , NS(Sq3StmtC_BindValue) },
1015 { "::Sq3StmtC::BindZeroblob" , NS(Sq3StmtC_BindZeroblob) },
1016 { "::Sq3StmtC::BindZeroblob64" , NS(Sq3StmtC_BindZeroblob64) },
1017 { "::Sq3StmtC::Busy" , NS(Sq3StmtC_Busy) },
1018 { "::Sq3StmtC::ClearBindings" , NS(Sq3StmtC_ClearBindings) },
1019 { "::Sq3StmtC::ColumnBlob" , NS(Sq3StmtC_ColumnBlob) },
1020 { "::Sq3StmtC::ColumnBytes" , NS(Sq3StmtC_ColumnBytes) },
1021 { "::Sq3StmtC::ColumnCount" , NS(Sq3StmtC_ColumnCount) },
1022 { "::Sq3StmtC::ColumnDouble" , NS(Sq3StmtC_ColumnDouble) },
1023 { "::Sq3StmtC::ColumnInt" , NS(Sq3StmtC_ColumnInt) },
1024 { "::Sq3StmtC::ColumnInt64" , NS(Sq3StmtC_ColumnInt64) },
1025 { "::Sq3StmtC::ColumnName" , NS(Sq3StmtC_ColumnName) },
1026 { "::Sq3StmtC::ColumnText" , NS(Sq3StmtC_ColumnText) },
1027 { "::Sq3StmtC::ColumnType" , NS(Sq3StmtC_ColumnType) },
1028 { "::Sq3StmtC::DataCount" , NS(Sq3StmtC_DataCount) },
1029 { "::Sq3StmtC::ExpandedSql" , NS(Sq3StmtC_ExpandedSql) },
1030 { "::Sq3StmtC::Explain" , NS(Sq3StmtC_Explain) },
1031 { "::Sq3StmtC::Finalize" , NS(Sq3StmtC_Finalize) },
1032 { "::Sq3StmtC::GetPzTail" , NS(Sq3StmtC_GetPzTail) },
1033 // skip class-overload: HandleGet → MkObjectHandleGet
1034 { "::Sq3StmtC::IsExplain" , NS(Sq3StmtC_IsExplain) },
1035 // skip class-overload: Log → MkObjectLog
1036 { "::Sq3StmtC::Readonly" , NS(Sq3StmtC_Readonly) },
1037 { "::Sq3StmtC::Reset" , NS(Sq3StmtC_Reset) },
1038 { "::Sq3StmtC::Sql" , NS(Sq3StmtC_Sql) },
1039 { "::Sq3StmtC::Status" , NS(Sq3StmtC_Status) },
1040
1041 // doc-key: Sq3StmtC,Sq3Stmt,omo
1042 { "::Sq3StmtC::Step" , NS(Sq3StmtC_Step) },
1043
1044 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
1045 { NULL }
1046};
1047
1053
1054int NS(pSq3StmtC_Init) ( OT_SQ3_ARGS OT_NS_T ns )
1055{
1056 ClassInit
1057
1058 return TCL_OK;
1059error:
1060 return TCL_ERROR;
1061}
#define OT_CHECK_bool(val)
#define MK(n)
#define AtomMake(...)
#define OT_SETUP_VARARGS(min, max, d)
#define OT_CHECK_NIH(val)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_ERROR_LNG_RETURN
#define OT_CHECK_NI4(val)
#define OT_CHECK_NI8(val)
MOX_NS_T OT_NS_T
#define OT_retObj_SET_Error
#define OT_CHECK_NF8(val)
#define OT_CONSTRUCTOR_POST(x)
#define OT_retObj_SET_DBL(nat)
#define OT_retObj_SET_I64(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
MOX_OBJ_T OT_SELF_T
#define OT_GET__ME_REF_MkStringR(s)
#define OT_GET__ME_REF_MkBinaryR(b)
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_RETURN
#define OT_CHECK__ME_REF_MkStringR(val)
#define OT_CHECK__ME_REF_MkBinaryR(val)
#define OT_MK_CALL
#define OT_retObj_SET_STR(nat)
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define CONSTR_ARGS
#define OT_CHECK_STRN(val)
#define OtClass_ARGS
#define OT_SQ3_ARGS
#define Sq3StmtC_ARGS
#define OT_NEW_Sq3_enum_OBJ(typ, val)
#define OT_retObj_SET_LITE(nat)
#define NS(n)
#define OT_retObj_SET_VAL(nat)
#define OT_retObj_SET_STMT(nat)
#define SETUP_asq3rt(r)
tag: nhi1-release-250425
#define Instances_doc
#define DataCount_doc
#define ColumnType_doc
#define OT_SETUP_hdl_static_constr
#define DbHandle_doc
#define BindValue_doc
#define Reset_doc
#define Finalize_doc
#define ColumnDouble_doc
#define OT_SETUP_hdl
#define IsExplain_doc
#define ClearBindings_doc
#define ColumnName_doc
#define Step_doc
#define ColumnText_doc
#define BindParameterCount_doc
#define ColumnBytes_doc
#define GetPzTail_doc
#define OT_SETUP_hdl_destr
#define BindInt_doc
#define GetNull_doc
#define ColumnInt_doc
#define Next_doc
#define ColumnCount_doc
#define BindZeroblob64_doc
#define HandleResolve_doc
#define Prev_doc
#define BindParameterName_doc
#define OT_CLASS
#define BindNull_doc
#define OT_SETUP_hdl_static
#define OT_SETUP_hdl_constr
#define PrepareV2_doc
#define Status_doc
#define ColumnValue_doc
#define BindParameterIndex_doc
#define Explain_doc
#define NextStmt_doc
#define PrepareV3_doc
#define Sql_doc
#define OT_retObj_CONSTR(x)
#define BindZeroblob_doc
#define BindInt64_doc
#define BindText_doc
#define CTOR_doc
#define ColumnInt64_doc
#define ExpandedSql_doc
#define ClassInit
#define Readonly_doc
#define Busy_doc
#define ColumnBlob_doc
#define BindDouble_doc
#define BindBlob_doc
#define MK_NULL_NO
#define MK_NULL_YES
#define MK_UNUSED
#define MK_DEPRECATED
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
signed long long MK_I64
bool MK_BOOL
double MK_DBL
int32_t MK_HDL
signed int MK_I32
#define MK_RT_ARGS
Sq3StmtStatusE
Status Parameters for prepared statements.
Sq3PrepareEF
Prepare Flags.
Sq3ErrorE
Result Codes.
@ SQ3_PREPARE_NO
static enum MkErrorE Sq3StmtBindDouble(SQ3_STMT sq3stmt, MK_I32 arg1, MK_DBL arg2)
Binding Values To Prepared Statements …
static enum MkErrorE Sq3StmtBindNull(SQ3_STMT sq3stmt, MK_I32 arg1)
Binding Values To Prepared Statements …
static MK_STRN Sq3StmtBindParameterName(SQ3_STMT sq3stmt, MK_I32 arg1)
Name Of A Host Parameter …
#define Sq3StmtBindText(...)
static enum MkErrorE Sq3StmtBindZeroblob64(SQ3_STMT sq3stmt, MK_I32 arg1, MK_I64 arg2)
Binding Values To Prepared Statements …
#define Sq3StmtBindBlob(...)
static enum MkErrorE Sq3StmtBindParameterCount(SQ3_STMT sq3stmt)
Number Of SQL Parameters …
static enum MkErrorE Sq3StmtBindInt64(SQ3_STMT sq3stmt, MK_I32 arg1, MK_I64 arg2)
Binding Values To Prepared Statements …
static enum MkErrorE Sq3StmtBindValue(SQ3_STMT sq3stmt, MK_I32 arg1, SQ3_VALN arg2)
Binding Values To Prepared Statements …
static enum MkErrorE Sq3StmtBindZeroblob(SQ3_STMT sq3stmt, MK_I32 arg1, MK_I32 n)
Binding Values To Prepared Statements …
static enum MkErrorE Sq3StmtBindParameterIndex(SQ3_STMT sq3stmt, MK_STRN zName)
Index Of A Parameter With A Given Name …
static enum MkErrorE Sq3StmtBindInt(SQ3_STMT sq3stmt, MK_I32 arg1, MK_I32 arg2)
Binding Values To Prepared Statements …
#define Sq3StmtHandleResolve(...)
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
#define Sq3StmtInstances()
static SQ3_STMT Sq3StmtGetNull(void)
Null-Slot - return a Sq3StmtC typed NULL instance …
static enum Sq3TypeE Sq3StmtColumnType(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
static MkBinaryR Sq3StmtColumnBlob(SQ3_STMT sq3stmt, MK_I32 iCol)
Result a MkBinaryR Value From A Query.
static MK_DBL Sq3StmtColumnDouble(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
static MK_I64 Sq3StmtColumnInt64(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
static MkStringR Sq3StmtColumnText(SQ3_STMT sq3stmt, MK_I32 iCol)
Result a MkStringR Value From A Query.
static MK_I32 Sq3StmtColumnCount(SQ3_STMT pStmt)
Number Of Columns In A Result Set …
static MK_STRN Sq3StmtColumnName(SQ3_STMT sq3stmt, MK_I32 N)
Column Names In A Result Set …
static SQ3_VAL Sq3StmtColumnValue(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
static MK_I32 Sq3StmtColumnInt(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
static MK_I32 Sq3StmtColumnBytes(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
static enum MkErrorE Sq3StmtStatus(SQ3_STMT sq3stmt, enum Sq3StmtStatusE op, MK_BOOL resetFlg)
Prepared Statement Status …
static SQ3_LITE Sq3StmtDbHandle(SQ3_STMT sq3stmt)
Find The Database Handle Of A Prepared Statement …
static enum MkErrorE Sq3StmtDataCount(SQ3_STMT pStmt)
Number of columns in a result set …
static enum MkErrorE Sq3StmtIsExplain(SQ3_STMT pStmt)
Query The EXPLAIN Setting For A Prepared Statement …
static enum MkErrorE Sq3StmtReadonly(SQ3_STMT pStmt)
Determine If An SQL Statement Writes The Database …
static enum MkErrorE Sq3StmtBusy(SQ3_STMT sq3stmt)
Determine If A Prepared Statement Has Been Reset …
static enum MkErrorE Sq3StmtExplain(SQ3_STMT pStmt, MK_I32 eMode)
Change The EXPLAIN Setting For A Prepared Statement …
static enum MkErrorE Sq3StmtClearBindings(SQ3_STMT sq3stmt)
Reset All Bindings On A Prepared Statement …
static SQ3_STMT Sq3StmtNextStmt(SQ3_LITE pDb, SQ3_STMT pStmt)
Find the next prepared statement …
static enum MkErrorE Sq3StmtStep(SQ3_STMT sq3stmt, enum Sq3ErrorE *retCode)
Evaluate An SQL Statement …
static enum MkErrorE Sq3StmtReset(SQ3_STMT pStmt)
Reset A Prepared Statement Object …
static MK_STR Sq3StmtExpandedSql(SQ3_STMT pStmt)
Retrieving Statement SQL …
static MK_STRN Sq3StmtGetPzTail(SQ3_STMT sq3stmt)
return the non compiled sql-statement from Sq3StmtPrepareV2 and Sq3StmtPrepareV3 …
static MK_STRN Sq3StmtSql(SQ3_STMT pStmt)
Retrieving Statement SQL …
static enum MkErrorE Sq3StmtPrepareV2(SQ3_LITE db, MkStringR zSql, SQ3_STMT *ppStmt)
Compiling An SQL Statement …
static enum MkErrorE Sq3StmtFinalize(SQ3_STMT pStmt)
Destroy A Prepared Statement Object …
static enum MkErrorE Sq3StmtPrepareV3(SQ3_LITE db, MkStringR zSql, Sq3PrepareEF prepFlags, SQ3_STMT *ppStmt)
Compiling An SQL Statement …
#define OT_CHECK_VALN(val, nullB)
#define OT_CHECK_LITE(val, nullB)
#define OT_CHECK_STMT(val, nullB)
Struct to represent the data of the Sq3LiteC …
Struct to represent the data of the Sq3StmtC …
Struct to represent the data of the Sq3ValueC …