-
Notifications
You must be signed in to change notification settings - Fork 457
feat: sqlite pool options #2784
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: v2
Are you sure you want to change the base?
Conversation
Package Changes Through ce5cebbThere are 2 changes which include updater with minor, updater-js with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
@FabianLars is there any interest of merging this? |
|
interest yes but i have 0 time for the sql plugin at the moment. also, some ci checks failed :) |
|
okay. i've updated the PR to address the failing checks. |
I use SQLite as storage for my Tauri application. By default, SQLx (the underlying driver) uses max. 10 parallel pool connections for SQLite.
When inserting a bunch of rows, I frequently get foreign key failure issues because the INSERT statements are spread across all connections and thus not in the right order. This plugin does not have proper transaction support (executing all statements on the same connection) and thus doesnt work either.
This PR implements the ability to limit the maximum number of connections in the pool. For me, by setting this to 1 connection maximum, I can ensure that all INSERTs are applied in the same order as I send them. Also, I can now start a transaction manually, because there's only ever 1 connection active.
Rust implementation based on #2553