@ultipa-graph/ultipa-driver 5.1.5-s5.2 → 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.
- package/LICENSE +21 -0
- package/README.md +65 -0
- package/dist/client.d.ts +194 -0
- package/dist/client.js +390 -0
- package/dist/config.d.ts +65 -0
- package/dist/config.js +135 -0
- package/dist/connection.d.ts +30 -0
- package/dist/connection.js +190 -0
- package/dist/errors.d.ts +99 -0
- package/dist/errors.js +237 -0
- package/dist/index.d.ts +14 -5
- package/dist/index.js +88 -39
- package/dist/printers.d.ts +33 -0
- package/dist/printers.js +312 -0
- package/dist/proto/gqldb.proto +632 -0
- package/dist/response.d.ts +256 -0
- package/dist/response.js +723 -0
- package/dist/services/admin-service.d.ts +40 -0
- package/dist/services/admin-service.js +115 -0
- package/dist/services/bulk-import-service.d.ts +35 -0
- package/dist/services/bulk-import-service.js +108 -0
- package/dist/services/converters.d.ts +57 -0
- package/dist/services/converters.js +254 -0
- package/dist/services/data-service.d.ts +44 -0
- package/dist/services/data-service.js +206 -0
- package/dist/services/graph-service.d.ts +32 -0
- package/dist/services/graph-service.js +127 -0
- package/dist/services/health-service.d.ts +50 -0
- package/dist/services/health-service.js +78 -0
- package/dist/services/index.d.ts +13 -0
- package/dist/services/index.js +30 -0
- package/dist/services/query-service.d.ts +39 -0
- package/dist/services/query-service.js +112 -0
- package/dist/services/service-context.d.ts +39 -0
- package/dist/services/service-context.js +73 -0
- package/dist/services/session-service.d.ts +24 -0
- package/dist/services/session-service.js +66 -0
- package/dist/services/transaction-service.d.ts +33 -0
- package/dist/services/transaction-service.js +100 -0
- package/dist/services.d.ts +28 -0
- package/dist/services.js +122 -0
- package/dist/session.d.ts +45 -0
- package/dist/session.js +75 -0
- package/dist/transaction.d.ts +42 -0
- package/dist/transaction.js +89 -0
- package/dist/types/bulk_import.d.ts +53 -0
- package/dist/types/bulk_import.js +6 -0
- package/dist/types/data_types.d.ts +116 -0
- package/dist/types/data_types.js +122 -0
- package/dist/types/enums.d.ts +59 -0
- package/dist/types/enums.js +67 -0
- package/dist/types/graph_models.d.ts +54 -0
- package/dist/types/graph_models.js +6 -0
- package/dist/types/index.d.ts +11 -5
- package/dist/types/index.js +36 -37
- package/dist/types/metadata.d.ts +60 -0
- package/dist/types/metadata.js +6 -0
- package/dist/types/schema.d.ts +31 -0
- package/dist/types/schema.js +6 -0
- package/dist/types/typed_value.d.ts +25 -0
- package/dist/types/typed_value.js +1176 -0
- package/dist/types/wrappers.d.ts +23 -0
- package/dist/types/wrappers.js +39 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.js +24 -0
- package/package.json +49 -62
- package/dist/connection/connection.final.d.ts +0 -14
- package/dist/connection/connection.final.js +0 -94
- package/dist/connection/connection.final.js.map +0 -1
- package/dist/connection/connection.pool.d.ts +0 -21
- package/dist/connection/connection.pool.js +0 -103
- package/dist/connection/connection.pool.js.map +0 -1
- package/dist/connection/extra/algos/algo.extra.d.ts +0 -34
- package/dist/connection/extra/algos/algo.extra.js +0 -69
- package/dist/connection/extra/algos/algo.extra.js.map +0 -1
- package/dist/connection/extra/algos/algo.utils.d.ts +0 -3
- package/dist/connection/extra/algos/algo.utils.js +0 -54
- package/dist/connection/extra/algos/algo.utils.js.map +0 -1
- package/dist/connection/extra/algos/community.d.ts +0 -27
- package/dist/connection/extra/algos/community.js +0 -76
- package/dist/connection/extra/algos/community.js.map +0 -1
- package/dist/connection/extra/algos/degrees.d.ts +0 -10
- package/dist/connection/extra/algos/degrees.js +0 -24
- package/dist/connection/extra/algos/degrees.js.map +0 -1
- package/dist/connection/extra/algos/embedding.d.ts +0 -13
- package/dist/connection/extra/algos/embedding.js +0 -33
- package/dist/connection/extra/algos/embedding.js.map +0 -1
- package/dist/connection/extra/algos/index.d.ts +0 -5
- package/dist/connection/extra/algos/index.js +0 -14
- package/dist/connection/extra/algos/index.js.map +0 -1
- package/dist/connection/extra/base.extra.d.ts +0 -18
- package/dist/connection/extra/base.extra.js +0 -111
- package/dist/connection/extra/base.extra.js.map +0 -1
- package/dist/connection/extra/batch.insert.extra.d.ts +0 -58
- package/dist/connection/extra/batch.insert.extra.js +0 -354
- package/dist/connection/extra/batch.insert.extra.js.map +0 -1
- package/dist/connection/extra/connection.base.d.ts +0 -112
- package/dist/connection/extra/connection.base.js +0 -530
- package/dist/connection/extra/connection.base.js.map +0 -1
- package/dist/connection/extra/connection.d.ts +0 -17
- package/dist/connection/extra/connection.js +0 -44
- package/dist/connection/extra/connection.js.map +0 -1
- package/dist/connection/extra/graph.extra.d.ts +0 -54
- package/dist/connection/extra/graph.extra.js +0 -151
- package/dist/connection/extra/graph.extra.js.map +0 -1
- package/dist/connection/extra/hdc.extra.d.ts +0 -89
- package/dist/connection/extra/hdc.extra.js +0 -322
- package/dist/connection/extra/hdc.extra.js.map +0 -1
- package/dist/connection/extra/index.extra.d.ts +0 -102
- package/dist/connection/extra/index.extra.js +0 -210
- package/dist/connection/extra/index.extra.js.map +0 -1
- package/dist/connection/extra/job.extra.d.ts +0 -32
- package/dist/connection/extra/job.extra.js +0 -122
- package/dist/connection/extra/job.extra.js.map +0 -1
- package/dist/connection/extra/meta.extra.d.ts +0 -36
- package/dist/connection/extra/meta.extra.js +0 -123
- package/dist/connection/extra/meta.extra.js.map +0 -1
- package/dist/connection/extra/policy.extra.d.ts +0 -32
- package/dist/connection/extra/policy.extra.js +0 -114
- package/dist/connection/extra/policy.extra.js.map +0 -1
- package/dist/connection/extra/privilege.extra.d.ts +0 -8
- package/dist/connection/extra/privilege.extra.js +0 -20
- package/dist/connection/extra/privilege.extra.js.map +0 -1
- package/dist/connection/extra/property.extra.d.ts +0 -66
- package/dist/connection/extra/property.extra.js +0 -190
- package/dist/connection/extra/property.extra.js.map +0 -1
- package/dist/connection/extra/schema.extra.d.ts +0 -108
- package/dist/connection/extra/schema.extra.js +0 -253
- package/dist/connection/extra/schema.extra.js.map +0 -1
- package/dist/connection/extra/search.extra.d.ts +0 -12
- package/dist/connection/extra/search.extra.js +0 -117
- package/dist/connection/extra/search.extra.js.map +0 -1
- package/dist/connection/extra/task.extra.d.ts +0 -24
- package/dist/connection/extra/task.extra.js +0 -107
- package/dist/connection/extra/task.extra.js.map +0 -1
- package/dist/connection/extra/user.extra.d.ts +0 -28
- package/dist/connection/extra/user.extra.js +0 -91
- package/dist/connection/extra/user.extra.js.map +0 -1
- package/dist/connection/extra/user.privilege.extra.d.ts +0 -64
- package/dist/connection/extra/user.privilege.extra.js +0 -273
- package/dist/connection/extra/user.privilege.extra.js.map +0 -1
- package/dist/connection/index.d.ts +0 -5
- package/dist/connection/index.js +0 -13
- package/dist/connection/index.js.map +0 -1
- package/dist/connection/network.manager.d.ts +0 -28
- package/dist/connection/network.manager.js +0 -179
- package/dist/connection/network.manager.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/printers/alias.d.ts +0 -2
- package/dist/printers/alias.js +0 -39
- package/dist/printers/alias.js.map +0 -1
- package/dist/printers/any.d.ts +0 -2
- package/dist/printers/any.js +0 -63
- package/dist/printers/any.js.map +0 -1
- package/dist/printers/array.aio.d.ts +0 -3
- package/dist/printers/array.aio.js +0 -259
- package/dist/printers/array.aio.js.map +0 -1
- package/dist/printers/common.d.ts +0 -0
- package/dist/printers/common.js +0 -1
- package/dist/printers/common.js.map +0 -1
- package/dist/printers/edge.d.ts +0 -5
- package/dist/printers/edge.js +0 -78
- package/dist/printers/edge.js.map +0 -1
- package/dist/printers/explain.plan.d.ts +0 -2
- package/dist/printers/explain.plan.js +0 -46
- package/dist/printers/explain.plan.js.map +0 -1
- package/dist/printers/index.d.ts +0 -24
- package/dist/printers/index.js +0 -43
- package/dist/printers/index.js.map +0 -1
- package/dist/printers/node.d.ts +0 -5
- package/dist/printers/node.js +0 -77
- package/dist/printers/node.js.map +0 -1
- package/dist/printers/path.d.ts +0 -3
- package/dist/printers/path.js +0 -62
- package/dist/printers/path.js.map +0 -1
- package/dist/printers/status.d.ts +0 -3
- package/dist/printers/status.js +0 -68
- package/dist/printers/status.js.map +0 -1
- package/dist/printers/table.d.ts +0 -2
- package/dist/printers/table.js +0 -56
- package/dist/printers/table.js.map +0 -1
- package/dist/proto/tmp.js +0 -366
- package/dist/proto/ultipa_grpc_pb.d.ts +0 -258
- package/dist/proto/ultipa_grpc_pb.js +0 -366
- package/dist/proto/ultipa_grpc_pb.js.map +0 -1
- package/dist/proto/ultipa_pb.d.ts +0 -1
- package/dist/proto/ultipa_pb.js +0 -12119
- package/dist/proto/ultipa_pb.js.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/types.algos.params.d.ts +0 -545
- package/dist/types/types.algos.params.js +0 -16
- package/dist/types/types.algos.params.js.map +0 -1
- package/dist/types/types.d.ts +0 -1214
- package/dist/types/types.extra.d.ts +0 -146
- package/dist/types/types.extra.js +0 -27
- package/dist/types/types.extra.js.map +0 -1
- package/dist/types/types.js +0 -1606
- package/dist/types/types.js.map +0 -1
- package/dist/types/util.d.ts +0 -15
- package/dist/types/util.js +0 -136
- package/dist/types/util.js.map +0 -1
- package/dist/utils/common.d.ts +0 -3
- package/dist/utils/common.js +0 -22
- package/dist/utils/common.js.map +0 -1
- package/dist/utils/config.d.ts +0 -3
- package/dist/utils/config.js +0 -7
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/format.d.ts +0 -45
- package/dist/utils/format.js +0 -879
- package/dist/utils/format.js.map +0 -1
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.js +0 -30
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/params.validate.d.ts +0 -4
- package/dist/utils/params.validate.js +0 -14
- package/dist/utils/params.validate.js.map +0 -1
- package/dist/utils/property.d.ts +0 -24
- package/dist/utils/property.js +0 -203
- package/dist/utils/property.js.map +0 -1
- package/dist/utils/raft.retry.d.ts +0 -0
- package/dist/utils/raft.retry.js +0 -1
- package/dist/utils/raft.retry.js.map +0 -1
- package/dist/utils/serialize/commont.d.ts +0 -12
- package/dist/utils/serialize/commont.js +0 -46
- package/dist/utils/serialize/commont.js.map +0 -1
- package/dist/utils/serialize/deserialize.d.ts +0 -10
- package/dist/utils/serialize/deserialize.js +0 -288
- package/dist/utils/serialize/deserialize.js.map +0 -1
- package/dist/utils/serialize/null.d.ts +0 -32
- package/dist/utils/serialize/null.js +0 -178
- package/dist/utils/serialize/null.js.map +0 -1
- package/dist/utils/serialize/serialize.d.ts +0 -10
- package/dist/utils/serialize/serialize.js +0 -146
- package/dist/utils/serialize/serialize.js.map +0 -1
- package/dist/utils/stream.helper.d.ts +0 -10
- package/dist/utils/stream.helper.js +0 -71
- package/dist/utils/stream.helper.js.map +0 -1
- package/dist/utils/time.record.d.ts +0 -15
- package/dist/utils/time.record.js +0 -52
- package/dist/utils/time.record.js.map +0 -1
- package/dist/utils/timezone.d.ts +0 -7
- package/dist/utils/timezone.js +0 -21
- package/dist/utils/timezone.js.map +0 -1
- package/dist/utils/ultipa.datetime.d.ts +0 -14
- package/dist/utils/ultipa.datetime.js +0 -160
- package/dist/utils/ultipa.datetime.js.map +0 -1
- package/dist/utils/uql-maker.d.ts +0 -165
- package/dist/utils/uql-maker.js +0 -402
- package/dist/utils/uql-maker.js.map +0 -1
- package/dist/utils/uql.parse.d.ts +0 -27
- package/dist/utils/uql.parse.js +0 -205
- package/dist/utils/uql.parse.js.map +0 -1
- package/readme.md +0 -65
- package/src/proto/build.sh +0 -41
- package/src/proto/build_windows.sh +0 -40
- package/src/proto/ultipa.proto +0 -531
- package/src/proto/ultipa_grpc_pb.d.ts +0 -92
- package/src/proto/ultipa_grpc_pb.js +0 -414
- package/src/proto/ultipa_pb.d.ts +0 -1983
- package/src/proto/ultipa_pb.js +0 -14852
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ConnectionBase } from "../connection.base";
|
|
2
|
-
import { AlgoParams, RequestType, ULTIPA } from "../../../types";
|
|
3
|
-
declare class AlgorithmsCommunity extends ConnectionBase {
|
|
4
|
-
private __commonAlgorithmsCommunity;
|
|
5
|
-
algo_khop_all(req: AlgoParams.khop_all, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
6
|
-
algo_knn(req: AlgoParams.knn, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
7
|
-
algo_k_core(req: AlgoParams.k_core, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
8
|
-
algo_page_rank(req: AlgoParams.page_rank, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
9
|
-
algo_sybil_rank(req: AlgoParams.sybil_rank, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
10
|
-
algo_jaccard(req: AlgoParams.jaccard, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
11
|
-
algo_cosine_similarity(req: AlgoParams.cosine_similarity, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
12
|
-
algo_connected_component(req: AlgoParams.connected_component, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
13
|
-
algo_lpa(req: AlgoParams.lpa, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
14
|
-
algo_mst(req: AlgoParams.mst, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
15
|
-
algo_hanp(req: AlgoParams.hanp, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
16
|
-
algo_k_means(req: AlgoParams.k_means, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
17
|
-
algo_louvain(req: AlgoParams.louvain, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
18
|
-
algo_triangle_counting(req: AlgoParams.triangle_counting, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
19
|
-
algo_hyperANF(req: AlgoParams.hyperANF, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
20
|
-
algo_common_neighbours(req: AlgoParams.common_neighbours, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
21
|
-
algo_subgraph(req: AlgoParams.subgraph, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
22
|
-
algo_clustering_coefficient(req: AlgoParams.clustering_coefficient, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
23
|
-
algo_variable_compute(req: AlgoParams.variable_compute, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
24
|
-
algo_bipartite(req: AlgoParams.bipartite, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
25
|
-
algo_adamic_adar(req: AlgoParams.adamic_adar, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
26
|
-
}
|
|
27
|
-
export { AlgorithmsCommunity };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlgorithmsCommunity = void 0;
|
|
4
|
-
const connection_base_1 = require("../connection.base");
|
|
5
|
-
const algo_utils_1 = require("./algo.utils");
|
|
6
|
-
class AlgorithmsCommunity extends connection_base_1.ConnectionBase {
|
|
7
|
-
async __commonAlgorithmsCommunity(req, name, commonReq) {
|
|
8
|
-
return (0, algo_utils_1.algoCommonSend)(this, req, name, commonReq);
|
|
9
|
-
// return ConnectionBase.UqlGetSimple(this, uqlMaker)
|
|
10
|
-
}
|
|
11
|
-
async algo_khop_all(req, commonReq) {
|
|
12
|
-
return this.__commonAlgorithmsCommunity(req, "algo_khop_all", commonReq);
|
|
13
|
-
}
|
|
14
|
-
async algo_knn(req, commonReq) {
|
|
15
|
-
return this.__commonAlgorithmsCommunity(req, "algo_knn", commonReq);
|
|
16
|
-
}
|
|
17
|
-
async algo_k_core(req, commonReq) {
|
|
18
|
-
return this.__commonAlgorithmsCommunity(req, "algo_k_core", commonReq);
|
|
19
|
-
}
|
|
20
|
-
async algo_page_rank(req, commonReq) {
|
|
21
|
-
return this.__commonAlgorithmsCommunity(req, "algo_page_rank", commonReq);
|
|
22
|
-
}
|
|
23
|
-
async algo_sybil_rank(req, commonReq) {
|
|
24
|
-
return this.__commonAlgorithmsCommunity(req, "algo_sybil_rank", commonReq);
|
|
25
|
-
}
|
|
26
|
-
async algo_jaccard(req, commonReq) {
|
|
27
|
-
return this.__commonAlgorithmsCommunity(req, "algo_jaccard", commonReq);
|
|
28
|
-
}
|
|
29
|
-
async algo_cosine_similarity(req, commonReq) {
|
|
30
|
-
return this.__commonAlgorithmsCommunity(req, "algo_cosine_similarity", commonReq);
|
|
31
|
-
}
|
|
32
|
-
async algo_connected_component(req, commonReq) {
|
|
33
|
-
return this.__commonAlgorithmsCommunity(req, "algo_connected_component", commonReq);
|
|
34
|
-
}
|
|
35
|
-
async algo_lpa(req, commonReq) {
|
|
36
|
-
return this.__commonAlgorithmsCommunity(req, "algo_lpa", commonReq);
|
|
37
|
-
}
|
|
38
|
-
async algo_mst(req, commonReq) {
|
|
39
|
-
return this.__commonAlgorithmsCommunity(req, "algo_mst", commonReq);
|
|
40
|
-
}
|
|
41
|
-
async algo_hanp(req, commonReq) {
|
|
42
|
-
return this.__commonAlgorithmsCommunity(req, "algo_hanp", commonReq);
|
|
43
|
-
}
|
|
44
|
-
async algo_k_means(req, commonReq) {
|
|
45
|
-
return this.__commonAlgorithmsCommunity(req, "algo_k_means", commonReq);
|
|
46
|
-
}
|
|
47
|
-
async algo_louvain(req, commonReq) {
|
|
48
|
-
return this.__commonAlgorithmsCommunity(req, "algo_louvain", commonReq);
|
|
49
|
-
}
|
|
50
|
-
async algo_triangle_counting(req, commonReq) {
|
|
51
|
-
return this.__commonAlgorithmsCommunity(req, "algo_triangle_counting", commonReq);
|
|
52
|
-
}
|
|
53
|
-
async algo_hyperANF(req, commonReq) {
|
|
54
|
-
return this.__commonAlgorithmsCommunity(req, "algo_hyperANF", commonReq);
|
|
55
|
-
}
|
|
56
|
-
async algo_common_neighbours(req, commonReq) {
|
|
57
|
-
return this.__commonAlgorithmsCommunity(req, "algo_common_neighbours", commonReq);
|
|
58
|
-
}
|
|
59
|
-
async algo_subgraph(req, commonReq) {
|
|
60
|
-
return this.__commonAlgorithmsCommunity(req, "algo_subgraph", commonReq);
|
|
61
|
-
}
|
|
62
|
-
async algo_clustering_coefficient(req, commonReq) {
|
|
63
|
-
return this.__commonAlgorithmsCommunity(req, "algo_clustering_coefficient", commonReq);
|
|
64
|
-
}
|
|
65
|
-
async algo_variable_compute(req, commonReq) {
|
|
66
|
-
return this.__commonAlgorithmsCommunity(req, "variable_compute", commonReq);
|
|
67
|
-
}
|
|
68
|
-
async algo_bipartite(req, commonReq) {
|
|
69
|
-
return this.__commonAlgorithmsCommunity(req, "bipartite", commonReq);
|
|
70
|
-
}
|
|
71
|
-
async algo_adamic_adar(req, commonReq) {
|
|
72
|
-
return this.__commonAlgorithmsCommunity(req, "adamic_adar", commonReq);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.AlgorithmsCommunity = AlgorithmsCommunity;
|
|
76
|
-
//# sourceMappingURL=community.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"community.js","sourceRoot":"","sources":["../../../../src/connection/extra/algos/community.ts"],"names":[],"mappings":";;;AACA,wDAAiD;AAEjD,6CAA8C;AAE9C,MAAM,mBAAoB,SAAQ,gCAAc;IACtC,KAAK,CAAC,2BAA2B,CAAC,GAAoB,EAAE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CAAC,GAAwB,EAAE,SAAqC;QACjF,OAAO,IAAI,CAAC,2BAA2B,CAAC,GAAG,EAAE,eAAe,EAAE,SAAS,CAAC,CAAA;IAC1E,CAAC;IACD,KAAK,CAAC,2BAA2B,CAAC,GAAsC,EAAE,SAAqC;QAC7G,OAAO,IAAI,CAAC,2BAA2B,CAAC,GAAG,EAAE,6BAA6B,EAAE,SAAS,CAAC,CAAA;IACxF,CAAC;IACD,KAAK,CAAC,qBAAqB,CAAC,GAAgC,EAAE,SAAqC;QACjG,OAAO,IAAI,CAAC,2BAA2B,CAAC,GAAG,EAAE,kBAAkB,EAAE,SAAS,CAAC,CAAA;IAC5E,CAAC;IACD,KAAK,CAAC,cAAc,CAAC,GAAyB,EAAE,SAAqC;QACpF,OAAO,IAAI,CAAC,2BAA2B,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,GAA2B,EAAE,SAAqC;QACxF,OAAO,IAAI,CAAC,2BAA2B,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;IACvE,CAAC;CAEH;AACQ,kDAAmB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ConnectionBase } from "../connection.base";
|
|
2
|
-
import { AlgoParams, RequestType, ULTIPA } from "../../../types";
|
|
3
|
-
declare class AlgorithmsDegrees extends ConnectionBase {
|
|
4
|
-
private __common_AlgorithmsDegrees;
|
|
5
|
-
algo_degree(req: AlgoParams.degree, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
6
|
-
algo_closeness_centrality(req: AlgoParams.closeness_centrality, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
7
|
-
algo_graph_centrality(req: AlgoParams.graph_centrality, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
8
|
-
algo_betweenness_centrality(req: AlgoParams.betweenness_centrality, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ULTIPA.QueryReply>>;
|
|
9
|
-
}
|
|
10
|
-
export { AlgorithmsDegrees };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlgorithmsDegrees = void 0;
|
|
4
|
-
const connection_base_1 = require("../connection.base");
|
|
5
|
-
const algo_utils_1 = require("./algo.utils");
|
|
6
|
-
class AlgorithmsDegrees extends connection_base_1.ConnectionBase {
|
|
7
|
-
async __common_AlgorithmsDegrees(req, name, commonReq) {
|
|
8
|
-
return (0, algo_utils_1.algoCommonSend)(this, req, name, commonReq);
|
|
9
|
-
}
|
|
10
|
-
async algo_degree(req, commonReq) {
|
|
11
|
-
return this.__common_AlgorithmsDegrees(req, "algo_degree", commonReq);
|
|
12
|
-
}
|
|
13
|
-
async algo_closeness_centrality(req, commonReq) {
|
|
14
|
-
return this.__common_AlgorithmsDegrees(req, "algo_closeness", commonReq);
|
|
15
|
-
}
|
|
16
|
-
async algo_graph_centrality(req, commonReq) {
|
|
17
|
-
return this.__common_AlgorithmsDegrees(req, "algo_graph_centrality", commonReq);
|
|
18
|
-
}
|
|
19
|
-
async algo_betweenness_centrality(req, commonReq) {
|
|
20
|
-
return this.__common_AlgorithmsDegrees(req, "algo_betweenness_centrality", commonReq);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.AlgorithmsDegrees = AlgorithmsDegrees;
|
|
24
|
-
//# sourceMappingURL=degrees.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"degrees.js","sourceRoot":"","sources":["../../../../src/connection/extra/algos/degrees.ts"],"names":[],"mappings":";;;AACA,wDAAiD;AAEjD,6CAA8C;AAE9C,MAAM,iBAAkB,SAAQ,gCAAc;IACpC,KAAK,CAAC,0BAA0B,CAAC,GAAoB,EAAE,IAAY,EAAE,SAAqC;QAChH,OAAO,IAAA,2BAAc,EAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;IACnD,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,GAAsB,EAAE,SAAqC;QAC7E,OAAO,IAAI,CAAC,0BAA0B,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;IACvE,CAAC;IACD,KAAK,CAAC,yBAAyB,CAAC,GAAoC,EAAE,SAAqC;QACzG,OAAO,IAAI,CAAC,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAA;IAC1E,CAAC;IACD,KAAK,CAAC,qBAAqB,CAAC,GAAgC,EAAE,SAAqC;QACjG,OAAO,IAAI,CAAC,0BAA0B,CAAC,GAAG,EAAE,uBAAuB,EAAE,SAAS,CAAC,CAAA;IACjF,CAAC;IACD,KAAK,CAAC,2BAA2B,CAAC,GAAsC,EAAE,SAAqC;QAC7G,OAAO,IAAI,CAAC,0BAA0B,CAAC,GAAG,EAAE,6BAA6B,EAAE,SAAS,CAAC,CAAA;IACvF,CAAC;CACF;AAEQ,8CAAiB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
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 };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlgorithmsEmbedding = void 0;
|
|
4
|
-
const connection_base_1 = require("../connection.base");
|
|
5
|
-
const algo_utils_1 = require("./algo.utils");
|
|
6
|
-
class AlgorithmsEmbedding extends connection_base_1.ConnectionBase {
|
|
7
|
-
async __common_AlgorithmsEmbedding(req, name, commonReq) {
|
|
8
|
-
return (0, algo_utils_1.algoCommonSend)(this, req, name, commonReq);
|
|
9
|
-
}
|
|
10
|
-
async algo_random_walk(req, commonReq) {
|
|
11
|
-
return this.__common_AlgorithmsEmbedding(req, "algo_random_walk", commonReq);
|
|
12
|
-
}
|
|
13
|
-
async algo_random_walk_node2vec(req, commonReq) {
|
|
14
|
-
return this.__common_AlgorithmsEmbedding(req, "algo_random_walk_node2vec", commonReq);
|
|
15
|
-
}
|
|
16
|
-
async algo_random_walk_struc2vec(req, commonReq) {
|
|
17
|
-
return this.__common_AlgorithmsEmbedding(req, "algo_random_walk_struc2vec", commonReq);
|
|
18
|
-
}
|
|
19
|
-
async algo_node2vec(req, commonReq) {
|
|
20
|
-
return this.__common_AlgorithmsEmbedding(req, "algo_node2vec", commonReq);
|
|
21
|
-
}
|
|
22
|
-
async algo_line(req, commonReq) {
|
|
23
|
-
return this.__common_AlgorithmsEmbedding(req, "algo_line", commonReq);
|
|
24
|
-
}
|
|
25
|
-
async algo_struc2vec(req, commonReq) {
|
|
26
|
-
return this.__common_AlgorithmsEmbedding(req, "algo_struc2vec", commonReq);
|
|
27
|
-
}
|
|
28
|
-
async algo_fastRP(req, commonReq) {
|
|
29
|
-
return this.__common_AlgorithmsEmbedding(req, "algo_fastRP", commonReq);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.AlgorithmsEmbedding = AlgorithmsEmbedding;
|
|
33
|
-
//# sourceMappingURL=embedding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"embedding.js","sourceRoot":"","sources":["../../../../src/connection/extra/algos/embedding.ts"],"names":[],"mappings":";;;AACA,wDAAiD;AAEjD,6CAA8C;AAG9C,MAAM,mBAAqB,SAAQ,gCAAc;IACtC,KAAK,CAAC,4BAA4B,CAAC,GAAoB,EAAE,IAAY,EAAG,SAAqC;QAClH,OAAO,IAAA,2BAAc,EAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;IACrD,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,GAA2B,EAAE,SAAqC;QACtF,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,kBAAkB,EAAE,SAAS,CAAC,CAAA;IAC/E,CAAC;IACD,KAAK,CAAC,yBAAyB,CAAC,GAAoC,EAAE,SAAqC;QACxG,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,2BAA2B,EAAE,SAAS,CAAC,CAAA;IACxF,CAAC;IACD,KAAK,CAAC,0BAA0B,CAAC,GAAqC,EAAE,SAAqC;QAC1G,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,4BAA4B,EAAE,SAAS,CAAC,CAAA;IACzF,CAAC;IACD,KAAK,CAAC,aAAa,CAAC,GAAwB,EAAE,SAAqC;QAChF,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,eAAe,EAAE,SAAS,CAAC,CAAA;IAC5E,CAAC;IACD,KAAK,CAAC,SAAS,CAAC,GAAoB,EAAE,SAAqC;QACxE,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA;IACxE,CAAC;IACD,KAAK,CAAC,cAAc,CAAC,GAAyB,EAAE,SAAqC;QAClF,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAA;IAC7E,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,GAAsB,EAAE,SAAqC;QAC9E,OAAO,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;IACxE,CAAC;CACF;AAEQ,kDAAmB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ConnectionBase } from "./connection.base";
|
|
2
|
-
import { RequestType } from "../../types";
|
|
3
|
-
import { ExportRequest } from "../../proto/ultipa_pb";
|
|
4
|
-
import { RequestConfig, Response } from "../../types/types";
|
|
5
|
-
export declare class BaseExtra extends ConnectionBase {
|
|
6
|
-
/**
|
|
7
|
-
* Checking database server statistics.
|
|
8
|
-
*/
|
|
9
|
-
stats(config?: RequestConfig): Promise<Response>;
|
|
10
|
-
/**
|
|
11
|
-
* Download file from server.
|
|
12
|
-
*/
|
|
13
|
-
download(fileName: string, config: RequestType.CommonStreamRequire): Promise<import("@grpc/grpc-js").ClientReadableStream<import("../../proto/ultipa_pb").DownloadFileReply>>;
|
|
14
|
-
/**
|
|
15
|
-
* Exports nodes and edges from the current graph.
|
|
16
|
-
*/
|
|
17
|
-
export(exportRequest: ExportRequest, listener: RequestType.ExportListener): Promise<void>;
|
|
18
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseExtra = void 0;
|
|
4
|
-
const connection_base_1 = require("./connection.base");
|
|
5
|
-
const utils_1 = require("../../utils");
|
|
6
|
-
const ultipa_pb_1 = require("../../proto/ultipa_pb");
|
|
7
|
-
const types_1 = require("../../types/types");
|
|
8
|
-
const { CommandList } = utils_1.UQLMAKER;
|
|
9
|
-
class BaseExtra extends connection_base_1.ConnectionBase {
|
|
10
|
-
/**
|
|
11
|
-
* Checking database server statistics.
|
|
12
|
-
*/
|
|
13
|
-
async stats(config) {
|
|
14
|
-
// let command = CommandList.stats
|
|
15
|
-
let command = CommandList.licenseDump;
|
|
16
|
-
let uqlMaker = new utils_1.UQLMAKER(command, config);
|
|
17
|
-
return await this.uql(uqlMaker.toString(), config);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Download file from server.
|
|
21
|
-
*/
|
|
22
|
-
async download(fileName, config) {
|
|
23
|
-
let req = new ultipa_pb_1.DownloadFileRequest();
|
|
24
|
-
req.setFileName(fileName);
|
|
25
|
-
let clientInfo = await this.getClientInfo({
|
|
26
|
-
graphSetName: config?.graph,
|
|
27
|
-
timezone: config?.timezone,
|
|
28
|
-
timezoneOffset: config?.timezoneOffset,
|
|
29
|
-
});
|
|
30
|
-
let stream = clientInfo.client.controlsClient.downloadFile(req, clientInfo.metadata);
|
|
31
|
-
utils_1.streamHelper.commonDeal(stream, config?.stream, (chunkData) => {
|
|
32
|
-
let status = utils_1.FormatType.status(chunkData.getStatus());
|
|
33
|
-
if (status.code != types_1.ErrorCode.SUCCESS) {
|
|
34
|
-
let err = new Error(status.message);
|
|
35
|
-
err.code = status.code;
|
|
36
|
-
throw err;
|
|
37
|
-
}
|
|
38
|
-
let data = Buffer.from(chunkData.getChunk());
|
|
39
|
-
return data;
|
|
40
|
-
});
|
|
41
|
-
return stream;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Exports nodes and edges from the current graph.
|
|
45
|
-
*/
|
|
46
|
-
async export(exportRequest, listener) {
|
|
47
|
-
let clientInfo = await this.getClientInfo({
|
|
48
|
-
graphSetName: exportRequest.getGraph() || listener?.graph,
|
|
49
|
-
timezone: listener?.timezone,
|
|
50
|
-
timezoneOffset: listener?.timezoneOffset,
|
|
51
|
-
});
|
|
52
|
-
await new Promise((resolve, reject) => {
|
|
53
|
-
const originalCb = listener?.stream;
|
|
54
|
-
const wrappedCb = {
|
|
55
|
-
onData: async (data) => {
|
|
56
|
-
try {
|
|
57
|
-
await originalCb.onData(data);
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
reject(error);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
onEnd: () => {
|
|
64
|
-
originalCb.onEnd();
|
|
65
|
-
resolve();
|
|
66
|
-
},
|
|
67
|
-
onClose: () => {
|
|
68
|
-
resolve();
|
|
69
|
-
originalCb.onClose?.();
|
|
70
|
-
},
|
|
71
|
-
onError: (err) => {
|
|
72
|
-
reject(err);
|
|
73
|
-
originalCb.onError?.(err);
|
|
74
|
-
},
|
|
75
|
-
onPause: () => {
|
|
76
|
-
originalCb.onPause?.();
|
|
77
|
-
},
|
|
78
|
-
onReadable: () => {
|
|
79
|
-
originalCb.onReadable?.();
|
|
80
|
-
},
|
|
81
|
-
onResume: () => {
|
|
82
|
-
originalCb.onResume?.();
|
|
83
|
-
},
|
|
84
|
-
onStart: () => {
|
|
85
|
-
originalCb.onStart?.();
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
// config.stream = wrappedCb;
|
|
89
|
-
let stream = clientInfo.client.controlsClient.export(exportRequest, clientInfo.metadata);
|
|
90
|
-
utils_1.streamHelper.commonDeal(stream, wrappedCb, (chunkData) => {
|
|
91
|
-
let status = utils_1.FormatType.status(chunkData.getStatus());
|
|
92
|
-
if (status.code != types_1.ErrorCode.SUCCESS) {
|
|
93
|
-
let err = new Error(status.message);
|
|
94
|
-
err.code = status.code;
|
|
95
|
-
throw err;
|
|
96
|
-
}
|
|
97
|
-
if (exportRequest.getDbType() == ultipa_pb_1.DBType.DBNODE) {
|
|
98
|
-
let nodes = chunkData.getNodeTable();
|
|
99
|
-
return utils_1.FormatType.nodeTable(nodes, { timezone: listener.timezone });
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
let edges = chunkData.getEdgeTable();
|
|
103
|
-
return utils_1.FormatType.edgeTable(edges, { timezone: listener.timezone });
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
// let req = new ExportRequest()
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
exports.BaseExtra = BaseExtra;
|
|
111
|
-
//# sourceMappingURL=base.extra.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.extra.js","sourceRoot":"","sources":["../../../src/connection/extra/base.extra.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAGlD,uCAAiE;AACjE,qDAAmF;AACnF,6CAA8E;AAE9E,MAAM,EAAE,WAAW,EAAE,GAAG,gBAAQ,CAAA;AAEhC,MAAa,SAAU,SAAQ,gCAAc;IACzC;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,MAAsB;QAC9B,kCAAkC;QAClC,IAAI,OAAO,GAAG,WAAW,CAAC,WAAW,CAAA;QACrC,IAAI,QAAQ,GAAG,IAAI,gBAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QAC5C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAA;IACtD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,MAAuC;QACpE,IAAI,GAAG,GAAG,IAAI,+BAAmB,EAAE,CAAA;QACnC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;QACzB,IAAI,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC;YACtC,YAAY,EAAE,MAAM,EAAE,KAAK;YAC3B,QAAQ,EAAE,MAAM,EAAE,QAAQ;YAC1B,cAAc,EAAE,MAAM,EAAE,cAAc;SACzC,CAAC,CAAA;QACF,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC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GAAG,CAAA;iBACZ;gBACD,IAAI,aAAa,CAAC,SAAS,EAAE,IAAI,kBAAM,CAAC,MAAM,EAAE;oBAC5C,IAAI,KAAK,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;oBACrC,OAAO,kBAAU,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACvE;qBAAM;oBACH,IAAI,KAAK,GAAG,SAAS,CAAC,YAAY,EAAE,CAAA;oBACpC,OAAO,kBAAU,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACvE;YACL,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;QACF,gCAAgC;IAEpC,CAAC;CACJ;AApGD,8BAoGC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { EntityTable } from "../../proto/ultipa_pb";
|
|
2
|
-
import { InsertRequestConfig, InsertResponse, Edge, Response, Schema, Node } from "../../types/types";
|
|
3
|
-
import { SchemaExra } from "./schema.extra";
|
|
4
|
-
export declare class BatchInsertExtra extends SchemaExra {
|
|
5
|
-
/**
|
|
6
|
-
* Inserts new nodes of a schema into the current graph through gRPC. The properties within the node values must be consistent with those declared in the schema structure.
|
|
7
|
-
* @param table
|
|
8
|
-
* @param config
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
insertNodesBatch(table: EntityTable, config?: InsertRequestConfig): Promise<InsertResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* Inserts new nodes of a schema into the current graph through gRPC. The properties within the node values must be consistent with those declared in the schema structure.
|
|
14
|
-
* @param schema
|
|
15
|
-
* @param nodes
|
|
16
|
-
* @param config
|
|
17
|
-
* @returns InsertResponse
|
|
18
|
-
*/
|
|
19
|
-
insertNodesBatchBySchema(schema: Schema, nodes: Node[], config: InsertRequestConfig): Promise<InsertResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* Insert node list to shcem by schemaName
|
|
22
|
-
*/
|
|
23
|
-
insertNodes(schemaName: string, nodes: Node[], config?: InsertRequestConfig): Promise<Response>;
|
|
24
|
-
/**
|
|
25
|
-
* Insert edge list to shcem by schemaName
|
|
26
|
-
*/
|
|
27
|
-
insertEdges(schemaName: string, edges: Edge[], config?: InsertRequestConfig): Promise<Response>;
|
|
28
|
-
/**
|
|
29
|
-
* Inserts new nodes of one or multiple schemas to the current graph through gRPC. The properties within node values must be consistent with those defined in the corresponding schema structure.
|
|
30
|
-
* @param nodes
|
|
31
|
-
* @param config
|
|
32
|
-
* @returns
|
|
33
|
-
*/
|
|
34
|
-
insertNodesBatchAuto(nodes: Node[], config: InsertRequestConfig): Promise<Map<string, InsertResponse>>;
|
|
35
|
-
/**
|
|
36
|
-
* Inserts new edges of a schema into the current graph through gRPC. The properties within the edge values must be consistent with those declared in the schema structure.
|
|
37
|
-
* @param table
|
|
38
|
-
* @param config
|
|
39
|
-
* @returns
|
|
40
|
-
*/
|
|
41
|
-
insertEdgesBatch(table: EntityTable, config?: InsertRequestConfig): Promise<InsertResponse>;
|
|
42
|
-
/**
|
|
43
|
-
* Inserts new edges of a schema into the current graph through gRPC. The properties within the edge values must be consistent with those declared in the schema structure.
|
|
44
|
-
*/
|
|
45
|
-
insertEdgesBatchBySchema(schema: Schema, edges: Edge[], config: InsertRequestConfig): Promise<InsertResponse>;
|
|
46
|
-
validEdgeRows(rows: Edge[]): {
|
|
47
|
-
ok: boolean;
|
|
48
|
-
msg?: string;
|
|
49
|
-
failedIndex?: number;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Inserts new edges of one or multiple schemas to the current graph through gRPC. The properties within edge values must be consistent with those defined in the corresponding schema structure.
|
|
53
|
-
* @param edges
|
|
54
|
-
* @param config
|
|
55
|
-
* @returns
|
|
56
|
-
*/
|
|
57
|
-
insertEdgesBatchAuto(edges: Edge[], config: InsertRequestConfig): Promise<Map<string, InsertResponse>>;
|
|
58
|
-
}
|