From bf76aae903e57ca79269a9401749f75ef8894c6a Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 26 Mar 2022 13:32:52 -0500 Subject: [PATCH] Add a commit to make sure the database has uncommitted data for the following query. --- SyncDatabase/Sources/SyncDatabase/SyncStatusTable.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SyncDatabase/Sources/SyncDatabase/SyncStatusTable.swift b/SyncDatabase/Sources/SyncDatabase/SyncStatusTable.swift index 0ab0d80cb..286b50b11 100644 --- a/SyncDatabase/Sources/SyncDatabase/SyncStatusTable.swift +++ b/SyncDatabase/Sources/SyncDatabase/SyncStatusTable.swift @@ -30,6 +30,8 @@ struct SyncStatusTable: DatabaseTable { let updateSQL = "update syncStatus set selected = true" database.executeUpdate(updateSQL, withArgumentsIn: nil) + database.commit() + var selectSQL = "select * from syncStatus where selected == true" if let limit = limit { selectSQL = "\(selectSQL) limit \(limit)"