10000 feat: sqlite pool options by rpander93 · Pull Request #2784 · tauri-apps/plugins-workspace · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 3 commits into
base: v2
Choose a base branch
from

Conversation

rpander93
Copy link
@rpander93 rpander93 commented Jun 20, 2025

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

@rpander93 rpander93 requested a review from a team as a code owner June 20, 2025 15:12
Copy link
Contributor

Package Changes Through 1393c8c

There are 2 changes which include cli with minor, cli-js with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.28 2.0.29
api-example-js 2.0.24 2.0.25
cli 2.2.1 2.3.0
cli-js 2.2.1 2.3.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

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.

1 participant
0