11#define META_FILE_NAME "Sq3LiteC_atl.c"
15#define OT_CLASS asq3rt->AtlSq3LiteC
16#define OT_NULL asq3rt->AtlSq3LiteC_MK_NULL
17#define OT_CLASS_NAME "Sq3LiteC"
19#define SELF2HDL(O) Sq3Lite(VAL2MNG(O))
47#define OT_SETUP_hdl SetupHdlFromMetaData_2(SQ3_LITE)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(SQ3_LITE)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(SQ3_LITE)
50#define OT_SETUP_hdl_constr SetupHdlConstr(Sq3LiteC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(Sq3LiteC)
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,Sq3LiteC_X2obj(x),asq3rt))
59 if (Sq3LiteCTT == NULL) Sq3LiteCTT = Sq3LiteSTT; \
62 if (Sq3LiteCTT->selfCreate == NS(Sq3LiteC_selfCreate)) return MK_OK; \
65 Sq3LiteCTT->selfCreate = NS(Sq3LiteC_selfCreate); \
66 Sq3LiteCTT->selfDelete = NS(Sq3LiteC_selfDelete); \
67 Sq3LiteCTT->selfUnlink = NS(Sq3LiteC_selfUnlink); \
70 OT_CLASS = AltClassDef(Sq3LiteCTT,&asq3rt->AtlSq3LiteC_NS); \
71 if (OT_CLASS == NULL) goto error; \
72 OT_REF_INCR(OT_CLASS); \
75 check_LNG(AtlUnknownSetup (NS(sOtClassDef),asq3rt)) goto error; \
78 check_LNG(AtlUnknownSetup (NS(sInstanceDef),asq3rt)) goto error; \
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; \
86 OT_NULL = AtomCreateNULL(OT_CLASS, "::Sq3LiteC::MK_NULL", (MK_PTR)asq3rt); \
87 if (OT_NULL == NULL) goto error; \
94#define CTOR_doc "Sq3LiteC [Sq3LiteC::CTOR filename:string ?flags:Sq3OpenEF={SQ3_OPEN_READWRITE SQ3_OPEN_CREATE}? ?zVfs:string=\"NULL\"?]"
95#define OpenV2_doc "Sq3LiteC [Sq3LiteC::OpenV2 filename:string ?flags:Sq3OpenEF={SQ3_OPEN_READWRITE SQ3_OPEN_CREATE}? ?zVfs:string=\"NULL\"?]"
98#define GetNull_doc "Sq3LiteC [Sq3LiteC::GetNull]"
99#define HandleResolve_doc "Sq3LiteC [Sq3LiteC::HandleResolve netHdl:MK_HDL]"
100#define Instances_doc "Sq3LiteC [Sq3LiteC::Instances]"
103#define ErrStr_doc "string [Sq3LiteC::ErrStr arg0:int32]"
104#define Sleep_doc "Sq3LiteC::Sleep arg0:int32"
107#define Next_doc "Sq3LiteC [Sq3LiteC::Next $lite]"
108#define Prev_doc "Sq3LiteC [Sq3LiteC::Prev $lite]"
111#define DbStatusBFL_doc "MkBufferListC [Sq3LiteC::DbStatusBFL $sq3lite op:Sq3DbStatusE resetFlg:bool]"
112#define PrepareV2_doc "Sq3StmtC [Sq3LiteC::PrepareV2 $db zSql:string]"
115#define BusyTimeout_doc "Sq3LiteC::BusyTimeout $sq3lite ms:int32"
116#define Changes_doc "int32 [Sq3LiteC::Changes $sq3lite]"
117#define Changes64_doc "int64 [Sq3LiteC::Changes64 $sq3lite]"
118#define CloseV2_doc "Sq3LiteC::CloseV2 $sq3lite"
119#define DbCacheflush_doc "Sq3LiteC::DbCacheflush $sq3lite"
120#define DbFilename_doc "string [Sq3LiteC::DbFilename $db zDbName:string]"
121#define DbName_doc "string [Sq3LiteC::DbName $db N:int32]"
122#define DbReadonly_doc "Sq3LiteC::DbReadonly $db zDbName:string"
123#define DbReleaseMemory_doc "Sq3LiteC::DbReleaseMemory $sq3lite"
124#define DeclareVtab_doc "Sq3LiteC::DeclareVtab $sq3lite zSQL:string"
125#define Deserialize_doc "Sq3LiteC::Deserialize $sq3lite zSchema:string pData:binary mFlags:Sq3DeSerializeEF"
126#define DropModules_doc "Sq3LiteC::DropModules $sq3lite azKeepBfl:MkBufferListC"
127#define ErrCode_doc "Sq3ErrorE [Sq3LiteC::ErrCode $db]"
128#define ErrMsg_doc "string [Sq3LiteC::ErrMsg $sq3lite]"
129#define ErrorOffset_doc "Sq3LiteC::ErrorOffset $db"
130#define Exec_doc "Sq3LiteC::Exec $sq3lite sql:string ?callback_data:callable=NULL?"
131#define ExecV2_doc "Sq3LiteC::ExecV2 $sq3lite sql:string ?callback:callable=NULL?"
132#define ExtendedResultCodes_doc "Sq3LiteC::ExtendedResultCodes $sq3lite onoff:int32"
133#define ExtendetErrCode_doc "Sq3ExtendetResultCodesE [Sq3LiteC::ExtendetErrCode $db]"
134#define GetAutocommit_doc "int32 [Sq3LiteC::GetAutocommit $sq3lite]"
136#define Interrupt_doc "Sq3LiteC::Interrupt $sq3lite"
137#define IsInterrupted_doc "bool [Sq3LiteC::IsInterrupted $sq3lite]"
138#define LastInsertRowid_doc "int64 [Sq3LiteC::LastInsertRowid $sq3lite]"
139#define Limit_doc "Sq3LiteC::Limit $sq3lite id:Sq3LimitE newVal:int32"
141#define OverloadFunction_doc "Sq3LiteC::OverloadFunction $sq3lite zFuncName:string nArg:int32"
142#define Serialize_doc "binary [Sq3LiteC::Serialize $sq3lite zSchema:string mFlags:Sq3SerializeE]"
143#define SetLastInsertRowid_doc "Sq3LiteC::SetLastInsertRowid $sq3lite arg1:int64"
144#define SystemErrno_doc "Sq3LiteC::SystemErrno $sq3lite"
145#define TotalChanges_doc "int32 [Sq3LiteC::TotalChanges $sq3lite]"
146#define TotalChanges64_doc "int64 [Sq3LiteC::TotalChanges64 $sq3lite]"
147#define TxnState_doc "Sq3LiteC::TxnState $sq3lite zSchema:string"
148#define VtabOnConflict_doc "Sq3LiteC::VtabOnConflict $sq3lite"
149#define WalAutocheckpoint_doc "Sq3LiteC::WalAutocheckpoint $db N:int32"
152#define DbStatus_doc "{pCur:int32 pHiwtr:int32} [Sq3LiteC::DbStatus $sq3lite op:Sq3DbStatusE resetFlg:bool]"
153#define TableColumnMetadata_doc "{pzDataType:string pzCollSeq:string pNotNull:int32 pPrimaryKey:int32 pAutoinc:int32} [Sq3LiteC::TableColumnMetadata $db zDbName:string zTableName:string zColumnName:string]"
154#define WalCheckpointV2_doc "{pnLog:int32 pnCkpt:int32} [Sq3LiteC::WalCheckpointV2 $db zDb:string eMode:int32]"
1062 {
"::Sq3LiteC::OpenV2" ,
NS(Sq3LiteC_OpenV2) },
1065 {
"::Sq3LiteC::GetNull" ,
NS(Sq3LiteC_GetNull) },
1066 {
"::Sq3LiteC::HandleResolve" ,
NS(Sq3LiteC_HandleResolve) },
1067 {
"::Sq3LiteC::Instances" ,
NS(Sq3LiteC_Instances) },
1070 {
"::Sq3LiteC::ErrStr" ,
NS(Sq3LiteC_ErrStr) },
1071 {
"::Sq3LiteC::Sleep" ,
NS(Sq3LiteC_Sleep) },
1083 {
"::Sq3LiteC::Sq3LiteC" ,
NS(Sq3LiteC_CTOR) },
1086 {
"::Sq3LiteC::Next" ,
NS(Sq3LiteC_Next) },
1087 {
"::Sq3LiteC::Prev" ,
NS(Sq3LiteC_Prev) },
1090 {
"::Sq3LiteC::DbStatusBFL" ,
NS(Sq3LiteC_DbStatusBFL) },
1091 {
"::Sq3LiteC::PrepareV2" ,
NS(Sq3LiteC_PrepareV2) },
1094 {
"::Sq3LiteC::BusyTimeout" ,
NS(Sq3LiteC_BusyTimeout) },
1095 {
"::Sq3LiteC::Changes" ,
NS(Sq3LiteC_Changes) },
1096 {
"::Sq3LiteC::Changes64" ,
NS(Sq3LiteC_Changes64) },
1097 {
"::Sq3LiteC::CloseV2" ,
NS(Sq3LiteC_CloseV2) },
1098 {
"::Sq3LiteC::DbCacheflush" ,
NS(Sq3LiteC_DbCacheflush) },
1099 {
"::Sq3LiteC::DbFilename" ,
NS(Sq3LiteC_DbFilename) },
1100 {
"::Sq3LiteC::DbName" ,
NS(Sq3LiteC_DbName) },
1101 {
"::Sq3LiteC::DbReadonly" ,
NS(Sq3LiteC_DbReadonly) },
1102 {
"::Sq3LiteC::DbReleaseMemory" ,
NS(Sq3LiteC_DbReleaseMemory) },
1103 {
"::Sq3LiteC::DeclareVtab" ,
NS(Sq3LiteC_DeclareVtab) },
1104 {
"::Sq3LiteC::Deserialize" ,
NS(Sq3LiteC_Deserialize) },
1105 {
"::Sq3LiteC::DropModules" ,
NS(Sq3LiteC_DropModules) },
1106 {
"::Sq3LiteC::ErrCode" ,
NS(Sq3LiteC_ErrCode) },
1107 {
"::Sq3LiteC::ErrMsg" ,
NS(Sq3LiteC_ErrMsg) },
1108 {
"::Sq3LiteC::ErrorOffset" ,
NS(Sq3LiteC_ErrorOffset) },
1109 {
"::Sq3LiteC::Exec" ,
NS(Sq3LiteC_Exec) },
1110 {
"::Sq3LiteC::ExecV2" ,
NS(Sq3LiteC_ExecV2) },
1111 {
"::Sq3LiteC::ExtendedResultCodes" ,
NS(Sq3LiteC_ExtendedResultCodes) },
1112 {
"::Sq3LiteC::ExtendetErrCode" ,
NS(Sq3LiteC_ExtendetErrCode) },
1113 {
"::Sq3LiteC::GetAutocommit" ,
NS(Sq3LiteC_GetAutocommit) },
1115 {
"::Sq3LiteC::Interrupt" ,
NS(Sq3LiteC_Interrupt) },
1116 {
"::Sq3LiteC::IsInterrupted" ,
NS(Sq3LiteC_IsInterrupted) },
1117 {
"::Sq3LiteC::LastInsertRowid" ,
NS(Sq3LiteC_LastInsertRowid) },
1118 {
"::Sq3LiteC::Limit" ,
NS(Sq3LiteC_Limit) },
1120 {
"::Sq3LiteC::OverloadFunction" ,
NS(Sq3LiteC_OverloadFunction) },
1121 {
"::Sq3LiteC::Serialize" ,
NS(Sq3LiteC_Serialize) },
1122 {
"::Sq3LiteC::SetLastInsertRowid" ,
NS(Sq3LiteC_SetLastInsertRowid) },
1123 {
"::Sq3LiteC::SystemErrno" ,
NS(Sq3LiteC_SystemErrno) },
1124 {
"::Sq3LiteC::TotalChanges" ,
NS(Sq3LiteC_TotalChanges) },
1125 {
"::Sq3LiteC::TotalChanges64" ,
NS(Sq3LiteC_TotalChanges64) },
1126 {
"::Sq3LiteC::TxnState" ,
NS(Sq3LiteC_TxnState) },
1127 {
"::Sq3LiteC::VtabOnConflict" ,
NS(Sq3LiteC_VtabOnConflict) },
1128 {
"::Sq3LiteC::WalAutocheckpoint" ,
NS(Sq3LiteC_WalAutocheckpoint) },
1131 {
"::Sq3LiteC::DbStatus" ,
NS(Sq3LiteC_DbStatus) },
1132 {
"::Sq3LiteC::TableColumnMetadata" ,
NS(Sq3LiteC_TableColumnMetadata) },
1133 {
"::Sq3LiteC::WalCheckpointV2" ,
NS(Sq3LiteC_WalCheckpointV2) },
#define OT_CHECK_bool(val)
#define OT_SETUP_VARARGS(min, max, d)
#define OT_CHECK_NIH(val)
#define OT_retObj_SET_BOL(nat)
#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)
#define OT_retObj_SET_Error
#define OT_CONSTRUCTOR_POST(x)
#define OT_retObj_SET_I64(nat)
#define OT_retObj_SET_List
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
#define OT_retObj_SET_BFL(nat)
#define OT_TMP_I32_OBJ(val)
#define OT_GET__ME_REF_MkBinaryR(b)
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_APPEND(var)
#define OT_CHECK__ME_REF_MkStringR(val)
#define OT_CHECK__ME_REF_MkBinaryR(val)
#define OT_retObj_SET_STR(nat)
#define OT_CHECK_OPTIONAL(val)
#define OT_TMP_STR_OBJ(val)
#define OT_retObj_SET(val)
#define MkErrorC_Check(mng, PROC)
#define OT_CHECK_STRN(val)
#define OT_NEW_Sq3_enum_OBJ(typ, val)
#define OT_retObj_SET_LITE(nat)
#define OT_retObj_SET_STMT(nat)
#define OT_SETUP_hdl_static_constr
#define ExtendedResultCodes_doc
#define DbReleaseMemory_doc
#define WalAutocheckpoint_doc
#define ExtendetErrCode_doc
#define OverloadFunction_doc
#define SetLastInsertRowid_doc
#define OT_SETUP_hdl_destr
#define LastInsertRowid_doc
#define TotalChanges64_doc
#define HandleResolve_doc
#define OT_SETUP_hdl_static
#define OT_SETUP_hdl_constr
#define TableColumnMetadata_doc
#define WalCheckpointV2_doc
#define OT_retObj_CONSTR(x)
#define GetAutocommit_doc
#define IsInterrupted_doc
#define VtabOnConflict_doc
#define MkBufferListCreateTLS_T(name, num)
static SQ3_LITE Sq3LiteNext(SQ3_LITE const lite)
get next instance from linked-list of Sq3LiteS type
#define Sq3LiteInstances()
static SQ3_LITE Sq3LiteGetNull(void)
Null-Slot - return a Sq3LiteC typed NULL instance …
static SQ3_LITE Sq3LitePrev(SQ3_LITE const lite)
get previous instance from linked-list of Sq3LiteS type
#define Sq3LiteHandleResolve(...)
static enum MkErrorE Sq3LiteBusyTimeout(SQ3_LITE sq3lite, MK_I32 ms)
Set A Busy Timeout …
static enum MkErrorE Sq3LiteLimit(SQ3_LITE sq3lite, enum Sq3LimitE id, MK_I32 newVal)
Run-time Limits …
static enum MkErrorE Sq3LiteDeclareVtab(SQ3_LITE sq3lite, MK_STRN zSQL)
Declare The Schema Of A Virtual Table …
static enum MkErrorE Sq3LiteExtendedResultCodes(SQ3_LITE sq3lite, MK_I32 onoff)
Enable Or Disable Extended Result Codes …
static enum MkErrorE Sq3LiteErrorOffset(SQ3_LITE db)
Error Codes And Messages …
static enum MkErrorE Sq3LiteSystemErrno(SQ3_LITE sq3lite)
Low-level system error code …
static enum Sq3ErrorE Sq3LiteErrCode(SQ3_LITE db)
Error Codes And Messages …
static MK_STRN Sq3LiteErrMsg(SQ3_LITE sq3lite)
Error Codes And Messages …
static MK_STRN Sq3LiteErrStr(MK_I32 arg0)
Error Codes And Messages …
static enum Sq3ExtendetResultCodesE Sq3LiteExtendetErrCode(SQ3_LITE db)
Error Codes And Messages …
static enum MkErrorE Sq3LiteSleep(MK_I32 arg0)
Suspend Execution For A Short Time …
static enum MkErrorE Sq3LiteExec(SQ3_LITE sq3lite, MK_STRN sql, Sq3Fupu_Sq3LiteExec_callback_call callback_call, MK_CBP callback_data)
One-Step Query Execution Interface …
#define Sq3LiteExecV2(...)
Sq3Fupu_Sq3LiteExec_callback_call_ret(* Sq3Fupu_Sq3LiteExec_callback_call)(Sq3Fupu_Sq3LiteExec_callback_call_args)
enum MkErrorE(* Sq3LiteExecV2CB)(MK_RT mkrt, MK_CBP callV2, MK_BFL vals, MK_BFL cols)
callback for Sq3LiteExecV2
static enum MkErrorE Sq3LiteTxnState(SQ3_LITE sq3lite, MK_STRN zSchema)
Determine the transaction state of a database …
static MK_I32 Sq3LiteGetAutocommit(SQ3_LITE sq3lite)
Test For Auto-Commit Mode …
static enum MkErrorE Sq3LiteVtabOnConflict(SQ3_LITE sq3lite)
Determine The Virtual Table Conflict Policy …
static MK_I64 Sq3LiteLastInsertRowid(SQ3_LITE sq3lite)
Last Insert Rowid …
static enum MkErrorE Sq3LiteDbCacheflush(SQ3_LITE sq3lite)
Flush caches to disk mid-transaction …
static enum MkErrorE Sq3LiteTableColumnMetadata(SQ3_LITE db, MK_STRN zDbName, MK_STRN zTableName, MK_STRN zColumnName, MK_STRN *pzDataType, MK_STRN *pzCollSeq, MK_I32 *pNotNull, MK_I32 *pPrimaryKey, MK_I32 *pAutoinc)
Extract Metadata About A Column Of A Table …
static enum MkErrorE Sq3LiteDbReleaseMemory(SQ3_LITE sq3lite)
Free Memory Used By A Database Connection …
static MK_STRN Sq3LiteDbName(SQ3_LITE db, MK_I32 N)
Return The Schema Name For A Database Connection …
#define Sq3LiteDbStatusBFL(...)
#define Sq3LiteDropModules(...)
static enum MkErrorE Sq3LiteDbStatus(SQ3_LITE sq3lite, enum Sq3DbStatusE op, MK_I32 *pCur, MK_I32 *pHiwtr, MK_BOOL resetFlg)
Database Connection Status …
static MkBinaryR Sq3LiteSerialize(SQ3_LITE sq3lite, MK_STRN zSchema, enum Sq3SerializeE mFlags)
Serialize a database …
static SQ3_FILENAME Sq3LiteDbFilename(SQ3_LITE db, MK_STRN zDbName)
Return The Filename For A Database Connection …
static enum MkErrorE Sq3LiteOverloadFunction(SQ3_LITE sq3lite, MK_STRN zFuncName, MK_I32 nArg)
Overload A Function For A Virtual Table …
#define Sq3LiteDeserialize(...)
static enum MkErrorE Sq3LiteDbReadonly(SQ3_LITE db, MK_STRN zDbName)
Determine if a database is read-only …
static enum MkErrorE Sq3LiteWalAutocheckpoint(SQ3_LITE db, MK_I32 N)
Configure an auto-checkpoint …
static enum MkErrorE Sq3LiteWalCheckpointV2(SQ3_LITE db, MK_STRN zDb, MK_I32 eMode, MK_I32 *pnLog, MK_I32 *pnCkpt)
Checkpoint a database …
static void Sq3LiteInterrupt(SQ3_LITE sq3lite)
Interrupt A Long-Running Query …
static MK_BOOL Sq3LiteIsInterrupted(SQ3_LITE sq3lite)
Interrupt A Long-Running Query …
static MK_I64 Sq3LiteChanges64(SQ3_LITE sq3lite)
Count The Number Of Rows Modified …
static MK_I64 Sq3LiteTotalChanges64(SQ3_LITE sq3lite)
Total Number Of Rows Modified …
static MK_I32 Sq3LiteChanges(SQ3_LITE sq3lite)
Count The Number Of Rows Modified …
static MK_I32 Sq3LiteTotalChanges(SQ3_LITE sq3lite)
Total Number Of Rows Modified …
static void Sq3LiteSetLastInsertRowid(SQ3_LITE sq3lite, MK_I64 arg1)
Set the Last Insert Rowid value …
static enum MkErrorE Sq3LiteCloseV2(SQ3_LITE sq3lite)
Closing A Database Connection …
static enum MkErrorE Sq3LiteOpenV2(MK_STRN filename, SQ3_LITE *ppDb, enum Sq3OpenEF flags, MK_STRN zVfs)
Opening A New Database Connection …
Sq3OpenEF
Flags For File Open Operations.
Sq3LimitE
Run-Time Limit Categories.
Sq3SerializeE
Flags for sqlite3_serialize.
Sq3DeSerializeEF
Flags for sqlite3_deserialize()
Sq3DbStatusE
Status Parameters for database connections.
static enum MkErrorE Sq3LitePrepareV2(SQ3_LITE db, MkStringR zSql, SQ3_STMT *ppStmt)
Compiling An SQL Statement …
#define OT_CHECK_CALLABLE(val)
#define OT_SETUP_CALLABLE_ONCE(val)
#define OT_CLEANUP_CALLABLE_ONCE(val)
#define OT_CHECK_BFL(val, nullB)
Struct to represent the data of the Sq3LiteC …
Struct to represent the data of the Sq3StmtC …