MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / lua_func_int

Function lua_func_int

lua/sp.c:7075–7090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7073}
7074
7075static int lua_func_int(char *spname, char **err, struct sqlthdstate *thd,
7076 struct sqlclntstate *clnt, sqlite3_context *context,
7077 int argc, sqlite3_value **argv)
7078{
7079 int rc, new_vm;
7080 if ((rc = setup_sp(spname, thd, clnt, &new_vm, err)) != 0) return rc;
7081 Lua L = clnt->sp->lua;
7082 SP sp = clnt->sp;
7083 remove_emit(L);
7084 remove_tran_funcs(L);
7085 if ((rc = process_src(L, sp->src, err)) != 0) return rc;
7086 if ((rc = get_func_by_name(L, spname, err)) != 0) return rc;
7087 if ((rc = sqlite_to_lua(L, clnt->tzname, argc, argv)) != 0) return rc;
7088 sp->num_instructions = 0;
7089 return run_func(clnt, argc, err, 1);
7090}
7091
7092static int exec_thread_int(struct sqlthdstate *thd, struct sqlclntstate *clnt)
7093{

Callers 1

lua_funcFunction · 0.85

Calls 7

setup_spFunction · 0.85
remove_emitFunction · 0.85
remove_tran_funcsFunction · 0.85
process_srcFunction · 0.85
get_func_by_nameFunction · 0.85
sqlite_to_luaFunction · 0.85
run_funcFunction · 0.85

Tested by

no test coverage detected