From 56141fcbd9f25358c9af831e3700d5c8a1a61b8f Mon Sep 17 00:00:00 2001 From: Nathan Villaescusa Date: Mon, 18 Mar 2024 15:11:26 -0700 Subject: [PATCH] Move var --- lib/rdbms/scan/scan.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rdbms/scan/scan.go b/lib/rdbms/scan/scan.go index faa0afca..c4169cd6 100644 --- a/lib/rdbms/scan/scan.go +++ b/lib/rdbms/scan/scan.go @@ -90,10 +90,9 @@ func (s *Scanner) Next() ([]map[string]any, error) { if len(rows) == 0 || s.primaryKeys.IsExhausted() { s.done = true } else { - var startingValuesChanged bool - // Update the starting keys so that the next scan will pick off where we last left off. lastRow := rows[len(rows)-1] + var startingValuesChanged bool for _, pk := range s.primaryKeys.Keys() { changed, err := s.primaryKeys.UpdateStartingValue(pk.Name, lastRow[pk.Name]) if err != nil {