theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3StmtC_cc.hh
Go to the documentation of this file.
1
9/* LABEL-INIT */
10
11#pragma once
12
13namespace ccsq3lite {
14
17 typedef struct {
20 } Sq3StmtC_A;
21
24 class Sq3StmtC : public MkObjectC {
25
26 friend class Sq3Lite;
27
28 static inline MK_PTR Sq3StmtC_selfCreateTLS (MK_OBJ obj);
29
30/* LABEL-START */
31
34
35 public:
36 static thread_local Sq3StmtC MK_NULL_REF;
37
38 private:
39
40 static Sq3StmtC* Sq3StmtC_GetSelf (SQ3_STMT hdl) {
41 return (hdl != NULL ? static_cast<Sq3StmtC*>((*Sq3StmtC_X2obj(hdl)).self) : &MK_NULL_REF);
42 }
43
44 #ifdef Sq3StmtC_selfCreate_overload
45 static MK_PTR Sq3StmtC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env);
46 #else
47 static MK_PTR Sq3StmtC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env) {
48 return new Sq3StmtC(obj);
49 }
50 #endif
51
52 static void Sq3StmtC_selfDelete (MK_RT_ARGS MK_PTR self, MK_PTR env) {
53 delete static_cast<Sq3StmtC*>(self);
54 }
55
56 static void Sq3StmtC_selfUnlink (MK_RT_ARGS MK_PTR self, MK_PTR env) {
57 Sq3StmtC* selfO = static_cast<Sq3StmtC*>(self);
58 selfO->atomUnlink();
59 }
60
61 void Sq3StmtC_Init (SQ3_STMT hdl) { atomInit(Sq3StmtC_X2obj(hdl)); };
62
63
64 static Sq3StmtC* Sq3StmtC_ObjCreate (MK_RT_ARGS SQ3_STMT hdl) {
65 return static_cast<Sq3StmtC*>(MkObjectC::atomObjCreate(MK_RT_CALL Sq3StmtC_X2obj(hdl)));
66 }
67
68#ifndef META_IS_MkObjectC
69 Sq3StmtC (MK_OBJ obj) : MkObjectC(obj) {};
70#endif
71
72 public:
73
74#ifndef META_IS_MkObjectC
76#endif
77
82
84 SQ3_STMT getSTMT() const {
85 SQ3_STMT ret = reinterpret_cast<SQ3_STMT>(hdl);
86 if (unlikely(ret == NULL)) InstHdlIsNullError();
87 return ret;
88 };
89
92 return reinterpret_cast<SQ3_STMT>(hdl);
93 };
94
97 SQ3_STMTN ret = reinterpret_cast<SQ3_STMTN>(hdl);
98 if (unlikely(ret == NULL)) InstHdlIsNullError();
99 return ret;
100 };
101
104 return reinterpret_cast<SQ3_STMTN>(hdl);
105 };
106
108 static SQ3_STMT getSTMT(Sq3StmtC* clsHdl) {
109 SQ3_STMT ret = clsHdl ? reinterpret_cast<SQ3_STMT>(clsHdl->hdl) : NULL;
110 if (unlikely(ret == NULL)) ClassHdlIsNullError(Sq3StmtC);
111 return ret;
112 };
113
116 return clsHdl ? reinterpret_cast<SQ3_STMT>(clsHdl->hdl) : NULL;
117 };
118
120 static SQ3_STMTN getSTMTN(const Sq3StmtC* clsHdl) {
121 SQ3_STMTN ret = clsHdl ? reinterpret_cast<SQ3_STMTN>(clsHdl->hdl) : NULL;
122 if (unlikely(ret == NULL)) ClassHdlIsNullError(Sq3StmtC);
123 return ret;
124 };
125
128 return clsHdl ? reinterpret_cast<SQ3_STMTN>(clsHdl->hdl) : NULL;
129 };
130
132 static SQ3_STMT getSTMT(const Sq3StmtC& clsHdl) {
133 return clsHdl.getSTMT();
134 };
135
137 static SQ3_STMT getSTMT__null_allow(const Sq3StmtC& clsHdl) {
138 return clsHdl.getSTMT__null_allow();
139 };
140
142 static SQ3_STMTN getSTMTN(const Sq3StmtC& clsHdl) {
143 return clsHdl.getSTMTN();
144 };
145
148 return clsHdl.getSTMTN__null_allow();
149 };
150
152 bool Check() const {
153 return (hdl && Sq3StmtCheck(hdl));
154 };
155
156/* LABEL-END */
157
158 public:
159
160/* no COPY constructor
161 Sq3StmtC (const Sq3StmtC* hdl);
162 Sq3StmtC (const Sq3StmtC& ref);
163 Sq3StmtC& operator= (const Sq3StmtC& buf);
164 Sq3StmtC& operator= (const Sq3StmtC* buf);
165*/
166
167 // BEGIN-Sq3StmtC - created by 'cc_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
168
172
173 public:
174
175 // doc-key: Sq3StmtC,Sq3StmtC-Bind,om_,public
176
178 void BindBlob (MK_I32 pos, MK_BNP blob);
179
181 void BindDouble (MK_I32 arg1, MK_DBL arg2);
182
184 void BindInt (MK_I32 arg1, MK_I32 arg2);
185
187 void BindInt64 (MK_I32 arg1, MK_I64 arg2);
188
190 void BindNull (MK_I32 arg1);
191
193 void BindParameterCount ();
194
196 void BindParameterIndex (MK_STRN zName);
197
199 void BindParameterIndex (const std::string& zName);
200
203
205 void BindText (MK_I32 pos, const std::string& text);
206
208 void BindValue (MK_I32 arg1, const Sq3ValueC* arg2);
209
211 void BindValue (MK_I32 arg1, const Sq3ValueC& arg2);
212
214 void BindZeroblob (MK_I32 arg1, MK_I32 n);
215
217 void BindZeroblob64 (MK_I32 arg1, MK_I64 arg2);
218
220 // Sq3StmtC_Bind_CC_API
221
225
226 public:
227
228 // doc-key: Sq3StmtC,Sq3StmtC-Class-Export,sc_,public
229
231 static Sq3StmtC* HandleResolve (MK_HDL netHdl);
232
233 // doc-key: Sq3StmtC,Sq3StmtC-Class-Export,om_,public
234
235 // skip class-overload: MK_HDL HandleGet ()
236
238 // Sq3StmtC_Class_CC_API
239
243
244 public:
245
246 // doc-key: Sq3StmtC,Sq3StmtC-Class-Introspection,oc_,public
247
249 Sq3StmtC* Next ();
250
252 Sq3StmtC* Prev ();
253
254 // doc-key: Sq3StmtC,Sq3StmtC-Class-Introspection,sc_,public
255
257 static Sq3StmtC* Instances ();
258
260 // Sq3StmtC_Class_CC_API
261
265
266 public:
267
268 // doc-key: Sq3StmtC,Sq3StmtC-Class-Misc,sc_,public
269
271 static Sq3StmtC* GetNull ();
272
274 // Sq3StmtC_Class_CC_API
275
279
280 public:
281
282 // doc-key: Sq3StmtC,Sq3StmtC-Column,oc_,public
283
286
287 // doc-key: Sq3StmtC,Sq3StmtC-Column,om_,public
288
290 MK_BNP ColumnBlob (MK_I32 iCol);
291
294
297
300
302 MK_I32 ColumnInt (MK_I32 iCol);
303
306
309
311 std::string ColumnText (MK_I32 iCol);
312
315
317 // Sq3StmtC_Column_CC_API
318
322
323 public:
324
325 // doc-key: Sq3StmtC,Sq3StmtC-Info,oc_,public
326
328 Sq3LiteC* DbHandle ();
329
330 // doc-key: Sq3StmtC,Sq3StmtC-Info,om_,public
331
333 void Busy ();
334
336 void DataCount ();
337
339 void IsExplain ();
340
341 // skip class-overload: void Log (const MkObjectC* fmtobj = NULL, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) const
342
343 // skip class-overload: void Log (const MkObjectC& fmtobj, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) const
344
346 void Readonly ();
347
349 void Status (Sq3StmtStatusE op, MK_BOOL resetFlg);
350
352 // Sq3StmtC_Info_CC_API
353
357
358 public:
359
360 // doc-key: Sq3StmtC,Sq3StmtC-Misc,sc_,public
361
363 static Sq3StmtC* NextStmt (Sq3LiteC* pDb, Sq3StmtC* pStmt = NULL);
364
366 static Sq3StmtC* NextStmt (const Sq3LiteC& pDb, const Sq3StmtC& pStmt);
367
368 // doc-key: Sq3StmtC,Sq3StmtC-Misc,om_,public
369
371 void ClearBindings ();
372
374 void Explain (MK_I32 eMode);
375
377 void Reset ();
378
379 // doc-key: Sq3StmtC,Sq3StmtC-Misc,omo,public
380
382 Sq3ErrorE Step ();
383
385 // Sq3StmtC_Misc_CC_API
386
390
391 public:
392
393 // doc-key: Sq3StmtC,Sq3StmtC-Sql,om_,public
394
397
400
402 MK_STRN Sql ();
403
405 // Sq3StmtC_Sql_CC_API
406
410
411 private:
412
413 // doc-key: Sq3StmtC,Sq3StmtC-TOR,sCo,private
414
416 static MK_OBJ CTOR (Sq3LiteC* db, const std::string& zSql);
417
418 public:
419
420 // doc-key: Sq3StmtC,Sq3StmtC-TOR,sCo,public
421
423 static Sq3StmtC* PrepareV2 (Sq3LiteC* db, const std::string& zSql);
424
426 Sq3StmtC (Sq3LiteC* db, const std::string& zSql) : MkObjectC(CTOR(db, zSql)) {};
427
429 static Sq3StmtC* PrepareV3 (Sq3LiteC* db, const std::string& zSql, Sq3PrepareEF prepFlags = SQ3_PREPARE_NO);
430
431 // doc-key: Sq3StmtC,Sq3StmtC-TOR,om_,public
432
434 void Finalize ();
435
437 // Sq3StmtC_TOR_CC_API
438
439 // END-Sq3StmtC - created by 'cc_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
440
442
443 }; // class Sq3StmtC
444} // namespace ccsq3lite
Struct to represent the data of the Sq3LiteC … → C-API: libsq3lite::Sq3LiteS
Sq3Lite PACKAGE - toplevel package of the Programming-Language-Micro-Kernel (PLMK) …
Struct to represent the data of the Sq3StmtC … → C-API: libsq3lite::Sq3StmtS
Struct to represent the data of the Sq3ValueC … → C-API: libsq3lite::Sq3ValueS
#define unlikely(x)
double MK_DBL
signed long long MK_I64
int32_t MK_HDL
int32_t MK_NUM
signed int MK_I32
MK_STRB * MK_STR
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
static MK_PTR atomObjCreate(MK_RT_ARGS MK_OBJ obj)
void atomInit(MK_OBJ obj)
static MK_PTR atomObjNew(MK_RT_ARGS MK_OBJ obj)
struct MkObjectS * MK_OBJ
#define MK_RT_CALL
#define MK_RT_ARGS
Sq3ErrorE
Result Codes.
Sq3TypeE
Fundamental Datatypes.
Sq3StmtStatusE
Status Parameters for prepared statements.
Sq3PrepareEF
Prepare Flags.
void BindText(MK_I32 pos, const std::string &text)
C++: sq3stmt.BindText(MK_I32 pos, const std::string& text) → C-API Bind a MkStringR Value To a ...
void BindValue(MK_I32 arg1, const Sq3ValueC *arg2)
C++: sq3stmt.BindValue(MK_I32 arg1, const Sq3ValueC* arg2) → C-API Binding Values To Prepared S...
void BindZeroblob(MK_I32 arg1, MK_I32 n)
C++: sq3stmt.BindZeroblob(MK_I32 arg1, MK_I32 n) → C-API Binding Values To Prepared Statements ...
void BindNull(MK_I32 arg1)
C++: sq3stmt.BindNull(MK_I32 arg1) → C-API Binding Values To Prepared Statements …
void BindDouble(MK_I32 arg1, MK_DBL arg2)
C++: sq3stmt.BindDouble(MK_I32 arg1, MK_DBL arg2) → C-API Binding Values To Prepared Statements...
MK_STRN BindParameterName(MK_I32 arg1)
C++: MK_STRN sq3stmt.BindParameterName(MK_I32 arg1) → C-API Name Of A Host Parameter …
void BindParameterIndex(MK_STRN zName)
C++: sq3stmt.BindParameterIndex(MK_STRN zName) → C-API Index Of A Parameter With A Given Name …
void BindInt(MK_I32 arg1, MK_I32 arg2)
C++: sq3stmt.BindInt(MK_I32 arg1, MK_I32 arg2) → C-API Binding Values To Prepared Statements …
void BindParameterCount()
C++: sq3stmt.BindParameterCount() → C-API Number Of SQL Parameters …
void BindZeroblob64(MK_I32 arg1, MK_I64 arg2)
C++: sq3stmt.BindZeroblob64(MK_I32 arg1, MK_I64 arg2) → C-API Binding Values To Prepared Statem...
void BindBlob(MK_I32 pos, MK_BNP blob)
C++: sq3stmt.BindBlob(MK_I32 pos, MK_BNP blob) → C-API Bind a MkBinaryR Value To a Prepared Sta...
void BindInt64(MK_I32 arg1, MK_I64 arg2)
C++: sq3stmt.BindInt64(MK_I32 arg1, MK_I64 arg2) → C-API Binding Values To Prepared Statements ...
static SQ3_STMT getSTMT(Sq3StmtC *clsHdl)
return LibMsgqueObject from current Sq3StmtC pointer
static SQ3_STMT getSTMT__null_allow(const Sq3StmtC &clsHdl)
return LibMsgqueObject from current Sq3StmtC reference
SQ3_STMT getSTMT() const
return the LibMsgqueObject from current Sq3StmtC instance
Sq3StmtC(SQ3_STMT hdl)
bool Check() const
check if pointer is still valid
SQ3_STMT getSTMT__null_allow() const
return the LibMsgqueObject from current Sq3StmtC instance
static SQ3_STMT getSTMT(const Sq3StmtC &clsHdl)
return LibMsgqueObject from current Sq3StmtC reference
static Sq3StmtC * Sq3StmtC_ObjNew(MK_RT_ARGS SQ3_STMT hdl)
return Sq3StmtC from LibMsgqueObject
static SQ3_STMTN getSTMTN__null_allow(const Sq3StmtC *clsHdl)
(const) return LibMsgqueObject from current Sq3StmtC pointer
static SQ3_STMTN getSTMTN__null_allow(const Sq3StmtC &clsHdl)
(const) return LibMsgqueObject from current Sq3StmtC reference
SQ3_STMTN getSTMTN() const
(const) return the LibMsgqueObject from current Sq3StmtC instance
static thread_local Sq3StmtC MK_NULL_REF
static SQ3_STMTN getSTMTN(const Sq3StmtC *clsHdl)
(const) return LibMsgqueObject from current Sq3StmtC pointer
static SQ3_STMTN getSTMTN(const Sq3StmtC &clsHdl)
(const) return LibMsgqueObject from current Sq3StmtC reference
SQ3_STMTN getSTMTN__null_allow() const
(const) return the LibMsgqueObject from current Sq3StmtC instance
static SQ3_STMT getSTMT__null_allow(Sq3StmtC *clsHdl)
return LibMsgqueObject from current Sq3StmtC pointer
Sq3StmtC * Next()
C++: Sq3StmtC* stmt.Next() → C-API get next instance from linked-list of Sq3StmtS type
static Sq3StmtC * HandleResolve(MK_HDL netHdl)
C++: [static] Sq3StmtC* Sq3StmtC::HandleResolve(MK_HDL netHdl) → C-API Handle-Resolve-Slot - ret...
static Sq3StmtC * GetNull()
C++: [static] Sq3StmtC* Sq3StmtC::GetNull() → C-API Null-Slot - return a Sq3StmtC typed NULL ins...
static Sq3StmtC * Instances()
C++: [static] Sq3StmtC* Sq3StmtC::Instances() → C-API get head-instance from linked-list of Sq3S...
Sq3StmtC * Prev()
C++: Sq3StmtC* stmt.Prev() → C-API get previous instance from linked-list of Sq3StmtS type
struct Sq3StmtS * SQ3_STMT
class-shortcut for struct Sq3StmtS *, all shortcut using the XX_YYY syntax (only for public API) …
static bool Sq3StmtCheck(MK_MNGN mng)
check Sq3StmtS -> libmkkernel::MkObjectS::signature …
#define Sq3StmtC_X2obj(x)
Sq3ValueC * ColumnValue(MK_I32 iCol)
C++: Sq3ValueC* sq3stmt.ColumnValue(MK_I32 iCol) → C-API Result Values From A Query …
std::string ColumnText(MK_I32 iCol)
C++: std::string sq3stmt.ColumnText(MK_I32 iCol) → C-API Result a MkStringR Value From A Query.
MK_BNP ColumnBlob(MK_I32 iCol)
C++: MK_BNP sq3stmt.ColumnBlob(MK_I32 iCol) → C-API Result a MkBinaryR Value From A Query.
Sq3TypeE ColumnType(MK_I32 iCol)
C++: Sq3TypeE sq3stmt.ColumnType(MK_I32 iCol) → C-API Result Values From A Query …
MK_STRN ColumnName(MK_I32 N)
C++: MK_STRN sq3stmt.ColumnName(MK_I32 N) → C-API Column Names In A Result Set …
MK_DBL ColumnDouble(MK_I32 iCol)
C++: MK_DBL sq3stmt.ColumnDouble(MK_I32 iCol) → C-API Result Values From A Query …
MK_I64 ColumnInt64(MK_I32 iCol)
C++: MK_I64 sq3stmt.ColumnInt64(MK_I32 iCol) → C-API Result Values From A Query …
MK_I32 ColumnBytes(MK_I32 iCol)
C++: MK_I32 sq3stmt.ColumnBytes(MK_I32 iCol) → C-API Result Values From A Query …
MK_I32 ColumnInt(MK_I32 iCol)
C++: MK_I32 sq3stmt.ColumnInt(MK_I32 iCol) → C-API Result Values From A Query …
MK_I32 ColumnCount()
C++: MK_I32 pStmt.ColumnCount() → C-API Number Of Columns In A Result Set …
void IsExplain()
C++: pStmt.IsExplain() → C-API Query The EXPLAIN Setting For A Prepared Statement …
void Status(Sq3StmtStatusE op, MK_BOOL resetFlg)
C++: sq3stmt.Status(Sq3StmtStatusE op, MK_BOOL resetFlg) → C-API Prepared Statement Status …
Sq3LiteC * DbHandle()
C++: Sq3LiteC* sq3stmt.DbHandle() → C-API Find The Database Handle Of A Prepared Statement …
void Readonly()
C++: pStmt.Readonly() → C-API Determine If An SQL Statement Writes The Database …
void Busy()
C++: sq3stmt.Busy() → C-API Determine If A Prepared Statement Has Been Reset …
void DataCount()
C++: pStmt.DataCount() → C-API Number of columns in a result set …
void Explain(MK_I32 eMode)
C++: pStmt.Explain(MK_I32 eMode) → C-API Change The EXPLAIN Setting For A Prepared Statement …
void Reset()
C++: pStmt.Reset() → C-API Reset A Prepared Statement Object …
Sq3ErrorE Step()
C++: Sq3ErrorE sq3stmt.Step() → C-API Evaluate An SQL Statement …
void ClearBindings()
C++: sq3stmt.ClearBindings() → C-API Reset All Bindings On A Prepared Statement …
static Sq3StmtC * NextStmt(Sq3LiteC *pDb, Sq3StmtC *pStmt=NULL)
C++: [static] Sq3StmtC* Sq3StmtC::NextStmt(Sq3LiteC* pDb, Sq3StmtC* pStmt = NULL) → C-API Find t...
MK_STRN GetPzTail()
C++: MK_STRN sq3stmt.GetPzTail() → C-API return the non compiled sql-statement from Sq3StmtPrep...
MK_STRN Sql()
C++: MK_STRN pStmt.Sql() → C-API Retrieving Statement SQL …
MK_STR ExpandedSql()
C++: MK_STR pStmt.ExpandedSql() → C-API Retrieving Statement SQL …
static Sq3StmtC * PrepareV3(Sq3LiteC *db, const std::string &zSql, Sq3PrepareEF prepFlags=SQ3_PREPARE_NO)
C++: [constructor,static] Sq3StmtC* Sq3StmtC::PrepareV3(Sq3LiteC* db, const std::string& zSql,...
static Sq3StmtC * PrepareV2(Sq3LiteC *db, const std::string &zSql)
C++: [constructor,static] Sq3StmtC* Sq3StmtC::PrepareV2(Sq3LiteC* db, const std::string& zSql) → C-A...
void Finalize()
C++: [destructor] pStmt.Finalize() → C-API Destroy A Prepared Statement Object …
Sq3StmtC(Sq3LiteC *db, const std::string &zSql)
C++: [constructor,static] Sq3StmtC* Sq3StmtC::PrepareV2(Sq3LiteC* db, const std::string& zSql) → C-A...
std::pair< MK_SIZE, MK_BINN > MK_BNP
namespace for the CcSq3Lite "C++"-API
Struct to represent the data of the Sq3StmtC … → C-API: libsq3lite::Sq3StmtS
Struct to represent the data of the Sq3StmtC …