Skip to content

Commit

Permalink
Account for the maximum number of variables in SQLite (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD authored Dec 10, 2024
1 parent ebbcc7b commit 29d33e3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ class SqlNormalizedCache internal constructor(
} else {
emptySet()
}
recordDatabase.delete(keys + referencedKeys)
return recordDatabase.changes().toInt()
return (keys + referencedKeys).chunked(999).sumOf { chunkedKeys ->
recordDatabase.delete(chunkedKeys)
recordDatabase.changes().toInt()
}
}

/**
Expand Down

0 comments on commit 29d33e3

Please sign in to comment.