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

Function set_sqlrow_stmt

lua/sp.c:1426–1441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1424}
1425
1426static void set_sqlrow_stmt(Lua L)
1427{
1428 /*
1429 ** stack:
1430 ** 1. row (lua table)
1431 ** 2. stmt
1432 ** tag stmt to row by:
1433 ** newtbl = {}
1434 ** newtbl.__metatable = stmt
1435 ** setmetatable(row, newtbl)
1436 */
1437 lua_newtable(L);
1438 lua_pushvalue(L, -3);
1439 lua_setfield(L, -2, "__metatable");
1440 lua_setmetatable(L, -2);
1441}
1442
1443static sqlite3_stmt *get_sqlrow_stmt(Lua L)
1444{

Callers 1

stmt_sql_stepFunction · 0.85

Calls 3

lua_pushvalueFunction · 0.85
lua_setfieldFunction · 0.85
lua_setmetatableFunction · 0.85

Tested by

no test coverage detected