@ultipa-graph/ultipa-driver 5.1.4-s5.1 → 6.0.0

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.
Files changed (215) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/dist/client.d.ts +194 -0
  4. package/dist/client.js +390 -0
  5. package/dist/config.d.ts +65 -0
  6. package/dist/config.js +135 -0
  7. package/dist/connection.d.ts +30 -0
  8. package/dist/connection.js +190 -0
  9. package/dist/errors.d.ts +99 -0
  10. package/dist/errors.js +237 -0
  11. package/dist/index.d.ts +14 -5
  12. package/dist/index.js +88 -39
  13. package/dist/printers.d.ts +33 -0
  14. package/dist/printers.js +312 -0
  15. package/dist/proto/gqldb.proto +632 -0
  16. package/dist/response.d.ts +256 -0
  17. package/dist/response.js +723 -0
  18. package/dist/services/admin-service.d.ts +40 -0
  19. package/dist/services/admin-service.js +115 -0
  20. package/dist/services/bulk-import-service.d.ts +35 -0
  21. package/dist/services/bulk-import-service.js +108 -0
  22. package/dist/services/converters.d.ts +57 -0
  23. package/dist/services/converters.js +254 -0
  24. package/dist/services/data-service.d.ts +44 -0
  25. package/dist/services/data-service.js +206 -0
  26. package/dist/services/graph-service.d.ts +32 -0
  27. package/dist/services/graph-service.js +127 -0
  28. package/dist/services/health-service.d.ts +50 -0
  29. package/dist/services/health-service.js +78 -0
  30. package/dist/services/index.d.ts +13 -0
  31. package/dist/services/index.js +30 -0
  32. package/dist/services/query-service.d.ts +39 -0
  33. package/dist/services/query-service.js +112 -0
  34. package/dist/services/service-context.d.ts +39 -0
  35. package/dist/services/service-context.js +73 -0
  36. package/dist/services/session-service.d.ts +24 -0
  37. package/dist/services/session-service.js +66 -0
  38. package/dist/services/transaction-service.d.ts +33 -0
  39. package/dist/services/transaction-service.js +100 -0
  40. package/dist/services.d.ts +28 -0
  41. package/dist/services.js +122 -0
  42. package/dist/session.d.ts +45 -0
  43. package/dist/session.js +75 -0
  44. package/dist/transaction.d.ts +42 -0
  45. package/dist/transaction.js +89 -0
  46. package/dist/types/bulk_import.d.ts +53 -0
  47. package/dist/types/bulk_import.js +6 -0
  48. package/dist/types/data_types.d.ts +116 -0
  49. package/dist/types/data_types.js +122 -0
  50. package/dist/types/enums.d.ts +59 -0
  51. package/dist/types/enums.js +67 -0
  52. package/dist/types/graph_models.d.ts +54 -0
  53. package/dist/types/graph_models.js +6 -0
  54. package/dist/types/index.d.ts +11 -5
  55. package/dist/types/index.js +36 -37
  56. package/dist/types/metadata.d.ts +60 -0
  57. package/dist/types/metadata.js +6 -0
  58. package/dist/types/schema.d.ts +31 -0
  59. package/dist/types/schema.js +6 -0
  60. package/dist/types/typed_value.d.ts +25 -0
  61. package/dist/types/typed_value.js +1176 -0
  62. package/dist/types/wrappers.d.ts +23 -0
  63. package/dist/types/wrappers.js +39 -0
  64. package/dist/types.d.ts +7 -0
  65. package/dist/types.js +24 -0
  66. package/package.json +40 -53
  67. package/dist/connection/connection.final.d.ts +0 -14
  68. package/dist/connection/connection.final.js +0 -96
  69. package/dist/connection/connection.final.js.map +0 -1
  70. package/dist/connection/connection.pool.d.ts +0 -21
  71. package/dist/connection/connection.pool.js +0 -103
  72. package/dist/connection/connection.pool.js.map +0 -1
  73. package/dist/connection/extra/base.extra.d.ts +0 -18
  74. package/dist/connection/extra/base.extra.js +0 -111
  75. package/dist/connection/extra/base.extra.js.map +0 -1
  76. package/dist/connection/extra/batch.insert.extra.d.ts +0 -58
  77. package/dist/connection/extra/batch.insert.extra.js +0 -353
  78. package/dist/connection/extra/batch.insert.extra.js.map +0 -1
  79. package/dist/connection/extra/connection.base.d.ts +0 -112
  80. package/dist/connection/extra/connection.base.js +0 -528
  81. package/dist/connection/extra/connection.base.js.map +0 -1
  82. package/dist/connection/extra/connection.d.ts +0 -17
  83. package/dist/connection/extra/connection.js +0 -44
  84. package/dist/connection/extra/connection.js.map +0 -1
  85. package/dist/connection/extra/graph.extra.d.ts +0 -54
  86. package/dist/connection/extra/graph.extra.js +0 -151
  87. package/dist/connection/extra/graph.extra.js.map +0 -1
  88. package/dist/connection/extra/hdc.extra.d.ts +0 -89
  89. package/dist/connection/extra/hdc.extra.js +0 -322
  90. package/dist/connection/extra/hdc.extra.js.map +0 -1
  91. package/dist/connection/extra/index.extra.d.ts +0 -102
  92. package/dist/connection/extra/index.extra.js +0 -210
  93. package/dist/connection/extra/index.extra.js.map +0 -1
  94. package/dist/connection/extra/job.extra.d.ts +0 -32
  95. package/dist/connection/extra/job.extra.js +0 -122
  96. package/dist/connection/extra/job.extra.js.map +0 -1
  97. package/dist/connection/extra/policy.extra.d.ts +0 -32
  98. package/dist/connection/extra/policy.extra.js +0 -114
  99. package/dist/connection/extra/policy.extra.js.map +0 -1
  100. package/dist/connection/extra/privilege.extra.d.ts +0 -8
  101. package/dist/connection/extra/privilege.extra.js +0 -20
  102. package/dist/connection/extra/privilege.extra.js.map +0 -1
  103. package/dist/connection/extra/property.extra.d.ts +0 -66
  104. package/dist/connection/extra/property.extra.js +0 -190
  105. package/dist/connection/extra/property.extra.js.map +0 -1
  106. package/dist/connection/extra/schema.extra.d.ts +0 -108
  107. package/dist/connection/extra/schema.extra.js +0 -253
  108. package/dist/connection/extra/schema.extra.js.map +0 -1
  109. package/dist/connection/extra/user.extra.d.ts +0 -28
  110. package/dist/connection/extra/user.extra.js +0 -91
  111. package/dist/connection/extra/user.extra.js.map +0 -1
  112. package/dist/connection/index.d.ts +0 -5
  113. package/dist/connection/index.js +0 -13
  114. package/dist/connection/index.js.map +0 -1
  115. package/dist/connection/network.manager.d.ts +0 -28
  116. package/dist/connection/network.manager.js +0 -179
  117. package/dist/connection/network.manager.js.map +0 -1
  118. package/dist/index.js.map +0 -1
  119. package/dist/printers/alias.d.ts +0 -2
  120. package/dist/printers/alias.js +0 -39
  121. package/dist/printers/alias.js.map +0 -1
  122. package/dist/printers/any.d.ts +0 -2
  123. package/dist/printers/any.js +0 -63
  124. package/dist/printers/any.js.map +0 -1
  125. package/dist/printers/array.aio.d.ts +0 -3
  126. package/dist/printers/array.aio.js +0 -259
  127. package/dist/printers/array.aio.js.map +0 -1
  128. package/dist/printers/edge.d.ts +0 -5
  129. package/dist/printers/edge.js +0 -78
  130. package/dist/printers/edge.js.map +0 -1
  131. package/dist/printers/explain.plan.d.ts +0 -2
  132. package/dist/printers/explain.plan.js +0 -46
  133. package/dist/printers/explain.plan.js.map +0 -1
  134. package/dist/printers/index.d.ts +0 -24
  135. package/dist/printers/index.js +0 -43
  136. package/dist/printers/index.js.map +0 -1
  137. package/dist/printers/node.d.ts +0 -5
  138. package/dist/printers/node.js +0 -77
  139. package/dist/printers/node.js.map +0 -1
  140. package/dist/printers/path.d.ts +0 -3
  141. package/dist/printers/path.js +0 -62
  142. package/dist/printers/path.js.map +0 -1
  143. package/dist/printers/status.d.ts +0 -3
  144. package/dist/printers/status.js +0 -68
  145. package/dist/printers/status.js.map +0 -1
  146. package/dist/printers/table.d.ts +0 -2
  147. package/dist/printers/table.js +0 -56
  148. package/dist/printers/table.js.map +0 -1
  149. package/dist/proto/tmp.js +0 -366
  150. package/dist/proto/ultipa_grpc_pb.d.ts +0 -258
  151. package/dist/proto/ultipa_grpc_pb.js +0 -366
  152. package/dist/proto/ultipa_grpc_pb.js.map +0 -1
  153. package/dist/proto/ultipa_pb.d.ts +0 -1
  154. package/dist/proto/ultipa_pb.js +0 -11002
  155. package/dist/proto/ultipa_pb.js.map +0 -1
  156. package/dist/types/index.js.map +0 -1
  157. package/dist/types/types.algos.params.d.ts +0 -545
  158. package/dist/types/types.algos.params.js +0 -16
  159. package/dist/types/types.algos.params.js.map +0 -1
  160. package/dist/types/types.d.ts +0 -1204
  161. package/dist/types/types.extra.d.ts +0 -146
  162. package/dist/types/types.extra.js +0 -27
  163. package/dist/types/types.extra.js.map +0 -1
  164. package/dist/types/types.js +0 -1596
  165. package/dist/types/types.js.map +0 -1
  166. package/dist/types/util.d.ts +0 -15
  167. package/dist/types/util.js +0 -136
  168. package/dist/types/util.js.map +0 -1
  169. package/dist/utils/common.d.ts +0 -3
  170. package/dist/utils/common.js +0 -22
  171. package/dist/utils/common.js.map +0 -1
  172. package/dist/utils/format.d.ts +0 -45
  173. package/dist/utils/format.js +0 -877
  174. package/dist/utils/format.js.map +0 -1
  175. package/dist/utils/index.d.ts +0 -10
  176. package/dist/utils/index.js +0 -30
  177. package/dist/utils/index.js.map +0 -1
  178. package/dist/utils/property.d.ts +0 -18
  179. package/dist/utils/property.js +0 -153
  180. package/dist/utils/property.js.map +0 -1
  181. package/dist/utils/serialize/commont.d.ts +0 -12
  182. package/dist/utils/serialize/commont.js +0 -46
  183. package/dist/utils/serialize/commont.js.map +0 -1
  184. package/dist/utils/serialize/deserialize.d.ts +0 -9
  185. package/dist/utils/serialize/deserialize.js +0 -166
  186. package/dist/utils/serialize/deserialize.js.map +0 -1
  187. package/dist/utils/serialize/null.d.ts +0 -25
  188. package/dist/utils/serialize/null.js +0 -136
  189. package/dist/utils/serialize/null.js.map +0 -1
  190. package/dist/utils/serialize/serialize.d.ts +0 -10
  191. package/dist/utils/serialize/serialize.js +0 -144
  192. package/dist/utils/serialize/serialize.js.map +0 -1
  193. package/dist/utils/stream.helper.d.ts +0 -10
  194. package/dist/utils/stream.helper.js +0 -71
  195. package/dist/utils/stream.helper.js.map +0 -1
  196. package/dist/utils/time.record.d.ts +0 -15
  197. package/dist/utils/time.record.js +0 -52
  198. package/dist/utils/time.record.js.map +0 -1
  199. package/dist/utils/ultipa.datetime.d.ts +0 -14
  200. package/dist/utils/ultipa.datetime.js +0 -160
  201. package/dist/utils/ultipa.datetime.js.map +0 -1
  202. package/dist/utils/uql-maker.d.ts +0 -165
  203. package/dist/utils/uql-maker.js +0 -402
  204. package/dist/utils/uql-maker.js.map +0 -1
  205. package/dist/utils/uql.parse.d.ts +0 -27
  206. package/dist/utils/uql.parse.js +0 -205
  207. package/dist/utils/uql.parse.js.map +0 -1
  208. package/readme.md +0 -65
  209. package/src/proto/build.sh +0 -41
  210. package/src/proto/build_windows.sh +0 -40
  211. package/src/proto/ultipa.proto +0 -492
  212. package/src/proto/ultipa_grpc_pb.d.ts +0 -92
  213. package/src/proto/ultipa_grpc_pb.js +0 -414
  214. package/src/proto/ultipa_pb.d.ts +0 -1806
  215. package/src/proto/ultipa_pb.js +0 -13499
@@ -1,102 +0,0 @@
1
- import { ConnectionBase } from "./connection.base";
2
- import { RequestConfig, Index, Response, DBType, JobResponse } from "../../types/types";
3
- export declare class IndexExtra extends ConnectionBase {
4
- /**
5
- * Retrieves all indexes from the current graphset.
6
- */
7
- showIndex(config?: RequestConfig): Promise<Index[]>;
8
- /**
9
- * Show node or edge index
10
- */
11
- private showNodeOrEdgeIndex;
12
- /**
13
- * List all node indexes
14
- */
15
- showNodeIndex(config?: RequestConfig): Promise<Index[]>;
16
- /**
17
- * List all edge indexes
18
- */
19
- showEdgeIndex(config?: RequestConfig): Promise<Index[]>;
20
- /**
21
- * Drop indexes in the current graphset.
22
- */
23
- dropIndex(dbType: DBType, indexName: string, config?: RequestConfig): Promise<Response>;
24
- /**
25
- * Drop node indexes in the current graphset.
26
- * @param indexName
27
- * @param config
28
- * @returns
29
- */
30
- dropNodeIndex(indexName: string, config?: RequestConfig): Promise<Response>;
31
- /**
32
- * Drop edge indexes in the current graphset.
33
- * @param indexName
34
- * @param config
35
- * @returns
36
- */
37
- dropEdgeIndex(indexName: string, config?: RequestConfig): Promise<Response>;
38
- /**
39
- * Create a new index in the current graphset.
40
- */
41
- createIndex(dbType: DBType, source: string, indexName: string, config?: RequestConfig): Promise<JobResponse>;
42
- /**
43
- * Create a new node index in the current graphset.
44
- * @param source
45
- * @param indexName
46
- * @param config
47
- * @returns
48
- */
49
- createNodeIndex(source: string, indexName: string, config?: RequestConfig): Promise<JobResponse>;
50
- /**
51
- * Create a new edge index in the current graphset.
52
- * @param source
53
- * @param indexName
54
- * @param config
55
- * @returns
56
- */
57
- createEdgeIndex(source: string, indexName: string, config?: RequestConfig): Promise<JobResponse>;
58
- /**
59
- * Show fulltext
60
- */
61
- private showFulltextBase;
62
- /**
63
- * Show all fulltext
64
- */
65
- showFulltext(config?: RequestConfig): Promise<Index[]>;
66
- /**
67
- * Show node fulltext
68
- * @param config
69
- */
70
- showNodeFulltext(config?: RequestConfig): Promise<Index[]>;
71
- /**
72
- * Show edge fulltext
73
- * @param config
74
- */
75
- showEdgeFulltext(config?: RequestConfig): Promise<Index[]>;
76
- /**
77
- * Create a new fulltext index in the current graphset.
78
- */
79
- createFulltext(dbType: DBType, schemaName: string, propertyName: string, indexName: string, config?: RequestConfig): Promise<JobResponse>;
80
- /**
81
- * Retrieves all fulltext indexes of node properties from the current graphset.
82
- * @param schemaName
83
- * @param propertyName
84
- * @param indexName
85
- * @param config
86
- * @returns
87
- */
88
- createNodeFulltext(schemaName: string, propertyName: string, indexName: string, config?: RequestConfig): Promise<JobResponse>;
89
- /**
90
- * Retrieves all fulltext indexes of edge properties from the current graphset.
91
- * @param schemaName
92
- * @param propertyName
93
- * @param indexName
94
- * @param config
95
- * @returns
96
- */
97
- createEdgeFulltext(schemaName: string, propertyName: string, indexName: string, config?: RequestConfig): Promise<JobResponse>;
98
- /**
99
- * Drop a fulltext index in the current graphset.
100
- */
101
- dropFulltext(dbType: DBType, fulltextName: string, config?: RequestConfig): Promise<Response>;
102
- }
@@ -1,210 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IndexExtra = void 0;
4
- const connection_base_1 = require("./connection.base");
5
- const utils_1 = require("../../utils");
6
- const types_1 = require("../../types/types");
7
- const types_extra_1 = require("../../types/types.extra");
8
- const { CommandList, SchemaStringWithDefault } = utils_1.UQLMAKER;
9
- class IndexExtra extends connection_base_1.ConnectionBase {
10
- /**
11
- * Retrieves all indexes from the current graphset.
12
- */
13
- async showIndex(config) {
14
- let command = CommandList.showIndex;
15
- let uqlMaker = new utils_1.UQLMAKER(command, config);
16
- let res = await this.uql(uqlMaker.toString(), config);
17
- let node_index = res.items[types_extra_1.ResponseTableName.NODE_INDEX].asIndexes();
18
- let edge_index = res.items[types_extra_1.ResponseTableName.EDGE_INDEX].asIndexes();
19
- return [...node_index, ...edge_index];
20
- }
21
- /**
22
- * Show node or edge index
23
- */
24
- async showNodeOrEdgeIndex(dbType, config) {
25
- let command = dbType === types_1.DBType.DBNODE
26
- ? CommandList.showNodeIndex
27
- : CommandList.showEdgeIndex;
28
- let uqlMaker = new utils_1.UQLMAKER(command, config);
29
- let res = this.uql(uqlMaker.toString(), config);
30
- return res;
31
- }
32
- /**
33
- * List all node indexes
34
- */
35
- async showNodeIndex(config) {
36
- let command = CommandList.showNodeIndex;
37
- let uqlMaker = new utils_1.UQLMAKER(command, config);
38
- let res = await this.uql(uqlMaker.toString(), config);
39
- let node_index = res.items[types_extra_1.ResponseTableName.NODE_INDEX].asIndexes();
40
- // let edge_index = res.items.get(ResponseTableName.EDGE_INDEX).asIndexes();
41
- return [...node_index];
42
- }
43
- /**
44
- * List all edge indexes
45
- */
46
- async showEdgeIndex(config) {
47
- let command = CommandList.showEdgeIndex;
48
- let uqlMaker = new utils_1.UQLMAKER(command, config);
49
- let res = await this.uql(uqlMaker.toString(), config);
50
- // let node_index = res.items.get(ResponseTableName.NODE_INDEX).asIndexes();
51
- let edge_index = res.items[types_extra_1.ResponseTableName.EDGE_INDEX].asIndexes();
52
- return [...edge_index];
53
- }
54
- /**
55
- * Drop indexes in the current graphset.
56
- */
57
- async dropIndex(dbType, indexName, config) {
58
- let command = dbType === types_1.DBType.DBNODE
59
- ? CommandList.dropNodeIndex
60
- : CommandList.dropEdgeIndex;
61
- let uqlMaker = new utils_1.UQLMAKER(command, config, indexName);
62
- let res = await this.uql(uqlMaker.toString(), config);
63
- return res;
64
- }
65
- /**
66
- * Drop node indexes in the current graphset.
67
- * @param indexName
68
- * @param config
69
- * @returns
70
- */
71
- async dropNodeIndex(indexName, config) {
72
- return this.dropIndex(types_1.DBType.DBNODE, indexName, config);
73
- }
74
- /**
75
- * Drop edge indexes in the current graphset.
76
- * @param indexName
77
- * @param config
78
- * @returns
79
- */
80
- async dropEdgeIndex(indexName, config) {
81
- return this.dropIndex(types_1.DBType.DBEDGE, indexName, config);
82
- }
83
- /**
84
- * Create a new index in the current graphset.
85
- */
86
- async createIndex(
87
- // req: RequestType.CreateIndex,
88
- dbType, source, indexName, config) {
89
- let command = dbType === types_1.DBType.DBNODE
90
- ? CommandList.createNodeIndex
91
- : CommandList.createEdgeIndex;
92
- let uqlMaker = new utils_1.UQLMAKER(command, config, [source, indexName]);
93
- let res = await this.uql(uqlMaker.toString(), config);
94
- return {
95
- statisics: res.statistics,
96
- status: res.status,
97
- jobId: res.items[types_extra_1.ResponseTableName.JOB_RESULT].asTable().toKV().pop().new_job_id
98
- };
99
- }
100
- /**
101
- * Create a new node index in the current graphset.
102
- * @param source
103
- * @param indexName
104
- * @param config
105
- * @returns
106
- */
107
- async createNodeIndex(source, indexName, config) {
108
- return this.createIndex(types_1.DBType.DBNODE, source, indexName, config);
109
- }
110
- /**
111
- * Create a new edge index in the current graphset.
112
- * @param source
113
- * @param indexName
114
- * @param config
115
- * @returns
116
- */
117
- async createEdgeIndex(source, indexName, config) {
118
- let command = CommandList.createEdgeIndex;
119
- let commandParams = [source, indexName];
120
- let uqlMaker = new utils_1.UQLMAKER(command, config, commandParams);
121
- return this.uqlJobResponse(uqlMaker, config);
122
- }
123
- /**
124
- * Show fulltext
125
- */
126
- async showFulltextBase(dbType, config) {
127
- let command = CommandList.showFulltext;
128
- if (dbType === types_1.DBType.DBNODE) {
129
- command = CommandList.showNodeFulltext;
130
- }
131
- else if (dbType === types_1.DBType.DBEDGE) {
132
- command = CommandList.showEdgeFulltext;
133
- }
134
- let uqlMaker = new utils_1.UQLMAKER(command, config);
135
- let res = await this.uql(uqlMaker.toString(), config);
136
- let node_fulltext = res.aliases.find(a => a.name === types_extra_1.ResponseTableName.NODE_FULLTEXT) ? res.items[types_extra_1.ResponseTableName.NODE_FULLTEXT].asIndexes() : [];
137
- let edge_fulltext = res.aliases.find(a => a.name === types_extra_1.ResponseTableName.EDGE_FULLTEXT) ? res.items[types_extra_1.ResponseTableName.EDGE_FULLTEXT].asIndexes() : [];
138
- let fulltexts = [...node_fulltext, ...edge_fulltext];
139
- return fulltexts;
140
- }
141
- /**
142
- * Show all fulltext
143
- */
144
- async showFulltext(config) {
145
- return this.showFulltextBase(null, config);
146
- }
147
- /**
148
- * Show node fulltext
149
- * @param config
150
- */
151
- async showNodeFulltext(config) {
152
- return this.showFulltextBase(types_1.DBType.DBNODE, config);
153
- }
154
- /**
155
- * Show edge fulltext
156
- * @param config
157
- */
158
- async showEdgeFulltext(config) {
159
- return this.showFulltextBase(types_1.DBType.DBEDGE, config);
160
- }
161
- /**
162
- * Create a new fulltext index in the current graphset.
163
- */
164
- async createFulltext(dbType, schemaName, propertyName, indexName, config) {
165
- let command = dbType === types_1.DBType.DBNODE
166
- ? CommandList.createNodeFulltext
167
- : CommandList.createEdgeFulltext;
168
- let uqlMaker = new utils_1.UQLMAKER(command, config, [SchemaStringWithDefault(schemaName, propertyName), indexName,]);
169
- let res = await this.uql(uqlMaker.toString(), config);
170
- return {
171
- statisics: res.statistics,
172
- status: res.status,
173
- jobId: res.items[types_extra_1.ResponseTableName.JOB_RESULT].asTable().toKV().pop().new_job_id
174
- };
175
- }
176
- /**
177
- * Retrieves all fulltext indexes of node properties from the current graphset.
178
- * @param schemaName
179
- * @param propertyName
180
- * @param indexName
181
- * @param config
182
- * @returns
183
- */
184
- async createNodeFulltext(schemaName, propertyName, indexName, config) {
185
- return this.createFulltext(types_1.DBType.DBNODE, schemaName, propertyName, indexName, config);
186
- }
187
- /**
188
- * Retrieves all fulltext indexes of edge properties from the current graphset.
189
- * @param schemaName
190
- * @param propertyName
191
- * @param indexName
192
- * @param config
193
- * @returns
194
- */
195
- async createEdgeFulltext(schemaName, propertyName, indexName, config) {
196
- return this.createFulltext(types_1.DBType.DBEDGE, schemaName, propertyName, indexName, config);
197
- }
198
- /**
199
- * Drop a fulltext index in the current graphset.
200
- */
201
- async dropFulltext(dbType, fulltextName, config) {
202
- let command = dbType === types_1.DBType.DBNODE
203
- ? CommandList.dropNodeFulltext
204
- : CommandList.dropEdgeFulltext;
205
- let uqlMaker = new utils_1.UQLMAKER(command, config, fulltextName);
206
- return this.uql(uqlMaker.toString(), config);
207
- }
208
- }
209
- exports.IndexExtra = IndexExtra;
210
- //# sourceMappingURL=index.extra.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.extra.js","sourceRoot":"","sources":["../../../src/connection/extra/index.extra.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,uCAAuC;AACvC,6CAAuF;AAEvF,yDAA4D;AAE5D,MAAM,EAAE,WAAW,EAAE,uBAAuB,EAAE,GAAG,gBAAQ,CAAC;AAE1D,MAAa,UAAW,SAAQ,gCAAc;IAC1C;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,MAAsB;QAClC,IAAI,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC;QACpC,IAAI,QAAQ,GAAG,IAAI,gBAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7C,IAAI,GAAG,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;QACtD,IAAI,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,+BAAiB,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,CAAC;QACrE,IAAI,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,+BAAiB,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,CAAC;QACrE,OAAO,CAAC,GAAG,UAAU,EAAE,GAAG,UAAU,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,mBAAmB,CAAC,MAAc,EAAE,MAAsB;QACpE,IAAI,OAAO,GAAG,MAAM,KAAK,cAAM,CAAC,MAAM;YAClC,CAAC,CAAC,WAAW,CAAC,aAAa;YAC3B,CAAC,C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AI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;CACJ;AA7PD,gCA6PC"}
@@ -1,32 +0,0 @@
1
- import { ConnectionBase } from "./connection.base";
2
- import { Job, Process, RequestConfig, Response } from "../../types/types";
3
- export declare class JobExra extends ConnectionBase {
4
- /**
5
- * Show all job,if have id,return job
6
- */
7
- showJob(id?: string, config?: RequestConfig): Promise<Job[]>;
8
- /**
9
- * Clean job by id
10
- */
11
- clearJob(id: string, config?: RequestConfig): Promise<Response>;
12
- /**
13
- * pause job by id
14
- */
15
- pauseJob(id?: string, config?: RequestConfig): Promise<Response>;
16
- /**
17
- * resume job by id
18
- */
19
- resumeJob(id?: string, config?: RequestConfig): Promise<Response>;
20
- /**
21
- * stop job by id
22
- */
23
- stopJob(id: string, config?: RequestConfig): Promise<Response>;
24
- /**
25
- * Retrieves all running and stopping processes from the instance.
26
- */
27
- top(config?: RequestConfig): Promise<Process[]>;
28
- /**
29
- * Kills running processes in the instance. If no process id is specified, all processes will be killed.
30
- */
31
- kill(processId: string, config?: RequestConfig): Promise<Response>;
32
- }
@@ -1,122 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JobExra = void 0;
4
- const connection_base_1 = require("./connection.base");
5
- const utils_1 = require("../../utils");
6
- const CommandList = utils_1.UQLMAKER.CommandList;
7
- class JobExra extends connection_base_1.ConnectionBase {
8
- /**
9
- * Show all job,if have id,return job
10
- */
11
- async showJob(id, config) {
12
- let command = CommandList.showJob;
13
- let params = null;
14
- if (id == "*") {
15
- params = null;
16
- }
17
- else {
18
- params = [];
19
- if (id) {
20
- params.push(id);
21
- }
22
- }
23
- let uqlMaker = new utils_1.UQLMAKER(command, config, params);
24
- let res = await this.uql(uqlMaker.toString(), config);
25
- return res.items["_job"].asJobs();
26
- }
27
- /**
28
- * Clean job by id
29
- */
30
- async clearJob(id, config) {
31
- let command = CommandList.clearJob;
32
- let params = null;
33
- if (!id) {
34
- id = "*";
35
- }
36
- if (id == "*") {
37
- params = ["*"];
38
- }
39
- else {
40
- params = [];
41
- if (id) {
42
- params.push(id);
43
- }
44
- }
45
- let uqlMaker = new utils_1.UQLMAKER(command, config, params);
46
- return this.uql(uqlMaker.toString(), config);
47
- }
48
- /**
49
- * pause job by id
50
- */
51
- async pauseJob(id, config) {
52
- let command = CommandList.pauseJob;
53
- let params = [];
54
- if (id == "*") {
55
- params.push("*");
56
- }
57
- if (id) {
58
- params.push(id);
59
- }
60
- let uqlMaker = new utils_1.UQLMAKER(command, config, params);
61
- return this.uql(uqlMaker.toString(), config);
62
- }
63
- /**
64
- * resume job by id
65
- */
66
- async resumeJob(id, config) {
67
- let command = CommandList.resumeJob;
68
- let params = [];
69
- if (id == "*") {
70
- params.push("*");
71
- }
72
- if (id) {
73
- params.push(id);
74
- }
75
- let uqlMaker = new utils_1.UQLMAKER(command, config, params);
76
- return this.uql(uqlMaker.toString(), config);
77
- }
78
- /**
79
- * stop job by id
80
- */
81
- async stopJob(id, config) {
82
- let command = CommandList.stopJob;
83
- let params = [];
84
- if (id == "*") {
85
- params.push("*");
86
- }
87
- if (id) {
88
- params.push(id);
89
- }
90
- let uqlMaker = new utils_1.UQLMAKER(command, config, params);
91
- return this.uql(uqlMaker.toString(), config);
92
- }
93
- /**
94
- * Retrieves all running and stopping processes from the instance.
95
- */
96
- async top(config) {
97
- let command = CommandList.top;
98
- let uqlMaker = new utils_1.UQLMAKER(command, config);
99
- let res = await this.uql(uqlMaker.toString(), config);
100
- return res.items["_top"]?.asProcesses() || [];
101
- }
102
- /**
103
- * Kills running processes in the instance. If no process id is specified, all processes will be killed.
104
- */
105
- async kill(processId, config) {
106
- let command = CommandList.kill;
107
- let params = [];
108
- if (processId == "*") {
109
- params = ["*"];
110
- }
111
- else if (processId) {
112
- params = [processId];
113
- }
114
- else {
115
- params = ["*"];
116
- }
117
- let uqlMaker = new utils_1.UQLMAKER(command, config, params);
118
- return this.uql(uqlMaker.toString(), config);
119
- }
120
- }
121
- exports.JobExra = JobExra;
122
- //# sourceMappingURL=job.extra.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"job.extra.js","sourceRoot":"","sources":["../../../src/connection/extra/job.extra.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAClD,uCAAuC;AAGvC,MAAM,WAAW,GAAG,gBAAQ,CAAC,WAAW,CAAA;AAExC,MAAa,OAAQ,SAAQ,gCAAc;IACvC;;OAEG;IACH,KAAK,CAAC,OAAO,CAAC,EAAW,EAAE,MAAsB;QAC7C,IAAI,OAAO,GAAG,WAAW,CAAC,OAAO,CAAA;QACjC,IAAI,MAAM,GAAU,IAAI,CAAA;QACxB,IAAI,EAAE,IAAI,GAAG,EAAE;YACX,MAAM,GAAG,IAAI,CAAA;SAChB;aAAM;YACH,MAAM,GAAG,EAAE,CAAA;YACX,IAAI,EAAE,EAAE;gBACJ,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;aAClB;SACJ;QACD,IAAI,QAAQ,GAAG,IAAI,gBAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;QACpD,IAAI,GAAG,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAA;QACrD,OAAO,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,CAAC;IACD;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,EAAU,EAAE,MAAsB;QAC7C,IAAI,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAA;QAClC,IAAI,MAAM,GAAU,IAAI,CAAA;QACxB,IAAI,CAAC,EAAE,EAAE;YAAE,EAAE,GAAG,GAAG,CAAA;SAAE;QACrB,IAAI,EAAE,IAAI,GAAG,EAAE;YACX,MAAM,GAAG,CAAC,GAAG,CAAC,CAAA;SACjB;aAAM;YACH,MAAM,GAAG,EAAE,CAA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AG,CAAC,GAAG,CAAC,CAAA;SACjB;QACD,IAAI,QAAQ,GAAG,IAAI,gBAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAA;IAChD,CAAC;CAEJ;AAlHD,0BAkHC"}
@@ -1,32 +0,0 @@
1
- import { ConnectionBase } from "./connection.base";
2
- import { Policy, RequestConfig, Response, PropertyPrivilege } from "../../types/types";
3
- export declare class PolicyExtra extends ConnectionBase {
4
- /**
5
- * Retrieves all policies from the instance. A policy includes system privileges, graph privileges, property privileges and other policies.
6
- */
7
- showPolicy(config?: RequestConfig): Promise<Policy[]>;
8
- /**
9
- * Retrieves a policy from the instance by its name.
10
- */
11
- getPolicy(policyName: string, config?: RequestConfig): Promise<Policy>;
12
- /**
13
- * Creates a policy in the instance.
14
- */
15
- createPolicy(policy: Policy, config?: RequestConfig): Promise<Response>;
16
- /**
17
- * Alters the system privileges, graph privileges, property privileges and policies of one existing policy in the instance by its name.
18
- */
19
- alterPolicy(policy: Policy, config?: RequestConfig): Promise<Response>;
20
- /**
21
- * Drops one policy from the instance by its name.
22
- */
23
- dropPolicy(policyName: string, config?: RequestConfig): Promise<Response>;
24
- /**
25
- * Grant user policy
26
- */
27
- grantPolicy(userName: string, graphPrivileges?: Map<string, string[]>, systemPrivileges?: string[], policies?: string[], PropertyPrivilege?: PropertyPrivilege, config?: RequestConfig): Promise<Response>;
28
- /**
29
- * Revoke user policy List
30
- */
31
- revokePolicy(userName: string, graphPrivileges?: Map<string, string[]>, systemPrivileges?: string[], policies?: string[], PropertyPrivilege?: PropertyPrivilege, config?: RequestConfig): Promise<Response>;
32
- }
@@ -1,114 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PolicyExtra = void 0;
4
- const connection_base_1 = require("./connection.base");
5
- const utils_1 = require("../../utils");
6
- const types_extra_1 = require("../../types/types.extra");
7
- const { CommandList } = utils_1.UQLMAKER;
8
- class PolicyExtra extends connection_base_1.ConnectionBase {
9
- /**
10
- * Retrieves all policies from the instance. A policy includes system privileges, graph privileges, property privileges and other policies.
11
- */
12
- async showPolicy(config) {
13
- let command = CommandList.showPolicy;
14
- let uqlMaker = new utils_1.UQLMAKER(command, config);
15
- let res = await this.uql(uqlMaker.toString(), config);
16
- return res.items[types_extra_1.ResponseTableName.POLICY]?.asPolicies();
17
- }
18
- /**
19
- * Retrieves a policy from the instance by its name.
20
- */
21
- async getPolicy(policyName, config) {
22
- let command = CommandList.getPolicy;
23
- let uqlMaker = new utils_1.UQLMAKER(command, config, policyName);
24
- let res = await this.uql(uqlMaker.toString(), config);
25
- return res.items[types_extra_1.ResponseTableName.POLICY]?.asPolicies().find(v => v.name == policyName);
26
- }
27
- /**
28
- * Creates a policy in the instance.
29
- */
30
- async createPolicy(policy, config) {
31
- let command = CommandList.createPolicy;
32
- let uqlMaker = new utils_1.UQLMAKER(command, config, [policy.name,
33
- policy?.graphPrivileges ? Object.fromEntries(policy?.graphPrivileges) : {},
34
- policy.systemPrivileges || [], policy.policies || [], policy.propertyPrivileges || {}]);
35
- return this.uql(uqlMaker.toString(), config);
36
- }
37
- /**
38
- * Alters the system privileges, graph privileges, property privileges and policies of one existing policy in the instance by its name.
39
- */
40
- async alterPolicy(policy, config) {
41
- let command = CommandList.alterPolicy;
42
- let uqlMaker = new utils_1.UQLMAKER(command, config, policy.name);
43
- let set = {};
44
- if (policy?.graphPrivileges) {
45
- set.graph_privileges =
46
- policy?.graphPrivileges ? Object.fromEntries(policy?.graphPrivileges) : {};
47
- }
48
- if (policy?.systemPrivileges) {
49
- set.system_privileges = policy.systemPrivileges;
50
- }
51
- if (policy?.policies) {
52
- set.policies = policy.policies;
53
- }
54
- if (policy?.propertyPrivileges) {
55
- set.property_privileges = policy.propertyPrivileges;
56
- }
57
- uqlMaker.addParam("set", set);
58
- return this.uql(uqlMaker.toString(), config);
59
- }
60
- /**
61
- * Drops one policy from the instance by its name.
62
- */
63
- async dropPolicy(policyName, config) {
64
- let command = CommandList.dropPolicy;
65
- let uqlMaker = new utils_1.UQLMAKER(command, config, policyName);
66
- return this.uql(uqlMaker.toString(), config);
67
- }
68
- /**
69
- * Grant user policy
70
- */
71
- async grantPolicy(userName, graphPrivileges, systemPrivileges, policies, PropertyPrivilege, config) {
72
- let command = CommandList.grantUser;
73
- let uqlMaker = new utils_1.UQLMAKER(command, config, userName);
74
- let set = {};
75
- if (graphPrivileges) {
76
- graphPrivileges ? Object.fromEntries(graphPrivileges) : {};
77
- }
78
- if (systemPrivileges) {
79
- set.system_privileges = systemPrivileges;
80
- }
81
- if (policies) {
82
- set.policies = policies;
83
- }
84
- if (PropertyPrivilege) {
85
- set.property_privileges = PropertyPrivilege;
86
- }
87
- uqlMaker.addParam("params", set);
88
- return this.uql(uqlMaker.toString(), config);
89
- }
90
- /**
91
- * Revoke user policy List
92
- */
93
- async revokePolicy(userName, graphPrivileges, systemPrivileges, policies, PropertyPrivilege, config) {
94
- let command = CommandList.revokeUser;
95
- let uqlMaker = new utils_1.UQLMAKER(command, config, userName);
96
- let set = {};
97
- if (graphPrivileges) {
98
- set.graph_privileges = graphPrivileges ? Object.fromEntries(graphPrivileges) : {};
99
- }
100
- if (systemPrivileges) {
101
- set.system_privileges = systemPrivileges;
102
- }
103
- if (policies) {
104
- set.policies = policies;
105
- }
106
- if (PropertyPrivilege) {
107
- set.property_privileges = PropertyPrivilege;
108
- }
109
- uqlMaker.addParam("params", set);
110
- return this.uql(uqlMaker.toString(), config);
111
- }
112
- }
113
- exports.PolicyExtra = PolicyExtra;
114
- //# sourceMappingURL=policy.extra.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"policy.extra.js","sourceRoot":"","sources":["../../../src/connection/extra/policy.extra.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAGlD,uCAAuC;AACvC,yDAA4D;AAC5D,MAAM,EAAE,WAAW,EA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,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;QACtD,IAAI,GAAG,GAAQ,EAAE,CAAA;QACjB,IAAI,eAAe,EAAE;YACjB,GAAG,CAAC,gBAAgB,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;SACpF;QACD,IAAI,gBAAgB,EAAE;YAClB,GAAG,CAAC,iBAAiB,GAAG,gBAAgB,CAAA;SAC3C;QACD,IAAI,QAAQ,EAAE;YACV,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAA;SAC1B;QACD,IAAI,iBAAiB,EAAE;YACnB,GAAG,CAAC,mBAAmB,GAAG,iBAAiB,CAAA;SAC9C;QACD,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;QAChC,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAA;IAChD,CAAC;CACJ;AA1HD,kCA0HC"}
@@ -1,8 +0,0 @@
1
- import { ConnectionBase } from "./connection.base";
2
- import { Privilege, RequestConfig } from "../../types/types";
3
- export declare class PrivilegeExtra extends ConnectionBase {
4
- /**
5
- * Retrieves all system privileges and graph privileges, which are actually UQL command names categorized based on their operation scope.
6
- */
7
- showPrivilege(config?: RequestConfig): Promise<Privilege[]>;
8
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PrivilegeExtra = void 0;
4
- const connection_base_1 = require("./connection.base");
5
- const utils_1 = require("../../utils");
6
- const { CommandList } = utils_1.UQLMAKER;
7
- class PrivilegeExtra extends connection_base_1.ConnectionBase {
8
- /**
9
- * Retrieves all system privileges and graph privileges, which are actually UQL command names categorized based on their operation scope.
10
- */
11
- async showPrivilege(config) {
12
- let command = CommandList.showPrivilege;
13
- let uqlMaker = new utils_1.UQLMAKER(command, config);
14
- let res = await this.uql(uqlMaker.toString(), config);
15
- let result = res.items["_privilege"].asPrivileges();
16
- return result;
17
- }
18
- }
19
- exports.PrivilegeExtra = PrivilegeExtra;
20
- //# sourceMappingURL=privilege.extra.js.map