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

SqliteConnectOptions::filename() memory fix (#3136) #3137

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hoxxep
Copy link

@hoxxep hoxxep commented Mar 20, 2024

Fixes #3136

Copy link
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will erase the in_memory flag if the filename is not :memory: but that would break usage of in-memory databases with shared cache (see the description of the SQLITE_OPEN_MEMORY flag): https://www.sqlite.org/c3ref/open.html

Additionally, the docs for filename() need to be updated to describe the new behavior.

@abonander
Copy link
Collaborator

@hoxxep are you planning on addressing my review comment?

@hoxxep
Copy link
Author

hoxxep commented Apr 11, 2024

@abonander apologies for the delay. I have pushed an alternative proposal to align with your comments, which is to allow setting the in_memory flag in the connect options, and also document that from_str may be preferred for simple use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SqliteConnectOptions::new() doesn't set in_memory = true
2 participants