@nymphjs/driver-sqlite3 1.0.0-beta.13 → 1.0.0-beta.131
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 +590 -0
- package/README.md +5 -3
- package/dist/SQLite3Driver.d.ts +108 -17
- package/dist/SQLite3Driver.js +1501 -572
- package/dist/SQLite3Driver.js.map +1 -1
- package/dist/SQLite3Driver.test.js +28 -22
- package/dist/SQLite3Driver.test.js.map +1 -1
- package/dist/conf/defaults.d.ts +1 -1
- package/dist/conf/defaults.js +2 -4
- package/dist/conf/defaults.js.map +1 -1
- package/dist/conf/index.d.ts +63 -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 +31 -5
- package/package.json +32 -21
- package/src/SQLite3Driver.test.ts +23 -9
- package/src/SQLite3Driver.ts +2218 -901
- package/src/conf/defaults.ts +2 -2
- package/src/conf/index.ts +63 -2
- package/src/index.ts +2 -2
- package/tsconfig.json +6 -3
- package/typedoc.json +4 -0
- package/dist/conf/d.d.ts +0 -9
- package/dist/conf/d.js +0 -3
- package/dist/conf/d.js.map +0 -1
- package/src/conf/d.ts +0 -52
package/src/conf/defaults.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SQLite3DriverConfig } from './
|
|
1
|
+
import type { SQLite3DriverConfig } from './index.js';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
filename: ':memory:',
|
|
@@ -7,5 +7,5 @@ export default {
|
|
|
7
7
|
timeout: 10000,
|
|
8
8
|
explicitWrite: false,
|
|
9
9
|
wal: false,
|
|
10
|
-
|
|
10
|
+
pragmas: [],
|
|
11
11
|
} as SQLite3DriverConfig;
|
package/src/conf/index.ts
CHANGED
|
@@ -1,4 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* SQLite3 Driver Config
|
|
3
|
+
*/
|
|
4
|
+
export interface SQLite3DriverConfig {
|
|
5
|
+
/**
|
|
6
|
+
* The filename of the SQLite3 DB. Use ':memory:' for an in-memory DB.
|
|
7
|
+
*/
|
|
8
|
+
filename: string;
|
|
9
|
+
/**
|
|
10
|
+
* If the file does not exist, an Error will be thrown instead of creating a
|
|
11
|
+
* new file.
|
|
12
|
+
*
|
|
13
|
+
* This option is ignored for in-memory, temporary, or readonly database
|
|
14
|
+
* connections.
|
|
15
|
+
*/
|
|
16
|
+
fileMustExist: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The SQLite3 table name prefix.
|
|
19
|
+
*/
|
|
20
|
+
prefix: string;
|
|
21
|
+
/**
|
|
22
|
+
* The timeout to use for waiting for the DB to become available.
|
|
23
|
+
*/
|
|
24
|
+
timeout: number;
|
|
25
|
+
/**
|
|
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.
|
|
37
|
+
*/
|
|
38
|
+
explicitWrite: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Turn on WAL mode.
|
|
41
|
+
*
|
|
42
|
+
* This will generally increase performance, but does mean that the DB must be
|
|
43
|
+
* on a local disk.
|
|
44
|
+
*
|
|
45
|
+
* See: https://www.sqlite.org/wal.html
|
|
46
|
+
*/
|
|
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[];
|
|
62
|
+
}
|
|
2
63
|
|
|
3
|
-
import defaults from './defaults';
|
|
64
|
+
import defaults from './defaults.js';
|
|
4
65
|
export { defaults as SQLite3DriverConfigDefaults };
|
package/src/index.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
"extends": "@tsconfig/recommended/tsconfig.json",
|
|
3
3
|
|
|
4
4
|
"compilerOptions": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"types": ["node", "jest"],
|
|
6
|
+
"module": "nodenext",
|
|
7
|
+
"moduleResolution": "nodenext",
|
|
8
|
+
"lib": ["es2024"],
|
|
9
|
+
"target": "es2024",
|
|
7
10
|
"noImplicitAny": true,
|
|
8
|
-
"removeComments":
|
|
11
|
+
"removeComments": false,
|
|
9
12
|
"sourceMap": true,
|
|
10
13
|
"outDir": "dist",
|
|
11
14
|
"resolveJsonModule": true,
|
package/typedoc.json
ADDED
package/dist/conf/d.d.ts
DELETED
package/dist/conf/d.js
DELETED
package/dist/conf/d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"d.js","sourceRoot":"","sources":["../../src/conf/d.ts"],"names":[],"mappings":""}
|
package/src/conf/d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SQLite3 Driver Config
|
|
3
|
-
*/
|
|
4
|
-
export interface SQLite3DriverConfig {
|
|
5
|
-
/**
|
|
6
|
-
* The filename of the SQLite3 DB. Use ':memory:' for an in-memory DB.
|
|
7
|
-
*/
|
|
8
|
-
filename: string;
|
|
9
|
-
/**
|
|
10
|
-
* If the file does not exist, an Error will be thrown instead of creating a
|
|
11
|
-
* new file.
|
|
12
|
-
*
|
|
13
|
-
* This option is ignored for in-memory, temporary, or readonly database
|
|
14
|
-
* connections.
|
|
15
|
-
*/
|
|
16
|
-
fileMustExist: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The SQLite3 table name prefix.
|
|
19
|
-
*/
|
|
20
|
-
prefix: string;
|
|
21
|
-
/**
|
|
22
|
-
* The timeout to use for waiting for the DB to become available.
|
|
23
|
-
*/
|
|
24
|
-
timeout: number;
|
|
25
|
-
/**
|
|
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.
|
|
37
|
-
*/
|
|
38
|
-
explicitWrite: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Turn on WAL mode.
|
|
41
|
-
*
|
|
42
|
-
* This will generally increase performance, but does mean that the DB must be
|
|
43
|
-
* on a local disk.
|
|
44
|
-
*
|
|
45
|
-
* See: https://www.sqlite.org/wal.html
|
|
46
|
-
*/
|
|
47
|
-
wal: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Function that gets called with every SQL string executed.
|
|
50
|
-
*/
|
|
51
|
-
verbose: ((message?: any, ...additionalArgs: any[]) => void) | undefined;
|
|
52
|
-
}
|