tauri-apps / tauri-apps/plugins-workspace
[plugin-store]: add function to set/get whole store
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
currently I am only able to get/set a value in a store individually. is there a way to add a function to get/set all of them at the same time? I need to read many keys at the same time and making 10 different get calls is very inconvenient.
any chance that can be added? maybe something like:
```ts
import { load } from "@tauri-apps/plugin-store";
const store = await load(...);
//current:
store.set(key, val); // set individually
store.set(key, val);
store.set(key, val);
store.set(key, val);
// proposed
await store.set({
key1: val1,
key2: val2,
// ...
});
```
This can be done by overloading by passing an object (passing 2 params means setting indiviually will stay the same)
Contributor guide
Assessment
This issue has not been assessed yet.