| 1717 | } |
| 1718 | |
| 1719 | static 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 */ |
| 1742 | static struct command_result *refresh_by_created_index(struct command *cmd, |
nothing calls this directly
no test coverage detected