harperdb 4.3.0-beta.1 → 4.3.0-beta.11
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 +1 -1
- package/bin/harperdb.js +58 -55
- package/bin/lite.js +21 -18
- package/config/yaml/defaultConfig.yaml +7 -2
- package/dependencies/linux-x64/nats-server +0 -0
- package/json/systemSchema.json +20 -0
- package/launchServiceScripts/launchInstallNATSServer.js +3 -3
- package/launchServiceScripts/launchNatsIngestService.js +21 -18
- package/launchServiceScripts/launchNatsReplyService.js +21 -18
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +21 -18
- package/npm-shrinkwrap.json +549 -530
- package/package.json +6 -9
- package/resources/DatabaseTransaction.d.ts +9 -3
- package/resources/RecordEncoder.d.ts +0 -1
- package/resources/Table.d.ts +2 -2
- package/resources/databases.d.ts +5 -3
- package/resources/search.d.ts +1 -0
- package/server/jobs/jobProcess.js +21 -18
- package/server/serverHelpers/Headers.d.ts +12 -0
- package/server/threads/threadServer.js +21 -18
- package/studio/build-local/asset-manifest.json +2 -2
- package/studio/build-local/index.html +1 -1
- package/studio/build-local/static/js/main.42e734c5.js +2 -0
- package/utility/scripts/restartHdb.js +21 -18
- package/studio/build-local/static/js/main.67d8f5e6.js +0 -2
- /package/studio/build-local/static/js/{main.67d8f5e6.js.LICENSE.txt → main.42e734c5.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harperdb",
|
|
3
|
-
"version": "4.3.0-beta.
|
|
3
|
+
"version": "4.3.0-beta.11",
|
|
4
4
|
"description": "HarperDB is a distributed SQL & NoSQL data platform focused on speed, flexibility, and ease of use.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"database",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
21
|
"minimum-node": "16.0.0",
|
|
22
|
-
"go-lang": "1.21.
|
|
23
|
-
"nats-server": "2.10.
|
|
22
|
+
"go-lang": "1.21.7",
|
|
23
|
+
"nats-server": "2.10.11"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
".": "./index.js"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"json2csv": "5.0.7",
|
|
69
69
|
"jsonata": "1.8.6",
|
|
70
70
|
"jsonwebtoken": "9.0.2",
|
|
71
|
-
"lmdb": "
|
|
71
|
+
"lmdb": "3.0.0-beta.8",
|
|
72
72
|
"lodash": "4.17.21",
|
|
73
73
|
"mathjs": "11.11.2",
|
|
74
74
|
"minimist": "1.2.8",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"moment": "2.29.4",
|
|
77
77
|
"mqtt-packet": "~8.2.1",
|
|
78
78
|
"msgpackr": "1.10.1",
|
|
79
|
-
"nats": "2.
|
|
79
|
+
"nats": "2.19.0",
|
|
80
80
|
"needle": "3.2.0",
|
|
81
81
|
"node-stream-zip": "1.15.0",
|
|
82
82
|
"node-unix-socket": "0.2.5",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"passport-http": "0.3.0",
|
|
89
89
|
"passport-local": "1.0.0",
|
|
90
90
|
"pino": "8.16.0",
|
|
91
|
-
"pm2": "5.3.
|
|
91
|
+
"pm2": "5.3.1",
|
|
92
92
|
"prompt": "1.3.0",
|
|
93
93
|
"properties-reader": "2.3.0",
|
|
94
94
|
"recursive-iterator": "3.3.0",
|
|
@@ -110,9 +110,6 @@
|
|
|
110
110
|
"eslint-plugin-radar": {
|
|
111
111
|
"eslint": "8.22.0"
|
|
112
112
|
},
|
|
113
|
-
"newman-reporter-html": {
|
|
114
|
-
"newman": "5.3.2"
|
|
115
|
-
},
|
|
116
113
|
"alasql": {
|
|
117
114
|
"xlsx": "0.18.5"
|
|
118
115
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { RootDatabase, Transaction as LMDBTransaction } from 'lmdb';
|
|
2
|
+
export declare enum TRANSACTION_STATE {
|
|
3
|
+
CLOSED = 0,// the transaction has been committed or aborted and can no longer be used for writes (if read txn is active, it can be used for reads)
|
|
4
|
+
OPEN = 1,// the transaction is open and can be used for reads and writes
|
|
5
|
+
LINGERING = 2
|
|
6
|
+
}
|
|
2
7
|
export declare class DatabaseTransaction implements Transaction {
|
|
3
8
|
writes: any[];
|
|
4
9
|
lmdbDb: RootDatabase;
|
|
@@ -9,18 +14,19 @@ export declare class DatabaseTransaction implements Transaction {
|
|
|
9
14
|
timestamp: number;
|
|
10
15
|
next: DatabaseTransaction;
|
|
11
16
|
stale: boolean;
|
|
12
|
-
open:
|
|
17
|
+
open: TRANSACTION_STATE;
|
|
13
18
|
getReadTxn(): LMDBTransaction | void;
|
|
14
19
|
useReadTxn(): LMDBTransaction;
|
|
15
20
|
doneReadTxn(): void;
|
|
16
21
|
disregardReadTxn(): void;
|
|
17
|
-
|
|
22
|
+
checkOverloaded(): void;
|
|
23
|
+
addWrite(operation: any): Promise<CommitResolution>;
|
|
18
24
|
removeWrite(operation: any): void;
|
|
19
25
|
/**
|
|
20
26
|
* Resolves with information on the timestamp and success of the commit
|
|
21
27
|
*/
|
|
22
28
|
commit(options?: {
|
|
23
|
-
|
|
29
|
+
letItLinger?: boolean;
|
|
24
30
|
timestamp?: number;
|
|
25
31
|
}): Promise<CommitResolution>;
|
|
26
32
|
abort(): void;
|
|
@@ -21,6 +21,5 @@ export declare class RecordEncoder extends Encoder {
|
|
|
21
21
|
constructor(options: any);
|
|
22
22
|
decode(buffer: any, options: any): any;
|
|
23
23
|
}
|
|
24
|
-
export declare function fromResource(callback: any): any;
|
|
25
24
|
export declare function handleLocalTimeForGets(store: any): any;
|
|
26
25
|
export declare function getUpdateRecord(store: any, table_id: any, audit_store: any): (id: any, record: any, existing_entry: any, new_version: any, assign_metadata?: number, audit?: boolean, context?: any, expires_at?: number, type?: string, resolve_record?: boolean, audit_record?: any) => any;
|
package/resources/Table.d.ts
CHANGED
|
@@ -480,7 +480,7 @@ export declare function makeTable(options: any): {
|
|
|
480
480
|
* @param can_skip
|
|
481
481
|
* @returns
|
|
482
482
|
*/
|
|
483
|
-
transformToOrderedSelect(entries: any, select: any, sort: any, context: any, transformToRecord: any): any;
|
|
483
|
+
transformToOrderedSelect(entries: any, select: any, sort: any, context: any, read_txn: any, transformToRecord: any): any;
|
|
484
484
|
/**
|
|
485
485
|
* This is responsible for select()ing the attributes/properties from returned entries
|
|
486
486
|
* @param select
|
|
@@ -490,7 +490,7 @@ export declare function makeTable(options: any): {
|
|
|
490
490
|
* @param can_skip
|
|
491
491
|
* @returns
|
|
492
492
|
*/
|
|
493
|
-
transformEntryForSelect(select: any, context: any, filtered: any, ensure_loaded?: any, can_skip?: any): (entry: any) => any;
|
|
493
|
+
transformEntryForSelect(select: any, context: any, read_txn: any, filtered: any, ensure_loaded?: any, can_skip?: any): (entry: any) => any;
|
|
494
494
|
addAttributes(attributes_to_add: any): Promise<any>;
|
|
495
495
|
removeAttributes(names: string[]): Promise<any>;
|
|
496
496
|
getRecordCount(options: any): {
|
package/resources/databases.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ interface TableDefinition {
|
|
|
39
39
|
eviction?: number;
|
|
40
40
|
scanInterval?: number;
|
|
41
41
|
audit?: boolean;
|
|
42
|
+
sealed?: boolean;
|
|
42
43
|
trackDeletes?: boolean;
|
|
43
44
|
attributes: any[];
|
|
44
45
|
schemaDefined?: boolean;
|
|
@@ -68,8 +69,9 @@ export declare function dropDatabase(database_name: any): Promise<void>;
|
|
|
68
69
|
* @param scanInterval
|
|
69
70
|
* @param attributes
|
|
70
71
|
* @param audit
|
|
72
|
+
* @param sealed
|
|
71
73
|
*/
|
|
72
|
-
export declare function table({ table: table_name, database: database_name, expiration, eviction, scanInterval: scan_interval, attributes, audit, trackDeletes: track_deletes, schemaDefined: schema_defined, origin, }: TableDefinition): {
|
|
74
|
+
export declare function table({ table: table_name, database: database_name, expiration, eviction, scanInterval: scan_interval, attributes, audit, sealed, trackDeletes: track_deletes, schemaDefined: schema_defined, origin, }: TableDefinition): {
|
|
73
75
|
new (identifier: import("./ResourceInterface").Id, source: any): {
|
|
74
76
|
ensureLoaded(): any;
|
|
75
77
|
get(query?: string | import("./ResourceInterface").Query): void | object | Promise<void | object>;
|
|
@@ -320,8 +322,8 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
320
322
|
dropTable(): Promise<void>;
|
|
321
323
|
evict(id: any, existing_record: any, existing_version: any): any;
|
|
322
324
|
operation(operation: any, context: any): any;
|
|
323
|
-
transformToOrderedSelect(entries: any, select: any, sort: any, context: any, transformToRecord: any): any;
|
|
324
|
-
transformEntryForSelect(select: any, context: any, filtered: any, ensure_loaded?: any, can_skip?: any): (entry: any) => any;
|
|
325
|
+
transformToOrderedSelect(entries: any, select: any, sort: any, context: any, read_txn: any, transformToRecord: any): any;
|
|
326
|
+
transformEntryForSelect(select: any, context: any, read_txn: any, filtered: any, ensure_loaded?: any, can_skip?: any): (entry: any) => any;
|
|
325
327
|
addAttributes(attributes_to_add: any): Promise<any>;
|
|
326
328
|
removeAttributes(names: string[]): Promise<any>;
|
|
327
329
|
getRecordCount(options: any): {
|
package/resources/search.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare const COERCIBLE_OPERATORS: {
|
|
|
6
6
|
ne: boolean;
|
|
7
7
|
eq: boolean;
|
|
8
8
|
};
|
|
9
|
+
export declare function executeConditions(conditions: any, operator: any, table: any, txn: any, request: any, context: any, transformToEntries: any, filtered: any): any;
|
|
9
10
|
export declare function searchByIndex(search_condition: any, transaction: any, reverse: any, Table: any, allow_full_scan?: any, filtered?: any): any;
|
|
10
11
|
export declare function findAttribute(attributes: any, attribute_name: any): any;
|
|
11
12
|
/**
|