theSq3Lite 10.0
Loading...
Searching...
No Matches
LibSq3Lite_py.h
Go to the documentation of this file.
1
9#pragma once
10
11#include "LibMkKernel_py.h"
12#include "LibSq3Lite_sq3.h"
13
14/*****************************************************************************/
15/* */
16/* Macro_API */
17/* */
18/*****************************************************************************/
19
20// BEGIN-HEADER - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
21
22#undef HEADER
23#define HEADER
24
25// If the source of libsq3lite is direct used in an external library
26// (without dynamic linking) and this library should *not* export
27// the symbol's of libsq3lite then the flag META_IGNORE_EXTERN have
28// to be set
29#undef SQ3_PY_EXTERN
30#if defined(META_IGNORE_EXTERN)
31# define SQ3_PY_EXTERN
32#elif defined(PIC)
33 // does we build a DLL ?
34# if defined(DLL_EXPORT)
35 // does we build the libsq3lite library ?
36# if defined(SQ3_PY_BUILD_DLL)
37# define SQ3_PY_EXTERN __declspec(dllexport)
38# else
39# define SQ3_PY_EXTERN __declspec(dllimport)
40# endif
41# else
42 // no DLL - architecture specific extern specifier
43# define SQ3_PY_EXTERN __attribute__ ((visibility("default")))
44# endif
45#else
47# define SQ3_PY_EXTERN
48#endif
49
50// external data lookup
51#undef SQ3_PY_EXTERN_DATA
52#if defined(META_PRIVATE)
53# define SQ3_PY_EXTERN_DATA extern
54#elif defined(META_IGNORE_EXTERN)
55# define SQ3_PY_EXTERN_DATA extern
56#elif defined(PIC)
57 // does we build a DLL ?
58# if defined(DLL_EXPORT)
59 // does we build the libsq3lite library ?
60# if defined(SQ3_PY_BUILD_DLL)
61# define SQ3_PY_EXTERN_DATA __declspec(dllexport)
62# else
63# define SQ3_PY_EXTERN_DATA __declspec(dllimport)
64# endif
65# else
66 // no DLL - architecture specific extern specifier
67# define SQ3_PY_EXTERN_DATA __attribute__ ((visibility("default"))) extern
68# endif
69#else
70# define SQ3_PY_EXTERN_DATA extern
71#endif
72
73#undef SQ3
74#define SQ3(n) pysq3lite_ ## n
75#undef NS
76#define NS(n) pysq3lite_ ## n
77
78// END-HEADER - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
79
80/*****************************************************************************/
81/* */
82/* Module API */
83/* */
84/*****************************************************************************/
85
86// MARK_C
87// BEGIN-CLASS-DEC - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
88
89int NS(pSq3LiteC_Init) (MK_RT_ARGS OT_OBJ_T) ;
90int NS(pSq3ValueC_Init) (MK_RT_ARGS OT_OBJ_T) ;
91int NS(pSq3StmtC_Init) (MK_RT_ARGS OT_OBJ_T) ;
92int NS(pSq3BlobC_Init) (MK_RT_ARGS OT_OBJ_T) ;
93int NS(pSq3FileC_Init) (MK_RT_ARGS OT_OBJ_T) ;
94
95// END-CLASS-DEC - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
96
97typedef struct {
98 // BEGIN-EnumThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
99
100 PyTypeObject* Sq3AccessE;
101 PyTypeObject* Sq3AuthActionE;
102 PyTypeObject* Sq3AuthReturnE;
104 PyTypeObject* Sq3ChangesetE;
105 PyTypeObject* Sq3CheckpointE;
106 PyTypeObject* Sq3ConfigE;
108 PyTypeObject* Sq3DbConfigE;
109 PyTypeObject* Sq3DbStatusE;
110 PyTypeObject* Sq3DeSerializeEF;
111 PyTypeObject* Sq3ErrorE;
113 PyTypeObject* Sq3FcntlE;
114 PyTypeObject* Sq3FunctionEF;
115 PyTypeObject* Sq3IndexConstraintEF;
116 PyTypeObject* Sq3IoCapEF;
117 PyTypeObject* Sq3LimitE;
118 PyTypeObject* Sq3LockE;
119 PyTypeObject* Sq3MutexE;
120 PyTypeObject* Sq3OpenEF;
121 PyTypeObject* Sq3PrepareEF;
122 PyTypeObject* Sq3ScanStatE;
123 PyTypeObject* Sq3SerializeE;
124 PyTypeObject* Sq3SessionObjConfigE;
125 PyTypeObject* Sq3ShmLockE;
126 PyTypeObject* Sq3StatusE;
127 PyTypeObject* Sq3StmtStatusE;
128 PyTypeObject* Sq3SyncEF;
129 PyTypeObject* Sq3TestCtrlE;
130 PyTypeObject* Sq3TextE;
131 PyTypeObject* Sq3TraceEF;
132 PyTypeObject* Sq3TxnE;
133 PyTypeObject* Sq3TypeE;
134 PyTypeObject* Sq3VtabE;
135
136 // END-EnumThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
137 // BEGIN-ClassThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
138
144
145 // END-ClassThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
146 // BEGIN-ClassThreadStateNull - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
147
153
154 // END-ClassThreadStateNull - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
155
157
159
160/*****************************************************************************/
161/* */
162/* Class_API */
163/* */
164/*****************************************************************************/
165
166// BEGIN-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
167
168// ----------------------------------------------------------------------
169// class: Sq3BlobC
170
171 // class struct
172 typedef struct Sq3BlobC_Obj {
173 PyObject_HEAD
176
178 #define Sq3BlobC_lngO (&SQ3(Sq3BlobCR))
179 #define Sq3BlobC_base (&MK(MkObjectCR))
180
181 // MK_NULL singelton
182 #define Sq3BlobC_MK_NULL SQ3(Sq3LiteThreadState).Sq3BlobC_MK_NULL
183
184 // arguments
185 #define Sq3BlobC_ARGS Sq3BlobC_Obj *self, PyObject *objv
186 #define Sq3BlobC_ARGS_CALL self, objv
187
188 // return object
189 #define OT_retObj_SET_BLOB(nat) retObj = SQ3(Sq3BlobC_ObjNew) (MK_RT_CALL &SQ3(Sq3BlobCR),nat)
190
191 // new objec
192 #define OT_TMP_BLOB_OBJ(val) SQ3(Sq3BlobC_ObjNew)(MK_RT_CALL &SQ3(Sq3BlobCR),val)
195 return hdl ? MK(AtomObjNew)(MK_RT_CALL type,Sq3BlobC_X2obj(hdl)) : Py_NewRef(Sq3BlobC_MK_NULL);
196 }
197
198 // cast from LNG to MQ
199 #define VAL2BLOB(val) ((Sq3BlobC_Obj*) (val))->hdl
200
201// ----------------------------------------------------------------------
202// class: Sq3FileC
203
204 // class struct
205 typedef struct Sq3FileC_Obj {
206 PyObject_HEAD
209
211 #define Sq3FileC_lngO (&SQ3(Sq3FileCR))
212 #define Sq3FileC_base (&MK(MkObjectCR))
213
214 // MK_NULL singelton
215 #define Sq3FileC_MK_NULL SQ3(Sq3LiteThreadState).Sq3FileC_MK_NULL
216
217 // arguments
218 #define Sq3FileC_ARGS Sq3FileC_Obj *self, PyObject *objv
219 #define Sq3FileC_ARGS_CALL self, objv
220
221 // return object
222 #define OT_retObj_SET_FILE(nat) retObj = SQ3(Sq3FileC_ObjNew) (MK_RT_CALL &SQ3(Sq3FileCR),nat)
223
224 // new objec
225 #define OT_TMP_FILE_OBJ(val) SQ3(Sq3FileC_ObjNew)(MK_RT_CALL &SQ3(Sq3FileCR),val)
228 return hdl ? MK(AtomObjNew)(MK_RT_CALL type,Sq3FileC_X2obj(hdl)) : Py_NewRef(Sq3FileC_MK_NULL);
229 }
230
231 // cast from LNG to MQ
232 #define VAL2FILE(val) ((Sq3FileC_Obj*) (val))->hdl
233
234// ----------------------------------------------------------------------
235// class: Sq3LiteC
236
237 // class struct
238 typedef struct Sq3LiteC_Obj {
239 PyObject_HEAD
242
244 #define Sq3LiteC_lngO (&SQ3(Sq3LiteCR))
245 #define Sq3LiteC_base (&MK(MkObjectCR))
246
247 // MK_NULL singelton
248 #define Sq3LiteC_MK_NULL SQ3(Sq3LiteThreadState).Sq3LiteC_MK_NULL
249
250 // arguments
251 #define Sq3LiteC_ARGS Sq3LiteC_Obj *self, PyObject *objv
252 #define Sq3LiteC_ARGS_CALL self, objv
253
254 // return object
255 #define OT_retObj_SET_LITE(nat) retObj = SQ3(Sq3LiteC_ObjNew) (MK_RT_CALL &SQ3(Sq3LiteCR),nat)
256
257 // new objec
258 #define OT_TMP_LITE_OBJ(val) SQ3(Sq3LiteC_ObjNew)(MK_RT_CALL &SQ3(Sq3LiteCR),val)
261 return hdl ? MK(AtomObjNew)(MK_RT_CALL type,Sq3LiteC_X2obj(hdl)) : Py_NewRef(Sq3LiteC_MK_NULL);
262 }
263
264 // cast from LNG to MQ
265 #define VAL2LITE(val) ((Sq3LiteC_Obj*) (val))->hdl
266
267// ----------------------------------------------------------------------
268// class: Sq3StmtC
269
270 // class struct
271 typedef struct Sq3StmtC_Obj {
272 PyObject_HEAD
275
277 #define Sq3StmtC_lngO (&SQ3(Sq3StmtCR))
278 #define Sq3StmtC_base (&MK(MkObjectCR))
279
280 // MK_NULL singelton
281 #define Sq3StmtC_MK_NULL SQ3(Sq3LiteThreadState).Sq3StmtC_MK_NULL
282
283 // arguments
284 #define Sq3StmtC_ARGS Sq3StmtC_Obj *self, PyObject *objv
285 #define Sq3StmtC_ARGS_CALL self, objv
286
287 // return object
288 #define OT_retObj_SET_STMT(nat) retObj = SQ3(Sq3StmtC_ObjNew) (MK_RT_CALL &SQ3(Sq3StmtCR),nat)
289
290 // new objec
291 #define OT_TMP_STMT_OBJ(val) SQ3(Sq3StmtC_ObjNew)(MK_RT_CALL &SQ3(Sq3StmtCR),val)
294 return hdl ? MK(AtomObjNew)(MK_RT_CALL type,Sq3StmtC_X2obj(hdl)) : Py_NewRef(Sq3StmtC_MK_NULL);
295 }
296
297 // cast from LNG to MQ
298 #define VAL2STMT(val) ((Sq3StmtC_Obj*) (val))->hdl
299
300// ----------------------------------------------------------------------
301// class: Sq3ValueC
302
303 // class struct
304 typedef struct Sq3ValueC_Obj {
305 PyObject_HEAD
308
310 #define Sq3ValueC_lngO (&SQ3(Sq3ValueCR))
311 #define Sq3ValueC_base (&MK(MkObjectCR))
312
313 // MK_NULL singelton
314 #define Sq3ValueC_MK_NULL SQ3(Sq3LiteThreadState).Sq3ValueC_MK_NULL
315
316 // arguments
317 #define Sq3ValueC_ARGS Sq3ValueC_Obj *self, PyObject *objv
318 #define Sq3ValueC_ARGS_CALL self, objv
319
320 // return object
321 #define OT_retObj_SET_VAL(nat) retObj = SQ3(Sq3ValueC_ObjNew) (MK_RT_CALL &SQ3(Sq3ValueCR),nat)
322
323 // new objec
324 #define OT_TMP_VAL_OBJ(val) SQ3(Sq3ValueC_ObjNew)(MK_RT_CALL &SQ3(Sq3ValueCR),val)
327 return hdl ? MK(AtomObjNew)(MK_RT_CALL type,Sq3ValueC_X2obj(hdl)) : Py_NewRef(Sq3ValueC_MK_NULL);
328 }
329
330 // cast from LNG to MQ
331 #define VAL2VAL(val) ((Sq3ValueC_Obj*) (val))->hdl
332
333// END-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
334
335// check *********************************************************************************
336
338
339/*****************************************************************************/
340/* */
341/* Enum_API */
342/* */
343/*****************************************************************************/
344
345#define OT_NEW_Sq3_enum_OBJ(typ,val) PyObject_CallFunction((PyObject*)(Sq3 ## typ ## _lngO),"i",val)
346
347// BEGIN-EnumExtern - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
348
349#define Sq3AccessE_lngO (SQ3(Sq3LiteThreadState).Sq3AccessE)
350#define Sq3AuthActionE_lngO (SQ3(Sq3LiteThreadState).Sq3AuthActionE)
351#define Sq3AuthReturnE_lngO (SQ3(Sq3LiteThreadState).Sq3AuthReturnE)
352#define Sq3ChangeSetConflictE_lngO (SQ3(Sq3LiteThreadState).Sq3ChangeSetConflictE)
353#define Sq3ChangesetE_lngO (SQ3(Sq3LiteThreadState).Sq3ChangesetE)
354#define Sq3CheckpointE_lngO (SQ3(Sq3LiteThreadState).Sq3CheckpointE)
355#define Sq3ConfigE_lngO (SQ3(Sq3LiteThreadState).Sq3ConfigE)
356#define Sq3ConflictResolutionE_lngO (SQ3(Sq3LiteThreadState).Sq3ConflictResolutionE)
357#define Sq3DbConfigE_lngO (SQ3(Sq3LiteThreadState).Sq3DbConfigE)
358#define Sq3DbStatusE_lngO (SQ3(Sq3LiteThreadState).Sq3DbStatusE)
359#define Sq3DeSerializeEF_lngO (SQ3(Sq3LiteThreadState).Sq3DeSerializeEF)
360#define Sq3ErrorE_lngO (SQ3(Sq3LiteThreadState).Sq3ErrorE)
361#define Sq3ExtendetResultCodesE_lngO (SQ3(Sq3LiteThreadState).Sq3ExtendetResultCodesE)
362#define Sq3FcntlE_lngO (SQ3(Sq3LiteThreadState).Sq3FcntlE)
363#define Sq3FunctionEF_lngO (SQ3(Sq3LiteThreadState).Sq3FunctionEF)
364#define Sq3IndexConstraintEF_lngO (SQ3(Sq3LiteThreadState).Sq3IndexConstraintEF)
365#define Sq3IoCapEF_lngO (SQ3(Sq3LiteThreadState).Sq3IoCapEF)
366#define Sq3LimitE_lngO (SQ3(Sq3LiteThreadState).Sq3LimitE)
367#define Sq3LockE_lngO (SQ3(Sq3LiteThreadState).Sq3LockE)
368#define Sq3MutexE_lngO (SQ3(Sq3LiteThreadState).Sq3MutexE)
369#define Sq3OpenEF_lngO (SQ3(Sq3LiteThreadState).Sq3OpenEF)
370#define Sq3PrepareEF_lngO (SQ3(Sq3LiteThreadState).Sq3PrepareEF)
371#define Sq3ScanStatE_lngO (SQ3(Sq3LiteThreadState).Sq3ScanStatE)
372#define Sq3SerializeE_lngO (SQ3(Sq3LiteThreadState).Sq3SerializeE)
373#define Sq3SessionObjConfigE_lngO (SQ3(Sq3LiteThreadState).Sq3SessionObjConfigE)
374#define Sq3ShmLockE_lngO (SQ3(Sq3LiteThreadState).Sq3ShmLockE)
375#define Sq3StatusE_lngO (SQ3(Sq3LiteThreadState).Sq3StatusE)
376#define Sq3StmtStatusE_lngO (SQ3(Sq3LiteThreadState).Sq3StmtStatusE)
377#define Sq3SyncEF_lngO (SQ3(Sq3LiteThreadState).Sq3SyncEF)
378#define Sq3TestCtrlE_lngO (SQ3(Sq3LiteThreadState).Sq3TestCtrlE)
379#define Sq3TextE_lngO (SQ3(Sq3LiteThreadState).Sq3TextE)
380#define Sq3TraceEF_lngO (SQ3(Sq3LiteThreadState).Sq3TraceEF)
381#define Sq3TxnE_lngO (SQ3(Sq3LiteThreadState).Sq3TxnE)
382#define Sq3TypeE_lngO (SQ3(Sq3LiteThreadState).Sq3TypeE)
383#define Sq3VtabE_lngO (SQ3(Sq3LiteThreadState).Sq3VtabE)
384
385// END-EnumExtern - created by 'py_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
386
387/*****************************************************************************/
388/* */
389/* debugging */
390/* */
391/*****************************************************************************/
392
393#undef HEADER
tag: nhi1-release-250425
#define MK(n)
#define MK_PY_EXTERN_DATA
PyTypeObject * OT_CLS_T
PyObject * OT_OBJ_T
#define OT_CLASS_TYPE_REF
struct Sq3LiteC_Obj Sq3LiteC_Obj
#define SQ3(n)
#define Sq3BlobC_MK_NULL
struct Sq3ValueC_Obj Sq3ValueC_Obj
#define Sq3ValueC_MK_NULL
#define Sq3StmtC_MK_NULL
#define Sq3FileC_MK_NULL
#define NS(n)
struct Sq3BlobC_Obj Sq3BlobC_Obj
#define SQ3_PY_EXTERN_DATA
struct Sq3FileC_Obj Sq3FileC_Obj
#define Sq3LiteC_MK_NULL
struct Sq3StmtC_Obj Sq3StmtC_Obj
tag: nhi1-release-250425
#define mk_inline
#define MK_ARTIFICIAL
#define MkThreadLocal
#define MK_RT_CALL
#define MK_RT_ARGS
static MK_ARTIFICIAL SQ3_BLOB Sq3BlobC_ObjNew(sqlite3_blob *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define Sq3BlobC_X2obj(x)
static MK_ARTIFICIAL SQ3_FILE Sq3FileC_ObjNew(sqlite3_file *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define Sq3FileC_X2obj(x)
static MK_ARTIFICIAL SQ3_LITE Sq3LiteC_ObjNew(sqlite3 *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define Sq3LiteC_X2obj(x)
static MK_ARTIFICIAL SQ3_STMT Sq3StmtC_ObjNew(sqlite3_stmt *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define Sq3StmtC_X2obj(x)
static MK_ARTIFICIAL SQ3_VAL Sq3ValueC_ObjNew(sqlite3_value *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define Sq3ValueC_X2obj(x)
tag: nhi1-release-250425
PyObject_HEAD SQ3_BLOB hdl
Struct to represent the data of the Sq3BlobC …
PyObject_HEAD SQ3_FILE hdl
Struct to represent the data of the Sq3FileC …
PyObject_HEAD SQ3_LITE hdl
Struct to represent the data of the Sq3LiteC …
PyTypeObject * Sq3ChangesetE
PyTypeObject * Sq3SerializeE
PyTypeObject * Sq3IoCapEF
PyObject * Sq3BlobC_MK_NULL
PyTypeObject * Sq3DeSerializeEF
PyObject * Sq3FileC_MK_NULL
PyTypeObject * Sq3TestCtrlE
PyTypeObject * Sq3AuthReturnE
PyTypeObject * Sq3MutexE
PyTypeObject * Sq3ConflictResolutionE
PyTypeObject * Sq3SessionObjConfigE
PyTypeObject * Sq3ChangeSetConflictE
PyTypeObject * Sq3AuthActionE
PyTypeObject * Sq3TraceEF
PyTypeObject * Sq3LockE
PyObject * Sq3ValueC_MK_NULL
PyTypeObject * Sq3ScanStatE
PyObject * Sq3LiteC_MK_NULL
PyTypeObject * Sq3VtabE
PyTypeObject * Sq3TextE
PyTypeObject * Sq3DbStatusE
PyTypeObject * Sq3TypeE
PyTypeObject * Sq3StatusE
PyTypeObject * Sq3ShmLockE
PyTypeObject * Sq3TxnE
PyTypeObject * Sq3IndexConstraintEF
PyTypeObject * Sq3PrepareEF
PyTypeObject * Sq3CheckpointE
PyTypeObject * Sq3AccessE
PyTypeObject * Sq3DbConfigE
PyTypeObject * Sq3LimitE
PyTypeObject * Sq3ErrorE
PyTypeObject * Sq3SyncEF
PyTypeObject * Sq3OpenEF
PyTypeObject * Sq3ExtendetResultCodesE
PyTypeObject * Sq3FunctionEF
PyObject * Sq3StmtC_MK_NULL
PyTypeObject * Sq3StmtStatusE
PyTypeObject * Sq3ConfigE
PyTypeObject * Sq3FcntlE
PyObject_HEAD SQ3_STMT hdl
Struct to represent the data of the Sq3StmtC …
PyObject_HEAD SQ3_VAL hdl
Struct to represent the data of the Sq3ValueC …