// src/dbop.tsimportDatabasefrom"tauri-plugin-sql-api";// 初始化数据库连接asyncfunctioninitDb(){// sqlite数据库,路径相对于tauri::api::path::BaseDirectory::Appconstdb=awaitDatabase.load("sqlite:example.db");returndb;}//
tauri-apps/plugin-shell: 访问系统 shell,另一个主要功能是打开浏览器或者文件管理器。 tauri-apps/plugin-sql: 提供接口前端与数据库交互。 tauri-apps/plugin-store: 本地存储,记录一些系统配置时用到。 tauri-apps/plugin-window-state: 记录窗状态。 tauri-plugin-clipboard-api: 官方提供的剪贴板功能有限,这...
import Database from "tauri-plugin-sql-api";import {ENV_MODE} from "@/utils/const"class DatabaseService {private db!: Database;private dbReady: Promise<void>;constructor() {this.dbReady = this.initDatabase();}private async initDatabase() {try {this.db = await Database.load(ENV_MODE ...
更好的选择是采用本地数据,我更倾向使用 SQLite,官方提供了 @tauri-apps/plugin-sql 插件,让前端可以通过 sqlx 与SQL 数据库进行通信,支持 SQLite、MySQL 和 PostgreSQL。 键值,这种很简单,类似平时使用的 localstorage,主要可以应用在系统配置或其他设置的记录上。官方提供了 @tauri-apps/plugin-store 来实现简单、...
{ "name": "tauri-plugin-sql-api", "version": "0.0.0", "description": "Interface with SQL databases", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" ], "type": "module", "browser": "dist-js/index.min.js", "module": "dist-js/...
[package] name = "tauri-plugin-sql" version = "0.0.0" description = "Interface with SQL databases." authors = { workspace = true } license = { workspace = true } edition = { workspace = true } #rust-version = { workspace = true } rust-version = "1.80" # See more keys and the...
tauri-apps/plugin-fs: 访问文件系统,笔记的文件管理使用到此功能。 tauri-apps/plugin-global-shortcut: 绑定全局快捷键。 tauri-apps/plugin-shell: 访问系统 shell,另一个主要功能是打开浏览器或者文件管理器。 tauri-apps/plugin-sql: 提供接口前端与数据库交互。
tauri-plugin-sql / LICENSE_MIT MIT License A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code. Permissions Commercial use ...
tauri-plugin-sql— 连接任何 SQL 数据库。 tauri-plugin-aptabase— Tauri 应用的分析工具。 等等,还有更多插件…… 这些功能本来可以内置在 Tauri 中,但将它们独立出来后,你可以根据需要选择使用哪些功能。这意味着它们可以独立发展和进化,如果出现更好的替代品,也可以轻松替换。
Kysely Tauri dialect, using @tauri-apps/plugin-sql. Latest version: 1.2.1, last published: a month ago. Start using kysely-dialect-tauri in your project by running `npm i kysely-dialect-tauri`. There are no other projects in the npm registry using kysely