@quereus/plugin-leveldb 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -7
- package/dist/src/plugin.d.ts +7 -1
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +5 -2
- package/dist/src/plugin.js.map +1 -1
- package/dist/src/provider.d.ts +3 -2
- package/dist/src/provider.d.ts.map +1 -1
- package/dist/src/provider.js +19 -9
- package/dist/src/provider.js.map +1 -1
- package/package.json +12 -3
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ LevelDB storage plugin for Quereus. Provides persistent storage for Node.js envi
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Fast**: LevelDB offers excellent read/write performance for key-value workloads
|
|
8
|
+
- **Transaction isolation**: Read-your-own-writes and snapshot isolation by default
|
|
8
9
|
- **Sorted keys**: Efficient range queries with ordered iteration
|
|
9
10
|
- **ACID batches**: Atomic writes across multiple keys
|
|
10
11
|
- **Compression**: Built-in Snappy compression for reduced disk usage
|
|
@@ -12,7 +13,7 @@ LevelDB storage plugin for Quereus. Provides persistent storage for Node.js envi
|
|
|
12
13
|
## Installation
|
|
13
14
|
|
|
14
15
|
```bash
|
|
15
|
-
npm install @quereus/plugin-leveldb @quereus/store
|
|
16
|
+
npm install @quereus/plugin-leveldb @quereus/store @quereus/isolation
|
|
16
17
|
```
|
|
17
18
|
|
|
18
19
|
## Quick Start
|
|
@@ -27,9 +28,26 @@ const db = new Database();
|
|
|
27
28
|
await registerPlugin(db, leveldbPlugin, { basePath: './data' });
|
|
28
29
|
|
|
29
30
|
await db.exec(`
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
create table users (id integer primary key, name text)
|
|
32
|
+
using store
|
|
32
33
|
`);
|
|
34
|
+
|
|
35
|
+
// Full transaction isolation enabled by default
|
|
36
|
+
await db.exec('BEGIN');
|
|
37
|
+
await db.exec(`INSERT INTO users VALUES (1, 'Alice')`);
|
|
38
|
+
const user = await db.get('SELECT * FROM users WHERE id = 1'); // Sees uncommitted insert
|
|
39
|
+
await db.exec('COMMIT');
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Disabling Isolation
|
|
43
|
+
|
|
44
|
+
If you need maximum performance and don't require read-your-own-writes within transactions:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
await registerPlugin(db, leveldbPlugin, {
|
|
48
|
+
basePath: './data',
|
|
49
|
+
isolation: false // Disable isolation layer
|
|
50
|
+
});
|
|
33
51
|
```
|
|
34
52
|
|
|
35
53
|
### Direct Usage with Provider
|
|
@@ -37,16 +55,18 @@ await db.exec(`
|
|
|
37
55
|
```typescript
|
|
38
56
|
import { Database } from '@quereus/quereus';
|
|
39
57
|
import { createLevelDBProvider } from '@quereus/plugin-leveldb';
|
|
40
|
-
import {
|
|
58
|
+
import { createIsolatedStoreModule } from '@quereus/store';
|
|
41
59
|
|
|
42
60
|
const db = new Database();
|
|
43
61
|
const provider = createLevelDBProvider({ basePath: './data' });
|
|
44
|
-
|
|
62
|
+
|
|
63
|
+
// With isolation (recommended)
|
|
64
|
+
const storeModule = createIsolatedStoreModule({ provider });
|
|
45
65
|
db.registerModule('store', storeModule);
|
|
46
66
|
|
|
47
67
|
await db.exec(`
|
|
48
|
-
|
|
49
|
-
|
|
68
|
+
create table users (id integer primary key, name text)
|
|
69
|
+
using store
|
|
50
70
|
`);
|
|
51
71
|
```
|
|
52
72
|
|
package/dist/src/plugin.d.ts
CHANGED
|
@@ -25,6 +25,12 @@ export interface LevelDBPluginConfig {
|
|
|
25
25
|
* @default 'store'
|
|
26
26
|
*/
|
|
27
27
|
moduleName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Enable transaction isolation (read-your-own-writes, snapshot isolation).
|
|
30
|
+
* When true, wraps the store module with an isolation layer.
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
isolation?: boolean;
|
|
28
34
|
}
|
|
29
35
|
/**
|
|
30
36
|
* Register the LevelDB plugin with a database.
|
|
@@ -32,7 +38,7 @@ export interface LevelDBPluginConfig {
|
|
|
32
38
|
export default function register(_db: Database, config?: Record<string, SqlValue>): {
|
|
33
39
|
vtables: {
|
|
34
40
|
name: string;
|
|
35
|
-
module: StoreModule;
|
|
41
|
+
module: import("@quereus/isolation").IsolationModule | StoreModule;
|
|
36
42
|
}[];
|
|
37
43
|
};
|
|
38
44
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/src/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAA6B,MAAM,gBAAgB,CAAC;AAGxE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC/B,GAAG,EAAE,QAAQ,EACb,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAM;;;;;EAwBrC"}
|
package/dist/src/plugin.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Registers a StoreModule backed by LevelDB for Node.js environments.
|
|
5
5
|
*/
|
|
6
|
-
import { StoreModule } from '@quereus/store';
|
|
6
|
+
import { StoreModule, createIsolatedStoreModule } from '@quereus/store';
|
|
7
7
|
import { LevelDBProvider } from './provider.js';
|
|
8
8
|
/**
|
|
9
9
|
* Register the LevelDB plugin with a database.
|
|
@@ -12,11 +12,14 @@ export default function register(_db, config = {}) {
|
|
|
12
12
|
const basePath = config.basePath ?? './data';
|
|
13
13
|
const createIfMissing = config.createIfMissing !== false;
|
|
14
14
|
const moduleName = config.moduleName ?? 'store';
|
|
15
|
+
const isolation = config.isolation ?? true;
|
|
15
16
|
const provider = new LevelDBProvider({
|
|
16
17
|
basePath,
|
|
17
18
|
createIfMissing,
|
|
18
19
|
});
|
|
19
|
-
const storeModule =
|
|
20
|
+
const storeModule = isolation
|
|
21
|
+
? createIsolatedStoreModule({ provider })
|
|
22
|
+
: new StoreModule(provider);
|
|
20
23
|
return {
|
|
21
24
|
vtables: [
|
|
22
25
|
{
|
package/dist/src/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAiChD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC/B,GAAa,EACb,SAAmC,EAAE;IAErC,MAAM,QAAQ,GAAI,MAAM,CAAC,QAAmB,IAAI,QAAQ,CAAC;IACzD,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,KAAK,KAAK,CAAC;IACzD,MAAM,UAAU,GAAI,MAAM,CAAC,UAAqB,IAAI,OAAO,CAAC;IAC5D,MAAM,SAAS,GAAI,MAAM,CAAC,SAAqB,IAAI,IAAI,CAAC;IAExD,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAC;QACpC,QAAQ;QACR,eAAe;KACf,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,SAAS;QAC5B,CAAC,CAAC,yBAAyB,CAAC,EAAE,QAAQ,EAAE,CAAC;QACzC,CAAC,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE7B,OAAO;QACN,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,MAAM,EAAE,WAAW;aACnB;SACD;KACD,CAAC;AACH,CAAC"}
|
package/dist/src/provider.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Storage naming convention:
|
|
7
7
|
* {basePath}/{schema}/{table} - Data store (row data)
|
|
8
8
|
* {basePath}/{schema}/{table}_idx_{name} - Index store (secondary indexes)
|
|
9
|
-
* {basePath}/
|
|
9
|
+
* {basePath}/__stats__ - Unified stats store (row counts for all tables)
|
|
10
10
|
* {basePath}/__catalog__ - Catalog store (DDL metadata)
|
|
11
11
|
*/
|
|
12
12
|
import type { KVStore, KVStoreProvider } from '@quereus/store';
|
|
@@ -36,10 +36,11 @@ export declare class LevelDBProvider implements KVStoreProvider {
|
|
|
36
36
|
private createIfMissing;
|
|
37
37
|
private stores;
|
|
38
38
|
private catalogStore;
|
|
39
|
+
private statsStore;
|
|
39
40
|
constructor(options: LevelDBProviderOptions);
|
|
40
41
|
getStore(schemaName: string, tableName: string, options?: Record<string, unknown>): Promise<KVStore>;
|
|
41
42
|
getIndexStore(schemaName: string, tableName: string, indexName: string): Promise<KVStore>;
|
|
42
|
-
getStatsStore(
|
|
43
|
+
getStatsStore(_schemaName: string, _tableName: string): Promise<KVStore>;
|
|
43
44
|
getCatalogStore(): Promise<KVStore>;
|
|
44
45
|
closeStore(schemaName: string, tableName: string): Promise<void>;
|
|
45
46
|
closeIndexStore(schemaName: string, tableName: string, indexName: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAI/D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,qBAAa,eAAgB,YAAW,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,YAAY,CAA6B;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAI/D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,qBAAa,eAAgB,YAAW,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,UAAU,CAA6B;gBAEnC,OAAO,EAAE,sBAAsB;IAKrC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAMpG,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMzF,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYxE,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAWnC,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxF,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBzB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOzF,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAoB/D,gBAAgB;YAchB,gBAAgB;CAO9B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAEtF"}
|
package/dist/src/provider.js
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* Storage naming convention:
|
|
7
7
|
* {basePath}/{schema}/{table} - Data store (row data)
|
|
8
8
|
* {basePath}/{schema}/{table}_idx_{name} - Index store (secondary indexes)
|
|
9
|
-
* {basePath}/
|
|
9
|
+
* {basePath}/__stats__ - Unified stats store (row counts for all tables)
|
|
10
10
|
* {basePath}/__catalog__ - Catalog store (DDL metadata)
|
|
11
11
|
*/
|
|
12
12
|
import path from 'node:path';
|
|
13
|
-
import { STORE_SUFFIX, CATALOG_STORE_NAME } from '@quereus/store';
|
|
13
|
+
import { STORE_SUFFIX, CATALOG_STORE_NAME, STATS_STORE_NAME } from '@quereus/store';
|
|
14
14
|
import { LevelDBStore } from './store.js';
|
|
15
15
|
/**
|
|
16
16
|
* LevelDB implementation of KVStoreProvider.
|
|
@@ -23,6 +23,7 @@ export class LevelDBProvider {
|
|
|
23
23
|
createIfMissing;
|
|
24
24
|
stores = new Map();
|
|
25
25
|
catalogStore = null;
|
|
26
|
+
statsStore = null;
|
|
26
27
|
constructor(options) {
|
|
27
28
|
this.basePath = options.basePath;
|
|
28
29
|
this.createIfMissing = options.createIfMissing ?? true;
|
|
@@ -37,10 +38,16 @@ export class LevelDBProvider {
|
|
|
37
38
|
const storePath = path.join(this.basePath, schemaName, `${tableName}${STORE_SUFFIX.INDEX}${indexName}`);
|
|
38
39
|
return this.getOrCreateStore(storeName, storePath);
|
|
39
40
|
}
|
|
40
|
-
async getStatsStore(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
async getStatsStore(_schemaName, _tableName) {
|
|
42
|
+
// Use the unified __stats__ store for all tables
|
|
43
|
+
if (!this.statsStore) {
|
|
44
|
+
const statsPath = path.join(this.basePath, STATS_STORE_NAME);
|
|
45
|
+
this.statsStore = await LevelDBStore.open({
|
|
46
|
+
path: statsPath,
|
|
47
|
+
createIfMissing: this.createIfMissing,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return this.statsStore;
|
|
44
51
|
}
|
|
45
52
|
async getCatalogStore() {
|
|
46
53
|
if (!this.catalogStore) {
|
|
@@ -69,6 +76,10 @@ export class LevelDBProvider {
|
|
|
69
76
|
await this.catalogStore.close();
|
|
70
77
|
this.catalogStore = null;
|
|
71
78
|
}
|
|
79
|
+
if (this.statsStore) {
|
|
80
|
+
await this.statsStore.close();
|
|
81
|
+
this.statsStore = null;
|
|
82
|
+
}
|
|
72
83
|
}
|
|
73
84
|
async deleteIndexStore(schemaName, tableName, indexName) {
|
|
74
85
|
const storeName = `${schemaName}.${tableName}${STORE_SUFFIX.INDEX}${indexName}`.toLowerCase();
|
|
@@ -80,9 +91,8 @@ export class LevelDBProvider {
|
|
|
80
91
|
// Close data store
|
|
81
92
|
const dataStoreName = `${schemaName}.${tableName}`.toLowerCase();
|
|
82
93
|
await this.closeStoreByName(dataStoreName);
|
|
83
|
-
//
|
|
84
|
-
|
|
85
|
-
await this.closeStoreByName(statsStoreName);
|
|
94
|
+
// Stats are in the unified __stats__ store, so no need to close a separate store
|
|
95
|
+
// The individual stats entry will be removed by the calling code if needed
|
|
86
96
|
// Close all index stores for this table
|
|
87
97
|
const indexPrefix = `${schemaName}.${tableName}${STORE_SUFFIX.INDEX}`.toLowerCase();
|
|
88
98
|
for (const [name, store] of this.stores) {
|
package/dist/src/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAmB1C;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IACnB,QAAQ,CAAS;IACjB,eAAe,CAAU;IACzB,MAAM,GAAG,IAAI,GAAG,EAAwB,CAAC;IACzC,YAAY,GAAwB,IAAI,CAAC;IACzC,UAAU,GAAwB,IAAI,CAAC;IAE/C,YAAY,OAA+B;QAC1C,IAAI,CAAC,QAAQ,GAAG,OAAO,C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,KAAK,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,EAAE,SAAS;gBACf,eAAe,EAAE,IAAI,CAAC,eAAe;aACrC,CAAC,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,KAAK,EAAE,CAAC;YACX,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC;IACF,CAAC;CACD;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAA+B;IACpE,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quereus/plugin-leveldb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "LevelDB storage plugin for Quereus - Node.js persistent storage",
|
|
6
6
|
"keywords": [
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@quereus/
|
|
41
|
-
"@quereus/
|
|
40
|
+
"@quereus/isolation": "^0.2.0",
|
|
41
|
+
"@quereus/quereus": "^0.13.0",
|
|
42
|
+
"@quereus/store": "^0.6.0"
|
|
42
43
|
},
|
|
43
44
|
"engines": {
|
|
44
45
|
"quereus": "^0.24.0"
|
|
@@ -70,6 +71,13 @@
|
|
|
70
71
|
"type": "string",
|
|
71
72
|
"default": "store",
|
|
72
73
|
"help": "Name to register the virtual table module under"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"key": "isolation",
|
|
77
|
+
"label": "Transaction Isolation",
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"default": true,
|
|
80
|
+
"help": "Enable transaction isolation (read-your-own-writes, snapshot isolation)"
|
|
73
81
|
}
|
|
74
82
|
]
|
|
75
83
|
},
|
|
@@ -83,6 +91,7 @@
|
|
|
83
91
|
"classic-level": "^2.0.0"
|
|
84
92
|
},
|
|
85
93
|
"devDependencies": {
|
|
94
|
+
"@quereus/isolation": "*",
|
|
86
95
|
"@quereus/quereus": "*",
|
|
87
96
|
"@quereus/store": "*",
|
|
88
97
|
"@types/mocha": "^10.0.10",
|