MCPcopy Create free account
hub / github.com/F-Stack/f-stack / prepareLuaClient

Function prepareLuaClient

app/redis-6.2.6/src/scripting.c:1498–1507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1496}
1497
1498void prepareLuaClient(void) {
1499 /* Select the right DB in the context of the Lua client */
1500 selectDb(server.lua_client,server.lua_caller->db->id);
1501 server.lua_client->resp = 2; /* Default is RESP2, scripts can change it. */
1502
1503 /* If we are in MULTI context, flag Lua client as CLIENT_MULTI. */
1504 if (server.lua_caller->flags & CLIENT_MULTI) {
1505 server.lua_client->flags |= CLIENT_MULTI;
1506 }
1507}
1508
1509void resetLuaClient(void) {
1510 /* After the script done, remove the MULTI state. */

Callers 1

evalGenericCommandFunction · 0.85

Calls 1

selectDbFunction · 0.85

Tested by

no test coverage detected