-
Notifications
You must be signed in to change notification settings - Fork 0
Add support for sqlite #105
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thanks for this PR. While skimming older open PRs, I stumbled upon this one and its modernc.org/sqlite
dependency.
Besides the one comment about the library, could you please describe the motivation for this change and its necessity? Where is it needed and why?
@jrauh01 It's for some kind of automatic tests, right? |
Right, like described above it's for mocking databases in e.g. unit tests. |
mode = "mode=memory&" | ||
} | ||
|
||
addr = fmt.Sprintf("file:%s?%scache=shared", name, mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I was just fiddling with some other SQLite application, I realized that by default foreign key constraints are not enforced unless _foreign_keys
is set accordingly. After fixing this on my side, I remembered this PR and would suggest adding this here as well.
Add sqlite support to use in memory databases for example in unit tests. (Like in #102)