🤔 feat(sqlite): 引入 sqlite

This commit is contained in:
BTMuli
2023-04-24 13:20:56 +08:00
parent 8da4ebdcf5
commit f9199efd03
4 changed files with 16 additions and 0 deletions

9
package-lock.json generated
View File

@@ -14,6 +14,7 @@
"clipboard": "^2.0.11",
"pinia": "^2.0.35",
"pinia-plugin-persistedstate": "^3.1.0",
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql",
"vue": "^3.2.47",
"vue-json-viewer": "^3.0.4",
"vue-router": "^4.1.6",
@@ -6019,6 +6020,14 @@
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
"node_modules/tauri-plugin-sql-api": {
"version": "0.0.0",
"resolved": "git+ssh://git@github.com/tauri-apps/tauri-plugin-sql.git#62b21ef24303d80e9905f57b2b6d27efc8677c23",
"license": "MIT or APACHE-2.0",
"dependencies": {
"@tauri-apps/api": "^1.2.0"
}
},
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/text-table/-/text-table-0.2.0.tgz",

View File

@@ -45,6 +45,7 @@
"clipboard": "^2.0.11",
"pinia": "^2.0.35",
"pinia-plugin-persistedstate": "^3.1.0",
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql",
"vue": "^3.2.47",
"vue-json-viewer": "^3.0.4",
"vue-router": "^4.1.6",

View File

@@ -18,6 +18,11 @@ tauri = { version = "1.2", features = ["api-all", "updater"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
[dependencies.tauri-plugin-sql]
git = "https://github.com/tauri-apps/plugins-workspace"
branch = "dev"
features = ["sqlite"]
[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!

View File

@@ -89,6 +89,7 @@ fn main() {
}
Ok(())
})
.plugin(tauri_plugin_sql::Builder::default().build())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}