Go to the source code of this file.
Classes | |
struct | DB |
struct | Stmt |
struct | CB_Data |
struct | f_entry |
struct | d_entry |
Defines | |
#define | IS_INT(n) ( ( (lua_Number) ((int)(n)) ) == (n) ) |
#define | CAST(type, arg) ( (type)(arg) ) |
#define | FUNC(name) static int name (lua_State * L) |
#define | CB_DATA(ptr) CAST(CB_Data *, (ptr)) |
#define | KEY(ptr, id) CAST( void*, CAST(char*,(ptr))+(id) ) |
#define | KEY_KEY2VALUE_TABLE(p) KEY((p), 1) |
#define | KEY_FUNCTION_TABLE(p) KEY((p), 2) |
#define | KEY_COLLATION_TABLE(p) KEY((p), 3) |
#define | KEY_COLLNEEDED_DATA(p) KEY((p), 4) |
#define | KEY_AUTHORIZER_DATA(p) KEY((p), 5) |
#define | KEY_PROGRESS_DATA(p) KEY((p), 6) |
#define | KEY_TRACE_DATA(p) KEY((p), 7) |
#define | KEY_BUSY_DATA(p) KEY((p), 8) |
#define | KEY_COMMIT_DATA(p) KEY((p), 9) |
#define | KEY_XFUNC(p) KEY((p), 1) |
#define | KEY_XSTEP(p) KEY((p), 2) |
#define | KEY_XFINAL(p) KEY((p), 3) |
#define | KEY_XCOMPARE(p) KEY((p), 1) |
#define | KEY_XNEEDED(p) KEY((p), 1) |
#define | KEY_XAUTH(p) KEY((p), 1) |
#define | KEY_XPROGRESS(p) KEY((p), 1) |
#define | KEY_XTRACE(p) KEY((p), 1) |
#define | KEY_XBUSY(p) KEY((p), 1) |
#define | KEY_XCOMMIT(p) KEY((p), 1) |
#define | get_function_cb_data(L, db, name_pos) get_named_cb_data((L), (db), KEY_FUNCTION_TABLE(db), name_pos) |
#define | get_collation_cb_data(L, db, name_pos) get_named_cb_data((L), (db), KEY_COLLATION_TABLE(db), name_pos) |
#define | get_collneeded_cb_data(L, db) get_cb_data((L), (db), KEY_COLLNEEDED_DATA(db)) |
#define | get_authorizer_cb_data(L, db) get_cb_data((L), (db), KEY_AUTHORIZER_DATA(db)) |
#define | get_progress_cb_data(L, db) get_cb_data((L), (db), KEY_PROGRESS_DATA(db)) |
#define | get_trace_cb_data(L, db) get_cb_data((L), (db), KEY_TRACE_DATA(db)) |
#define | get_busy_cb_data(L, db) get_cb_data((L), (db), KEY_BUSY_DATA(db)) |
#define | get_commit_cb_data(L, db) get_cb_data((L), (db), KEY_COMMIT_DATA(db)) |
#define | checkany(L, narg) ( luaL_checkany((L), (narg)) ) |
#define | checkstr(L, narg) ( luaL_checklstring((L), (narg), 0) ) |
#define | checknumber(L, narg) ( luaL_checknumber((L), (narg)) ) |
#define | checkint(L, narg) ( (int) checknumber((L), (narg)) ) |
#define | checkdouble(L, narg) ( (double) checknumber((L), (narg)) ) |
#define | checkcontext(L, narg) ( (sqlite3_context *) checkudata((L), (narg)) ) |
#define | checkvalues(L, narg) ( (sqlite3_value **) checkudata((L), (narg)) ) |
#define | checkstmt(L, narg) ( (Stmt *) checkudata((L), (narg)) ) |
#define | checkdb(L, narg) ( (DB *) checkudata((L), (narg)) ) |
Typedefs | |
typedef const char *(* | column_text_blob_t )(sqlite3_stmt *, int) |
Functions | |
static void | push_private_table (lua_State *L, void *table_key) |
static void | delete_private_value (lua_State *L, void *value_key) |
static CB_Data * | new_cb_data (lua_State *L, DB *db) |
static CB_Data * | get_cb_data (lua_State *L, DB *db, void *data_key) |
static CB_Data * | get_named_cb_data (lua_State *L, DB *db, void *table_key, int name_pos) |
static void | register_callback (lua_State *L, DB *db, void *cb_key, int callback_pos) |
static void | init_callback_usage (lua_State *L, DB *db) |
static void | push_callback (lua_State *L, DB *db, void *cb_key) |
static int | pop_break_condition (lua_State *L) |
static void | push_nil_or_string (lua_State *L, const char *str) |
static void | report_error (lua_State *L, const char *msg) |
static void * | checkudata (lua_State *L, int narg) |
static sqlite3_stmt * | checkstmt_stmt (lua_State *L, int narg) |
static sqlite3 * | checkdb_sqlite3 (lua_State *L, int narg) |
static int | checknilornoneorfunc (lua_State *L, int narg) |
FUNC (l_sqlite3_bind_null) | |
FUNC (l_sqlite3_bind_text) | |
FUNC (l_sqlite3_bind_blob) | |
FUNC (l_sqlite3_bind_int) | |
FUNC (l_sqlite3_bind_double) | |
FUNC (l_sqlite3_bind_number) | |
FUNC (l_sqlite3_bind) | |
FUNC (l_sqlite3_bind_parameter_count) | |
FUNC (l_sqlite3_bind_parameter_name) | |
FUNC (l_sqlite3_bind_parameter_name_x) | |
FUNC (l_sqlite3_busy_timeout) | |
FUNC (l_sqlite3_changes) | |
FUNC (l_sqlite3_close) | |
static int | l_sqlite3_column_text_or_blob (lua_State *L, column_text_blob_t column_text_blob) |
FUNC (l_sqlite3_column_blob) | |
FUNC (l_sqlite3_column_text) | |
FUNC (l_sqlite3_column_int) | |
FUNC (l_sqlite3_column_double) | |
FUNC (l_sqlite3_column_number) | |
static void | push_column (lua_State *L, sqlite3_stmt *stmt, int column) |
FUNC (l_sqlite3_column) | |
static int | l_sqlite3_row_mode (lua_State *L, int mode) |
FUNC (l_sqlite3_drow) | |
FUNC (l_sqlite3_irow) | |
FUNC (l_sqlite3_arow) | |
FUNC (l_sqlite3_column_type) | |
FUNC (l_sqlite3_column_count) | |
static int | l_sqlite3_column_info (lua_State *L, const char *(*info_func)(sqlite3_stmt *, int)) |
FUNC (l_sqlite3_column_decltype) | |
FUNC (l_sqlite3_column_name) | |
FUNC (l_sqlite3_complete) | |
FUNC (l_sqlite3_data_count) | |
FUNC (l_sqlite3_errcode) | |
FUNC (l_sqlite3_errmsg) | |
FUNC (l_sqlite3_finalize) | |
FUNC (l_sqlite3_interrupt) | |
FUNC (l_sqlite3_last_insert_rowid) | |
FUNC (l_sqlite3_open) | |
FUNC (l_sqlite3_prepare) | |
FUNC (l_sqlite3_reset) | |
FUNC (l_sqlite3_step) | |
FUNC (l_sqlite3_total_changes) | |
static int | exec_callback_wrapper (void *cb_data, int num_columns, char **values, char **names) |
FUNC (l_sqlite3_exec) | |
static void | func_callback_wrapper (int which, sqlite3_context *ctx, int num_args, sqlite3_value **values) |
static void | xfunc_callback_wrapper (sqlite3_context *ctx, int num_args, sqlite3_value **values) |
static void | xstep_callback_wrapper (sqlite3_context *ctx, int num_args, sqlite3_value **values) |
static void | xfinal_callback_wrapper (sqlite3_context *ctx) |
FUNC (l_sqlite3_create_function) | |
static int | xcompare_callback_wrapper (void *cb_data, int len_a, const void *str_a, int len_b, const void *str_b) |
FUNC (l_sqlite3_create_collation) | |
static void | xneeded_callback_wrapper (void *cb_data, sqlite3 *sqlite3, int eTextRep, const char *collation_name) |
FUNC (l_sqlite3_collation_needed) | |
static void | xtrace_callback_wrapper (void *cb_data, const char *str) |
FUNC (l_sqlite3_trace) | |
FUNC (l_sqlite3_result_null) | |
FUNC (l_sqlite3_result_error) | |
FUNC (l_sqlite3_result_double) | |
FUNC (l_sqlite3_result_int) | |
FUNC (l_sqlite3_result_number) | |
FUNC (l_sqlite3_result_blob) | |
FUNC (l_sqlite3_result_text) | |
FUNC (l_sqlite3_result_value) | |
FUNC (l_sqlite3_result) | |
FUNC (l_sqlite3_aggregate_count) | |
FUNC (l_sqlite3_aggregate_context) | |
FUNC (l_sqlite3_value_int) | |
FUNC (l_sqlite3_value_double) | |
FUNC (l_sqlite3_value_number) | |
FUNC (l_sqlite3_value_blob) | |
FUNC (l_sqlite3_value_text) | |
FUNC (l_sqlite3_value) | |
FUNC (l_sqlite3_value_type) | |
FUNC (l_sqlite3_libversion) | |
static int | xcommit_callback_wrapper (void *cb_data) |
FUNC (l_sqlite3_commit_hook) | |
static int | xprogress_callback_wrapper (void *cb_data) |
FUNC (l_sqlite3_progress_handler) | |
static int | xbusy_callback_wrapper (void *cb_data, int num_called) |
FUNC (l_sqlite3_busy_handler) | |
static int | xauth_callback_wrapper (void *cb_data, int auth_request, const char *name1, const char *name2, const char *db_name, const char *trigger_name) |
FUNC (l_sqlite3_set_authorizer) | |
static void | f (lua_State *L, f_entry entries[]) |
static void | d (lua_State *L, d_entry entries[]) |
int | luaopen_sqlite3 (lua_State *L) |
Variables | |
f_entry | api_entries [] |
d_entry | error_entries [] |
d_entry | type_entries [] |
d_entry | auth_entries [] |
#define CAST | ( | type, | |||
arg | ) | ( (type)(arg) ) |
Definition at line 76 of file libluasqlite3.c.
#define CB_DATA | ( | ptr | ) | CAST(CB_Data *, (ptr)) |
Definition at line 82 of file libluasqlite3.c.
Referenced by xauth_callback_wrapper(), xbusy_callback_wrapper(), xcommit_callback_wrapper(), xcompare_callback_wrapper(), xneeded_callback_wrapper(), xprogress_callback_wrapper(), and xtrace_callback_wrapper().
#define checkany | ( | L, | |||
narg | ) | ( luaL_checkany((L), (narg)) ) |
Definition at line 322 of file libluasqlite3.c.
#define checkcontext | ( | L, | |||
narg | ) | ( (sqlite3_context *) checkudata((L), (narg)) ) |
Definition at line 335 of file libluasqlite3.c.
Referenced by FUNC().
#define checkdb | ( | L, | |||
narg | ) | ( (DB *) checkudata((L), (narg)) ) |
Definition at line 338 of file libluasqlite3.c.
Referenced by checkdb_sqlite3(), and FUNC().
#define checkdouble | ( | L, | |||
narg | ) | ( (double) checknumber((L), (narg)) ) |
Definition at line 326 of file libluasqlite3.c.
Referenced by FUNC().
#define checkint | ( | L, | |||
narg | ) | ( (int) checknumber((L), (narg)) ) |
Definition at line 325 of file libluasqlite3.c.
Referenced by FUNC(), l_sqlite3_column_info(), and l_sqlite3_column_text_or_blob().
#define checknumber | ( | L, | |||
narg | ) | ( luaL_checknumber((L), (narg)) ) |
Definition at line 324 of file libluasqlite3.c.
Referenced by FUNC().
#define checkstmt | ( | L, | |||
narg | ) | ( (Stmt *) checkudata((L), (narg)) ) |
Definition at line 337 of file libluasqlite3.c.
Referenced by checkstmt_stmt(), and FUNC().
#define checkstr | ( | L, | |||
narg | ) | ( luaL_checklstring((L), (narg), 0) ) |
Definition at line 323 of file libluasqlite3.c.
Referenced by FUNC().
#define checkvalues | ( | L, | |||
narg | ) | ( (sqlite3_value **) checkudata((L), (narg)) ) |
Definition at line 336 of file libluasqlite3.c.
Referenced by FUNC().
#define FUNC | ( | name | ) | static int name (lua_State * L) |
Definition at line 78 of file libluasqlite3.c.
Definition at line 144 of file libluasqlite3.c.
Referenced by FUNC().
Definition at line 147 of file libluasqlite3.c.
Referenced by FUNC().
#define get_collation_cb_data | ( | L, | |||
db, | |||||
name_pos | ) | get_named_cb_data((L), (db), KEY_COLLATION_TABLE(db), name_pos) |
Definition at line 142 of file libluasqlite3.c.
Referenced by FUNC().
Definition at line 143 of file libluasqlite3.c.
Referenced by FUNC().
Definition at line 148 of file libluasqlite3.c.
Referenced by FUNC().
#define get_function_cb_data | ( | L, | |||
db, | |||||
name_pos | ) | get_named_cb_data((L), (db), KEY_FUNCTION_TABLE(db), name_pos) |
Definition at line 141 of file libluasqlite3.c.
Referenced by FUNC().
Definition at line 145 of file libluasqlite3.c.
Referenced by FUNC().
Definition at line 146 of file libluasqlite3.c.
Referenced by FUNC().
#define IS_INT | ( | n | ) | ( ( (lua_Number) ((int)(n)) ) == (n) ) |
Definition at line 74 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY | ( | ptr, | |||
id | ) | CAST( void*, CAST(char*,(ptr))+(id) ) |
Definition at line 84 of file libluasqlite3.c.
#define KEY_AUTHORIZER_DATA | ( | p | ) | KEY((p), 5) |
Definition at line 90 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_BUSY_DATA | ( | p | ) | KEY((p), 8) |
Definition at line 93 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_COLLATION_TABLE | ( | p | ) | KEY((p), 3) |
Definition at line 88 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_COLLNEEDED_DATA | ( | p | ) | KEY((p), 4) |
Definition at line 89 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_COMMIT_DATA | ( | p | ) | KEY((p), 9) |
Definition at line 94 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_FUNCTION_TABLE | ( | p | ) | KEY((p), 2) |
Definition at line 87 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_KEY2VALUE_TABLE | ( | p | ) | KEY((p), 1) |
Definition at line 86 of file libluasqlite3.c.
Referenced by FUNC(), push_callback(), and register_callback().
#define KEY_PROGRESS_DATA | ( | p | ) | KEY((p), 6) |
Definition at line 91 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_TRACE_DATA | ( | p | ) | KEY((p), 7) |
Definition at line 92 of file libluasqlite3.c.
Referenced by FUNC().
#define KEY_XAUTH | ( | p | ) | KEY((p), 1) |
Definition at line 101 of file libluasqlite3.c.
Referenced by FUNC(), and xauth_callback_wrapper().
#define KEY_XBUSY | ( | p | ) | KEY((p), 1) |
Definition at line 104 of file libluasqlite3.c.
Referenced by FUNC(), and xbusy_callback_wrapper().
#define KEY_XCOMMIT | ( | p | ) | KEY((p), 1) |
Definition at line 105 of file libluasqlite3.c.
Referenced by FUNC(), and xcommit_callback_wrapper().
#define KEY_XCOMPARE | ( | p | ) | KEY((p), 1) |
Definition at line 99 of file libluasqlite3.c.
Referenced by FUNC(), and xcompare_callback_wrapper().
#define KEY_XFINAL | ( | p | ) | KEY((p), 3) |
Definition at line 98 of file libluasqlite3.c.
Referenced by FUNC(), and func_callback_wrapper().
#define KEY_XFUNC | ( | p | ) | KEY((p), 1) |
Definition at line 96 of file libluasqlite3.c.
Referenced by FUNC(), and func_callback_wrapper().
#define KEY_XNEEDED | ( | p | ) | KEY((p), 1) |
Definition at line 100 of file libluasqlite3.c.
Referenced by FUNC(), and xneeded_callback_wrapper().
#define KEY_XPROGRESS | ( | p | ) | KEY((p), 1) |
Definition at line 102 of file libluasqlite3.c.
Referenced by FUNC(), and xprogress_callback_wrapper().
#define KEY_XSTEP | ( | p | ) | KEY((p), 2) |
Definition at line 97 of file libluasqlite3.c.
Referenced by FUNC(), and func_callback_wrapper().
#define KEY_XTRACE | ( | p | ) | KEY((p), 1) |
Definition at line 103 of file libluasqlite3.c.
Referenced by FUNC(), and xtrace_callback_wrapper().
typedef const char*(* column_text_blob_t)(sqlite3_stmt *, int) |
Definition at line 531 of file libluasqlite3.c.
static int checknilornoneorfunc | ( | lua_State * | L, | |
int | narg | |||
) | [static] |
Definition at line 357 of file libluasqlite3.c.
References lua_isfunction, lua_isnil, lua_isnone, and luaL_typerror().
Referenced by FUNC().
static sqlite3_stmt* checkstmt_stmt | ( | lua_State * | L, | |
int | narg | |||
) | [static] |
Definition at line 340 of file libluasqlite3.c.
References checkstmt.
Referenced by FUNC(), l_sqlite3_column_info(), l_sqlite3_column_text_or_blob(), and l_sqlite3_row_mode().
static void* checkudata | ( | lua_State * | L, | |
int | narg | |||
) | [static] |
Definition at line 328 of file libluasqlite3.c.
References lua_isuserdata(), lua_touserdata(), and luaL_typerror().
Definition at line 1492 of file libluasqlite3.c.
References lua_newtable, lua_pushnumber(), lua_pushstring(), lua_rawset(), and d_entry::name.
Referenced by balance_nonroot(), docListNew(), docListSpliceElement(), et_getdigit(), luaL_checkinteger(), luaL_checknumber(), luaopen_sqlite3(), math_max(), math_min(), read_number(), skipToDocid(), sqlite3VdbeRecordUnpack(), and symbexec().
static void delete_private_value | ( | lua_State * | L, | |
void * | value_key | |||
) | [static] |
Definition at line 175 of file libluasqlite3.c.
References lua_isnil, lua_pop, lua_pushlightuserdata(), lua_pushnil(), lua_rawget(), lua_rawset(), and LUA_REGISTRYINDEX.
Referenced by FUNC().
static int exec_callback_wrapper | ( | void * | cb_data, | |
int | num_columns, | |||
char ** | values, | |||
char ** | names | |||
) | [static] |
Definition at line 838 of file libluasqlite3.c.
References lua_newtable, lua_pcall(), lua_pop, lua_pushstring(), lua_pushvalue(), lua_rawseti(), and pop_break_condition().
Referenced by FUNC().
Definition at line 1478 of file libluasqlite3.c.
References lua_newtable, lua_pushcfunction, lua_pushstring(), lua_rawset(), and f_entry::name.
Referenced by addk(), aux_upvalue(), close_func(), combine(), f_seek(), f_setvbuf(), getiofile(), indexupvalue(), io_gc(), io_readline(), io_tostring(), LoadFunction(), lua_getallocf(), lua_getinfo(), luaF_newproto(), luaK_code(), luaopen_sqlite3(), open_func(), pagerSharedLock(), parlist(), pmain(), pushclosure(), registerlocalvar(), sqlite3VdbeMemMakeWriteable(), and tofile().
FUNC | ( | l_sqlite3_set_authorizer | ) |
Definition at line 1450 of file libluasqlite3.c.
References checkdb, checknilornoneorfunc(), db, get_authorizer_cb_data, KEY_XAUTH, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_set_authorizer(), and xauth_callback_wrapper().
FUNC | ( | l_sqlite3_busy_handler | ) |
Definition at line 1402 of file libluasqlite3.c.
References checkdb, checknilornoneorfunc(), db, get_busy_cb_data, KEY_XBUSY, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_busy_handler(), and xbusy_callback_wrapper().
FUNC | ( | l_sqlite3_progress_handler | ) |
Definition at line 1365 of file libluasqlite3.c.
References checkdb, checkint, checknilornoneorfunc(), db, get_progress_cb_data, KEY_XPROGRESS, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_errcode(), sqlite3_progress_handler(), and xprogress_callback_wrapper().
FUNC | ( | l_sqlite3_commit_hook | ) |
Definition at line 1328 of file libluasqlite3.c.
References checkdb, checknilornoneorfunc(), db, get_commit_cb_data, KEY_XCOMMIT, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_commit_hook(), sqlite3_errcode(), and xcommit_callback_wrapper().
FUNC | ( | l_sqlite3_libversion | ) |
Definition at line 1305 of file libluasqlite3.c.
References lua_pushstring(), and sqlite3_libversion().
FUNC | ( | l_sqlite3_value_type | ) |
Definition at line 1296 of file libluasqlite3.c.
References checkint, checkvalues, lua_pushnumber(), and sqlite3_value_type().
FUNC | ( | l_sqlite3_value | ) |
Definition at line 1261 of file libluasqlite3.c.
References checkint, checkvalues, lua_pushlstring(), lua_pushnil(), lua_pushnumber(), report_error(), sqlite3_value_blob(), sqlite3_value_bytes(), sqlite3_value_double(), sqlite3_value_int(), sqlite3_value_text(), sqlite3_value_type(), SQLITE_BLOB, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, and SQLITE_TEXT.
FUNC | ( | l_sqlite3_value_text | ) |
Definition at line 1252 of file libluasqlite3.c.
References checkint, checkvalues, lua_pushlstring(), sqlite3_value_bytes(), and sqlite3_value_text().
FUNC | ( | l_sqlite3_value_blob | ) |
Definition at line 1243 of file libluasqlite3.c.
References checkint, checkvalues, lua_pushlstring(), sqlite3_value_blob(), and sqlite3_value_bytes().
FUNC | ( | l_sqlite3_value_number | ) |
Definition at line 1230 of file libluasqlite3.c.
References checkint, checkvalues, lua_pushnumber(), sqlite3_value_double(), sqlite3_value_int(), sqlite3_value_type(), and SQLITE_INTEGER.
FUNC | ( | l_sqlite3_value_double | ) |
Definition at line 1221 of file libluasqlite3.c.
References checkint, checkvalues, lua_pushnumber(), and sqlite3_value_double().
FUNC | ( | l_sqlite3_value_int | ) |
Definition at line 1212 of file libluasqlite3.c.
References checkint, checkvalues, lua_pushnumber(), and sqlite3_value_int().
FUNC | ( | l_sqlite3_aggregate_context | ) |
Definition at line 1205 of file libluasqlite3.c.
References checkcontext, lua_pushlightuserdata(), and sqlite3_aggregate_context().
FUNC | ( | l_sqlite3_aggregate_count | ) |
Definition at line 1198 of file libluasqlite3.c.
References checkcontext, lua_pushnumber(), and sqlite3_aggregate_count().
FUNC | ( | l_sqlite3_result | ) |
Definition at line 1157 of file libluasqlite3.c.
References checkcontext, IS_INT, lua_strlen, LUA_TBOOLEAN, LUA_TNIL, LUA_TNONE, LUA_TNUMBER, lua_toboolean(), lua_tonumber(), lua_tostring, LUA_TSTRING, lua_type(), report_error(), sqlite3_result_double(), sqlite3_result_int(), sqlite3_result_null(), sqlite3_result_text(), and SQLITE_TRANSIENT.
FUNC | ( | l_sqlite3_result_value | ) |
Definition at line 1149 of file libluasqlite3.c.
References checkcontext, checkint, checkvalues, and sqlite3_result_value().
FUNC | ( | l_sqlite3_result_text | ) |
Definition at line 1142 of file libluasqlite3.c.
References checkcontext, checkstr, lua_strlen, sqlite3_result_text(), and SQLITE_TRANSIENT.
FUNC | ( | l_sqlite3_result_blob | ) |
Definition at line 1135 of file libluasqlite3.c.
References checkcontext, checkstr, lua_strlen, sqlite3_result_blob(), and SQLITE_TRANSIENT.
FUNC | ( | l_sqlite3_result_number | ) |
Definition at line 1122 of file libluasqlite3.c.
References checkcontext, checknumber, IS_INT, sqlite3_result_double(), and sqlite3_result_int().
FUNC | ( | l_sqlite3_result_int | ) |
Definition at line 1115 of file libluasqlite3.c.
References checkcontext, checkint, and sqlite3_result_int().
FUNC | ( | l_sqlite3_result_double | ) |
Definition at line 1108 of file libluasqlite3.c.
References checkcontext, checkdouble, and sqlite3_result_double().
FUNC | ( | l_sqlite3_result_error | ) |
Definition at line 1101 of file libluasqlite3.c.
References checkcontext, checkstr, lua_strlen, and sqlite3_result_error().
FUNC | ( | l_sqlite3_result_null | ) |
Definition at line 1094 of file libluasqlite3.c.
References checkcontext, and sqlite3_result_null().
FUNC | ( | l_sqlite3_trace | ) |
Definition at line 1071 of file libluasqlite3.c.
References checkdb, checknilornoneorfunc(), db, get_trace_cb_data, KEY_XTRACE, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_trace(), SQLITE_OK, and xtrace_callback_wrapper().
FUNC | ( | l_sqlite3_collation_needed | ) |
Definition at line 1038 of file libluasqlite3.c.
References checkdb, checknilornoneorfunc(), db, get_collneeded_cb_data, KEY_XNEEDED, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_collation_needed(), and xneeded_callback_wrapper().
FUNC | ( | l_sqlite3_create_collation | ) |
Definition at line 1003 of file libluasqlite3.c.
References checkdb, checknilornoneorfunc(), checkstr, db, get_collation_cb_data, KEY_XCOMPARE, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_create_collation(), SQLITE_UTF8, and xcompare_callback_wrapper().
FUNC | ( | l_sqlite3_create_function | ) |
Definition at line 941 of file libluasqlite3.c.
References checkdb, checkint, checknilornoneorfunc(), checkstr, db, get_function_cb_data, KEY_XFINAL, KEY_XFUNC, KEY_XSTEP, DB::kr_db, lua_pushnumber(), register_callback(), sqlite3_create_function(), SQLITE_UTF8, xfinal_callback_wrapper(), xfunc_callback_wrapper(), and xstep_callback_wrapper().
FUNC | ( | l_sqlite3_exec | ) |
Definition at line 865 of file libluasqlite3.c.
References checkdb, checknilornoneorfunc(), checkstr, db, exec_callback_wrapper(), init_callback_usage(), DB::kr_db, lua_pushnumber(), and sqlite3_exec().
FUNC | ( | l_sqlite3_total_changes | ) |
Definition at line 830 of file libluasqlite3.c.
References checkdb_sqlite3(), lua_pushnumber(), and sqlite3_total_changes().
FUNC | ( | l_sqlite3_step | ) |
Definition at line 821 of file libluasqlite3.c.
References checkstmt, Stmt::db, init_callback_usage(), lua_pushnumber(), sqlite3_step(), and Stmt::stmt.
FUNC | ( | l_sqlite3_reset | ) |
Definition at line 814 of file libluasqlite3.c.
References checkstmt_stmt(), lua_pushnumber(), and sqlite3_reset().
FUNC | ( | l_sqlite3_prepare | ) |
Definition at line 781 of file libluasqlite3.c.
References checkdb, checkstr, Stmt::db, db, error(), init_callback_usage(), DB::kr_db, lua_newuserdata(), lua_pushlstring(), lua_pushnil(), lua_pushnumber(), lua_strlen, sqlite3_prepare(), and Stmt::stmt.
FUNC | ( | l_sqlite3_open | ) |
Definition at line 772 of file libluasqlite3.c.
References ac_global_LogDb, db, DB::kr_db, and lua_newuserdata().
FUNC | ( | l_sqlite3_last_insert_rowid | ) |
Definition at line 765 of file libluasqlite3.c.
References checkdb_sqlite3(), lua_pushnumber(), and sqlite3_last_insert_rowid().
FUNC | ( | l_sqlite3_interrupt | ) |
Definition at line 758 of file libluasqlite3.c.
References checkdb_sqlite3(), and sqlite3_interrupt().
FUNC | ( | l_sqlite3_finalize | ) |
Definition at line 751 of file libluasqlite3.c.
References checkstmt_stmt(), lua_pushnumber(), and sqlite3_finalize().
FUNC | ( | l_sqlite3_errmsg | ) |
Definition at line 744 of file libluasqlite3.c.
References checkdb_sqlite3(), lua_pushstring(), and sqlite3_errmsg().
FUNC | ( | l_sqlite3_errcode | ) |
Definition at line 737 of file libluasqlite3.c.
References checkdb_sqlite3(), lua_pushnumber(), and sqlite3_errcode().
FUNC | ( | l_sqlite3_data_count | ) |
Definition at line 730 of file libluasqlite3.c.
References checkstmt_stmt(), lua_pushnumber(), and sqlite3_data_count().
FUNC | ( | l_sqlite3_complete | ) |
Definition at line 723 of file libluasqlite3.c.
References checkstr, lua_pushboolean(), and sqlite3_complete().
FUNC | ( | l_sqlite3_column_name | ) |
Definition at line 717 of file libluasqlite3.c.
References l_sqlite3_column_info(), and sqlite3_column_name().
FUNC | ( | l_sqlite3_column_decltype | ) |
Definition at line 712 of file libluasqlite3.c.
References l_sqlite3_column_info(), and sqlite3_column_decltype().
FUNC | ( | l_sqlite3_column_count | ) |
Definition at line 692 of file libluasqlite3.c.
References checkstmt_stmt(), lua_pushnumber(), and sqlite3_column_count().
FUNC | ( | l_sqlite3_column_type | ) |
Definition at line 685 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnumber(), and sqlite3_column_type().
FUNC | ( | l_sqlite3_arow | ) |
Definition at line 679 of file libluasqlite3.c.
References l_sqlite3_row_mode().
FUNC | ( | l_sqlite3_irow | ) |
Definition at line 674 of file libluasqlite3.c.
References l_sqlite3_row_mode().
FUNC | ( | l_sqlite3_drow | ) |
Definition at line 669 of file libluasqlite3.c.
References l_sqlite3_row_mode().
FUNC | ( | l_sqlite3_column | ) |
Definition at line 613 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), and push_column().
FUNC | ( | l_sqlite3_column_number | ) |
Definition at line 567 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnumber(), sqlite3_column_double(), sqlite3_column_int(), sqlite3_column_type(), and SQLITE_INTEGER.
FUNC | ( | l_sqlite3_column_double | ) |
Definition at line 560 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnumber(), and sqlite3_column_double().
FUNC | ( | l_sqlite3_column_int | ) |
Definition at line 553 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnumber(), and sqlite3_column_int().
FUNC | ( | l_sqlite3_column_text | ) |
Definition at line 547 of file libluasqlite3.c.
References l_sqlite3_column_text_or_blob(), and sqlite3_column_text().
FUNC | ( | l_sqlite3_column_blob | ) |
Definition at line 542 of file libluasqlite3.c.
References l_sqlite3_column_text_or_blob(), and sqlite3_column_blob().
FUNC | ( | l_sqlite3_close | ) |
Definition at line 512 of file libluasqlite3.c.
References checkdb, db, delete_private_value(), KEY_AUTHORIZER_DATA, KEY_BUSY_DATA, KEY_COLLATION_TABLE, KEY_COLLNEEDED_DATA, KEY_COMMIT_DATA, KEY_FUNCTION_TABLE, KEY_KEY2VALUE_TABLE, KEY_PROGRESS_DATA, and KEY_TRACE_DATA.
FUNC | ( | l_sqlite3_changes | ) |
Definition at line 505 of file libluasqlite3.c.
References checkdb_sqlite3(), lua_pushnumber(), and sqlite3_changes().
FUNC | ( | l_sqlite3_busy_timeout | ) |
Definition at line 493 of file libluasqlite3.c.
References checkdb, checkint, db, delete_private_value(), KEY_BUSY_DATA, DB::kr_db, lua_pushnumber(), and sqlite3_busy_timeout().
FUNC | ( | l_sqlite3_bind_parameter_name_x | ) |
Definition at line 482 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnil(), lua_pushstring(), and sqlite3_bind_parameter_name().
FUNC | ( | l_sqlite3_bind_parameter_name | ) |
Definition at line 471 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnil(), lua_pushstring(), and sqlite3_bind_parameter_name().
FUNC | ( | l_sqlite3_bind_parameter_count | ) |
Definition at line 464 of file libluasqlite3.c.
References checkstmt_stmt(), lua_pushnumber(), and sqlite3_bind_parameter_count().
FUNC | ( | l_sqlite3_bind | ) |
Definition at line 422 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), IS_INT, lua_pushnumber(), lua_strlen, LUA_TBOOLEAN, LUA_TNIL, LUA_TNONE, LUA_TNUMBER, lua_toboolean(), lua_tonumber(), lua_tostring, LUA_TSTRING, lua_type(), luaL_argerror(), sqlite3_bind_double(), sqlite3_bind_int(), sqlite3_bind_null(), sqlite3_bind_text(), and SQLITE_TRANSIENT.
FUNC | ( | l_sqlite3_bind_number | ) |
Definition at line 407 of file libluasqlite3.c.
References checkint, checknumber, checkstmt_stmt(), IS_INT, lua_pushnumber(), sqlite3_bind_double(), and sqlite3_bind_int().
FUNC | ( | l_sqlite3_bind_double | ) |
Definition at line 400 of file libluasqlite3.c.
References checkdouble, checkint, checkstmt_stmt(), lua_pushnumber(), and sqlite3_bind_double().
FUNC | ( | l_sqlite3_bind_int | ) |
Definition at line 393 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnumber(), and sqlite3_bind_int().
FUNC | ( | l_sqlite3_bind_blob | ) |
Definition at line 386 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), checkstr, lua_pushnumber(), lua_strlen, sqlite3_bind_blob(), and SQLITE_TRANSIENT.
FUNC | ( | l_sqlite3_bind_text | ) |
Definition at line 379 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), checkstr, lua_pushnumber(), lua_strlen, sqlite3_bind_text(), and SQLITE_TRANSIENT.
FUNC | ( | l_sqlite3_bind_null | ) |
Definition at line 372 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushnumber(), and sqlite3_bind_null().
static void func_callback_wrapper | ( | int | which, | |
sqlite3_context * | ctx, | |||
int | num_args, | |||
sqlite3_value ** | values | |||
) | [static] |
Definition at line 890 of file libluasqlite3.c.
References CB_Data::db, db, KEY_XFINAL, KEY_XFUNC, KEY_XSTEP, DB::L, lua_isnil, lua_pcall(), lua_pop, lua_pushlightuserdata(), lua_pushnumber(), lua_strlen, lua_tostring, push_callback(), sqlite3_result_error(), and sqlite3_user_data().
Referenced by xfinal_callback_wrapper(), xfunc_callback_wrapper(), and xstep_callback_wrapper().
Definition at line 197 of file libluasqlite3.c.
References lua_isnil, lua_pop, lua_pushlightuserdata(), lua_rawget(), lua_rawset(), LUA_REGISTRYINDEX, lua_touserdata(), and new_cb_data().
static CB_Data * get_named_cb_data | ( | lua_State * | L, | |
DB * | db, | |||
void * | table_key, | |||
int | name_pos | |||
) | [static] |
Definition at line 218 of file libluasqlite3.c.
References lua_isnil, lua_pop, lua_pushvalue(), lua_rawget(), lua_rawset(), LUA_REGISTRYINDEX, lua_touserdata(), new_cb_data(), and push_private_table().
Definition at line 250 of file libluasqlite3.c.
References DB::key2value_pos, and DB::L.
Referenced by FUNC().
static int l_sqlite3_column_info | ( | lua_State * | L, | |
const char *(*)(sqlite3_stmt *, int) | info_func | |||
) | [static] |
Definition at line 700 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), and lua_pushstring().
Referenced by FUNC().
static int l_sqlite3_column_text_or_blob | ( | lua_State * | L, | |
column_text_blob_t | column_text_blob | |||
) | [static] |
Definition at line 533 of file libluasqlite3.c.
References checkint, checkstmt_stmt(), lua_pushlstring(), and sqlite3_column_bytes().
Referenced by FUNC().
static int l_sqlite3_row_mode | ( | lua_State * | L, | |
int | mode | |||
) | [static] |
Definition at line 623 of file libluasqlite3.c.
References checkstmt_stmt(), lua_checkstack(), lua_istable, lua_newtable, lua_pushstring(), lua_rawset(), lua_rawseti(), push_column(), report_error(), sqlite3_column_name(), and sqlite3_data_count().
Referenced by FUNC().
int luaopen_sqlite3 | ( | lua_State * | L | ) |
Definition at line 1653 of file libluasqlite3.c.
Definition at line 189 of file libluasqlite3.c.
References CB_Data::db, and lua_newuserdata().
Referenced by get_cb_data(), and get_named_cb_data().
static int pop_break_condition | ( | lua_State * | L | ) | [static] |
Definition at line 270 of file libluasqlite3.c.
References lua_isboolean, lua_isnil, lua_isnumber(), lua_pop, lua_toboolean(), and lua_tonumber().
Referenced by exec_callback_wrapper(), xbusy_callback_wrapper(), xcommit_callback_wrapper(), and xprogress_callback_wrapper().
Definition at line 257 of file libluasqlite3.c.
References DB::key2value_pos, KEY_KEY2VALUE_TABLE, lua_gettop(), lua_pushlightuserdata(), lua_rawget(), and push_private_table().
Referenced by func_callback_wrapper(), xauth_callback_wrapper(), xbusy_callback_wrapper(), xcommit_callback_wrapper(), xcompare_callback_wrapper(), xneeded_callback_wrapper(), xprogress_callback_wrapper(), and xtrace_callback_wrapper().
static void push_column | ( | lua_State * | L, | |
sqlite3_stmt * | stmt, | |||
int | column | |||
) | [static] |
Definition at line 583 of file libluasqlite3.c.
References lua_pushboolean(), lua_pushlstring(), lua_pushnil(), lua_pushnumber(), sqlite3_column_blob(), sqlite3_column_bytes(), sqlite3_column_double(), sqlite3_column_int(), sqlite3_column_text(), sqlite3_column_type(), SQLITE_BLOB, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, and SQLITE_TEXT.
Referenced by FUNC(), and l_sqlite3_row_mode().
static void push_nil_or_string | ( | lua_State * | L, | |
const char * | str | |||
) | [static] |
Definition at line 288 of file libluasqlite3.c.
References lua_pushnil(), and lua_pushstring().
Referenced by xauth_callback_wrapper().
static void push_private_table | ( | lua_State * | L, | |
void * | table_key | |||
) | [static] |
Definition at line 160 of file libluasqlite3.c.
References lua_isnil, lua_newtable, lua_pop, lua_pushlightuserdata(), lua_pushvalue(), lua_rawget(), lua_rawset(), and LUA_REGISTRYINDEX.
Referenced by get_named_cb_data(), push_callback(), and register_callback().
Definition at line 240 of file libluasqlite3.c.
References KEY_KEY2VALUE_TABLE, lua_pop, lua_pushlightuserdata(), lua_pushvalue(), lua_rawset(), and push_private_table().
Referenced by FUNC().
static void report_error | ( | lua_State * | L, | |
const char * | msg | |||
) | [static] |
Definition at line 313 of file libluasqlite3.c.
References lua_error(), lua_pushstring(), and lua_settop().
Referenced by FUNC(), and l_sqlite3_row_mode().
static int xauth_callback_wrapper | ( | void * | cb_data, | |
int | auth_request, | |||
const char * | name1, | |||
const char * | name2, | |||
const char * | db_name, | |||
const char * | trigger_name | |||
) | [static] |
Definition at line 1422 of file libluasqlite3.c.
References CB_DATA, db, KEY_XAUTH, DB::L, lua_isnumber(), lua_pcall(), lua_pop, lua_pushnumber(), lua_tonumber(), push_callback(), push_nil_or_string(), and SQLITE_DENY.
Referenced by FUNC().
static int xbusy_callback_wrapper | ( | void * | cb_data, | |
int | num_called | |||
) | [static] |
Definition at line 1385 of file libluasqlite3.c.
References CB_DATA, db, KEY_XBUSY, DB::L, lua_pcall(), lua_pop, lua_pushnumber(), pop_break_condition(), and push_callback().
Referenced by FUNC().
static int xcommit_callback_wrapper | ( | void * | cb_data | ) | [static] |
Definition at line 1312 of file libluasqlite3.c.
References CB_DATA, db, KEY_XCOMMIT, DB::L, lua_pcall(), lua_pop, pop_break_condition(), and push_callback().
Referenced by FUNC().
static int xcompare_callback_wrapper | ( | void * | cb_data, | |
int | len_a, | |||
const void * | str_a, | |||
int | len_b, | |||
const void * | str_b | |||
) | [static] |
Definition at line 984 of file libluasqlite3.c.
References CB_DATA, db, KEY_XCOMPARE, DB::L, lua_pcall(), lua_pop, lua_pushlstring(), lua_tonumber(), and push_callback().
Referenced by FUNC().
static void xfinal_callback_wrapper | ( | sqlite3_context * | ctx | ) | [static] |
Definition at line 936 of file libluasqlite3.c.
References func_callback_wrapper().
Referenced by FUNC().
static void xfunc_callback_wrapper | ( | sqlite3_context * | ctx, | |
int | num_args, | |||
sqlite3_value ** | values | |||
) | [static] |
Definition at line 926 of file libluasqlite3.c.
References func_callback_wrapper().
Referenced by FUNC().
static void xneeded_callback_wrapper | ( | void * | cb_data, | |
sqlite3 * | sqlite3, | |||
int | eTextRep, | |||
const char * | collation_name | |||
) | [static] |
Definition at line 1023 of file libluasqlite3.c.
References CB_DATA, db, KEY_XNEEDED, DB::L, lua_pcall(), lua_pop, lua_pushstring(), and push_callback().
Referenced by FUNC().
static int xprogress_callback_wrapper | ( | void * | cb_data | ) | [static] |
Definition at line 1348 of file libluasqlite3.c.
References CB_DATA, db, KEY_XPROGRESS, DB::L, lua_pcall(), lua_pop, pop_break_condition(), and push_callback().
Referenced by FUNC().
static void xstep_callback_wrapper | ( | sqlite3_context * | ctx, | |
int | num_args, | |||
sqlite3_value ** | values | |||
) | [static] |
Definition at line 931 of file libluasqlite3.c.
References func_callback_wrapper().
Referenced by FUNC().
static void xtrace_callback_wrapper | ( | void * | cb_data, | |
const char * | str | |||
) | [static] |
Definition at line 1059 of file libluasqlite3.c.
References CB_DATA, db, KEY_XTRACE, DB::L, lua_pcall(), lua_pop, lua_pushstring(), and push_callback().
Referenced by FUNC().
Definition at line 1506 of file libluasqlite3.c.
{ { "CREATE_INDEX", SQLITE_CREATE_INDEX }, { "CREATE_TABLE", SQLITE_CREATE_TABLE }, { "CREATE_TRIGGER", SQLITE_CREATE_TRIGGER }, { "CREATE_VIEW", SQLITE_CREATE_VIEW }, { "CREATE_TEMP_INDEX", SQLITE_CREATE_TEMP_INDEX }, { "CREATE_TEMP_TABLE", SQLITE_CREATE_TEMP_TABLE }, { "CREATE_TEMP_TRIGGER", SQLITE_CREATE_TEMP_TRIGGER }, { "CREATE_TEMP_VIEW", SQLITE_CREATE_TEMP_VIEW }, { "DROP_INDEX", SQLITE_DROP_INDEX }, { "DROP_TABLE", SQLITE_DROP_TABLE }, { "DROP_TRIGGER", SQLITE_DROP_TRIGGER }, { "DROP_VIEW", SQLITE_DROP_VIEW }, { "DROP_TEMP_INDEX", SQLITE_DROP_TEMP_INDEX }, { "DROP_TEMP_TABLE", SQLITE_DROP_TEMP_TABLE }, { "DROP_TEMP_TRIGGER", SQLITE_DROP_TEMP_TRIGGER }, { "DROP_TEMP_VIEW", SQLITE_DROP_TEMP_VIEW }, { "INSERT", SQLITE_INSERT }, { "PRAGMA", SQLITE_PRAGMA }, { "READ", SQLITE_READ }, { "SELECT", SQLITE_SELECT }, { "TRANSACTION", SQLITE_TRANSACTION }, { "UPDATE", SQLITE_UPDATE }, { "ATTACH", SQLITE_ATTACH }, { "DETACH", SQLITE_DETACH }, { 0, 0 } }
Definition at line 1622 of file libluasqlite3.c.
Definition at line 1577 of file libluasqlite3.c.
{ { "INTEGER", SQLITE_INTEGER }, { "INT", SQLITE_INTEGER }, { "FLOAT", SQLITE_FLOAT }, { "DOUBLE", SQLITE_FLOAT }, { "TEXT", SQLITE_TEXT }, { "BLOB", SQLITE_BLOB }, { "NULL", SQLITE_NULL }, { 0, 0 } }
Definition at line 1610 of file libluasqlite3.c.
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1