Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport temporary copies from GRDBSnapshotTesting #1449

Merged
merged 2 commits into from
Oct 29, 2023
Merged

Conversation

groue
Copy link
Owner

@groue groue commented Oct 28, 2023

This pull requests adds two convenience methods that create temporary copies of databases:

let path = "/path/to/database.sqlite"
let dbQueue = try DatabaseQueue.inMemoryCopy(fromPath: path)
let dbQueue = try DatabaseQueue.temporaryCopy(fromPath: path)

Those have originally lived in GRDBSnapshotTesting, but people who want to test databases without GRDBSnapshotTesting might like those methods. Their implementation is more robust as well, with better support for the readonly configuration flag.

@groue groue merged commit 8479c4c into development Oct 29, 2023
22 checks passed
@groue groue deleted the dev/temp-copies branch October 29, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant