pull/279/head
FabianLars 2 years ago
parent f9ab350412
commit 0783f02158
No known key found for this signature in database
GPG Key ID: 3B12BC1DEBF61125

@ -5,18 +5,18 @@ on:
branches: branches:
- dev - dev
paths: paths:
- '.github/workflows/msrv-check.yml' - ".github/workflows/msrv-check.yml"
- 'plugins/*/src/**' - "plugins/*/src/**"
- '**/Cargo.toml' - "**/Cargo.toml"
- '**/Cargo.lock' - "**/Cargo.lock"
pull_request: pull_request:
branches: branches:
- dev - dev
paths: paths:
- '.github/workflows/msrv-check.yml' - ".github/workflows/msrv-check.yml"
- 'plugins/*/src/**' - "plugins/*/src/**"
- '**/Cargo.toml' - "**/Cargo.toml"
- '**/Cargo.lock' - "**/Cargo.lock"
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}

@ -1,5 +1,5 @@
import { invoke } from "@tauri-apps/api/tauri"; import { invoke } from "@tauri-apps/api/tauri";
import { BaseDirectory } from "@tauri-apps/api/path" import { BaseDirectory } from "@tauri-apps/api/path";
export interface QueryResult { export interface QueryResult {
/** The number of rows affected by the query. */ /** The number of rows affected by the query. */
@ -49,7 +49,7 @@ export default class Database {
static async load(path: string, dir?: BaseDirectory): Promise<Database> { static async load(path: string, dir?: BaseDirectory): Promise<Database> {
const _path = await invoke<string>("plugin:sql|load", { const _path = await invoke<string>("plugin:sql|load", {
db: path, db: path,
dir dir,
}); });
return new Database(_path); return new Database(_path);

@ -64,7 +64,9 @@ await store.save(); // this manually saves the store, otherwise the store is onl
``` ```
### Persisting values ### Persisting values
Values added to the store are not persisted between application loads unless: Values added to the store are not persisted between application loads unless:
1. The application is closed gracefully (plugin automatically saves) 1. The application is closed gracefully (plugin automatically saves)
2. The store is manually saved (using `store.save()`) 2. The store is manually saved (using `store.save()`)

Loading…
Cancel
Save