A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://op-engineering.github.io/op-sqlite/docs/key_value_storage below:

Key-Value Storage | OP-SQLite Docs

OP-SQLite provides a simple key-value storage API compatible with react-native-async-storage. Mostly as a convenience, use at your own caution. It uses sqlite as a simple text storage, so it might be slower than using other key-value packages or writing data to disk. If you use SQLCipher the data inside will also be encrypted.

import { Storage } from '@op-engineering/op-sqlite';



const storage = new Storage({
location: 'storage',
encryptionKey: 'myEncryptionKey',
});

const item = storage.getItemSync('foo');

const item2 = await storage.getItem('foo');

await storage.setItem('foo', 'bar');

storage.setItemSync('foo', 'bar');

const allKeys = storage.getAllKeys();


storage.clear();

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4