MCPcopy Create free account
hub / github.com/ElementsProject/lightning / param_tablename

Function param_tablename

plugins/sql.c:1460–1473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1458}
1459
1460static struct command_result *param_tablename(struct command *cmd,
1461 const char *name,
1462 const char *buffer,
1463 const jsmntok_t *tok,
1464 struct table_desc **td)
1465{
1466 struct sql *sql = sql_of(cmd->plugin);
1467 *td = strmap_getn(&sql->tablemap, buffer + tok->start,
1468 tok->end - tok->start);
1469 if (!*td)
1470 return command_fail_badparam(cmd, name, buffer, tok,
1471 "Unknown table");
1472 return NULL;
1473}
1474
1475static void json_add_column(struct json_stream *js,
1476 const char *dbname,

Callers

nothing calls this directly

Calls 2

sql_ofFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected