Sq3Lite PACKAGE - get information about the application … More...
Functions | |
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 enum MkErrorE | Sq3KeywordNameBUF_RT (MK_RT mkrt, MK_I32 num, MK_BUF *kwd_out) |
SQL Keyword Checking … | |
Sq3Lite - Sq3Lite_Info_C_API - function | |
enum MkErrorE | Sq3KeywordNameBUFP (MK_RT mkrt, MK_I32 num, MK_BUF *kwd_out) |
Non-inline replacement for Sq3KeywordNameBUF … | |
enum MkErrorE | Sq3CompleteP (MK_STRN sql) |
Non-inline replacement for Sq3Complete … | |
enum MkErrorE | Sq3KeywordCheckP (MK_STRN arg0, MK_I32 arg1) |
Non-inline replacement for Sq3KeywordCheck … | |
enum MkErrorE | Sq3KeywordCountP (void) |
Non-inline replacement for Sq3KeywordCount … | |
enum MkErrorE | Sq3KeywordNameP (MK_I32 num, MK_STRN *kwd, MK_I32 *kwdsz) |
Non-inline replacement for Sq3KeywordName … | |
enum MkErrorE | Sq3StatusP (enum Sq3StatusE op, MK_I32 *pCurrent, MK_I32 *pHighwater, MK_BOOL resetFlag) |
Non-inline replacement for Sq3Status … | |
enum MkErrorE | Sq3Status64P (enum Sq3StatusE op, MK_I64 *pCurrent, MK_I64 *pHighwater, MK_BOOL resetFlag) |
Non-inline replacement for Sq3Status64 … | |
Sq3Lite - Sq3Lite_Info_C_API - overload | |
#define | Sq3KeywordNameBUF_NULL(...) |
#define | Sq3KeywordNameBUF(...) |
#define | Sq3KeywordNameBUF_E(...) |
#define | Sq3KeywordNameBUF_C(...) |
#define | Sq3KeywordNameBUF_e(...) |
#define | Sq3Complete_E(...) |
#define | Sq3Complete_C(...) |
#define | Sq3KeywordCheck_E(...) |
#define | Sq3KeywordCheck_C(...) |
#define | Sq3KeywordCount_E(...) |
#define | Sq3KeywordCount_C(...) |
#define | Sq3KeywordName_E(...) |
#define | Sq3KeywordName_C(...) |
#define | Sq3Status_E(...) |
#define | Sq3Status_C(...) |
#define | Sq3Status64_E(...) |
#define | Sq3Status64_C(...) |
Sq3Lite PACKAGE - get information about the application …
#define Sq3Complete_C | ( | ... | ) |
Definition at line 258 of file sqlite3_overload_sq3.h.
#define Sq3Complete_E | ( | ... | ) |
Definition at line 257 of file sqlite3_overload_sq3.h.
#define Sq3KeywordCheck_C | ( | ... | ) |
Definition at line 260 of file sqlite3_overload_sq3.h.
#define Sq3KeywordCheck_E | ( | ... | ) |
Definition at line 259 of file sqlite3_overload_sq3.h.
#define Sq3KeywordCount_C | ( | ... | ) |
Definition at line 262 of file sqlite3_overload_sq3.h.
#define Sq3KeywordCount_E | ( | ... | ) |
Definition at line 261 of file sqlite3_overload_sq3.h.
#define Sq3KeywordName_C | ( | ... | ) |
Definition at line 266 of file sqlite3_overload_sq3.h.
#define Sq3KeywordName_E | ( | ... | ) |
Definition at line 265 of file sqlite3_overload_sq3.h.
#define Sq3KeywordNameBUF | ( | ... | ) |
Definition at line 251 of file sqlite3_overload_sq3.h.
#define Sq3KeywordNameBUF_C | ( | ... | ) |
Definition at line 253 of file sqlite3_overload_sq3.h.
#define Sq3KeywordNameBUF_E | ( | ... | ) |
Definition at line 252 of file sqlite3_overload_sq3.h.
#define Sq3KeywordNameBUF_e | ( | ... | ) |
Definition at line 254 of file sqlite3_overload_sq3.h.
#define Sq3KeywordNameBUF_NULL | ( | ... | ) |
Definition at line 250 of file sqlite3_overload_sq3.h.
#define Sq3Status64_C | ( | ... | ) |
Definition at line 270 of file sqlite3_overload_sq3.h.
#define Sq3Status64_E | ( | ... | ) |
Definition at line 269 of file sqlite3_overload_sq3.h.
#define Sq3Status_C | ( | ... | ) |
Definition at line 268 of file sqlite3_overload_sq3.h.
#define Sq3Status_E | ( | ... | ) |
Definition at line 267 of file sqlite3_overload_sq3.h.
Determine If An SQL Statement Is Complete …
These routines are useful during command-line input to determine if the currently entered text seems to form a complete SQL statement or if additional input is needed before sending the text into SQLite for parsing. These routines return 1 if the input string appears to be a complete SQL statement. A statement is judged to be complete if it ends with a semicolon token and is not a prefix of a well-formed CREATE TRIGGER statement. Semicolons that are embedded within string literals or quoted identifier names or comments are not independent tokens (they are part of the token in which they are embedded) and thus do not count as a statement terminator. Whitespace and comments that follow the final semicolon are ignored.
These routines return 0 if the statement is incomplete. If a memory allocation fails, then SQ3_RESULT_NOMEM is returned.
These routines do not parse the SQL statements thus will not detect syntactically incorrect SQL.
If SQLite has not been initialized using Sq3Initialize () prior to invoking sqlite3_complete16() then Sq3Initialize() is invoked automatically by sqlite3_complete16(). If that initialization fails, then the return value from sqlite3_complete16() will be non-zero regardless of whether or not the input SQL is complete.
The input to Sq3Complete () must be a zero-terminated UTF-8 string.
The input to sqlite3_complete16 () must be a zero-terminated UTF-16 string in native byte order.
Reference code from sqlite3:
Definition at line 704 of file LibSq3Lite_sq3.h.
Non-inline replacement for Sq3Complete …
SQL Keyword Checking …
These routines provide access to the set of SQL language keywords recognized by SQLite. Applications can uses these routines to determine whether or not a specific identifier needs to be escaped (for example, by enclosing in double-quotes) so as not to confuse the parser.
The Sq3KeywordCount() interface returns the number of distinct keywords understood by SQLite.
The Sq3KeywordName(N,Z,L) interface finds the N-th keyword and makes *Z point to that keyword expressed as UTF8 and writes the number of bytes in the keyword into *L. The string that *Z points to is not zero-terminated. The Sq3KeywordName(N,Z,L) routine returns SQ3_RESULT_OK if N is within bounds and SQ3_RESULT_ERROR if not. If either Z or L are NULL or invalid pointers then calls to Sq3KeywordName(N,Z,L) result in undefined behavior.
The Sq3KeywordCheck(Z,L) interface checks to see whether or not the L-byte UTF8 identifier that Z points to is a keyword, returning non-zero if it is and zero if not.
The parser used by SQLite is forgiving. It is often possible to use a keyword as an identifier as long as such use does not result in a parsing ambiguity. For example, the statement "CREATE TABLE BEGIN(REPLACE,PRAGMA,END);" is accepted by SQLite, and creates a new table named "BEGIN" with three columns named "REPLACE", "PRAGMA", and "END". Nevertheless, best practice is to avoid using keywords as identifiers. Common techniques used to avoid keyword name collisions include:
Note that the number of keywords understood by SQLite can depend on compile-time options. For example, "VACUUM" is not a keyword if SQLite is compiled with the -DSQLITE_OMIT_VACUUM option. Also, new keywords may be added to future releases of SQLite.
Reference code from sqlite3:
Definition at line 713 of file LibSq3Lite_sq3.h.
Non-inline replacement for Sq3KeywordCheck …
|
inlinestatic |
SQL Keyword Checking …
read more at 'Sq3KeywordCheck'
Definition at line 722 of file LibSq3Lite_sq3.h.
enum MkErrorE Sq3KeywordCountP | ( | void | ) |
Non-inline replacement for Sq3KeywordCount …
SQL Keyword Checking …
read more at 'Sq3KeywordCheck'
Definition at line 733 of file LibSq3Lite_sq3.h.
SQL Keyword Checking …
read more at 'Sq3KeywordCheck'
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | num | The keyword-number |
[out] | kwd_out | The return-value have to be not "MK_NULL" . |
MkExceptionC | → The default-exception from the Programming-Language-Micro-Kernel (PLMK) |
"MK_NULL"
for a non-error result.Definition at line 1000 of file LibSq3Lite_sq3.h.
Non-inline replacement for Sq3KeywordNameBUF …
Non-inline replacement for Sq3KeywordName …
|
inlinestatic |
SQLite Runtime Status …
These interfaces are used to retrieve runtime status information about the performance of SQLite, and optionally to reset various highwater marks. The first argument is an integer code for the specific parameter to measure. Recognized integer codes are of the form SQ3_STATUS_.... The current value of the parameter is returned into *pCurrent. The highest recorded value is returned in *pHighwater. If the resetFlag is true, then the highest record value is reset after pHighwater is written. Some parameters do not record the highest value. For those parameters nothing is written into *pHighwater and the resetFlag is ignored. Other parameters record only the highwater mark and not the current value. For these latter parameters nothing is written into *pCurrent.
The Sq3Status() and Sq3Status64() routines return SQ3_RESULT_OK on success and a non-zero error code on failure.
If either the current value or the highwater mark is too large to be represented by a 32-bit integer, then the values returned by Sq3Status() are undefined.
See also: Sq3LiteDbStatus ()
Reference code from sqlite3:
Definition at line 742 of file LibSq3Lite_sq3.h.
|
inlinestatic |
SQLite Runtime Status …
Definition at line 751 of file LibSq3Lite_sq3.h.
enum MkErrorE Sq3Status64P | ( | enum Sq3StatusE | op, |
MK_I64 * | pCurrent, | ||
MK_I64 * | pHighwater, | ||
MK_BOOL | resetFlag ) |
Non-inline replacement for Sq3Status64 …