32 #ifndef SQLITE_FUNCTIONS_H_
33 #define SQLITE_FUNCTIONS_H_
44 #ifndef SQLITE_OPEN_READONLY
48 #define SQLITE_OPEN_READONLY 0x00000001
51 #ifndef SQLITE_OPEN_READWRITE
55 #define SQLITE_OPEN_READWRITE 0x00000002
58 #ifndef SQLITE_OPEN_CREATE
64 #define SQLITE_OPEN_CREATE 0x00000004
78 #ifndef SQL_RESULT_FIELD_CHUNK_SIZE
82 # define SQL_RESULT_FIELD_CHUNK_SIZE 2048
85 #ifndef SQL_RESULT_FIELD_ELEMENT_COUNT
89 # define SQL_RESULT_FIELD_ELEMENT_COUNT 128
92 #ifndef SQL_RESULT_FIELD_CONST_COUNT
97 # define SQL_RESULT_FIELD_CONST_COUNT 0
100 #ifndef SQL_RESULT_RESULT_CHUNK_SIZE
104 # define SQL_RESULT_RESULT_CHUNK_SIZE 65536
107 #ifndef SQL_RESULT_RESULT_ELEMENT_COUNT
111 # define SQL_RESULT_RESULT_ELEMENT_COUNT 512
114 #ifndef SQL_RESULT_RESULT_CONST_COUNT
118 # define SQL_RESULT_RESULT_CONST_COUNT 0
int sqlite_count_matches(sqlite3 *db, const char *sqlClause, char **errMsg_ptr)
Count the matches returned by SQL clause.
StringList is a structure that stores a list of constant strings.
Definition: str_functions.h:47
String processing functions.
StringList * sqlite_get_fieldNames(sqlite3 *db, const char *sqlClause, int *execResult_ptr, char **errMsg_ptr)
Get the fields of result table of a SQL clause.
SQL_Result * sqlite_get_tableNames(sqlite3 *db)
Get the list of table names in the database.
Data structure that holds the result of SQL functions and command.
Definition: sqlite_functions.h:146
int execResult
sqlite3_exec result code. Initial value is -1, which means the result is not ready.
Definition: sqlite_functions.h:150
char * sqlite_value_signed_text_buffer(char *buf, sqlite3_value *value)
Store the value as signed string to provided buffer.
StringList * resultList
StringList that holds returned results.
Definition: sqlite_functions.h:148
StringList * sql_result_free(SQL_Result *sResult, gboolean freeResult)
Free a SQL_Result instance.
SQL_Result * sql_result_new()
New a SQL_Result instance.
char * errMsg
Eroor messages from sqlite3_exec().
Definition: sqlite_functions.h:151
StringList * fieldList
StringList that holds returned fields.
Definition: sqlite_functions.h:147
SQL_Result * sqlite_get_sql_result(sqlite3 *db, const char *sqlClause)
Get the results of SQL clause.
char * sqlite_value_signed_text(sqlite3_value *value)
Return the value as signed string.
int colCount
Column count. Value 0 usually implied that no matched results.
Definition: sqlite_functions.h:149