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

Function emit_sqlite_result

lua/sp.c:7007–7015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7005}
7006
7007static int emit_sqlite_result(struct sqlclntstate *clnt, sqlite3_context *context)
7008{
7009 Lua L = clnt->sp->lua;
7010 if (lua_gettop(L) != 1) {
7011 sqlite3_result_error(context, "bad number of return values", -1);
7012 return -1;
7013 }
7014 return lua_to_sqlite(L, context);
7015}
7016
7017/* This runs some Lua code in context of on-going SQL stmt. Should not
7018 * start/commit/rollback ongoing transaction. Calling SQL stmt will cleanup on

Callers 2

lua_finalFunction · 0.85
lua_funcFunction · 0.85

Calls 3

lua_gettopFunction · 0.85
sqlite3_result_errorFunction · 0.85
lua_to_sqliteFunction · 0.85

Tested by

no test coverage detected