forked from pubkey/rxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorage.js
More file actions
20 lines (18 loc) · 708 Bytes
/
storage.js
File metadata and controls
20 lines (18 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* The storage is defined in a separate file
* so that it can be swapped out in the CI to test
* different storages.
*/
import { wrappedValidateAjvStorage } from 'rxdb/plugins/validate-ajv';
import { getRxStorageSQLiteTrial, getSQLiteBasicsExpoSQLiteAsync } from 'rxdb/plugins/storage-sqlite';
import { getRxStorageMemory } from 'rxdb/plugins/storage-memory';
import * as SQLite from 'expo-sqlite';
export const STORAGE_SQLITE = wrappedValidateAjvStorage({
storage: getRxStorageSQLiteTrial({
sqliteBasics: getSQLiteBasicsExpoSQLiteAsync(SQLite.openDatabaseAsync)
})
});
// used in tests
export const STORAGE_MEMORY = wrappedValidateAjvStorage({
storage: getRxStorageMemory()
});