Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "civetweb_lua.h"
#include "sqlite3.h"
Go to the source code of this file.
Data Structures | |
struct | sdb_func |
struct | sdb |
struct | sdb_vm |
struct | lcontext |
struct | scc |
struct | sdb_bu |
Macros | |
#define | SQLITE_OMIT_PROGRESS_CALLBACK 0 |
#define | LSQLITE_OMIT_UPDATE_HOOK 0 |
#define | SQLITE3_OPEN(L, filename, flags) sqlite3_open_v2(L,filename,flags,NULL) |
#define | PUSH_INT64(L, i64in, fallback) |
#define | LSQLITE_VERSION "unknown" |
#define | SC(s) { #s, SQLITE_ ## s }, |
#define | LSC(s) { #s, LSQLITE_ ## s }, |
Typedefs | |
typedef struct sdb | sdb |
typedef struct sdb_vm | sdb_vm |
typedef struct sdb_bu | sdb_bu |
typedef struct sdb_func | sdb_func |
Variables | ||
static const char * | sqlite_meta = ":sqlite3" | |
static const char * | sqlite_vm_meta = ":sqlite3:vm" | |
static const char * | sqlite_bu_meta = ":sqlite3:bu" | |
static const char * | sqlite_ctx_meta = ":sqlite3:ctx" | |
static int | sqlite_ctx_meta_ref | |
struct { | ||
const char * name | ||
int value | ||
} | sqlite_constants [] | |
static const luaL_Reg | dblib [] | |
static const luaL_Reg | vmlib [] | |
static const luaL_Reg | ctxlib [] | |
static const luaL_Reg | dbbulib [] | |
static const luaL_Reg | sqlitelib [] | |
Definition at line 2151 of file lsqlite3.c.
#define LSQLITE_OMIT_UPDATE_HOOK 0 |
Definition at line 64 of file lsqlite3.c.
#define LSQLITE_VERSION "unknown" |
Definition at line 2134 of file lsqlite3.c.
Referenced by lsqlite_lversion().
#define PUSH_INT64 | ( | L, | |
i64in, | |||
fallback ) |
Definition at line 147 of file lsqlite3.c.
Referenced by db_last_insert_rowid(), db_push_value(), db_update_hook_callback(), dbvm_last_insert_rowid(), and vm_push_column().
Definition at line 2150 of file lsqlite3.c.
#define SQLITE3_OPEN | ( | L, | |
filename, | |||
flags ) sqlite3_open_v2(L,filename,flags,NULL) |
Definition at line 69 of file lsqlite3.c.
Referenced by lsqlite_do_open().
#define SQLITE_OMIT_PROGRESS_CALLBACK 0 |
Definition at line 61 of file lsqlite3.c.
typedef struct sdb sdb |
Definition at line 72 of file lsqlite3.c.
typedef struct sdb_bu sdb_bu |
Definition at line 74 of file lsqlite3.c.
typedef struct sdb_func sdb_func |
Definition at line 75 of file lsqlite3.c.
typedef struct sdb_vm sdb_vm |
Definition at line 73 of file lsqlite3.c.
Definition at line 1572 of file lsqlite3.c.
References sdb_bu::bu, lua_pushinteger(), lua_pushlightuserdata(), lua_pushnil(), lua_rawset(), LUA_REGISTRYINDEX, NULL, and sqlite3_backup_finish().
Referenced by dbbu_finish(), and dbbu_gc().
Definition at line 654 of file lsqlite3.c.
References sdb::busy_cb, sdb::busy_udata, cleanupvm(), sdb::commit_hook_cb, sdb::commit_hook_udata, sdb::db, sdb_func::fn_finalize, sdb_func::fn_step, free, sdb::func, lua_gettop(), lua_next(), lua_pop, lua_pushlightuserdata(), lua_pushnil(), lua_rawget(), lua_rawset(), LUA_REGISTRYINDEX, lua_settop(), lua_touserdata(), luaL_unref(), sdb_func::next, NULL, sdb::progress_cb, sdb::progress_udata, sdb::rollback_hook_cb, sdb::rollback_hook_udata, sqlite3_close(), sdb::trace_cb, sdb::trace_udata, sdb_func::udata, sdb::update_hook_cb, and sdb::update_hook_udata.
Referenced by db_close(), db_gc(), and lsqlite_do_open().
Definition at line 223 of file lsqlite3.c.
References sdb_vm::columns, sdb_vm::db, sdb_vm::has_values, lua_pop, lua_pushinteger(), lua_pushlightuserdata(), lua_pushnil(), lua_rawget(), lua_rawset(), LUA_REGISTRYINDEX, NULL, sqlite3_finalize(), and sdb_vm::vm.
Referenced by cleanupdb(), db_do_next_row(), db_do_rows(), db_prepare(), dbvm_finalize(), and dbvm_gc().
|
static |
Definition at line 1187 of file lsqlite3.c.
References free, scc::L, LUA_REGISTRYINDEX, luaL_unref(), and scc::ref.
Referenced by db_create_collation().
|
static |
Definition at line 1175 of file lsqlite3.c.
References scc::L, lua_pcall, lua_pop, lua_pushlstring(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_tonumber, and scc::ref.
Referenced by db_create_collation().
Definition at line 2365 of file lsqlite3.c.
References lua_pop, lua_pushstring(), lua_pushvalue(), lua_rawset(), luaL_newmetatable(), name, and NULL.
Referenced by luaopen_lsqlite3().
|
static |
Definition at line 1678 of file lsqlite3.c.
References sdb::busy_cb, sdb::busy_udata, sdb::L, lua_gettop(), lua_pcall, lua_pushinteger(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), and lua_toboolean().
Referenced by db_busy_handler().
|
static |
Definition at line 1696 of file lsqlite3.c.
References sdb::busy_cb, sdb::busy_udata, sdb::db, db_busy_callback(), lsqlite_checkdb(), lua_gettop(), lua_isnil, LUA_NOREF, LUA_REGISTRYINDEX, lua_settop(), LUA_TFUNCTION, luaL_checktype(), luaL_ref(), luaL_unref(), NULL, and sqlite3_busy_handler().
|
static |
Definition at line 1727 of file lsqlite3.c.
References sdb::busy_cb, sdb::busy_udata, sdb::db, lsqlite_checkdb(), LUA_NOREF, LUA_REGISTRYINDEX, luaL_checkint, luaL_unref(), and sqlite3_busy_timeout().
|
static |
Definition at line 903 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), lua_pushinteger(), and sqlite3_changes().
|
static |
Definition at line 1984 of file lsqlite3.c.
References cleanupdb(), lsqlite_checkdb(), and lua_pushinteger().
|
static |
Definition at line 1990 of file lsqlite3.c.
References lsqlite_checkdb(), lua_next(), lua_pop, lua_pushlightuserdata(), lua_pushnil(), lua_rawget(), LUA_REGISTRYINDEX, lua_toboolean(), lua_touserdata(), NULL, sqlite3_finalize(), sdb_vm::temp, and sdb_vm::vm.
|
static |
Definition at line 1395 of file lsqlite3.c.
References sdb::commit_hook_cb, sdb::commit_hook_udata, sdb::db, db_commit_hook_callback(), lsqlite_checkdb(), lua_gettop(), lua_isnil, LUA_NOREF, LUA_REGISTRYINDEX, lua_settop(), LUA_TFUNCTION, luaL_checktype(), luaL_ref(), luaL_unref(), NULL, and sqlite3_commit_hook().
|
static |
Definition at line 1377 of file lsqlite3.c.
References sdb::commit_hook_cb, sdb::commit_hook_udata, sdb::L, lua_gettop(), lua_pcall, lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), and lua_toboolean().
Referenced by db_commit_hook().
|
static |
Definition at line 1163 of file lsqlite3.c.
References db_register_function().
|
static |
Definition at line 1194 of file lsqlite3.c.
References collfree(), collwrapper(), sdb::db, scc::L, lsqlite_checkdb(), lua_isfunction, lua_isnil, LUA_REGISTRYINDEX, lua_settop(), luaL_checkstring, luaL_error(), luaL_ref(), malloc, NULL, scc::ref, sqlite3_create_collation_v2(), and SQLITE_UTF8.
|
static |
Definition at line 1159 of file lsqlite3.c.
References db_register_function().
|
static |
Definition at line 933 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), lua_pushstring(), luaL_checkstring, and sqlite3_db_filename().
|
static |
Definition at line 1851 of file lsqlite3.c.
References cleanupvm(), sdb_vm::columns, sdb::db, sdb_vm::db, sdb_vm::has_values, lsqlite_checkvm(), lua_checkstack(), lua_createtable(), lua_error(), lua_pushstring(), lua_rawset(), lua_rawseti(), NULL, sqlite3_column_name(), sqlite3_data_count(), sqlite3_errmsg(), sqlite3_finalize(), sqlite3_reset(), SQLITE_DONE, SQLITE_OK, SQLITE_ROW, stepvm(), sdb_vm::temp, sdb_vm::vm, and vm_push_column().
Referenced by db_next_named_row(), db_next_packed_row(), and db_next_row().
Definition at line 1940 of file lsqlite3.c.
References cleanupvm(), sdb::db, sdb_vm::db, lsqlite_checkdb(), lua_error(), lua_insert, lua_pop, lua_pushcfunction, lua_pushstring(), lua_settop(), luaL_checkstring, newvm(), NULL, sqlite3_errmsg(), sqlite3_prepare_v2(), SQLITE_OK, sdb_vm::temp, and sdb_vm::vm.
Referenced by db_nrows(), db_rows(), and db_urows().
|
static |
Definition at line 915 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), lua_pushinteger(), and sqlite3_errcode().
|
static |
Definition at line 921 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), lua_pushstring(), and sqlite3_errmsg().
|
static |
Definition at line 1797 of file lsqlite3.c.
References sdb::db, db_exec_callback(), lsqlite_checkdb(), lua_isnoneornil, lua_newtable, lua_pushinteger(), lua_pushnil(), lua_settop(), LUA_TFUNCTION, luaL_checkstring, luaL_checktype(), NULL, and sqlite3_exec().
|
static |
Definition at line 1750 of file lsqlite3.c.
References lua_createtable(), lua_gettop(), lua_isinteger(), lua_isnil, lua_isnumber(), lua_pcall, lua_pop, lua_pushinteger(), lua_pushstring(), lua_pushvalue(), lua_rawseti(), lua_replace, lua_settop(), lua_tointeger, lua_tonumber, and SQLITE_ABORT.
Referenced by db_exec().
|
static |
Definition at line 2027 of file lsqlite3.c.
References cleanupdb(), sdb::db, lsqlite_getdb(), and NULL.
|
static |
Definition at line 2021 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), and lua_pushlightuserdata().
|
static |
Definition at line 927 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), and sqlite3_interrupt().
|
static |
Definition at line 889 of file lsqlite3.c.
References sdb::db, lsqlite_getdb(), lua_pushboolean(), and NULL.
|
static |
Definition at line 895 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), lua_pushfstring(), PUSH_INT64, and sqlite3_last_insert_rowid().
|
static |
Definition at line 1222 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), lua_pushboolean(), lua_pushstring(), luaL_optstring, NULL, sqlite3_enable_load_extension(), sqlite3_free(), sqlite3_load_extension(), and SQLITE_OK.
|
static |
Definition at line 1915 of file lsqlite3.c.
References db_do_next_row().
Referenced by db_nrows(), and dbvm_nrows().
|
static |
Definition at line 1911 of file lsqlite3.c.
References db_do_next_row().
Referenced by db_rows(), and dbvm_rows().
|
static |
Definition at line 1907 of file lsqlite3.c.
References db_do_next_row().
Referenced by db_urows(), and dbvm_urows().
|
static |
Definition at line 1964 of file lsqlite3.c.
References db_do_rows(), and db_next_named_row().
|
static |
Definition at line 1829 of file lsqlite3.c.
References cleanupvm(), sdb::db, lsqlite_checkdb(), lua_pop, lua_pushinteger(), lua_pushnil(), lua_pushstring(), lua_settop(), lua_strlen, luaL_checkstring, newvm(), sqlite3_errcode(), sqlite3_prepare_v2(), SQLITE_OK, and sdb_vm::vm.
|
static |
Definition at line 1494 of file lsqlite3.c.
References sdb::L, lua_gettop(), lua_pcall, lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), lua_toboolean(), sdb::progress_cb, and sdb::progress_udata.
Referenced by db_progress_handler().
|
static |
Definition at line 1511 of file lsqlite3.c.
References sdb::db, db_progress_callback(), lsqlite_checkdb(), lua_gettop(), lua_isnil, LUA_NOREF, LUA_REGISTRYINDEX, lua_settop(), LUA_TFUNCTION, luaL_checkint, luaL_checktype(), luaL_ref(), luaL_unref(), NULL, sdb::progress_cb, sdb::progress_udata, and sqlite3_progress_handler().
|
static |
Definition at line 945 of file lsqlite3.c.
References lua_pushlstring(), lua_pushnil(), lua_pushnumber(), PUSH_INT64, sqlite3_value_blob(), sqlite3_value_bytes(), sqlite3_value_double(), sqlite3_value_int64(), sqlite3_value_text(), sqlite3_value_type(), SQLITE_BLOB, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, SQLITE_TEXT, and value.
Referenced by db_sql_normal_function().
|
static |
Definition at line 1098 of file lsqlite3.c.
References sdb_func::aggregate, sdb_func::db, sdb::db, db_sql_finalize_function(), db_sql_normal_function(), sdb_func::fn_finalize, sdb_func::fn_step, free, sdb::func, lsqlite_checkdb(), LUA_NOREF, lua_pushboolean(), lua_pushvalue(), LUA_REGISTRYINDEX, lua_settop(), LUA_TFUNCTION, luaL_checkint, luaL_checkstring, luaL_checktype(), luaL_error(), luaL_ref(), malloc, name, sdb_func::next, NULL, sqlite3_create_function(), SQLITE_OK, SQLITE_UTF8, and sdb_func::udata.
Referenced by db_create_aggregate(), and db_create_function().
|
static |
Definition at line 1450 of file lsqlite3.c.
References sdb::db, db_rollback_hook_callback(), lsqlite_checkdb(), lua_gettop(), lua_isnil, LUA_NOREF, LUA_REGISTRYINDEX, lua_settop(), LUA_TFUNCTION, luaL_checktype(), luaL_ref(), luaL_unref(), NULL, sdb::rollback_hook_cb, sdb::rollback_hook_udata, and sqlite3_rollback_hook().
|
static |
Definition at line 1434 of file lsqlite3.c.
References sdb::L, lua_gettop(), lua_pcall, lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), sdb::rollback_hook_cb, and sdb::rollback_hook_udata.
Referenced by db_rollback_hook().
|
static |
Definition at line 1960 of file lsqlite3.c.
References db_do_rows(), and db_next_packed_row().
|
static |
Definition at line 1042 of file lsqlite3.c.
References lcontext::ctx, sdb_func::db, sdb_func::fn_finalize, sdb::L, lsqlite_getcontext(), lsqlite_make_context(), lua_gettop(), lua_isnil, lua_pcall, lua_pop, lua_pushlightuserdata(), lua_pushnil(), lua_pushvalue(), lua_rawget(), lua_rawgeti(), lua_rawset(), LUA_REGISTRYINDEX, lua_settop(), lua_tostring, luaL_unref(), NULL, sqlite3_aggregate_context(), sqlite3_result_error(), sqlite3_user_data(), and lcontext::ud.
Referenced by db_register_function().
|
static |
Definition at line 983 of file lsqlite3.c.
References sdb_func::aggregate, lcontext::ctx, sdb_func::db, db_push_value(), sdb_func::fn_step, sdb::L, lsqlite_getcontext(), lsqlite_make_context(), lua_checkstack(), lua_gettop(), lua_isnil, lua_pcall, lua_pop, lua_pushlightuserdata(), lua_pushvalue(), lua_rawget(), lua_rawgeti(), lua_rawset(), LUA_REGISTRYINDEX, lua_settop(), lua_strlen, lua_tostring, luaL_unref(), NULL, sqlite3_aggregate_context(), sqlite3_result_error(), sqlite3_user_data(), and lcontext::ud.
Referenced by db_register_function().
|
static |
Definition at line 1973 of file lsqlite3.c.
References sdb::db, lsqlite_getdb(), lua_pushfstring(), lua_touserdata(), and NULL.
|
static |
Definition at line 909 of file lsqlite3.c.
References sdb::db, lsqlite_checkdb(), lua_pushinteger(), and sqlite3_total_changes().
|
static |
Definition at line 1272 of file lsqlite3.c.
References sdb::db, db_trace_callback(), lsqlite_checkdb(), lua_gettop(), lua_isnil, LUA_NOREF, LUA_REGISTRYINDEX, lua_settop(), LUA_TFUNCTION, luaL_checktype(), luaL_ref(), luaL_unref(), NULL, sqlite3_trace(), sdb::trace_cb, and sdb::trace_udata.
|
static |
Definition at line 1255 of file lsqlite3.c.
References sdb::L, lua_gettop(), lua_pcall, lua_pushstring(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), sdb::trace_cb, and sdb::trace_udata.
Referenced by db_trace().
|
static |
Definition at line 1336 of file lsqlite3.c.
References sdb::db, db_update_hook_callback(), lsqlite_checkdb(), lua_gettop(), lua_isnil, LUA_NOREF, LUA_REGISTRYINDEX, lua_settop(), LUA_TFUNCTION, luaL_checktype(), luaL_ref(), luaL_unref(), NULL, sqlite3_update_hook(), sdb::update_hook_cb, and sdb::update_hook_udata.
|
static |
Definition at line 1314 of file lsqlite3.c.
References sdb::L, lua_gettop(), lua_pcall, lua_pushfstring(), lua_pushinteger(), lua_pushstring(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), PUSH_INT64, sdb::update_hook_cb, and sdb::update_hook_udata.
Referenced by db_update_hook().
|
static |
Definition at line 1969 of file lsqlite3.c.
References db_do_rows(), and db_next_row().
|
static |
Definition at line 1663 of file lsqlite3.c.
References cleanupbu(), and lsqlite_checkbu().
|
static |
Definition at line 1634 of file lsqlite3.c.
References sdb_bu::bu, cleanupbu(), lsqlite_getbu(), lua_pop, and NULL.
|
static |
Definition at line 1657 of file lsqlite3.c.
References sdb_bu::bu, lsqlite_checkbu(), lua_pushinteger(), and sqlite3_backup_pagecount().
|
static |
Definition at line 1651 of file lsqlite3.c.
References sdb_bu::bu, lsqlite_checkbu(), lua_pushinteger(), and sqlite3_backup_remaining().
|
static |
Definition at line 1644 of file lsqlite3.c.
References sdb_bu::bu, lsqlite_checkbu(), lua_pushinteger(), luaL_checkint, and sqlite3_backup_step().
|
static |
Definition at line 528 of file lsqlite3.c.
References dbvm_bind_index(), dbvm_check_bind_index(), index, lsqlite_checkvm(), lua_pushinteger(), luaL_checkint, and sdb_vm::vm.
|
static |
Definition at line 541 of file lsqlite3.c.
References index, lsqlite_checkvm(), lua_pushinteger(), lua_strlen, luaL_checkint, luaL_checkstring, sqlite3_bind_blob(), SQLITE_TRANSIENT, value, and sdb_vm::vm.
|
static |
Definition at line 492 of file lsqlite3.c.
References index, lua_isinteger(), lua_strlen, LUA_TBOOLEAN, LUA_TNIL, LUA_TNONE, LUA_TNUMBER, lua_toboolean(), lua_tointeger, lua_tonumber, lua_tostring, LUA_TSTRING, lua_type(), lua_typename(), luaL_error(), sqlite3_bind_double(), sqlite3_bind_int(), sqlite3_bind_int64(), sqlite3_bind_null(), sqlite3_bind_text(), SQLITE_MISUSE, and SQLITE_TRANSIENT.
Referenced by dbvm_bind(), dbvm_bind_names(), and dbvm_bind_values().
|
static |
Definition at line 575 of file lsqlite3.c.
References dbvm_bind_index(), lsqlite_checkvm(), lua_gettable(), lua_pop, lua_pushinteger(), lua_pushstring(), LUA_TTABLE, luaL_checktype(), name, sqlite3_bind_parameter_count(), sqlite3_bind_parameter_name(), SQLITE_OK, and sdb_vm::vm.
|
static |
Definition at line 514 of file lsqlite3.c.
References lsqlite_checkvm(), lua_pushinteger(), sqlite3_bind_parameter_count(), and sdb_vm::vm.
|
static |
Definition at line 520 of file lsqlite3.c.
References dbvm_check_bind_index(), index, lsqlite_checkvm(), lua_pushstring(), luaL_checknumber(), sqlite3_bind_parameter_name(), and sdb_vm::vm.
|
static |
Definition at line 551 of file lsqlite3.c.
References dbvm_bind_index(), lsqlite_checkvm(), lua_gettop(), lua_pushinteger(), luaL_error(), sqlite3_bind_parameter_count(), SQLITE_OK, and sdb_vm::vm.
Definition at line 319 of file lsqlite3.c.
References luaL_error(), sqlite3_bind_parameter_count(), and sdb_vm::vm.
Referenced by dbvm_bind(), and dbvm_bind_parameter_name().
Definition at line 307 of file lsqlite3.c.
References sdb_vm::has_values, and luaL_error().
Referenced by dbvm_get_named_values(), dbvm_get_uvalues(), dbvm_get_value(), and dbvm_get_values().
Definition at line 313 of file lsqlite3.c.
References sdb_vm::columns, and luaL_error().
Referenced by dbvm_get_name(), dbvm_get_type(), and dbvm_get_value().
|
static |
Definition at line 338 of file lsqlite3.c.
References lsqlite_checkvm(), lua_pushinteger(), sqlite3_column_count(), and sdb_vm::vm.
Definition at line 1919 of file lsqlite3.c.
References lsqlite_checkvm(), lua_insert, lua_pushcfunction, and lua_pushvalue().
Referenced by dbvm_nrows(), dbvm_rows(), and dbvm_urows().
|
static |
Definition at line 295 of file lsqlite3.c.
References cleanupvm(), and lsqlite_checkvm().
|
static |
Definition at line 276 of file lsqlite3.c.
References cleanupvm(), lsqlite_getvm(), NULL, and sdb_vm::vm.
|
static |
Definition at line 359 of file lsqlite3.c.
References dbvm_check_index(), index, lsqlite_checkvm(), lua_pushstring(), luaL_checknumber(), sqlite3_column_name(), and sdb_vm::vm.
|
static |
Definition at line 471 of file lsqlite3.c.
References lsqlite_checkvm(), lua_createtable(), lua_pushstring(), lua_rawset(), sqlite3_column_count(), sqlite3_column_decltype(), sqlite3_column_name(), and sdb_vm::vm.
|
static |
Definition at line 455 of file lsqlite3.c.
References sdb_vm::columns, dbvm_check_contents(), lsqlite_checkvm(), lua_createtable(), lua_pushstring(), lua_rawset(), sqlite3_column_name(), sdb_vm::vm, and vm_push_column().
|
static |
Definition at line 390 of file lsqlite3.c.
References lsqlite_checkvm(), lua_createtable(), lua_pushstring(), lua_rawseti(), sqlite3_column_count(), sqlite3_column_name(), and sdb_vm::vm.
|
static |
Definition at line 367 of file lsqlite3.c.
References dbvm_check_index(), index, lsqlite_checkvm(), lua_pushstring(), luaL_checknumber(), sqlite3_column_decltype(), and sdb_vm::vm.
|
static |
Definition at line 404 of file lsqlite3.c.
References lsqlite_checkvm(), lua_createtable(), lua_pushstring(), lua_rawseti(), sqlite3_column_count(), sqlite3_column_decltype(), and sdb_vm::vm.
|
static |
Definition at line 431 of file lsqlite3.c.
References lsqlite_checkvm(), lua_checkstack(), lua_pushstring(), sqlite3_column_count(), sqlite3_column_name(), and sdb_vm::vm.
|
static |
Definition at line 443 of file lsqlite3.c.
References lsqlite_checkvm(), lua_checkstack(), lua_pushstring(), sqlite3_column_count(), sqlite3_column_decltype(), and sdb_vm::vm.
|
static |
Definition at line 418 of file lsqlite3.c.
References sdb_vm::columns, dbvm_check_contents(), lsqlite_checkvm(), lua_checkstack(), sdb_vm::vm, and vm_push_column().
|
static |
Definition at line 350 of file lsqlite3.c.
References dbvm_check_contents(), dbvm_check_index(), index, lsqlite_checkvm(), luaL_checkint, sdb_vm::vm, and vm_push_column().
|
static |
Definition at line 375 of file lsqlite3.c.
References sdb_vm::columns, dbvm_check_contents(), lsqlite_checkvm(), lua_createtable(), lua_rawseti(), sdb_vm::vm, and vm_push_column().
|
static |
Definition at line 259 of file lsqlite3.c.
References lsqlite_getvm(), lua_pushboolean(), NULL, and sdb_vm::vm.
|
static |
Definition at line 325 of file lsqlite3.c.
References sdb::db, sdb_vm::db, lsqlite_checkvm(), lua_pushfstring(), PUSH_INT64, and sqlite3_last_insert_rowid().
|
static |
Definition at line 1932 of file lsqlite3.c.
References db_next_named_row(), and dbvm_do_rows().
|
static |
Definition at line 300 of file lsqlite3.c.
References sdb::db, sdb_vm::db, lsqlite_checkvm(), lua_pushinteger(), sqlite3_errcode(), sqlite3_reset(), and sdb_vm::vm.
|
static |
Definition at line 1928 of file lsqlite3.c.
References db_next_packed_row(), and dbvm_do_rows().
|
static |
Definition at line 283 of file lsqlite3.c.
References sdb_vm::columns, sdb_vm::has_values, lsqlite_checkvm(), lua_pushinteger(), sqlite3_data_count(), SQLITE_ROW, stepvm(), and sdb_vm::vm.
|
static |
Definition at line 265 of file lsqlite3.c.
References lsqlite_getvm(), lua_pushfstring(), NULL, and sdb_vm::vm.
|
static |
Definition at line 1936 of file lsqlite3.c.
References db_next_row(), and dbvm_do_rows().
|
static |
Definition at line 801 of file lsqlite3.c.
References lcontext::ctx, lcontext_check_aggregate(), lsqlite_checkcontext(), lua_pushinteger(), and sqlite3_aggregate_count().
Definition at line 771 of file lsqlite3.c.
References sdb_func::aggregate, lcontext::ctx, luaL_error(), and sqlite3_user_data().
Referenced by lcontext_aggregate_count(), lcontext_get_aggregate_context(), and lcontext_set_aggregate_context().
|
static |
Definition at line 785 of file lsqlite3.c.
References lcontext_check_aggregate(), lsqlite_checkcontext(), lua_rawgeti(), LUA_REGISTRYINDEX, and lcontext::ud.
|
static |
Definition at line 813 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), lua_isinteger(), lua_strlen, LUA_TNIL, LUA_TNONE, LUA_TNUMBER, LUA_TSTRING, lua_type(), lua_typename(), luaL_checkinteger(), luaL_checknumber(), luaL_checkstring, luaL_error(), sqlite3_result_double(), sqlite3_result_int64(), sqlite3_result_null(), sqlite3_result_text(), and SQLITE_TRANSIENT.
|
static |
Definition at line 839 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), lua_strlen, luaL_checkstring, sqlite3_result_blob(), and SQLITE_TRANSIENT.
|
static |
Definition at line 847 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), luaL_checknumber(), and sqlite3_result_double().
|
static |
Definition at line 854 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), lua_strlen, luaL_checkstring, and sqlite3_result_error().
|
static |
Definition at line 862 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), luaL_checkint, and sqlite3_result_int().
|
static |
Definition at line 869 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), and sqlite3_result_null().
|
static |
Definition at line 875 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), lua_strlen, luaL_checkstring, sqlite3_result_text(), and SQLITE_TRANSIENT.
|
static |
Definition at line 792 of file lsqlite3.c.
References lcontext_check_aggregate(), lsqlite_checkcontext(), LUA_REGISTRYINDEX, lua_settop(), luaL_ref(), luaL_unref(), and lcontext::ud.
|
static |
Definition at line 760 of file lsqlite3.c.
References lcontext::ctx, lsqlite_getcontext(), lua_pushfstring(), and NULL.
|
static |
Definition at line 778 of file lsqlite3.c.
References lcontext::ctx, lsqlite_checkcontext(), lua_rawgeti(), LUA_REGISTRYINDEX, sqlite3_user_data(), and sdb_func::udata.
|
static |
Definition at line 1587 of file lsqlite3.c.
References sdb_bu::bu, sdb::db, lsqlite_checkdb(), lua_createtable(), lua_newuserdata, lua_pushlightuserdata(), lua_pushvalue(), lua_rawset(), lua_rawseti(), LUA_REGISTRYINDEX, lua_setmetatable(), luaL_checkstring, luaL_getmetatable, NULL, sqlite3_backup_init(), and sqlite_bu_meta.
Definition at line 1628 of file lsqlite3.c.
References sdb_bu::bu, index, lsqlite_getbu(), luaL_argerror(), and NULL.
Referenced by dbbu_finish(), dbbu_pagecount(), dbbu_remaining(), and dbbu_step().
Definition at line 754 of file lsqlite3.c.
References lcontext::ctx, index, lsqlite_getcontext(), luaL_argerror(), and NULL.
Referenced by lcontext_aggregate_count(), lcontext_get_aggregate_context(), lcontext_result(), lcontext_result_blob(), lcontext_result_double(), lcontext_result_error(), lcontext_result_int(), lcontext_result_null(), lcontext_result_text(), lcontext_set_aggregate_context(), and lcontext_user_data().
Definition at line 722 of file lsqlite3.c.
References sdb::db, index, lsqlite_getdb(), luaL_argerror(), and NULL.
Referenced by db_busy_handler(), db_busy_timeout(), db_changes(), db_close(), db_close_vm(), db_commit_hook(), db_create_collation(), db_db_filename(), db_do_rows(), db_errcode(), db_errmsg(), db_exec(), db_get_ptr(), db_interrupt(), db_last_insert_rowid(), db_load_extension(), db_prepare(), db_progress_handler(), db_register_function(), db_rollback_hook(), db_total_changes(), db_trace(), db_update_hook(), and lsqlite_backup_init().
Definition at line 253 of file lsqlite3.c.
References index, lsqlite_getvm(), luaL_argerror(), NULL, and sdb_vm::vm.
Referenced by db_do_next_row(), dbvm_bind(), dbvm_bind_blob(), dbvm_bind_names(), dbvm_bind_parameter_count(), dbvm_bind_parameter_name(), dbvm_bind_values(), dbvm_columns(), dbvm_do_rows(), dbvm_finalize(), dbvm_get_name(), dbvm_get_named_types(), dbvm_get_named_values(), dbvm_get_names(), dbvm_get_type(), dbvm_get_types(), dbvm_get_unames(), dbvm_get_utypes(), dbvm_get_uvalues(), dbvm_get_value(), dbvm_get_values(), dbvm_last_insert_rowid(), dbvm_reset(), and dbvm_step().
|
static |
Definition at line 2045 of file lsqlite3.c.
References lua_pushboolean(), luaL_checkstring, and sqlite3_complete().
|
static |
Definition at line 2072 of file lsqlite3.c.
References cleanupdb(), sdb::db, lua_pushinteger(), lua_pushnil(), lua_pushstring(), newdb(), sqlite3_errcode(), sqlite3_errmsg(), SQLITE3_OPEN, and SQLITE_OK.
Referenced by lsqlite_open(), and lsqlite_open_memory().
Definition at line 1622 of file lsqlite3.c.
References index, luaL_checkudata(), luaL_typerror(), NULL, and sqlite_bu_meta.
Referenced by dbbu_gc(), and lsqlite_checkbu().
Definition at line 748 of file lsqlite3.c.
References index, luaL_checkudata(), luaL_typerror(), NULL, and sqlite_ctx_meta.
Referenced by db_sql_finalize_function(), db_sql_normal_function(), lcontext_tostring(), and lsqlite_checkcontext().
Definition at line 716 of file lsqlite3.c.
References index, luaL_checkudata(), luaL_typerror(), NULL, and sqlite_meta.
Referenced by db_gc(), db_isopen(), db_tostring(), and lsqlite_checkdb().
Definition at line 247 of file lsqlite3.c.
References index, luaL_argerror(), luaL_checkudata(), NULL, and sqlite_vm_meta.
Referenced by dbvm_gc(), dbvm_isopen(), dbvm_tostring(), and lsqlite_checkvm().
|
static |
Definition at line 2139 of file lsqlite3.c.
References LSQLITE_VERSION, and lua_pushstring().
Definition at line 739 of file lsqlite3.c.
References lcontext::ctx, lua_newuserdata, LUA_NOREF, lua_rawgeti(), LUA_REGISTRYINDEX, lua_setmetatable(), NULL, sqlite_ctx_meta_ref, and lcontext::ud.
Referenced by db_sql_finalize_function(), and db_sql_normal_function().
|
static |
Definition at line 2126 of file lsqlite3.c.
References lua_error(), and lua_pushliteral.
|
static |
Definition at line 2092 of file lsqlite3.c.
References lsqlite_do_open(), luaL_checkstring, luaL_optinteger(), SQLITE_OPEN_CREATE, and SQLITE_OPEN_READWRITE.
|
static |
Definition at line 2098 of file lsqlite3.c.
References lsqlite_do_open(), SQLITE_OPEN_CREATE, and SQLITE_OPEN_READWRITE.
|
static |
Definition at line 2107 of file lsqlite3.c.
References sdb::db, LUA_TLIGHTUSERDATA, lua_touserdata(), luaL_argerror(), luaL_checktype(), newdb(), NULL, sqlite3_exec(), and SQLITE_OK.
|
static |
Definition at line 2052 of file lsqlite3.c.
References lua_isnone, lua_pushstring(), luaL_optstring, NULL, sqlite3_free(), sqlite3_mprintf(), and sqlite3_temp_directory.
|
static |
Definition at line 2040 of file lsqlite3.c.
References lua_pushstring(), and sqlite3_libversion().
LUALIB_API int luaopen_lsqlite3 | ( | lua_State * | L | ) |
Definition at line 2384 of file lsqlite3.c.
References create_meta(), ctxlib, dbbulib, dblib, lua_pushinteger(), lua_pushstring(), lua_pushvalue(), lua_rawset(), LUA_REGISTRYINDEX, lua_setmetatable(), luaL_getmetatable, luaL_ref(), luaL_requiref(), luaopen_sqlitelib(), name, sqlite_bu_meta, sqlite_constants, sqlite_ctx_meta, sqlite_ctx_meta_ref, sqlite_meta, sqlite_vm_meta, value, and vmlib.
|
static |
Definition at line 2378 of file lsqlite3.c.
References luaL_newlibtable, luaL_setfuncs(), and sqlitelib.
Referenced by luaopen_lsqlite3().
Definition at line 621 of file lsqlite3.c.
References sdb::busy_cb, sdb::busy_udata, sdb::commit_hook_cb, sdb::commit_hook_udata, sdb::db, sdb::func, sdb::L, lua_newtable, lua_newuserdata, LUA_NOREF, lua_pushlightuserdata(), lua_rawset(), LUA_REGISTRYINDEX, lua_setmetatable(), luaL_getmetatable, NULL, sdb::progress_cb, sdb::progress_udata, sdb::rollback_hook_cb, sdb::rollback_hook_udata, sqlite_meta, sdb::trace_cb, sdb::trace_udata, sdb::update_hook_cb, and sdb::update_hook_udata.
Referenced by lsqlite_do_open(), and lsqlite_open_ptr().
Definition at line 200 of file lsqlite3.c.
References sdb_vm::columns, sdb_vm::db, sdb_vm::has_values, lua_newuserdata, lua_pop, lua_pushlightuserdata(), lua_pushvalue(), lua_rawget(), lua_rawset(), LUA_REGISTRYINDEX, lua_setmetatable(), luaL_getmetatable, NULL, sqlite_vm_meta, sdb_vm::temp, and sdb_vm::vm.
Referenced by db_do_rows(), and db_prepare().
Definition at line 243 of file lsqlite3.c.
References sqlite3_step(), and sdb_vm::vm.
Referenced by db_do_next_row(), and dbvm_step().
|
static |
Definition at line 162 of file lsqlite3.c.
References lua_pushlstring(), lua_pushnil(), lua_pushnumber(), PUSH_INT64, sqlite3_column_blob(), sqlite3_column_bytes(), sqlite3_column_double(), sqlite3_column_int64(), sqlite3_column_text(), sqlite3_column_type(), SQLITE_BLOB, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, and SQLITE_TEXT.
Referenced by db_do_next_row(), dbvm_get_named_values(), dbvm_get_uvalues(), dbvm_get_value(), and dbvm_get_values().
|
static |
Definition at line 2316 of file lsqlite3.c.
Referenced by luaopen_lsqlite3().
|
static |
Definition at line 2336 of file lsqlite3.c.
Referenced by luaopen_lsqlite3().
|
static |
Definition at line 2224 of file lsqlite3.c.
Referenced by luaopen_lsqlite3().
const char* name |
Definition at line 2154 of file lsqlite3.c.
Referenced by _file_info_(), aux_upvalue(), aux_upvalue(), aux_upvalue(), auxopen(), auxupvalue(), auxupvalue(), auxupvalue(), auxupvalue(), checkrepeated(), create_meta(), createlabel(), db_getlocal(), db_getlocal(), db_getlocal(), db_getlocal(), db_register_function(), db_setlocal(), db_setlocal(), dbvm_bind_names(), dofile(), dofile(), dofile(), dofile(), dolibrary(), dolibrary(), dolibrary(), dolibrary(), dostring(), dostring(), dostring(), dostring(), duk__declvar_helper(), duk__delvar_helper(), duk__get_identifier_reference(), duk__getid_activation_regs(), duk__getid_open_decl_env_regs(), duk__getvar_helper(), duk__js_execute_bytecode_inner(), duk__putvar_helper(), duk_js_declvar_activation(), duk_js_delvar_activation(), duk_js_getvar_activation(), duk_js_getvar_envrec(), duk_js_putvar_activation(), duk_js_putvar_envrec(), fetch_github_user(), findfile(), findfile(), findfile(), findfile(), findlabel(), findloader(), findloader(), findloader(), findlocal(), findlocal(), findlocal(), funcnamefromcode(), funcnamefromcode(), get_header(), get_option_index(), get_req_headers(), get_system_name(), getfuncname(), getfuncname(), getfuncname(), getfuncname(), getnextfilename(), getobjname(), getobjname(), getobjname(), getobjname(), getupvalname(), getupvalname(), getupvalname(), gotostat(), gxf(), handle_luainit(), handle_luainit(), handle_luainit(), indexupvalue(), init_ssl_ctx(), kname(), kname(), kname(), labelstat(), ll_require(), ll_require(), ll_require(), ll_require(), loader_C(), loader_Croot(), loader_Lua(), loader_preload(), lua_getglobal(), lua_getlocal(), lua_getupvalue(), lua_setglobal(), lua_setlocal(), lua_setupvalue(), luaD_protectedparser(), luaD_protectedparser(), luaG_callerror(), luaG_findlocal(), luaG_typeerror(), luaL_checkoption(), luaL_checkoption(), luaL_loadbuffer(), luaL_loadbufferx(), luaopen_lsqlite3(), luaT_objtypename(), luaU_undump(), luaU_undump(), luaY_parser(), luaY_parser(), mg_get_header(), mg_get_option(), mg_get_system_info(), mg_get_var(), mg_get_var2(), mg_init_library(), mg_set_thread_name(), mg_split_form_urlencoded(), mg_start2(), mg_start_domain2(), new_localvar(), new_localvar(), new_localvar(), new_localvar(), new_localvarliteral_(), new_localvarliteral_(), newgotoentry(), newlabelentry(), newlabelentry(), newlabelentry(), newupvalue(), newupvalue(), newupvalue(), open_auth_file(), parse_auth_header(), print_props(), pushglobalfuncname(), pushglobalfuncname(), doctest::registerReporter(), rkname(), rname(), searcher_C(), searcher_C(), searcher_C(), searcher_Croot(), searcher_Croot(), searcher_Croot(), searcher_Lua(), searcher_Lua(), searcher_Lua(), searcher_preload(), searcher_preload(), searcher_preload(), searchpath(), searchpath(), searchpath(), searchupvalue(), searchupvalue(), searchupvalue(), set_option(), set_ports_option(), show_usage_and_exit(), varinfo(), and varinfo().
|
static |
Definition at line 126 of file lsqlite3.c.
Referenced by lsqlite_backup_init(), lsqlite_getbu(), and luaopen_lsqlite3().
const struct { ... } sqlite_constants[] |
Referenced by luaopen_lsqlite3().
|
static |
Definition at line 127 of file lsqlite3.c.
Referenced by lsqlite_getcontext(), and luaopen_lsqlite3().
|
static |
Definition at line 128 of file lsqlite3.c.
Referenced by lsqlite_make_context(), and luaopen_lsqlite3().
|
static |
Definition at line 124 of file lsqlite3.c.
Referenced by lsqlite_getdb(), luaopen_lsqlite3(), and newdb().
|
static |
Definition at line 125 of file lsqlite3.c.
Referenced by lsqlite_getvm(), luaopen_lsqlite3(), and newvm().
|
static |
Definition at line 2348 of file lsqlite3.c.
Referenced by luaopen_sqlitelib().
int value |
Definition at line 2155 of file lsqlite3.c.
Referenced by codeInteger(), codeReal(), db_push_value(), dbvm_bind_blob(), json_array_append(), json_array_insert(), json_array_set(), json_object_iter_set(), json_object_set(), json_object_set_nocheck(), json_object_setn(), json_object_setn_nocheck(), luaH_finishset(), luaH_newkey(), luaH_set(), luaH_setint(), luaH_setint(), luaopen_lsqlite3(), mg_split_form_urlencoded(), mg_start2(), mg_start_domain2(), doctest::IsNaN< F >::operator!(), parse_auth_header(), putinteger(), set_option(), setboolfield(), setboolfield(), setboolfield(), setboolfield(), setfield(), setfield(), setfield(), setfield(), sqlite3VdbeIntValue(), and doctest::toString().
|
static |
Definition at line 2268 of file lsqlite3.c.
Referenced by luaopen_lsqlite3().