52#ifndef PARSE_C_HEADER_TO_META
58 #define Sq3Fupu_Sq3LiteBusyHandler_arg1_ret MK_I32
59 #define Sq3Fupu_Sq3LiteBusyHandler_arg1_args MK_PTR arg0, MK_I32 arg1
65 #define Sq3Fupu_Sq3LiteCommitHook_arg1_ret MK_I32
66 #define Sq3Fupu_Sq3LiteCommitHook_arg1_args MK_PTR arg0
72 #define Sq3Fupu_Sq3LiteRollbackHook_arg1_ret void
73 #define Sq3Fupu_Sq3LiteRollbackHook_arg1_args MK_PTR arg0
79 #define Sq3Fupu_Sq3LiteUpdateHook_arg1_ret void
80 #define Sq3Fupu_Sq3LiteUpdateHook_arg1_args MK_PTR arg0, MK_I32 arg1, MK_STRN arg2, MK_STRN arg3, sqlite3_int64 arg4
85#ifndef PARSE_C_HEADER_TO_META
91 #define Sq3Fupu_Sq3LiteExec_callback_call_ret MK_I32
92 #define Sq3Fupu_Sq3LiteExec_callback_call_args MK_CBP callV1, MK_I32 num, MK_STR *vals, MK_STR *cols
97#ifndef PARSE_C_HEADER_TO_META
103 #define Sq3Fupu_Sq3LiteAutovacuumPages_arg1_ret MK_U32
104 #define Sq3Fupu_Sq3LiteAutovacuumPages_arg1_args MK_PTR arg0, MK_STRN arg1, MK_U32 arg2, MK_U32 arg3, MK_U32 arg4
110 #define Sq3Fupu_Sq3LiteAutovacuumPages_arg3_ret void
111 #define Sq3Fupu_Sq3LiteAutovacuumPages_arg3_args MK_PTR arg0
117 #define Sq3Fupu_Sq3LiteCreateCollation_xCompare_ret MK_I32
118 #define Sq3Fupu_Sq3LiteCreateCollation_xCompare_args MK_PTR arg0, MK_I32 arg1, MK_PTRN arg2, MK_I32 arg3, MK_PTRN arg4
128#ifndef PARSE_C_HEADER_TO_META
201#ifndef PARSE_C_HEADER_TO_META
253#ifndef PARSE_C_HEADER_TO_META
279#ifndef PARSE_C_HEADER_TO_META
316#ifndef PARSE_C_HEADER_TO_META
453#ifndef PARSE_C_HEADER_TO_META
480#ifndef PARSE_C_HEADER_TO_META
497#ifndef PARSE_C_HEADER_TO_META
532#ifndef PARSE_C_HEADER_TO_META
635#define Sq3LiteVtabConfig(sq3lite, op, ...) ({ \
636 Sq3ErrorE errVal = sqlite3_vtab_config(sq3lite->nat, op, __VA_ARGS__); \
637 Sq3ErrorE_Check_Macro(sq3lite,errVal); \
638 if (unlikely(Sq3ErrorCheckI(errVal))) { \
639 Sq3LiteErrorToMQ(MkOBJ(sq3lite), __func__,__FILE__,__LINE__); \
665 assert(val_out != NULL);
675 MkErrorReturnLabel(sq3lite);
719 (*ppStmt)->pzTail = pzTail;
720 MkErrorReturnLabel(db);
728#define Sq3Fupu_Sq3LiteExec_callback_call_check do { \
729 assert(callV1 != NULL); \
732#define Sq3Fupu_Sq3LiteExecV2CB_callback_call_check do { \
733 assert(callV2 != NULL); \
737#define Sq3LiteExecV2CB_ret enum MkErrorE
738#define Sq3LiteExecV2CB_args MK_RT_ARGS MK_CBP callV2, MK_BFL vals, MK_BFL cols
762__parser__(
class=Sq3LiteC,doc-group=Execution,callback-name=LiteExecV2,callback-null,callback-once)
LibSq3Lite_sq3.h - 10 Apr 2025 - aotto1968.
#define BEGIN_SQ3_C_DECLS
Sq3LiteC_def_sq3.h - 10 Apr 2025 - aotto1968.
#define MkBufferListAppendI32(...)
#define MkBufferListCreateTLS_T(name, num)
#define MkErrorStack_1X(...)
static MkBinaryR MkBinaryCreate(MK_SIZE size, MK_BINN data)
static bool MK_NULL_STR_CHECK_1(char const *const __str)
#define MK_ATTR_RT_INSTANCE
static SQ3_LITE Sq3LiteC_ObjCreate(sqlite3 *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
__thread MK_TYP Sq3LiteC_TT
class as MkTypeDefS-class-type …
static enum MkErrorE Sq3LiteBusyTimeout(SQ3_LITE sq3lite, MK_I32 ms)
Set A Busy Timeout …
static MK_PTR Sq3LiteUpdateHook(SQ3_LITE sq3lite, Sq3Fupu_Sq3LiteUpdateHook_arg1 arg1, MK_PTR arg2)
Data Change Notification Callbacks …
#define Sq3Fupu_Sq3LiteCommitHook_arg1_args
#define Sq3Fupu_Sq3LiteUpdateHook_arg1_ret
Sq3Fupu_Sq3LiteUpdateHook_arg1_ret(* Sq3Fupu_Sq3LiteUpdateHook_arg1)(Sq3Fupu_Sq3LiteUpdateHook_arg1_args)
static enum MkErrorE Sq3LiteBusyHandler(SQ3_LITE sq3lite, Sq3Fupu_Sq3LiteBusyHandler_arg1 arg1, MK_PTR arg2)
Register A Callback To Handle SQLITE_BUSY Errors …
Sq3Fupu_Sq3LiteBusyHandler_arg1_ret(* Sq3Fupu_Sq3LiteBusyHandler_arg1)(Sq3Fupu_Sq3LiteBusyHandler_arg1_args)
#define Sq3Fupu_Sq3LiteCommitHook_arg1_ret
static enum MkErrorE Sq3LiteLimit(SQ3_LITE sq3lite, enum Sq3LimitE id, MK_I32 newVal)
Run-time Limits …
Sq3Fupu_Sq3LiteCommitHook_arg1_ret(* Sq3Fupu_Sq3LiteCommitHook_arg1)(Sq3Fupu_Sq3LiteCommitHook_arg1_args)
static enum MkErrorE Sq3LiteDeclareVtab(SQ3_LITE sq3lite, MK_STRN zSQL)
Declare The Schema Of A Virtual Table …
static MK_PTR Sq3LiteRollbackHook(SQ3_LITE sq3lite, Sq3Fupu_Sq3LiteRollbackHook_arg1 arg1, MK_PTR arg2)
Commit And Rollback Notification Callbacks …
#define Sq3Fupu_Sq3LiteBusyHandler_arg1_args
static enum MkErrorE Sq3LiteExtendedResultCodes(SQ3_LITE sq3lite, MK_I32 onoff)
Enable Or Disable Extended Result Codes …
#define Sq3Fupu_Sq3LiteRollbackHook_arg1_args
static MK_PTR Sq3LiteCommitHook(SQ3_LITE sq3lite, Sq3Fupu_Sq3LiteCommitHook_arg1 arg1, MK_PTR arg2)
Commit And Rollback Notification Callbacks …
#define Sq3Fupu_Sq3LiteBusyHandler_arg1_ret
Sq3Fupu_Sq3LiteRollbackHook_arg1_ret(* Sq3Fupu_Sq3LiteRollbackHook_arg1)(Sq3Fupu_Sq3LiteRollbackHook_arg1_args)
#define Sq3Fupu_Sq3LiteUpdateHook_arg1_args
#define Sq3Fupu_Sq3LiteRollbackHook_arg1_ret
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 …
enum MkErrorE Sq3LiteExecV2_RT(MK_RT mkrt, SQ3_LITE sq3lite, MK_STRN sql, Sq3LiteExecV2CB callback_call, MK_CBP callback)
The Sq3LiteExecV2() interface is a convenience wrapper around Sq3StmtPrepareV2(), Sq3StmtStep(),...
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 …
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
#define Sq3Fupu_Sq3LiteExec_callback_call_args
#define Sq3Fupu_Sq3LiteExec_callback_call_ret
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 …
#define Sq3LiteDbStatus_E(...)
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 Sq3LiteDeserialize_RT(MK_RT mkrt, SQ3_LITE sq3lite, MK_STRN zSchema, MkBinaryR pData, enum Sq3DeSerializeEF mFlags)
Deserialize a database …
#define Sq3Fupu_Sq3LiteAutovacuumPages_arg1_args
#define Sq3Fupu_Sq3LiteAutovacuumPages_arg3_args
static MK_BIN Sq3LiteSerializeHide(SQ3_LITE db, MK_STRN zSchema, MK_I64 *piSize, enum Sq3SerializeE mFlags)
Serialize a database …
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 Sq3Fupu_Sq3LiteAutovacuumPages_arg3_ret
static enum MkErrorE Sq3LiteDropModulesHide(SQ3_LITE db, MK_STRN *azKeep)
Remove Unnecessary Virtual Table Implementations …
Sq3Fupu_Sq3LiteAutovacuumPages_arg3_ret(* Sq3Fupu_Sq3LiteAutovacuumPages_arg3)(Sq3Fupu_Sq3LiteAutovacuumPages_arg3_args)
static enum MkErrorE Sq3LiteFileControl(SQ3_LITE sq3lite, MK_STRN zDbName, enum Sq3TestCtrlE op, MK_PTR arg3)
Low-Level Control Of Database Files …
enum MkErrorE Sq3LiteDropModules_RT(MK_RT mkrt, SQ3_LITE sq3lite, MK_BFL azKeepBfl)
Remove Unnecessary Virtual Table Implementations …
#define Sq3LiteDeserializeHide_E(...)
static enum MkErrorE Sq3LiteDeserializeHide(SQ3_LITE db, MK_STRN zSchema, MK_BIN pData, MK_I64 szDb, MK_I64 szBuf, enum Sq3DeSerializeEF mFlags)
Deserialize a database …
Sq3Fupu_Sq3LiteAutovacuumPages_arg1_ret(* Sq3Fupu_Sq3LiteAutovacuumPages_arg1)(Sq3Fupu_Sq3LiteAutovacuumPages_arg1_args)
static enum MkErrorE Sq3LiteDbStatus(SQ3_LITE sq3lite, enum Sq3DbStatusE op, MK_I32 *pCur, MK_I32 *pHiwtr, MK_BOOL resetFlg)
Database Connection Status …
static enum MkErrorE Sq3LiteAutovacuumPages(SQ3_LITE db, Sq3Fupu_Sq3LiteAutovacuumPages_arg1 arg1, MK_PTR arg2, Sq3Fupu_Sq3LiteAutovacuumPages_arg3 arg3)
Autovacuum Compaction Amount Callback …
#define Sq3LiteVtabConfig(sq3lite, op,...)
Virtual Table Interface Configuration …
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 …
void Sq3LiteLog_RT(MK_RT mkrt, SQ3_LITEN const lite, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the lite …
#define Sq3Fupu_Sq3LiteCreateCollation_xCompare_ret
static enum MkErrorE Sq3LiteDbReadonly(SQ3_LITE db, MK_STRN zDbName)
Determine if a database is read-only …
#define Sq3Fupu_Sq3LiteAutovacuumPages_arg1_ret
Sq3Fupu_Sq3LiteCreateCollation_xCompare_ret(* Sq3Fupu_Sq3LiteCreateCollation_xCompare)(Sq3Fupu_Sq3LiteCreateCollation_xCompare_args)
static enum MkErrorE Sq3LiteDbStatusBFL_RT(MK_RT mkrt, SQ3_LITE sq3lite, enum Sq3DbStatusE op, MK_BFL *val_out, MK_BOOL resetFlg)
Database Connection Status …
static enum MkErrorE Sq3LiteCreateCollation(SQ3_LITE sq3lite, MK_STRN zName, MK_I32 eTextRep, MK_PTR pArg, Sq3Fupu_Sq3LiteCreateCollation_xCompare xCompare)
Define New Collating Sequences …
#define Sq3Fupu_Sq3LiteCreateCollation_xCompare_args
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 …
#define SQ3_EXTERN
static library
Sq3VtabE
Virtual Table Configuration Options.
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.
Sq3TestCtrlE
Testing Interface Operation Codes.
Sq3ExtendetResultCodesE
Extended Result Codes.
#define Sq3ErrorE_Check_Static(cls_hdl, PROC)
#define Sq3ErrorE_Check(sq3_hdl, PROC)
check on a tclsq3lite error and convert into a tclsq3lite error …
#define SQ3_INSTANCE_HDL(x)
#define SQ3_INSTANCE_RT_X(x)
static enum MkErrorE Sq3StmtPrepareV2Hide(SQ3_LITE db, MK_STRN zSql, MK_I32 nByte, SQ3_STMT *ppStmt, MK_STRN *pzTail)
Compiling An SQL Statement …
static enum MkErrorE Sq3LitePrepareV2(SQ3_LITE db, MkStringR zSql, SQ3_STMT *ppStmt)
Compiling An SQL Statement …
SQLITE_API int sqlite3_overload_function(sqlite3 *, const char *zFuncName, int nArg)
SQLITE_API int sqlite3_extended_result_codes(sqlite3 *, int onoff)
SQLITE_API int sqlite3_table_column_metadata(sqlite3 *db, const char *zDbName, const char *zTableName, const char *zColumnName, char const **pzDataType, char const **pzCollSeq, int *pNotNull, int *pPrimaryKey, int *pAutoinc)
SQLITE_API int sqlite3_wal_checkpoint_v2(sqlite3 *db, const char *zDb, int eMode, int *pnLog, int *pnCkpt)
SQLITE_API int sqlite3_limit(sqlite3 *, int id, int newVal)
SQLITE_API int sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs)
SQLITE_API unsigned char * sqlite3_serialize(sqlite3 *db, const char *zSchema, sqlite3_int64 *piSize, unsigned int mFlags)
SQLITE_API int sqlite3_file_control(sqlite3 *, const char *zDbName, int op, void *)
SQLITE_API int sqlite3_error_offset(sqlite3 *db)
SQLITE_API int sqlite3_db_cacheflush(sqlite3 *)
SQLITE_API int sqlite3_is_interrupted(sqlite3 *)
SQLITE_API int sqlite3_txn_state(sqlite3 *, const char *zSchema)
SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3 *, sqlite3_int64)
SQLITE_API void * sqlite3_commit_hook(sqlite3 *, int(*)(void *), void *)
SQLITE_API const char * sqlite3_errstr(int)
SQLITE_API int sqlite3_deserialize(sqlite3 *db, const char *zSchema, unsigned char *pData, sqlite3_int64 szDb, sqlite3_int64 szBuf, unsigned mFlags)
SQLITE_API int sqlite3_declare_vtab(sqlite3 *, const char *zSQL)
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *)
SQLITE_API const char * sqlite3_db_name(sqlite3 *db, int N)
SQLITE_API int sqlite3_extended_errcode(sqlite3 *db)
SQLITE_API int sqlite3_errcode(sqlite3 *db)
SQLITE_API int sqlite3_get_autocommit(sqlite3 *)
SQLITE_API int sqlite3_total_changes(sqlite3 *)
SQLITE_API int sqlite3_changes(sqlite3 *)
SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName)
SQLITE_API int sqlite3_exec(sqlite3 *, const char *sql, int(*callback)(void *, int, char **, char **), void *, char **errmsg)
SQLITE_API void * sqlite3_update_hook(sqlite3 *, void(*)(void *, int, char const *, char const *, sqlite3_int64), void *)
SQLITE_API void * sqlite3_rollback_hook(sqlite3 *, void(*)(void *), void *)
SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *)
SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db, const char *zDbName)
SQLITE_API int sqlite3_db_status(sqlite3 *, int op, int *pCur, int *pHiwtr, int resetFlg)
SQLITE_API void sqlite3_interrupt(sqlite3 *)
SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N)
SQLITE_API int sqlite3_sleep(int)
SQLITE_API int sqlite3_close_v2(sqlite3 *)
SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3 *)
SQLITE_API const char * sqlite3_errmsg(sqlite3 *)
SQLITE_API int sqlite3_create_collation(sqlite3 *, const char *zName, int eTextRep, void *pArg, int(*xCompare)(void *, int, const void *, int, const void *))
SQLITE_API int sqlite3_busy_handler(sqlite3 *, int(*)(void *, int), void *)
SQLITE_API int sqlite3_autovacuum_pages(sqlite3 *db, unsigned int(*)(void *, const char *, unsigned int, unsigned int, unsigned int), void *, void(*)(void *))
SQLITE_API int sqlite3_drop_modules(sqlite3 *db, const char **azKeep)
SQLITE_API int sqlite3_db_release_memory(sqlite3 *)
SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3 *)
SQLITE_API int sqlite3_busy_timeout(sqlite3 *, int ms)
SQLITE_API int sqlite3_system_errno(sqlite3 *)
Struct to represent the data of the Sq3LiteC …
sqlite3 * nat
internal - link between Sq3LiteS and native library
Struct to represent the data of the Sq3StmtC …