datafolder 1.0.38 → 1.0.39

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 CHANGED
@@ -1,3 +1,5 @@
1
+ 1.0.39 Improve batch performance.
2
+
1
3
  1.0.38 Reduce temp memory usage.
2
4
 
3
5
  1.0.37 Add more type decorations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datafolder",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "author": {
5
5
  "name": "lysh",
6
6
  "email": "datafolderdev@outlook.com"
package/src/QyAcl.d.ts CHANGED
@@ -9,7 +9,7 @@ export declare class QyAclCmdGenerator {
9
9
  cmdCount: number;
10
10
  batchSize: number;
11
11
  cmdArgAsMapArray: any[];
12
- cmdArgAsListArray: any[];
12
+ _cmdArgAsListArray: any[];
13
13
  pushCmd(cmdName: number, cmdHashKey: string, cmdArg?: any, value?: any): void;
14
14
  pushCmdArgAsListArray(cmdArgAsListArray: any): this;
15
15
  takeCmdArgAsListArray(): any[];
package/src/QyAcl.js CHANGED
@@ -81,7 +81,7 @@ class v {
81
81
  cmdCount = 0;
82
82
  batchSize = 0;
83
83
  cmdArgAsMapArray = [];
84
- cmdArgAsListArray = [];
84
+ _cmdArgAsListArray = [];
85
85
  pushCmd(r, t, e = void 0, a = void 0) {
86
86
  switch (++this.cmdCount, r) {
87
87
  case 0:
@@ -147,7 +147,7 @@ class v {
147
147
  takeCmdArgAsListArray() {
148
148
  var {
149
149
  cmdArgAsMapArray: r,
150
- cmdArgAsListArray: t
150
+ _cmdArgAsListArray: t
151
151
  } = this, [ e, a, i, n ] = r;
152
152
  if (r.length = 0, this.cmdCount = 0, this.batchSize = 0, t.length = 0, n && 0 < n.length && (t[3] = n),
153
153
  i) {
package/src/QyBatch.d.ts CHANGED
@@ -4,58 +4,59 @@ export declare class QyBatch extends QyCD {
4
4
  fileLogLevel: any;
5
5
  changeId: any;
6
6
  actionQueue: any[];
7
- changeList: any[];
7
+ fileDeltaList: any[];
8
8
  syncList: any[];
9
+ logList: any[];
9
10
  qyCmdObjHistory: any;
10
11
  running: any;
11
12
  options: any;
12
13
  qyAclCmdGenerator: QyAclCmdGenerator;
13
14
  constructor(qyCache?: any, options?: any);
14
- createDir(namePath: any, parentDir?: any): QyBatch;
15
- delDir(namePath: any, parentDir?: any): QyBatch;
16
- createFile(namePath: any, parentDir?: any): QyBatch;
17
- delFile(namePath: any, parentDir?: any): QyBatch;
18
- expireFile(namePath: any, expireSecond: number, parentDir?: any): QyBatch;
19
- expireFileM(namePath: any, milliSecond: number, parentDir?: any): QyBatch;
20
- expireDir(namePath: any, expireSecond: number, parentDir?: any): QyBatch;
21
- expireDirM(namePath: any, milliSecond: number, parentDir?: any): QyBatch;
22
- expireContent(namePath: any, expireInfoObj: any, isMilliSecond: any, parentDir?: any): QyBatch;
23
- expireContentM(namePath: any, expireInfoObj: any, parentDir?: any): QyBatch;
24
- removeFileExpire(namePath: any, infoFileOnly?: any, parentDir?: any): QyBatch;
25
- removeDirExpire(namePath: any, infoFileOnly?: any, parentDir?: any): QyBatch;
26
- removeContentExpire(namePath: any, expireInfoObj: any, infoFileOnly?: any, parentDir?: any): QyBatch;
27
- createIndex(indexHostDirNamePath: any, indexPropPathList: any, parentDir?: any): QyBatch;
28
- createIndexFromQuery(indexHostDirNamePath: any, queryObj: any, parentDir?: any): QyBatch;
29
- delIndex(indexHostDirNamePath: any, indexPropPath: any, parentDir?: any): QyBatch;
30
- insert(namePath: any, content: any, noClone?: boolean, noCreate?: boolean, parentDir?: any): QyBatch;
31
- insertEmbedding(namePath: any, embedding: any, parentDir?: any): QyBatch;
32
- delEmbedding(namePath: any, parentDir?: any): QyBatch;
33
- insertWithEmbedding(namePath: any, content: any, embedding: any, noClone?: boolean, noCreate?: boolean, parentDir?: any): QyBatch;
34
- delContent(namePath: any, parentDir?: any): QyBatch;
15
+ createDir(namePath: any): QyBatch;
16
+ delDir(namePath: any): QyBatch;
17
+ createFile(namePath: any): QyBatch;
18
+ delFile(namePath: any): QyBatch;
19
+ expireFile(namePath: any, expireSecond: number): QyBatch;
20
+ expireFileM(namePath: any, milliSecond: number): QyBatch;
21
+ expireDir(namePath: any, expireSecond: number): QyBatch;
22
+ expireDirM(namePath: any, milliSecond: number): QyBatch;
23
+ expireContent(namePath: any, expireInfoObj: any, isMilliSecond: any): QyBatch;
24
+ expireContentM(namePath: any, expireInfoObj: any): QyBatch;
25
+ removeFileExpire(namePath: any, infoFileOnly?: any): QyBatch;
26
+ removeDirExpire(namePath: any, infoFileOnly?: any): QyBatch;
27
+ removeContentExpire(namePath: any, expireInfoObj: any, infoFileOnly?: any): QyBatch;
28
+ createIndex(indexHostDirNamePath: any, indexPropPathList: any): QyBatch;
29
+ createIndexByQuery(indexHostDirNamePath: any, queryObj: any): QyBatch;
30
+ delIndex(indexHostDirNamePath: any, indexPropPath: any): QyBatch;
31
+ insert(namePath: any, content: any): QyBatch;
32
+ insertEmbedding(namePath: any, embedding: any): QyBatch;
33
+ delEmbedding(namePath: any): QyBatch;
34
+ insertWithEmbedding(namePath: any, content: any, embedding: any): QyBatch;
35
+ delContent(namePath: any): QyBatch;
35
36
  insertTrigger(triggerName: any, fileNamePath: any, propNamePathList: any, modCode: any): QyBatch;
36
37
  removeTrigger(triggerName: any): QyBatch;
37
38
  insertRpc(rpcFunName: any, modCode: any): QyBatch;
38
39
  removeRpc(rpcFunName: any): QyBatch;
39
40
  run(needPromise?: boolean): any;
40
41
  getTopHistoryCmdObj(): any;
41
- _action_insertTrigger(action: any): boolean;
42
- _action_removeTrigger(action: any): boolean;
43
- _action_insertRpc(action: any): boolean;
44
- _action_removeRpc(action: any): boolean;
45
- _action_createIndex(action: any): void;
46
- _action_delIndex(action: any): void;
47
- _action_delFile(action: any, deletingParentDir?: boolean): boolean;
48
- _action_delDir(action: any): boolean;
49
- _action_delContent(action: any): boolean;
50
- _action_insertEmbedding(action: any): boolean;
51
- _action_delEmbedding(action: any): true | undefined;
52
- _action_put(action: any): boolean;
42
+ _action_insertTrigger(file: any, fileNamePath: any, propNamePathList: any, modCode: any): boolean;
43
+ _action_removeTrigger(file: any): boolean;
44
+ _action_insertRpc(file: any, modCode: any): boolean;
45
+ _action_removeRpc(file: any): boolean;
46
+ _action_createIndex(indexHostDir: any, indexPropPathList: any): void;
47
+ _action_createIndexByQuery(indexHostDir: any, queryObj: any): void;
48
+ _action_delIndex(indexHostDir: any, indexPropPath: any): void;
49
+ _action_delFile(file: any, deletingParentDir?: boolean): boolean;
50
+ _action_delDir(dir: any): boolean;
51
+ _action_delContent(file: any): boolean;
52
+ _action_insertEmbedding(srcFile: any, embedding: any): boolean;
53
+ _action_delEmbedding(srcFile: any): true | undefined;
53
54
  _action_setProp(file: any, propName: any, value: any): any;
54
- _action_insert(action: any): boolean;
55
- _action_createFile(action: any): boolean;
56
- _action_createDir(action: any): boolean;
57
- _action_expireItem(action: any): boolean;
58
- _action_removeItemExpire(action: any): boolean;
59
- _action_expireContent(action: any): boolean;
60
- _action_removeContentExpire(action: any): boolean;
55
+ _action_insert(file: any, content: any): boolean;
56
+ _action_createFile(file: any): boolean;
57
+ _action_createDir(dir: any): boolean;
58
+ _action_expireItem(item: any, milliSecond: any): boolean;
59
+ _action_removeItemExpire(item: any, infoFileOnly: any): boolean;
60
+ _action_expireContent(file: any, expireInfoObj: any, isMilliSecond: any): boolean;
61
+ _action_removeContentExpire(file: any, expireInfoObj: any, infoFileOnly: any): boolean;
61
62
  }