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

Function limited_list_done

plugins/sql.c:1719–1739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1717}
1718
1719static struct command_result *limited_list_done(struct command *cmd,
1720 const char *method,
1721 const char *buf,
1722 const jsmntok_t *result,
1723 struct db_query *dbq)
1724{
1725 struct sql *sql = sql_of(dbq->cmd->plugin);
1726 struct table_desc *td = dbq->tables[0];
1727 struct command_result *ret;
1728 size_t num_entries;
1729
1730 ret = process_json_result(cmd, buf, result, td, false,
1731 &td->last_created_index,
1732 &td->last_updated_index,
1733 &num_entries);
1734 if (ret)
1735 return ret;
1736
1737 /* If we got the number we asked for, we need to ask again. */
1738 return one_refresh_done(cmd, dbq, num_entries == sql->limit_per_list);
1739}
1740
1741/* The simplest case: append-only lists */
1742static struct command_result *refresh_by_created_index(struct command *cmd,

Callers

nothing calls this directly

Calls 3

sql_ofFunction · 0.85
process_json_resultFunction · 0.85
one_refresh_doneFunction · 0.85

Tested by

no test coverage detected