-
Notifications
You must be signed in to change notification settings - Fork 50
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
Accept a list of modes to open db with nomutex option. #284
Accept a list of modes to open db with nomutex option. #284
Conversation
@ColaCheng I haven't messed with readonly no mutex before. Why wouldn't this be the default for readonly? |
4931a54
to
6548984
Compare
Thank you for review. I made readonly along with no mutex by default. |
6548984
to
9998c00
Compare
I'll need to look at the documentation to figure out if no mutex should be the default. We are compiling sqlite with thread safety enabled, so this flag makes sense. But if we disabled thread safety on the compilation this would effectively be a no-op. I'll accept this once I learn more |
@ColaCheng I think we'll need to modify mode to allow a list of modes added. After toying with this some, it's probably best to let the caller explicitly state the modes they want. I'm thinking something like
If the mode is just |
bc6e0ed
to
a91728d
Compare
Hi @warmwaffles, updated according to the comments. Please review it. Thanks! |
In our use case, we only read the database and never write the data. We found this flag can open db with no mutex. It should be safe to open db as read-only and no mutex.
Ref: https://www.sqlite.org/c3ref/open.html