The simplest case: append-only lists */
| 1740 | |
| 1741 | /* The simplest case: append-only lists */ |
| 1742 | static struct command_result *refresh_by_created_index(struct command *cmd, |
| 1743 | struct table_desc *td, |
| 1744 | struct db_query *dbq) |
| 1745 | { |
| 1746 | struct sql *sql = sql_of(dbq->cmd->plugin); |
| 1747 | struct out_req *req; |
| 1748 | |
| 1749 | /* We no longer need refresh_created, but wait could update this meanwhile. */ |
| 1750 | td->refresh_needs &= ~REFRESH_CREATED; |
| 1751 | |
| 1752 | req = jsonrpc_request_start(cmd, td->cmdname, |
| 1753 | limited_list_done, forward_error, |
| 1754 | dbq); |
| 1755 | json_add_string(req->js, "index", "created"); |
| 1756 | json_add_u64(req->js, "start", td->last_created_index + 1); |
| 1757 | json_add_u64(req->js, "limit", sql->limit_per_list); |
| 1758 | return send_outreq(req); |
| 1759 | } |
| 1760 | |
| 1761 | static struct command_result *updated_list_done(struct command *cmd, |
| 1762 | const char *method, |
no test coverage detected