@rljson/io-sqlite 0.0.11 → 0.0.17
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/LICENSE +21 -21
- package/README.architecture.md +9 -9
- package/README.blog.md +11 -11
- package/README.contributors.md +32 -32
- package/README.md +24 -24
- package/README.piano.md +42 -42
- package/README.public.md +15 -15
- package/README.trouble.md +23 -23
- package/dist/README.architecture.md +9 -9
- package/dist/README.blog.md +11 -11
- package/dist/README.contributors.md +32 -32
- package/dist/README.md +24 -24
- package/dist/README.piano.md +42 -42
- package/dist/README.public.md +15 -15
- package/dist/README.trouble.md +23 -23
- package/dist/index.d.ts +2 -1
- package/dist/io-sqlite.d.ts +35 -20
- package/dist/io-sqlite.js +2994 -821
- package/dist/sql-statements.d.ts +40 -0
- package/dist/src/example.ts +26 -7
- package/package.json +34 -40
package/dist/README.trouble.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
@license
|
|
3
|
-
Copyright (c) 2025 Rljson
|
|
4
|
-
|
|
5
|
-
Use of this source code is governed by terms that can be
|
|
6
|
-
found in the LICENSE file in the root of this package.
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
# Trouble shooting
|
|
10
|
-
|
|
11
|
-
## Table of contents <!-- omit in toc -->
|
|
12
|
-
|
|
13
|
-
- [Vscode Windows: Debugging is not working](#vscode-windows-debugging-is-not-working)
|
|
14
|
-
|
|
15
|
-
## Vscode Windows: Debugging is not working
|
|
16
|
-
|
|
17
|
-
Date: 2025-03-08
|
|
18
|
-
|
|
19
|
-
⚠️ IMPORTANT: On Windows, please check out the repo on drive C. There is a bug
|
|
20
|
-
in the VS Code Vitest extension (v1.14.4), which prevents test debugging from
|
|
21
|
-
working: <https://github.com/vitest-dev/vscode/issues/548> Please check from
|
|
22
|
-
time to time if the issue has been fixed and remove this note once it is
|
|
23
|
-
resolved.
|
|
1
|
+
<!--
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2025 Rljson
|
|
4
|
+
|
|
5
|
+
Use of this source code is governed by terms that can be
|
|
6
|
+
found in the LICENSE file in the root of this package.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# Trouble shooting
|
|
10
|
+
|
|
11
|
+
## Table of contents <!-- omit in toc -->
|
|
12
|
+
|
|
13
|
+
- [Vscode Windows: Debugging is not working](#vscode-windows-debugging-is-not-working)
|
|
14
|
+
|
|
15
|
+
## Vscode Windows: Debugging is not working
|
|
16
|
+
|
|
17
|
+
Date: 2025-03-08
|
|
18
|
+
|
|
19
|
+
⚠️ IMPORTANT: On Windows, please check out the repo on drive C. There is a bug
|
|
20
|
+
in the VS Code Vitest extension (v1.14.4), which prevents test debugging from
|
|
21
|
+
working: <https://github.com/vitest-dev/vscode/issues/548> Please check from
|
|
22
|
+
time to time if the issue has been fixed and remove this note once it is
|
|
23
|
+
resolved.
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './io-sqlite.ts';
|
|
2
|
+
export * from './sql-statements.ts';
|
package/dist/io-sqlite.d.ts
CHANGED
|
@@ -1,45 +1,60 @@
|
|
|
1
1
|
import { Io } from '@rljson/io';
|
|
2
|
-
import { JsonValue } from '@rljson/json';
|
|
3
|
-
import { Rljson } from '@rljson/rljson';
|
|
4
|
-
|
|
5
|
-
* Sqlite implementation of the Rljson Io interface.
|
|
6
|
-
*/
|
|
2
|
+
import { Json, JsonValue } from '@rljson/json';
|
|
3
|
+
import { ContentType, Rljson, TableCfg, TableKey } from '@rljson/rljson';
|
|
4
|
+
import { Database } from 'sql.js';
|
|
7
5
|
export declare class IoSqlite implements Io {
|
|
8
|
-
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
|
|
6
|
+
private _ioTools;
|
|
7
|
+
private _isReady;
|
|
8
|
+
private _sql;
|
|
9
|
+
private _map;
|
|
10
|
+
constructor();
|
|
11
|
+
init(): Promise<void>;
|
|
12
|
+
db: Database;
|
|
13
|
+
/**
|
|
14
|
+
* Returns an example database
|
|
15
|
+
*/
|
|
16
|
+
static example: () => Promise<IoSqlite>;
|
|
17
|
+
contentType(request: {
|
|
18
|
+
table: string;
|
|
19
|
+
}): Promise<ContentType>;
|
|
12
20
|
deleteDatabase(): Promise<void>;
|
|
13
21
|
isReady(): Promise<void>;
|
|
14
22
|
dump(): Promise<Rljson>;
|
|
15
23
|
dumpTable(request: {
|
|
16
24
|
table: string;
|
|
17
25
|
}): Promise<Rljson>;
|
|
18
|
-
readRow(request: {
|
|
19
|
-
table: string;
|
|
20
|
-
rowHash: string;
|
|
21
|
-
}): Promise<Rljson>;
|
|
22
26
|
readRows(request: {
|
|
23
27
|
table: string;
|
|
24
28
|
where: {
|
|
25
29
|
[column: string]: JsonValue;
|
|
26
30
|
};
|
|
27
31
|
}): Promise<Rljson>;
|
|
32
|
+
rowCount(table: string): Promise<number>;
|
|
33
|
+
tableExists(tableKey: TableKey): Promise<boolean>;
|
|
34
|
+
rawTableCfgs(): Promise<TableCfg[]>;
|
|
35
|
+
alltableKeys(): Promise<string[]>;
|
|
28
36
|
write(request: {
|
|
29
37
|
data: Rljson;
|
|
30
38
|
}): Promise<void>;
|
|
31
|
-
|
|
32
|
-
tableCfg:
|
|
39
|
+
createOrExtendTable(request: {
|
|
40
|
+
tableCfg: TableCfg;
|
|
33
41
|
}): Promise<void>;
|
|
34
|
-
tables(): Promise<Rljson>;
|
|
35
|
-
private _isReady;
|
|
36
|
-
private _init;
|
|
37
42
|
private _initTableCfgs;
|
|
43
|
+
private _createOrExtendTable;
|
|
38
44
|
private _createTable;
|
|
39
|
-
private
|
|
40
|
-
|
|
45
|
+
private _insertTableCfg;
|
|
46
|
+
_addMissingHashes(rljson: Json): void;
|
|
47
|
+
private _extendTable;
|
|
41
48
|
private _readRows;
|
|
49
|
+
private _serializeRow;
|
|
50
|
+
private _parseData;
|
|
51
|
+
parseDataTest(data: Json[], tableCfg: TableCfg): Json[];
|
|
42
52
|
private _dump;
|
|
43
53
|
private _dumpTable;
|
|
44
54
|
private _write;
|
|
55
|
+
_tableExists(tableKey: string): Promise<boolean>;
|
|
56
|
+
_whereString(whereClause: [string, JsonValue][]): string;
|
|
57
|
+
private _isOpen;
|
|
58
|
+
get isOpen(): boolean;
|
|
59
|
+
close(): Promise<void>;
|
|
45
60
|
}
|