A Tauri plugin for SQLite databases based on Sqlx, currently at version 0.1.2. It provides a consistent API with the official Tauri SQL plugin but exclusively supports SQLite, with additional support for SQLite extensions. The package is actively maintained with regular updates. It is designed for Tauri v2 and offers both Rust and frontend APIs for database operations like load, execute, select, and close, with automatic resource cleanup.
npm install tauri-plugin-sqlite-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates loading a SQLite database, executing an insert, selecting rows with placeholders, and closing the connection.
Use `load({ db_url: 'sqlite:test.db' })` instead of `load('sqlite:test.db')`.Pin exact version in package.json or use lockfile. Check changelog before upgrading.
Ensure your Tauri app is using v2 (tauri 2.x).
Always call `await close(db)` when done, or use the automatic resource cleanup provided by Tauri if configured.
Use ES module imports (import { ... } from 'tauri-plugin-sqlite-api').Use named import: `import { load } from 'tauri-plugin-sqlite-api'`.Run `npm install tauri-plugin-sqlite-api` and ensure tsconfig.json has `"moduleResolution": "node"` or `"nodenext"`.
Add `.plugin(tauri_plugin_sqlite::Builder::default().build())` in your Rust main function.
Ensure `db_url` is a string like `'sqlite:test.db'`.
Run a migration in Rust to create the necessary tables, or execute a CREATE TABLE statement first.