@ultipa-graph/ultipa-driver 5.0.0-s5.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.
- package/dist/.DS_Store +0 -0
- package/dist/connection/connection.final.d.ts +45 -0
- package/dist/connection/connection.final.js +600 -0
- package/dist/connection/connection.final.js.map +1 -0
- package/dist/connection/connection.pool.d.ts +26 -0
- package/dist/connection/connection.pool.js +121 -0
- package/dist/connection/connection.pool.js.map +1 -0
- package/dist/connection/extra/algos/algo.extra.d.ts +34 -0
- package/dist/connection/extra/algos/algo.extra.js +81 -0
- package/dist/connection/extra/algos/algo.extra.js.map +1 -0
- package/dist/connection/extra/algos/algo.utils.d.ts +3 -0
- package/dist/connection/extra/algos/algo.utils.js +71 -0
- package/dist/connection/extra/algos/algo.utils.js.map +1 -0
- package/dist/connection/extra/algos/community.d.ts +27 -0
- package/dist/connection/extra/algos/community.js +129 -0
- package/dist/connection/extra/algos/community.js.map +1 -0
- package/dist/connection/extra/algos/degrees.d.ts +10 -0
- package/dist/connection/extra/algos/degrees.js +43 -0
- package/dist/connection/extra/algos/degrees.js.map +1 -0
- package/dist/connection/extra/algos/embedding.d.ts +13 -0
- package/dist/connection/extra/algos/embedding.js +58 -0
- package/dist/connection/extra/algos/embedding.js.map +1 -0
- package/dist/connection/extra/algos/index.d.ts +5 -0
- package/dist/connection/extra/algos/index.js +14 -0
- package/dist/connection/extra/algos/index.js.map +1 -0
- package/dist/connection/extra/base.extra.d.ts +71 -0
- package/dist/connection/extra/base.extra.js +183 -0
- package/dist/connection/extra/base.extra.js.map +1 -0
- package/dist/connection/extra/connection.base.d.ts +82 -0
- package/dist/connection/extra/connection.base.js +623 -0
- package/dist/connection/extra/connection.base.js.map +1 -0
- package/dist/connection/extra/connection.d.ts +16 -0
- package/dist/connection/extra/connection.js +46 -0
- package/dist/connection/extra/connection.js.map +1 -0
- package/dist/connection/extra/graph.extra.d.ts +85 -0
- package/dist/connection/extra/graph.extra.js +241 -0
- package/dist/connection/extra/graph.extra.js.map +1 -0
- package/dist/connection/extra/index.extra.d.ts +70 -0
- package/dist/connection/extra/index.extra.js +201 -0
- package/dist/connection/extra/index.extra.js.map +1 -0
- package/dist/connection/extra/job.extra.d.ts +32 -0
- package/dist/connection/extra/job.extra.js +145 -0
- package/dist/connection/extra/job.extra.js.map +1 -0
- package/dist/connection/extra/meta.extra.d.ts +91 -0
- package/dist/connection/extra/meta.extra.js +441 -0
- package/dist/connection/extra/meta.extra.js.map +1 -0
- package/dist/connection/extra/property.extra.d.ts +81 -0
- package/dist/connection/extra/property.extra.js +268 -0
- package/dist/connection/extra/property.extra.js.map +1 -0
- package/dist/connection/extra/schema.extra.d.ts +50 -0
- package/dist/connection/extra/schema.extra.js +248 -0
- package/dist/connection/extra/schema.extra.js.map +1 -0
- package/dist/connection/extra/search.extra.d.ts +12 -0
- package/dist/connection/extra/search.extra.js +126 -0
- package/dist/connection/extra/search.extra.js.map +1 -0
- package/dist/connection/extra/task.extra.d.ts +24 -0
- package/dist/connection/extra/task.extra.js +126 -0
- package/dist/connection/extra/task.extra.js.map +1 -0
- package/dist/connection/extra/user.privilege.extra.d.ts +64 -0
- package/dist/connection/extra/user.privilege.extra.js +348 -0
- package/dist/connection/extra/user.privilege.extra.js.map +1 -0
- package/dist/connection/index.d.ts +4 -0
- package/dist/connection/index.js +10 -0
- package/dist/connection/index.js.map +1 -0
- package/dist/connection/network.manager.d.ts +27 -0
- package/dist/connection/network.manager.js +178 -0
- package/dist/connection/network.manager.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/printers/alias.d.ts +2 -0
- package/dist/printers/alias.js +15 -0
- package/dist/printers/alias.js.map +1 -0
- package/dist/printers/any.d.ts +2 -0
- package/dist/printers/any.js +40 -0
- package/dist/printers/any.js.map +1 -0
- package/dist/printers/array.aio.d.ts +44 -0
- package/dist/printers/array.aio.js +240 -0
- package/dist/printers/array.aio.js.map +1 -0
- package/dist/printers/common.d.ts +0 -0
- package/dist/printers/common.js +1 -0
- package/dist/printers/common.js.map +1 -0
- package/dist/printers/edge.d.ts +5 -0
- package/dist/printers/edge.js +49 -0
- package/dist/printers/edge.js.map +1 -0
- package/dist/printers/explain.plan.d.ts +2 -0
- package/dist/printers/explain.plan.js +24 -0
- package/dist/printers/explain.plan.js.map +1 -0
- package/dist/printers/graph.d.ts +2 -0
- package/dist/printers/graph.js +34 -0
- package/dist/printers/graph.js.map +1 -0
- package/dist/printers/index.d.ts +25 -0
- package/dist/printers/index.js +44 -0
- package/dist/printers/index.js.map +1 -0
- package/dist/printers/node.d.ts +5 -0
- package/dist/printers/node.js +49 -0
- package/dist/printers/node.js.map +1 -0
- package/dist/printers/path.d.ts +3 -0
- package/dist/printers/path.js +42 -0
- package/dist/printers/path.js.map +1 -0
- package/dist/printers/status.d.ts +3 -0
- package/dist/printers/status.js +45 -0
- package/dist/printers/status.js.map +1 -0
- package/dist/printers/table.d.ts +2 -0
- package/dist/printers/table.js +31 -0
- package/dist/printers/table.js.map +1 -0
- package/dist/proto/tmp.js +366 -0
- package/dist/proto/ultipa_grpc_pb.d.ts +257 -0
- package/dist/proto/ultipa_grpc_pb.js +366 -0
- package/dist/proto/ultipa_grpc_pb.js.map +1 -0
- package/dist/proto/ultipa_pb.d.ts +1 -0
- package/dist/proto/ultipa_pb.js +11002 -0
- package/dist/proto/ultipa_pb.js.map +1 -0
- package/dist/transaction/UltipaSession.d.ts +28 -0
- package/dist/transaction/UltipaSession.js +148 -0
- package/dist/transaction/UltipaSession.js.map +1 -0
- package/dist/transaction/UltipaTransaction.Recorder.d.ts +20 -0
- package/dist/transaction/UltipaTransaction.Recorder.js +23 -0
- package/dist/transaction/UltipaTransaction.Recorder.js.map +1 -0
- package/dist/transaction/UltipaTransaction.d.ts +35 -0
- package/dist/transaction/UltipaTransaction.js +203 -0
- package/dist/transaction/UltipaTransaction.js.map +1 -0
- package/dist/transaction/UltipaTransactionSession.d.ts +15 -0
- package/dist/transaction/UltipaTransactionSession.js +46 -0
- package/dist/transaction/UltipaTransactionSession.js.map +1 -0
- package/dist/transaction/operations/Transaction.Deletes.d.ts +4 -0
- package/dist/transaction/operations/Transaction.Deletes.js +52 -0
- package/dist/transaction/operations/Transaction.Deletes.js.map +1 -0
- package/dist/transaction/operations/Transaction.Inserts.d.ts +4 -0
- package/dist/transaction/operations/Transaction.Inserts.js +78 -0
- package/dist/transaction/operations/Transaction.Inserts.js.map +1 -0
- package/dist/transaction/operations/Transaction.Update.d.ts +4 -0
- package/dist/transaction/operations/Transaction.Update.js +43 -0
- package/dist/transaction/operations/Transaction.Update.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +13 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/types.algos.params.d.ts +545 -0
- package/dist/types/types.algos.params.js +16 -0
- package/dist/types/types.algos.params.js.map +1 -0
- package/dist/types/types.d.ts +496 -0
- package/dist/types/types.extra.d.ts +788 -0
- package/dist/types/types.extra.js +49 -0
- package/dist/types/types.extra.js.map +1 -0
- package/dist/types/types.js +706 -0
- package/dist/types/types.js.map +1 -0
- package/dist/types/util.d.ts +15 -0
- package/dist/types/util.js +163 -0
- package/dist/types/util.js.map +1 -0
- package/dist/utils/common.d.ts +3 -0
- package/dist/utils/common.js +31 -0
- package/dist/utils/common.js.map +1 -0
- package/dist/utils/config.d.ts +3 -0
- package/dist/utils/config.js +7 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/format.d.ts +49 -0
- package/dist/utils/format.js +990 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.js +34 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/params.validate.d.ts +4 -0
- package/dist/utils/params.validate.js +14 -0
- package/dist/utils/params.validate.js.map +1 -0
- package/dist/utils/property.d.ts +15 -0
- package/dist/utils/property.js +117 -0
- package/dist/utils/property.js.map +1 -0
- package/dist/utils/raft.retry.d.ts +0 -0
- package/dist/utils/raft.retry.js +1 -0
- package/dist/utils/raft.retry.js.map +1 -0
- package/dist/utils/serialize/commont.d.ts +12 -0
- package/dist/utils/serialize/commont.js +46 -0
- package/dist/utils/serialize/commont.js.map +1 -0
- package/dist/utils/serialize/deserialize.d.ts +9 -0
- package/dist/utils/serialize/deserialize.js +164 -0
- package/dist/utils/serialize/deserialize.js.map +1 -0
- package/dist/utils/serialize/null.d.ts +24 -0
- package/dist/utils/serialize/null.js +133 -0
- package/dist/utils/serialize/null.js.map +1 -0
- package/dist/utils/serialize/serialize.d.ts +10 -0
- package/dist/utils/serialize/serialize.js +135 -0
- package/dist/utils/serialize/serialize.js.map +1 -0
- package/dist/utils/stream.helper.d.ts +9 -0
- package/dist/utils/stream.helper.js +97 -0
- package/dist/utils/stream.helper.js.map +1 -0
- package/dist/utils/time.record.d.ts +15 -0
- package/dist/utils/time.record.js +50 -0
- package/dist/utils/time.record.js.map +1 -0
- package/dist/utils/timezone.d.ts +7 -0
- package/dist/utils/timezone.js +21 -0
- package/dist/utils/timezone.js.map +1 -0
- package/dist/utils/ultipa.datetime.d.ts +8 -0
- package/dist/utils/ultipa.datetime.js +120 -0
- package/dist/utils/ultipa.datetime.js.map +1 -0
- package/dist/utils/uql-maker.d.ts +164 -0
- package/dist/utils/uql-maker.js +400 -0
- package/dist/utils/uql-maker.js.map +1 -0
- package/dist/utils/uql.parse.d.ts +27 -0
- package/dist/utils/uql.parse.js +206 -0
- package/dist/utils/uql.parse.js.map +1 -0
- package/package.json +62 -0
- package/readme.md +63 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConnectionBase } from "../connection.base";
|
|
2
|
+
import { AlgoParams, ULTIPA, RequestType } from "../../../types";
|
|
3
|
+
declare class AlgorithmsEmbedding extends ConnectionBase {
|
|
4
|
+
private __common_AlgorithmsEmbedding;
|
|
5
|
+
algo_random_walk(req: AlgoParams.random_walk, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
6
|
+
algo_random_walk_node2vec(req: AlgoParams.random_walk_node2vec, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
7
|
+
algo_random_walk_struc2vec(req: AlgoParams.random_walk_struc2vec, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
8
|
+
algo_node2vec(req: AlgoParams.node2vec, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
9
|
+
algo_line(req: AlgoParams.line, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
10
|
+
algo_struc2vec(req: AlgoParams.struc2vec, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
11
|
+
algo_fastRP(req: AlgoParams.fastRP, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
12
|
+
}
|
|
13
|
+
export { AlgorithmsEmbedding };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AlgorithmsEmbedding = void 0;
|
|
13
|
+
const connection_base_1 = require("../connection.base");
|
|
14
|
+
const algo_utils_1 = require("./algo.utils");
|
|
15
|
+
class AlgorithmsEmbedding extends connection_base_1.ConnectionBase {
|
|
16
|
+
__common_AlgorithmsEmbedding(req, name, commonReq) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (0, algo_utils_1.algoCommonSend)(this, req, name, commonReq);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
algo_random_walk(req, commonReq) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return this.__common_AlgorithmsEmbedding(req, "algo_random_walk", commonReq);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
algo_random_walk_node2vec(req, commonReq) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return this.__common_AlgorithmsEmbedding(req, "algo_random_walk_node2vec", commonReq);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
algo_random_walk_struc2vec(req, commonReq) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
return this.__common_AlgorithmsEmbedding(req, "algo_random_walk_struc2vec", commonReq);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
algo_node2vec(req, commonReq) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return this.__common_AlgorithmsEmbedding(req, "algo_node2vec", commonReq);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
algo_line(req, commonReq) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return this.__common_AlgorithmsEmbedding(req, "algo_line", commonReq);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
algo_struc2vec(req, commonReq) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return this.__common_AlgorithmsEmbedding(req, "algo_struc2vec", commonReq);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
algo_fastRP(req, commonReq) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
return this.__common_AlgorithmsEmbedding(req, "algo_fastRP", commonReq);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.AlgorithmsEmbedding = AlgorithmsEmbedding;
|
|
58
|
+
//# sourceMappingURL=embedding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedding.js","sourceRoot":"","sources":["../../../../src/connection/extra/algos/embedding.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,wDAAmD;AAEnD,6CAA8C;AAG9C,MAAM,mBAAoB,SAAQ,gCAAc;IAC/B,4BAA4B,CAAC,GAAoB,EAAE,IAAY,EAAE,SAAqC;;YACjH,OAAO,IAAA,2BAAc,EAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;QACpD,CAAC;KAAA;IAEK,gBAAgB,CAAC,GAA2B,EAAE,SAAqC;;YACtF,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,kBAAkB,EAAE,SAAS,CAAC,CAAA;QAC/E,CAAC;KAAA;IACK,yBAAyB,CAAC,GAAoC,EAAE,SAAqC;;YACxG,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,2BAA2B,EAAE,SAAS,CAAC,CAAA;QACxF,CAAC;KAAA;IACK,0BAA0B,CAAC,GAAqC,EAAE,SAAqC;;YAC1G,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,4BAA4B,EAAE,SAAS,CAAC,CAAA;QACzF,CAAC;KAAA;IACK,aAAa,CAAC,GAAwB,EAAE,SAAqC;;YAChF,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,eAAe,EAAE,SAAS,CAAC,CAAA;QAC5E,CAAC;KAAA;IACK,SAAS,CAAC,GAAoB,EAAE,SAAqC;;YACxE,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA;QACxE,CAAC;KAAA;IACK,cAAc,CAAC,GAAyB,EAAE,SAAqC;;YAClF,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAA;QAC7E,CAAC;KAAA;IACK,WAAW,CAAC,GAAsB,EAAE,SAAqC;;YAC5E,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;QAC1E,CAAC;KAAA;CACH;AAEQ,kDAAmB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.algoCommonSend = exports.AlgorithmsEmbedding = exports.AlgorithmsCommunity = exports.AlgorithmsDegrees = exports.AlgoExtra = void 0;
|
|
4
|
+
var algo_extra_1 = require("./algo.extra");
|
|
5
|
+
Object.defineProperty(exports, "AlgoExtra", { enumerable: true, get: function () { return algo_extra_1.AlgoExtra; } });
|
|
6
|
+
var degrees_1 = require("./degrees");
|
|
7
|
+
Object.defineProperty(exports, "AlgorithmsDegrees", { enumerable: true, get: function () { return degrees_1.AlgorithmsDegrees; } });
|
|
8
|
+
var community_1 = require("./community");
|
|
9
|
+
Object.defineProperty(exports, "AlgorithmsCommunity", { enumerable: true, get: function () { return community_1.AlgorithmsCommunity; } });
|
|
10
|
+
var embedding_1 = require("./embedding");
|
|
11
|
+
Object.defineProperty(exports, "AlgorithmsEmbedding", { enumerable: true, get: function () { return embedding_1.AlgorithmsEmbedding; } });
|
|
12
|
+
var algo_utils_1 = require("./algo.utils");
|
|
13
|
+
Object.defineProperty(exports, "algoCommonSend", { enumerable: true, get: function () { return algo_utils_1.algoCommonSend; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/connection/extra/algos/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,qCAA8C;AAArC,4GAAA,iBAAiB,OAAA;AAC1B,yCAAkD;AAAzC,gHAAA,mBAAmB,OAAA;AAC5B,yCAAkD;AAAzC,gHAAA,mBAAmB,OAAA;AAC5B,2CAA4C;AAAnC,4GAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ConnectionBase } from "./connection.base";
|
|
2
|
+
import { ULTIPA, RequestType, ResponseType } from "../../types";
|
|
3
|
+
import { ExportReply } from "../../proto/ultipa_pb";
|
|
4
|
+
export declare class BaseExtra extends ConnectionBase {
|
|
5
|
+
/**
|
|
6
|
+
* 查看节点状态
|
|
7
|
+
*/
|
|
8
|
+
stats(requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.Stat>>;
|
|
9
|
+
/**
|
|
10
|
+
* 下载文件,一般为算法生成的文件
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```js
|
|
14
|
+
* let res = await client.download({
|
|
15
|
+
path: "file_path",
|
|
16
|
+
}, {
|
|
17
|
+
stream: {
|
|
18
|
+
onData: (data) => {
|
|
19
|
+
// deal data
|
|
20
|
+
},
|
|
21
|
+
onEnd: () => {
|
|
22
|
+
// end
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
download(params: RequestType.Download, commonReq: RequestType.CommonStreamRequire): Promise<grpc.ClientReadableStream<import("../../proto/ultipa_pb").DownloadFileReply>>;
|
|
29
|
+
/**
|
|
30
|
+
* 导出点或边的数据
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```js
|
|
34
|
+
* let conn = ...
|
|
35
|
+
* let res = await client.export({
|
|
36
|
+
dbType: ULTIPA.DBType.DBNODE,
|
|
37
|
+
limit: 100,
|
|
38
|
+
properties: ["name"]
|
|
39
|
+
}, {
|
|
40
|
+
stream: {
|
|
41
|
+
onData: (data) => {
|
|
42
|
+
// deal data
|
|
43
|
+
},
|
|
44
|
+
onEnd: () => {
|
|
45
|
+
// end
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export(params: RequestType.Export, commonReq: RequestType.CommonStreamRequire): Promise<grpc.ClientReadableStream<ExportReply>>;
|
|
52
|
+
/**
|
|
53
|
+
* 清空所有数据
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```js
|
|
57
|
+
* let conn = ...
|
|
58
|
+
* // 清除所有数据
|
|
59
|
+
* let res = await client.truncate({name: "graph_set_name"})
|
|
60
|
+
* // 清除点数据
|
|
61
|
+
* let res = await client.truncate({name: "graph_set_name", schema:'node_name', dbType: ULTIPA.DBType.DBNODE})
|
|
62
|
+
* // 清除边数据
|
|
63
|
+
* let res = await client.truncate({name: "graph_set_name", schema:'edge_name', dbType: ULTIPA.DBType.DBEDGE})
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
truncate(request: RequestType.Truncate, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>;
|
|
67
|
+
/**
|
|
68
|
+
* 碎片整理
|
|
69
|
+
*/
|
|
70
|
+
compact(graphName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseExtra = void 0;
|
|
13
|
+
const connection_base_1 = require("./connection.base");
|
|
14
|
+
const types_1 = require("../../types");
|
|
15
|
+
const utils_1 = require("../../utils");
|
|
16
|
+
const ultipa_pb_1 = require("../../proto/ultipa_pb");
|
|
17
|
+
const { CommandList, SchemaStringWithDefault } = utils_1.UQLMAKER;
|
|
18
|
+
class BaseExtra extends connection_base_1.ConnectionBase {
|
|
19
|
+
/**
|
|
20
|
+
* 查看节点状态
|
|
21
|
+
*/
|
|
22
|
+
stats(requestConfig) {
|
|
23
|
+
var _a;
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
// let command = CommandList.stats
|
|
26
|
+
let command = CommandList.licenseDump;
|
|
27
|
+
let uqlMaker = new utils_1.UQLMAKER(command, requestConfig);
|
|
28
|
+
let res = yield this.uqlSingle(uqlMaker);
|
|
29
|
+
let tableKV = (_a = res.QueryReply.singleDataTables()) === null || _a === void 0 ? void 0 : _a.toKV();
|
|
30
|
+
return Object.assign(Object.assign({}, res.responseWithoutData), { data: (tableKV === null || tableKV === void 0 ? void 0 : tableKV.length) > 0 ? tableKV[0] : {} });
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 下载文件,一般为算法生成的文件
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```js
|
|
38
|
+
* let res = await client.download({
|
|
39
|
+
path: "file_path",
|
|
40
|
+
}, {
|
|
41
|
+
stream: {
|
|
42
|
+
onData: (data) => {
|
|
43
|
+
// deal data
|
|
44
|
+
},
|
|
45
|
+
onEnd: () => {
|
|
46
|
+
// end
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
download(params, commonReq) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
// let req = new DownloadFileRequestV2()
|
|
55
|
+
// req.setTaskId(params.taskId + "")
|
|
56
|
+
let req = new ultipa_pb_1.DownloadFileRequest();
|
|
57
|
+
req.setFileName(params.fileName);
|
|
58
|
+
let clientInfo = yield this.getClientInfo({
|
|
59
|
+
graphSetName: commonReq === null || commonReq === void 0 ? void 0 : commonReq.graphSetName,
|
|
60
|
+
clusterId: commonReq === null || commonReq === void 0 ? void 0 : commonReq.clusterId,
|
|
61
|
+
timeZone: commonReq === null || commonReq === void 0 ? void 0 : commonReq.timeZone,
|
|
62
|
+
timeZoneOffset: commonReq === null || commonReq === void 0 ? void 0 : commonReq.timeZoneOffset,
|
|
63
|
+
});
|
|
64
|
+
// let stream = clientInfo.client.controlsClient.downloadFileV2(req, clientInfo.metadata)
|
|
65
|
+
let stream = clientInfo.client.controlsClient.downloadFile(req, clientInfo.metadata);
|
|
66
|
+
utils_1.streamHelper.commonDeal(stream, commonReq === null || commonReq === void 0 ? void 0 : commonReq.stream, (chunkData) => {
|
|
67
|
+
let status = utils_1.FormatType.status(chunkData.getStatus());
|
|
68
|
+
if (status.code != types_1.ULTIPA.Code.SUCCESS) {
|
|
69
|
+
let err = new Error(status.message);
|
|
70
|
+
err.code = status.code;
|
|
71
|
+
throw err;
|
|
72
|
+
}
|
|
73
|
+
let data = Buffer.from(chunkData.getChunk());
|
|
74
|
+
return data;
|
|
75
|
+
});
|
|
76
|
+
return stream;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 导出点或边的数据
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```js
|
|
84
|
+
* let conn = ...
|
|
85
|
+
* let res = await client.export({
|
|
86
|
+
dbType: ULTIPA.DBType.DBNODE,
|
|
87
|
+
limit: 100,
|
|
88
|
+
properties: ["name"]
|
|
89
|
+
}, {
|
|
90
|
+
stream: {
|
|
91
|
+
onData: (data) => {
|
|
92
|
+
// deal data
|
|
93
|
+
},
|
|
94
|
+
onEnd: () => {
|
|
95
|
+
// end
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export(params, commonReq) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
let req = new ultipa_pb_1.ExportRequest();
|
|
104
|
+
let isTypeNode = types_1.ULTIPA.DBType.DBNODE == params.dbType;
|
|
105
|
+
req.setDbType(isTypeNode ? ultipa_pb_1.DBType.DBNODE : ultipa_pb_1.DBType.DBEDGE);
|
|
106
|
+
req.setLimit(params.limit);
|
|
107
|
+
req.setSelectPropertiesList(params.properties);
|
|
108
|
+
req.setSchema(params.schema);
|
|
109
|
+
let clientInfo = yield this.getClientInfo({
|
|
110
|
+
graphSetName: commonReq === null || commonReq === void 0 ? void 0 : commonReq.graphSetName,
|
|
111
|
+
clusterId: commonReq === null || commonReq === void 0 ? void 0 : commonReq.clusterId,
|
|
112
|
+
timeZone: commonReq === null || commonReq === void 0 ? void 0 : commonReq.timeZone,
|
|
113
|
+
timeZoneOffset: commonReq === null || commonReq === void 0 ? void 0 : commonReq.timeZoneOffset,
|
|
114
|
+
});
|
|
115
|
+
let stream = clientInfo.client.controlsClient.export(req, clientInfo.metadata);
|
|
116
|
+
utils_1.streamHelper.commonDeal(stream, commonReq === null || commonReq === void 0 ? void 0 : commonReq.stream, (chunkData) => {
|
|
117
|
+
let status = utils_1.FormatType.status(chunkData.getStatus());
|
|
118
|
+
if (status.code != types_1.ULTIPA.Code.SUCCESS) {
|
|
119
|
+
let err = new Error(status.message);
|
|
120
|
+
err.code = status.code;
|
|
121
|
+
throw err;
|
|
122
|
+
}
|
|
123
|
+
if (isTypeNode) {
|
|
124
|
+
let nodes = chunkData.getNodeTable();
|
|
125
|
+
return utils_1.FormatType.nodeTable(nodes, this.getTimeZoneType(commonReq));
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
let edges = chunkData.getEdgeTable();
|
|
129
|
+
return utils_1.FormatType.edgeTable(edges, this.getTimeZoneType(commonReq));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return stream;
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* 清空所有数据
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```js
|
|
140
|
+
* let conn = ...
|
|
141
|
+
* // 清除所有数据
|
|
142
|
+
* let res = await client.truncate({name: "graph_set_name"})
|
|
143
|
+
* // 清除点数据
|
|
144
|
+
* let res = await client.truncate({name: "graph_set_name", schema:'node_name', dbType: ULTIPA.DBType.DBNODE})
|
|
145
|
+
* // 清除边数据
|
|
146
|
+
* let res = await client.truncate({name: "graph_set_name", schema:'edge_name', dbType: ULTIPA.DBType.DBEDGE})
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
truncate(request, requestConfig) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
let command = CommandList.truncate;
|
|
152
|
+
let uqlMaker = new utils_1.UQLMAKER(command, requestConfig, request.graphName);
|
|
153
|
+
let scope = "*";
|
|
154
|
+
if (request.schema) {
|
|
155
|
+
scope = SchemaStringWithDefault(request.schema);
|
|
156
|
+
}
|
|
157
|
+
if (request.dbType === types_1.ULTIPA.DBType.DBNODE) {
|
|
158
|
+
uqlMaker.addParam("nodes", scope);
|
|
159
|
+
}
|
|
160
|
+
else if (request.dbType === types_1.ULTIPA.DBType.DBEDGE) {
|
|
161
|
+
uqlMaker.addParam("edges", scope);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
if (request.schema) {
|
|
165
|
+
throw new Error("To truncate schema, DbType is required in the parameters.");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return connection_base_1.ConnectionBase.UqlUpdateSimple(this, uqlMaker);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 碎片整理
|
|
173
|
+
*/
|
|
174
|
+
compact(graphName, requestConfig) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
let command = CommandList.compact;
|
|
177
|
+
let uqlMaker = new utils_1.UQLMAKER(command, requestConfig, graphName);
|
|
178
|
+
return connection_base_1.ConnectionBase.UqlUpdateSimple(this, uqlMaker);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.BaseExtra = BaseExtra;
|
|
183
|
+
//# sourceMappingURL=base.extra.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.extra.js","sourceRoot":"","sources":["../../../src/connection/extra/base.extra.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAA6D;AAE7D,uCAAgE;AAGhE,uCAAyF;AACzF,qDAAmF;AAInF,MAAM,EAAC,WAAW,EAAE,uBAAuB,EAAC,GAAG,gBAAQ,CAAA;AAEvD,MAAa,SAAU,SAAQ,gCAAc;IACzC;;OAEG;IACG,KAAK,CAAC,aAAyC;;;YACjD,kCAAkC;YAClC,IAAI,OAAO,GAAG,WAAW,CAAC,WAAW,CAAA;YACrC,IAAI,QAAQ,GAAG,IAAI,gBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;YACnD,IAAI,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;YACxC,IAAI,OAAO,GAAG,MAAA,GAAG,CAAC,UAAU,CAAC,gBAAgB,EAAE,0CAAE,IAAI,EAAE,CAAA;YACvD,OAAO,gCACA,GAAG,CAAC,mBAAmB,KAC1B,IAAI,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,IAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAC9C,CAAA;;KACJ;IAED;;;;;;;;;;;;;;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,EAAE,KAAK,CAAC,CAAA;aACpC;iBAAM;gBACH,IAAG,OAAO,CAAC,MAAM,EAAC;oBAAE,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAA;iBAAE;aACrG;YACD,OAAO,gCAAc,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACzD,CAAC;KAAA;IAEG;;GAED;IACO,OAAO,CAAC,SAAiB,EAAE,aAAyC;;YACtE,IAAI,OAAO,GAAG,WAAW,CAAC,OAAO,CAAA;YACjC,IAAI,QAAQ,GAAG,IAAI,gBAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;YAC9D,OAAO,gCAAc,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACzD,CAAC;KAAA;CACR;AAxJD,8BAwJC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ULTIPA, RequestType } from "../../types";
|
|
3
|
+
import { UQLMAKER, ResponseKeyFormat } from "../../utils";
|
|
4
|
+
declare class GrpcClientInfo {
|
|
5
|
+
host: string;
|
|
6
|
+
username: string;
|
|
7
|
+
password: string;
|
|
8
|
+
crt: Buffer;
|
|
9
|
+
constructor(host: string, username: string, password: string, crt?: Buffer);
|
|
10
|
+
getMetadata(graphSetName: string, clusterId: string, timeZone: string, timeZoneOffset: number): any;
|
|
11
|
+
getClient(): import("../network.manager").UltipaClientAio;
|
|
12
|
+
}
|
|
13
|
+
export declare const RAFT_GLOBAL = "global";
|
|
14
|
+
export declare class ConnectionBase {
|
|
15
|
+
grpcClintInfo: GrpcClientInfo;
|
|
16
|
+
protected username: string;
|
|
17
|
+
protected password: string;
|
|
18
|
+
protected crt: Buffer;
|
|
19
|
+
defaultConfig: ULTIPA.UltipaConfig;
|
|
20
|
+
constructor(host: string, username: string, password: string, crt?: Buffer, defaultConfig?: ULTIPA.UltipaConfig, isMd5?: boolean);
|
|
21
|
+
setDefaultConfig(config?: ULTIPA.UltipaConfig): void;
|
|
22
|
+
protected getGraphSetName(currentGraphName: string, uql?: string, isGlobal?: boolean): string;
|
|
23
|
+
protected getTimeout(timeout: number): number;
|
|
24
|
+
protected getThreadNum(threadNum: number): number;
|
|
25
|
+
protected getLogUql(logUql: boolean): boolean;
|
|
26
|
+
protected getTimeZone(timeZone: string): string;
|
|
27
|
+
protected getTimeZoneOffset(timeZoneOffset: number): number;
|
|
28
|
+
protected getTimestampToString(timestampToString: boolean): boolean;
|
|
29
|
+
protected getClientInfo(params: {
|
|
30
|
+
type?: ULTIPA.ClientType;
|
|
31
|
+
graphSetName?: string;
|
|
32
|
+
uql?: string;
|
|
33
|
+
isGlobal?: boolean;
|
|
34
|
+
useHost?: string;
|
|
35
|
+
clusterId?: string;
|
|
36
|
+
forceRefresh?: boolean;
|
|
37
|
+
timeZone: string;
|
|
38
|
+
timeZoneOffset: number;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
client: import("../network.manager").UltipaClientAio;
|
|
41
|
+
host: string;
|
|
42
|
+
metadata: any;
|
|
43
|
+
goGraphName: string;
|
|
44
|
+
}>;
|
|
45
|
+
protected getTimeZoneType(commonReq?: RequestType.RequestConfig): ULTIPA.TimeZone;
|
|
46
|
+
uql(uql: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.QueryResponse>;
|
|
47
|
+
uqlStream(uql: string, stream: RequestType.QueryResponseStream, requestConfig?: RequestType.RequestConfig): Promise<void>;
|
|
48
|
+
gqlStream(gql: string, stream: RequestType.QueryResponseStream, requestConfig?: RequestType.RequestConfig): Promise<void>;
|
|
49
|
+
gql(gql: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.QueryResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* 运行UQL
|
|
52
|
+
*/
|
|
53
|
+
private _query_without_catch;
|
|
54
|
+
/**
|
|
55
|
+
* 通过UQLMaker运行uql
|
|
56
|
+
*/
|
|
57
|
+
uqlSingle(uqlMaker: UQLMAKER): Promise<ULTIPA.UQLSingleResponse>;
|
|
58
|
+
auth(req: RequestType.Auth, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<any>>;
|
|
59
|
+
/**
|
|
60
|
+
* 登录
|
|
61
|
+
*/
|
|
62
|
+
login(commonReq?: RequestType.RequestConfig): Promise<boolean>;
|
|
63
|
+
/**
|
|
64
|
+
* 测试连接
|
|
65
|
+
*/
|
|
66
|
+
test(commonReq?: RequestType.RequestConfig): Promise<boolean>;
|
|
67
|
+
/**
|
|
68
|
+
* 测试连接
|
|
69
|
+
*/
|
|
70
|
+
test_has_message(commonReq?: RequestType.RequestConfig): Promise<{
|
|
71
|
+
connect: boolean;
|
|
72
|
+
msg: string;
|
|
73
|
+
}>;
|
|
74
|
+
protected static UqlUpdateSimple(conn: ConnectionBase, uqlMaker: UQLMAKER): Promise<ULTIPA.Response<null>>;
|
|
75
|
+
protected static UqlListSimple<T>(conn: ConnectionBase, uqlMaker: UQLMAKER, keyFormat?: ResponseKeyFormat): Promise<ULTIPA.Response<T[]>>;
|
|
76
|
+
protected static UqlListSimpleAuto<T>(conn: ConnectionBase, uqlMaker: UQLMAKER, keyFormat?: ResponseKeyFormat): Promise<ULTIPA.Response<{
|
|
77
|
+
name: string;
|
|
78
|
+
values: T[];
|
|
79
|
+
}[]>>;
|
|
80
|
+
protected static UqlGetSimple<T>(conn: ConnectionBase, uqlMaker: UQLMAKER, keyFormat?: ResponseKeyFormat): Promise<ULTIPA.Response<T>>;
|
|
81
|
+
}
|
|
82
|
+
export {};
|