@nymphjs/driver-sqlite3 1.0.0-beta.11 → 1.0.0-beta.110
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/CHANGELOG.md +495 -0
- package/README.md +1 -1
- package/dist/SQLite3Driver.d.ts +104 -14
- package/dist/SQLite3Driver.js +1558 -569
- package/dist/SQLite3Driver.js.map +1 -1
- package/dist/SQLite3Driver.test.js +54 -15
- package/dist/SQLite3Driver.test.js.map +1 -1
- package/dist/conf/d.d.ts +58 -1
- package/dist/conf/d.js +1 -2
- package/dist/conf/defaults.d.ts +1 -1
- package/dist/conf/defaults.js +3 -4
- package/dist/conf/defaults.js.map +1 -1
- package/dist/conf/index.d.ts +2 -2
- package/dist/conf/index.js +2 -8
- package/dist/conf/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -24
- package/dist/index.js.map +1 -1
- package/jest.config.js +12 -2
- package/package.json +19 -16
- package/src/SQLite3Driver.test.ts +53 -9
- package/src/SQLite3Driver.ts +2362 -892
- package/src/conf/d.ts +26 -2
- package/src/conf/defaults.ts +3 -2
- package/src/conf/index.ts +2 -2
- package/src/index.ts +2 -2
- package/tsconfig.json +5 -3
- package/typedoc.json +4 -0
package/src/conf/d.ts
CHANGED
|
@@ -23,9 +23,19 @@ export interface SQLite3DriverConfig {
|
|
|
23
23
|
*/
|
|
24
24
|
timeout: number;
|
|
25
25
|
/**
|
|
26
|
-
* Open
|
|
26
|
+
* Open explicitly for writing.
|
|
27
|
+
*
|
|
28
|
+
* By default, the driver will always open the DB as readonly, and attempt to
|
|
29
|
+
* open another link to perform write operations. If you know that only one
|
|
30
|
+
* instance will be writing, you can force the driver to open for writing by
|
|
31
|
+
* default, which will block any other instance from opening it for writing.
|
|
32
|
+
*
|
|
33
|
+
* One thing to note is that starting a transaction is a write operation, so
|
|
34
|
+
* as long as an instance is in a transaction, no other instances can write.
|
|
35
|
+
*
|
|
36
|
+
* PubSub also needs to open the DB, and it only needs read access.
|
|
27
37
|
*/
|
|
28
|
-
|
|
38
|
+
explicitWrite: boolean;
|
|
29
39
|
/**
|
|
30
40
|
* Turn on WAL mode.
|
|
31
41
|
*
|
|
@@ -35,6 +45,20 @@ export interface SQLite3DriverConfig {
|
|
|
35
45
|
* See: https://www.sqlite.org/wal.html
|
|
36
46
|
*/
|
|
37
47
|
wal: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Additional pragma statements to run upon connection.
|
|
50
|
+
*
|
|
51
|
+
* The default pragmas:
|
|
52
|
+
*
|
|
53
|
+
* - journal_mode = WAL;
|
|
54
|
+
* (if wal is set to true)
|
|
55
|
+
* - encoding = "UTF-8";
|
|
56
|
+
* - foreign_keys = 1;
|
|
57
|
+
* - case_sensitive_like = 1;
|
|
58
|
+
*
|
|
59
|
+
* (Don't include the PRAGMA keyword, but do include the semicolon.)
|
|
60
|
+
*/
|
|
61
|
+
pragmas: string[];
|
|
38
62
|
/**
|
|
39
63
|
* Function that gets called with every SQL string executed.
|
|
40
64
|
*/
|
package/src/conf/defaults.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { SQLite3DriverConfig } from './d';
|
|
1
|
+
import { SQLite3DriverConfig } from './d.js';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
filename: ':memory:',
|
|
5
5
|
fileMustExist: false,
|
|
6
6
|
prefix: 'nymph_',
|
|
7
7
|
timeout: 10000,
|
|
8
|
-
|
|
8
|
+
explicitWrite: false,
|
|
9
9
|
wal: false,
|
|
10
|
+
pragmas: [],
|
|
10
11
|
verbose: undefined,
|
|
11
12
|
} as SQLite3DriverConfig;
|
package/src/conf/index.ts
CHANGED
package/src/index.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
"extends": "@tsconfig/recommended/tsconfig.json",
|
|
3
3
|
|
|
4
4
|
"compilerOptions": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"module": "ES2022",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"lib": ["ES2022"],
|
|
8
|
+
"target": "ES2022",
|
|
7
9
|
"noImplicitAny": true,
|
|
8
|
-
"removeComments":
|
|
10
|
+
"removeComments": false,
|
|
9
11
|
"sourceMap": true,
|
|
10
12
|
"outDir": "dist",
|
|
11
13
|
"resolveJsonModule": true,
|
package/typedoc.json
ADDED