|
|
@ -64,7 +64,7 @@ Afterwards all the plugin's APIs are available through the JavaScript guest bind
|
|
|
|
```javascript
|
|
|
|
```javascript
|
|
|
|
import Database from "@tauri-apps/plugin-sql";
|
|
|
|
import Database from "@tauri-apps/plugin-sql";
|
|
|
|
|
|
|
|
|
|
|
|
// sqlite. The path is relative to `tauri::api::path::BaseDirectory::App`.
|
|
|
|
// sqlite. The path is relative to `tauri::api::path::BaseDirectory::AppConfig`.
|
|
|
|
const db = await Database.load("sqlite:test.db");
|
|
|
|
const db = await Database.load("sqlite:test.db");
|
|
|
|
// mysql
|
|
|
|
// mysql
|
|
|
|
const db = await Database.load("mysql://user:pass@host/database");
|
|
|
|
const db = await Database.load("mysql://user:pass@host/database");
|
|
|
|