theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
LibSq3Lite_sq3.h File Reference

LibSq3Lite_sq3.h - 10 Apr 2025 - aotto1968. More...

#include "LibMkKernel_mk.h"
#include <string.h>
#include "debug_mk.h"
#include "gen/sqlite3_overload_sq3.h"
#include "Sq3Enum_sq3.h"
+ Include dependency graph for LibSq3Lite_sq3.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SQ3_RT_ARGS_ONLY   MK_RT mkrt
 
#define SQ3_RT_ARGS   SQ3_RT_ARGS_ONLY,
 
#define SQ3_RT_CALL_ONLY   mkrt
 
#define SQ3_RT_CALL   SQ3_RT_CALL_ONLY,
 
#define BEGIN_SQ3_C_DECLS   /* empty */
 
#define END_SQ3_C_DECLS   /* empty */
 
#define SQ3_INSTANCE_HDL(x)
 
#define SQ3_INSTANCE_RT_X(x)
 
#define SQ3_INSTANCE_RT_X_NULL(x)
 
#define SQ3_INSTANCE_RT_O(o)
 
#define SQ3_INSTANCE_RT_O_NULL(o)
 
#define SQ3_DESTRUCTOR_RT_X(c, x)
 
#define SQ3_STATIC_RT   MK_STATIC_RT
 
#define SQ3_EXTERN
 static library
 
#define SQ3_EXTERN_DATA   extern
 
#define SQ3_SET_T(_cls, _hook, _nat)
 
#define Sq3ErrorE_Check(sq3_hdl, PROC)
 check on a pysq3lite error and convert into a pysq3lite error …
 
#define Sq3ErrorE_Check_Package(PROC)
 
#define Sq3ErrorE_Check_Static(cls_hdl, PROC)
 
#define Sq3ErrorE_Check_Ctor(__cls, __hdl, PROC)
 
#define Sq3Fupu_Sq3LiteProgressHandler_X_ret   MK_I32
 
#define Sq3Fupu_Sq3LiteProgressHandler_X_args   MK_PTR P
 
#define Sq3Fupu_Sq3LiteSetAuthorizer_xAuth_ret   MK_I32
 
#define Sq3Fupu_Sq3LiteSetAuthorizer_xAuth_args   MK_PTR pUserData, MK_I32 auth_action_code, MK_STRN arg2, MK_STRN arg3, MK_STRN arg4, MK_STRN arg5
 
#define Sq3ErrorC_Check(hdl, PROC)
 
#define OT_ERROR_SQ3_2_MQ(hdl)
 

Typedefs

typedef struct Sq3ValueSSQ3_VAL
 class-shortcut for struct Sq3ValueS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3ValueSSQ3_VALN
 class-shortcut for const struct Sq3ValueS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3ValueS SQ3_VALR
 reference-shortcut for struct Sq3ValueS, all shortcut using the XX_YYYR syntax (only for public API) …
 
typedef struct Sq3StmtSSQ3_STMT
 class-shortcut for struct Sq3StmtS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3StmtSSQ3_STMTN
 class-shortcut for const struct Sq3StmtS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3StmtS SQ3_STMTR
 reference-shortcut for struct Sq3StmtS, all shortcut using the XX_YYYR syntax (only for public API) …
 
typedef struct Sq3BlobSSQ3_BLOB
 class-shortcut for struct Sq3BlobS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3BlobSSQ3_BLOBN
 class-shortcut for const struct Sq3BlobS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3BlobS SQ3_BLOBR
 reference-shortcut for struct Sq3BlobS, all shortcut using the XX_YYYR syntax (only for public API) …
 
typedef struct Sq3FileSSQ3_FILE
 class-shortcut for struct Sq3FileS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3FileSSQ3_FILEN
 class-shortcut for const struct Sq3FileS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3FileS SQ3_FILER
 reference-shortcut for struct Sq3FileS, all shortcut using the XX_YYYR syntax (only for public API) …
 
typedef struct Sq3LiteSSQ3_LITE
 class-shortcut for struct Sq3LiteS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3LiteSSQ3_LITEN
 class-shortcut for const struct Sq3LiteS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3LiteS SQ3_LITER
 reference-shortcut for struct Sq3LiteS, all shortcut using the XX_YYYR syntax (only for public API) …
 
typedef void(* Sq3SetupThreadF) (MK_RT mkrt)
 
typedef Sq3Fupu_Sq3LiteProgressHandler_X_ret(* Sq3Fupu_Sq3LiteProgressHandler_X) (Sq3Fupu_Sq3LiteProgressHandler_X_args)
 
typedef Sq3Fupu_Sq3LiteSetAuthorizer_xAuth_ret(* Sq3Fupu_Sq3LiteSetAuthorizer_xAuth) (Sq3Fupu_Sq3LiteSetAuthorizer_xAuth_args)
 

Functions

void Sq3Setup (void)
 setup pysq3lite internal memory …
 
void Sq3Cleanup (void)
 cleanup pysq3lite internal memory …
 
static bool Sq3ErrorCheckI (enum Sq3ErrorE ret)
 check if ret signal an error
 
enum MkErrorE Sq3LiteErrorToMQ (MK_OBJN const obj, MK_STRN const func, MK_STRN const file, MK_I32 const line)
 if a pysq3lite funtion return a MkErrorE use this function to convert the libsq3lite-error into the libmkkernel-error
 
void Sq3SetupThreadCallback (Sq3SetupThreadF call)
 Initialize a callback which is called at runtime-setup
 
static MK_STRN Sq3CompileOptionGet (MK_I32 N)
 Run-Time Library Compilation Options Diagnostics …
 
static MK_BOOL Sq3CompileOptionUsed (MK_STRN zOptName)
 Run-Time Library Compilation Options Diagnostics …
 
static void Sq3LiteProgressHandler (SQ3_LITE sq3lite, MK_I32 N, Sq3Fupu_Sq3LiteProgressHandler_X X, MK_PTR P)
 Query Progress Callbacks …
 
static enum Sq3AuthReturnE Sq3LiteSetAuthorizer (SQ3_LITE sq3lite, Sq3Fupu_Sq3LiteSetAuthorizer_xAuth xAuth, MK_PTR pUserData)
 Compile-Time Authorization Callbacks …
 
static MK_I64 Sq3MemoryHighwater (MK_I32 resetFlag)
 Memory Allocator Statistics …
 
static MK_I64 Sq3MemoryUsed (void)
 Memory Allocator Statistics …
 
static void Sq3Randomness (MK_I32 N, MK_PTR P)
 Pseudo-Random Number Generator …
 
static enum MkErrorE Sq3Threadsafe (void)
 Test To See If The Library Is Threadsafe …
 
static enum MkErrorE Sq3Complete (MK_STRN sql)
 Determine If An SQL Statement Is Complete …
 
static enum MkErrorE Sq3KeywordCheck (MK_STRN arg0, MK_I32 arg1)
 SQL Keyword Checking …
 
static enum MkErrorE Sq3KeywordCount (void)
 SQL Keyword Checking …
 
static enum MkErrorE Sq3KeywordName (MK_I32 num, MK_STRN *kwd, MK_I32 *kwdsz)
 SQL Keyword Checking …
 
static enum MkErrorE Sq3Status (enum Sq3StatusE op, MK_I32 *pCurrent, MK_I32 *pHighwater, MK_BOOL resetFlag)
 SQLite Runtime Status …
 
static enum MkErrorE Sq3Status64 (enum Sq3StatusE op, MK_I64 *pCurrent, MK_I64 *pHighwater, MK_BOOL resetFlag)
 SQLite Runtime Status …
 
static void Sq3Free (MK_PTR N)
 Memory Allocation Subsystem …
 
static MK_PTR Sq3Malloc (MK_I32 N)
 Memory Allocation Subsystem …
 
static MK_PTR Sq3Malloc64 (MK_I64 N)
 Memory Allocation Subsystem …
 
static MK_I64 Sq3Msize (MK_PTR N)
 Memory Allocation Subsystem …
 
static MK_PTR Sq3Realloc (MK_PTR arg0, MK_I32 N)
 Memory Allocation Subsystem …
 
static MK_PTR Sq3Realloc64 (MK_PTR arg0, MK_I64 N)
 Memory Allocation Subsystem …
 
static MK_I64 Sq3HardHeapLimit64 (MK_I64 N)
 Impose A Limit On Heap Size …
 
static enum MkErrorE Sq3ReleaseMemory (MK_I32 N)
 Attempt To Free Heap Memory …
 
static MK_I64 Sq3SoftHeapLimit64 (MK_I64 N)
 Impose A Limit On Heap Size …
 
static MK_I32 Sq3StrGlob (MK_STRN zGlob, MK_STRN zStr)
 String Globbing …
 
static MK_I32 Sq3StrIcmp (MK_STRN arg0, MK_STRN arg1)
 String Comparison …
 
static MK_I32 Sq3StrLike (MK_STRN zGlob, MK_STRN zStr, MK_I32 cEsc)
 String LIKE Matching …
 
static MK_I32 Sq3StrNicmp (MK_STRN arg0, MK_STRN arg1, MK_I32 arg2)
 String Comparison …
 
static enum MkErrorE Sq3Initialize (void)
 Initialize The SQLite Library …
 
static enum MkErrorE Sq3OsEnd (void)
 Initialize The SQLite Library …
 
static enum MkErrorE Sq3OsInit (void)
 Initialize The SQLite Library …
 
static enum MkErrorE Sq3Shutdown (void)
 Initialize The SQLite Library …
 
static MK_STRN Sq3Libversion (void)
 Run-Time Library Version Numbers …
 
static enum MkErrorE Sq3LibversionNumber (void)
 Run-Time Library Version Numbers …
 
static MK_STRN Sq3Sourceid (void)
 Run-Time Library Version Numbers …
 
static SQ3_FILENAME Sq3CreateFilename (MK_STRN zDatabase, MK_STRN zJournal, MK_STRN zWal, MK_I32 azParam_num, MK_STRN *azParam)
 Create and Destroy VFS Filenames …
 
static MK_STRN Sq3FilenameDatabase (SQ3_FILENAME F)
 Translate filenames …
 
static MK_STRN Sq3FilenameJournal (SQ3_FILENAME F)
 Translate filenames …
 
static MK_STRN Sq3FilenameWal (SQ3_FILENAME F)
 Translate filenames …
 
static void Sq3FreeFilename (SQ3_FILENAME arg0)
 Create and Destroy VFS Filenames …
 
static enum MkErrorE Sq3UriBoolean (SQ3_FILENAME z, MK_STRN zParam, MK_I32 bDefault)
 Obtain Values For URI Parameters …
 
static MK_I64 Sq3UriInt64 (SQ3_FILENAME arg0, MK_STRN arg1, MK_I64 arg2)
 Obtain Values For URI Parameters …
 
static MK_STRN Sq3UriKey (SQ3_FILENAME z, MK_I32 N)
 Obtain Values For URI Parameters …
 
static MK_STRN Sq3UriParameter (SQ3_FILENAME z, MK_STRN zParam)
 Obtain Values For URI Parameters …
 
static enum MkErrorE Sq3KeywordNameBUF_RT (MK_RT mkrt, MK_I32 num, MK_BUF *kwd_out)
 SQL Keyword Checking …
 

Detailed Description

LibSq3Lite_sq3.h - 10 Apr 2025 - aotto1968.

Version
220e89cf9473580117e04029d678fcf7e7736959
Date
Thu Apr 10 14:00:03 2025 +0200
Author
aotto1968 aotto.nosp@m.1968.nosp@m.@t-on.nosp@m.line.nosp@m..de

Definition in file LibSq3Lite_sq3.h.

Macro Definition Documentation

◆ BEGIN_SQ3_C_DECLS

#define BEGIN_SQ3_C_DECLS   /* empty */

Definition at line 202 of file LibSq3Lite_sq3.h.

◆ END_SQ3_C_DECLS

#define END_SQ3_C_DECLS   /* empty */

Definition at line 203 of file LibSq3Lite_sq3.h.

◆ OT_ERROR_SQ3_2_MQ

#define OT_ERROR_SQ3_2_MQ ( hdl)
Value:
Sq3LiteErrorToMQ(MkOBJ(hdl), __func__,__FILE__,__LINE__);
#define MkOBJ(x)
enum MkErrorE Sq3LiteErrorToMQ(MK_OBJN const obj, MK_STRN const func, MK_STRN const file, MK_I32 const line)
if a pysq3lite funtion return a MkErrorE use this function to convert the libsq3lite-error into the l...

Definition at line 986 of file LibSq3Lite_sq3.h.

◆ SQ3_RT_ARGS

#define SQ3_RT_ARGS   SQ3_RT_ARGS_ONLY,

Definition at line 177 of file LibSq3Lite_sq3.h.

◆ SQ3_RT_ARGS_ONLY

#define SQ3_RT_ARGS_ONLY   MK_RT mkrt

Definition at line 176 of file LibSq3Lite_sq3.h.

◆ SQ3_RT_CALL

#define SQ3_RT_CALL   SQ3_RT_CALL_ONLY,

Definition at line 179 of file LibSq3Lite_sq3.h.

◆ SQ3_RT_CALL_ONLY

#define SQ3_RT_CALL_ONLY   mkrt

Definition at line 178 of file LibSq3Lite_sq3.h.

◆ Sq3ErrorC_Check

#define Sq3ErrorC_Check ( hdl,
PROC )
Value:
if (unlikely(Sq3ErrorCheckI(PROC))) { \
OT_ERROR_SQ3_2_MQ(hdl); \
OT_ERROR_META_2_LNG(hdl); \
goto error; \
}
#define unlikely(x)
static bool Sq3ErrorCheckI(enum Sq3ErrorE ret)
check if ret signal an error …

Definition at line 979 of file LibSq3Lite_sq3.h.

979#define Sq3ErrorC_Check(hdl,PROC) \
980 if (unlikely(Sq3ErrorCheckI(PROC))) { \
981 OT_ERROR_SQ3_2_MQ(hdl); \
982 OT_ERROR_META_2_LNG(hdl); \
983 goto error; \
984 }

Typedef Documentation

◆ Sq3SetupThreadF

typedef void( * Sq3SetupThreadF) (MK_RT mkrt)

Definition at line 509 of file LibSq3Lite_sq3.h.

Function Documentation

◆ Sq3SetupThreadCallback()

void Sq3SetupThreadCallback ( Sq3SetupThreadF call)

Initialize a callback which is called at runtime-setup

A runtime is created with every new thread and the purpose of this function is to provide the possible to add extra code at the end of the runtime-setup.

Internal the MkRuntimeCallbackAdd is used to register the callback.

Parameters
[in]callthe new callback or None for cleanup.