-
Notifications
You must be signed in to change notification settings - Fork 362
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
feat(sql): support for SQLite pragma and encryption pragmas #2553
base: v2
Are you sure you want to change the base?
Conversation
- Introduced `libsqlite3-sys` dependency for SQLite support. - Updated the `load` method to accept optional pragmas for database connections. - Enhanced the JavaScript API to demonstrate loading databases with encryption keys and custom pragmas. - Added VSCode settings for Rust analyzer to enable SQLite feature, to facilitate development. - Updated Rust code to handle SQLite options and pragmas in the database connection logic.
Preload doesn't support pragma yet, because that will introduce breaking APIs here plugins-workspace/plugins/sql/src/lib.rs Line 55 in 43f0f95
If we have to support pragma in preload, then maybe something like this? {
"plugins": {
"sql": {
"preload": ["sqlite:mydatabase.db"],
"sqlite_options": {
"sqlite:mydatabase.db": {
"pragmas": {
"journal_mode": "WAL",
"foreign_keys": "ON"
}
}
}
}
}
} |
Problem fixed, the latest version supports connecting to sqlite, mysql and postgres at the same time |
I'm desperately waiting for this feature |
No one is reviewing this PR. In the meanwhile, if anyone wants to try this, you can set dependency to my branch in |
+1 on this! I am also waiting to move from my custom implementation to fully adapting to this plugin. Thanks for the PR! |
I was also using my custom implementation with cipher using rusqlite. BTW I also figured out how to use drizzle to work with this sql plugin and also rusqlite. |
resolve #7
libsqlite3-sys
dependency for SQLite support.load
method to accept optional pragmas for database connections.Now sqlite encryption can be enabled like this.
I already tested on Mac, further testing needed on Windows and Linux.