Skip to content

Commit

Permalink
Add a commit to make sure the database has uncommitted data for the f…
Browse files Browse the repository at this point in the history
…ollowing query.
  • Loading branch information
vincode-io committed Mar 26, 2022
1 parent 050bb67 commit f68836f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SyncDatabase/Sources/SyncDatabase/SyncStatusTable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit f68836f

Please sign in to comment.