From f1b9f6b672232bb3f50a5c1b667260473c327432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Elek?= Date: Tue, 16 May 2023 14:49:29 +0200 Subject: [PATCH] satellite/satellitedb: paginating on ordered invoice 87d0789691c2571daa5ead2344111f90a2281c41 replaces offset usage with cursors. But to continue the interation from a specific cursor, we need to iterate over ordered records. (at least this is what I understood based on the failing tests) 87d0789691c2571daa5ead2344111f90a2281c41 Change-Id: Ic4da3a7c5f03386dd4c373c05102f05871900a3a --- satellite/satellitedb/invoiceprojectrecords.go | 1 + 1 file changed, 1 insertion(+) diff --git a/satellite/satellitedb/invoiceprojectrecords.go b/satellite/satellitedb/invoiceprojectrecords.go index 210903029..ec6dfc63f 100644 --- a/satellite/satellitedb/invoiceprojectrecords.go +++ b/satellite/satellitedb/invoiceprojectrecords.go @@ -141,6 +141,7 @@ func (db *invoiceProjectRecords) ListUnapplied(ctx context.Context, cursor uuid. stripecoinpayments_invoice_project_records WHERE id > ? AND period_start = ? AND period_end = ? AND state = ? + ORDER BY id LIMIT ? `), cursor, start, end, invoiceProjectRecordStateUnapplied.Int(), limit+1))(func(rows tagsql.Rows) error { for rows.Next() {