@zilliz/milvus2-sdk-node 2.2.2 → 2.2.4
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/milvus/Client.d.ts +0 -8
- package/dist/milvus/Client.js +0 -17
- package/dist/milvus/Client.js.map +1 -1
- package/dist/milvus/Collection.d.ts +225 -131
- package/dist/milvus/Collection.js +262 -155
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/Data.d.ts +129 -125
- package/dist/milvus/Data.js +157 -150
- package/dist/milvus/Data.js.map +1 -1
- package/dist/milvus/MilvusIndex.d.ts +57 -53
- package/dist/milvus/MilvusIndex.js +61 -55
- package/dist/milvus/MilvusIndex.js.map +1 -1
- package/dist/milvus/Partition.d.ts +86 -79
- package/dist/milvus/Partition.js +89 -80
- package/dist/milvus/Partition.js.map +1 -1
- package/dist/milvus/Resource.d.ts +173 -0
- package/dist/milvus/Resource.js +356 -0
- package/dist/milvus/Resource.js.map +1 -0
- package/dist/milvus/User.d.ts +119 -93
- package/dist/milvus/User.js +133 -100
- package/dist/milvus/User.js.map +1 -1
- package/dist/milvus/Utils.d.ts +1 -1
- package/dist/milvus/const/Milvus.d.ts +272 -0
- package/dist/milvus/const/Milvus.js +375 -0
- package/dist/milvus/const/Milvus.js.map +1 -0
- package/dist/milvus/index.d.ts +3 -1
- package/dist/milvus/index.js +8 -5
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Collection.d.ts +88 -8
- package/dist/milvus/types/Collection.js +1 -9
- package/dist/milvus/types/Collection.js.map +1 -1
- package/dist/milvus/types/Common.d.ts +11 -267
- package/dist/milvus/types/Common.js +1 -369
- package/dist/milvus/types/Common.js.map +1 -1
- package/dist/milvus/types/Data.d.ts +154 -1
- package/dist/milvus/types/Index.d.ts +20 -1
- package/dist/milvus/types/Partition.d.ts +8 -1
- package/dist/milvus/types/Resource.d.ts +44 -0
- package/dist/milvus/types/{Search.js → Resource.js} +1 -1
- package/dist/milvus/types/Resource.js.map +1 -0
- package/dist/milvus/types/Response.d.ts +0 -246
- package/dist/milvus/types/Response.js.map +1 -1
- package/dist/milvus/types/User.d.ts +53 -1
- package/dist/milvus/types.d.ts +8 -7
- package/dist/milvus/types.js +2 -1
- package/dist/milvus/types.js.map +1 -1
- package/dist/milvus/utils/Format.d.ts +12 -11
- package/dist/milvus/utils/Format.js +27 -18
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/milvus/utils/Validate.d.ts +12 -0
- package/dist/milvus/utils/Validate.js +27 -5
- package/dist/milvus/utils/Validate.js.map +1 -1
- package/dist/proto/proto/common.proto +25 -2
- package/dist/proto/proto/google/protobuf/descriptor.proto +30 -0
- package/dist/proto/proto/milvus.proto +126 -0
- package/dist/proto/proto/msg.proto +107 -0
- package/dist/sdk.json +1 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.js +5 -32
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -10
- package/dist/milvus/types/Search.d.ts +0 -81
- package/dist/milvus/types/Search.js.map +0 -1
|
@@ -1,189 +1,9 @@
|
|
|
1
|
-
import { ConsistencyLevelEnum } from './Collection';
|
|
2
|
-
import { Privileges, IndexState, ImportState, KeyValuePair, NumberArrayId, SegmentState, StringArrayId, CompactionState, RbacObjects } from './Common';
|
|
3
1
|
export declare enum ErrorCode {
|
|
4
2
|
SUCCESS = "Success",
|
|
5
3
|
INDEX_NOT_EXIST = "IndexNotExist",
|
|
6
4
|
UNEXPECTED_ERROR = "UnexpectedError",
|
|
7
5
|
EMPTY_COLLECTION = "EmptyCollection"
|
|
8
6
|
}
|
|
9
|
-
interface TimeStamp {
|
|
10
|
-
created_timestamp: string;
|
|
11
|
-
created_utc_timestamp: string;
|
|
12
|
-
}
|
|
13
|
-
interface TimeStampArray {
|
|
14
|
-
created_timestamps: string[];
|
|
15
|
-
created_utc_timestamps: string[];
|
|
16
|
-
}
|
|
17
|
-
export interface ResStatus {
|
|
18
|
-
error_code: string | number;
|
|
19
|
-
reason: string;
|
|
20
|
-
}
|
|
21
|
-
export interface BoolResponse {
|
|
22
|
-
status: ResStatus;
|
|
23
|
-
value: Boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface CollectionData {
|
|
26
|
-
name: string;
|
|
27
|
-
id: string;
|
|
28
|
-
timestamp: string;
|
|
29
|
-
loadedPercentage: string;
|
|
30
|
-
}
|
|
31
|
-
export interface ShowCollectionsResponse extends TimeStampArray {
|
|
32
|
-
status: ResStatus;
|
|
33
|
-
data: CollectionData[];
|
|
34
|
-
}
|
|
35
|
-
export interface FieldSchema {
|
|
36
|
-
name: string;
|
|
37
|
-
description: string;
|
|
38
|
-
data_type: string;
|
|
39
|
-
is_primary_key?: boolean;
|
|
40
|
-
type_params: KeyValuePair[];
|
|
41
|
-
index_params: KeyValuePair[];
|
|
42
|
-
autoID: boolean;
|
|
43
|
-
}
|
|
44
|
-
export interface CollectionSchema {
|
|
45
|
-
name: string;
|
|
46
|
-
description: string;
|
|
47
|
-
fields: FieldSchema[];
|
|
48
|
-
}
|
|
49
|
-
export interface DescribeCollectionResponse extends TimeStamp {
|
|
50
|
-
status: ResStatus;
|
|
51
|
-
schema: CollectionSchema;
|
|
52
|
-
collectionID: string;
|
|
53
|
-
consistency_level: ConsistencyLevelEnum;
|
|
54
|
-
aliases: string[];
|
|
55
|
-
virtual_channel_names: string[];
|
|
56
|
-
physical_channel_names: string[];
|
|
57
|
-
}
|
|
58
|
-
export interface StatisticsResponse {
|
|
59
|
-
status: ResStatus;
|
|
60
|
-
stats: KeyValuePair[];
|
|
61
|
-
data: {
|
|
62
|
-
[x: string]: any;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export interface ShowPartitionsResponse extends TimeStampArray {
|
|
66
|
-
status: ResStatus;
|
|
67
|
-
partition_names: string[];
|
|
68
|
-
partitionIDs: number[];
|
|
69
|
-
}
|
|
70
|
-
export interface IndexDescription {
|
|
71
|
-
index_name: string;
|
|
72
|
-
indexID: number;
|
|
73
|
-
params: KeyValuePair[];
|
|
74
|
-
field_name: string;
|
|
75
|
-
}
|
|
76
|
-
export interface DescribeIndexResponse {
|
|
77
|
-
status: ResStatus;
|
|
78
|
-
index_descriptions: IndexDescription[];
|
|
79
|
-
}
|
|
80
|
-
export interface GetIndexStateResponse {
|
|
81
|
-
status: ResStatus;
|
|
82
|
-
state: IndexState;
|
|
83
|
-
}
|
|
84
|
-
export interface GetIndexBuildProgressResponse {
|
|
85
|
-
status: ResStatus;
|
|
86
|
-
indexed_rows: number;
|
|
87
|
-
total_rows: number;
|
|
88
|
-
}
|
|
89
|
-
export interface MutationResult {
|
|
90
|
-
succ_index: Number[];
|
|
91
|
-
err_index: Number[];
|
|
92
|
-
status: ResStatus;
|
|
93
|
-
acknowledged: boolean;
|
|
94
|
-
insert_cnt: string;
|
|
95
|
-
delete_cnt: string;
|
|
96
|
-
upsert_cnt: string;
|
|
97
|
-
timestamp: string;
|
|
98
|
-
IDs: StringArrayId | NumberArrayId;
|
|
99
|
-
}
|
|
100
|
-
export interface SearchResultData {
|
|
101
|
-
[x: string]: any;
|
|
102
|
-
score: number;
|
|
103
|
-
id: string;
|
|
104
|
-
}
|
|
105
|
-
export interface SearchResults {
|
|
106
|
-
status: ResStatus;
|
|
107
|
-
results: SearchResultData[];
|
|
108
|
-
}
|
|
109
|
-
export interface FlushResult {
|
|
110
|
-
status: ResStatus;
|
|
111
|
-
coll_segIDs: any;
|
|
112
|
-
}
|
|
113
|
-
export interface QueryResults {
|
|
114
|
-
status: ResStatus;
|
|
115
|
-
data: {
|
|
116
|
-
[x: string]: any;
|
|
117
|
-
}[];
|
|
118
|
-
}
|
|
119
|
-
export interface GetMetricsResponse {
|
|
120
|
-
status: ResStatus;
|
|
121
|
-
response: any;
|
|
122
|
-
component_name: string;
|
|
123
|
-
}
|
|
124
|
-
export interface CalcDistanceResponse {
|
|
125
|
-
status: ResStatus;
|
|
126
|
-
[x: string]: any;
|
|
127
|
-
}
|
|
128
|
-
export interface GetFlushStateResponse {
|
|
129
|
-
status: ResStatus;
|
|
130
|
-
flushed: boolean;
|
|
131
|
-
}
|
|
132
|
-
export interface QuerySegmentInfo {
|
|
133
|
-
segmentID: number;
|
|
134
|
-
collectionID: number;
|
|
135
|
-
partitionID: number;
|
|
136
|
-
mem_size: number;
|
|
137
|
-
num_rows: number;
|
|
138
|
-
index_name: string;
|
|
139
|
-
indexID: number;
|
|
140
|
-
nodeID: number;
|
|
141
|
-
state: SegmentState[];
|
|
142
|
-
}
|
|
143
|
-
export interface GetQuerySegmentInfoResponse {
|
|
144
|
-
status: ResStatus;
|
|
145
|
-
infos: QuerySegmentInfo[];
|
|
146
|
-
}
|
|
147
|
-
export interface CompactionResponse {
|
|
148
|
-
status: ResStatus;
|
|
149
|
-
compactionID: number;
|
|
150
|
-
}
|
|
151
|
-
export interface GetCompactionStateResponse {
|
|
152
|
-
status: ResStatus;
|
|
153
|
-
state: CompactionState;
|
|
154
|
-
executingPlanNo: number;
|
|
155
|
-
timeoutPlanNo: number;
|
|
156
|
-
completedPlanNo: number;
|
|
157
|
-
}
|
|
158
|
-
export interface GetCompactionPlansResponse {
|
|
159
|
-
status: ResStatus;
|
|
160
|
-
state: CompactionState;
|
|
161
|
-
mergeInfos: {
|
|
162
|
-
sources: number[];
|
|
163
|
-
target: number;
|
|
164
|
-
}[];
|
|
165
|
-
}
|
|
166
|
-
export interface ListCredUsersResponse {
|
|
167
|
-
status: ResStatus;
|
|
168
|
-
usernames: string[];
|
|
169
|
-
}
|
|
170
|
-
export interface ReplicasResponse {
|
|
171
|
-
status: ResStatus;
|
|
172
|
-
replicas: ReplicaInfo[];
|
|
173
|
-
}
|
|
174
|
-
export interface ReplicaInfo {
|
|
175
|
-
replicaID: number;
|
|
176
|
-
collectionID: number;
|
|
177
|
-
partition_ids: number[];
|
|
178
|
-
shard_replicas: ShardReplica[];
|
|
179
|
-
node_ids: number[];
|
|
180
|
-
}
|
|
181
|
-
export interface ShardReplica {
|
|
182
|
-
leaderID: number;
|
|
183
|
-
leader_addr: string;
|
|
184
|
-
dm_channel_name: string;
|
|
185
|
-
node_ids: number[];
|
|
186
|
-
}
|
|
187
7
|
export interface GetVersionResponse {
|
|
188
8
|
version: string;
|
|
189
9
|
}
|
|
@@ -191,69 +11,3 @@ export interface CheckHealthResponse {
|
|
|
191
11
|
isHealthy: boolean;
|
|
192
12
|
reasons: [];
|
|
193
13
|
}
|
|
194
|
-
export interface ImportResponse {
|
|
195
|
-
status: ResStatus;
|
|
196
|
-
tasks: number[];
|
|
197
|
-
}
|
|
198
|
-
export interface GetImportStateResponse {
|
|
199
|
-
status: ResStatus;
|
|
200
|
-
state: ImportState;
|
|
201
|
-
row_count: number;
|
|
202
|
-
id_list: number[];
|
|
203
|
-
infos: KeyValuePair[];
|
|
204
|
-
id: number;
|
|
205
|
-
collection_id: number;
|
|
206
|
-
segment_ids: number[];
|
|
207
|
-
create_ts: number;
|
|
208
|
-
}
|
|
209
|
-
export interface ListImportTasksResponse {
|
|
210
|
-
status: ResStatus;
|
|
211
|
-
tasks: GetImportStateResponse[];
|
|
212
|
-
}
|
|
213
|
-
declare type RoleEntity = {
|
|
214
|
-
name: string;
|
|
215
|
-
};
|
|
216
|
-
declare type User = {
|
|
217
|
-
name: string;
|
|
218
|
-
};
|
|
219
|
-
declare type RoleResult = {
|
|
220
|
-
users: User[];
|
|
221
|
-
role: RoleEntity;
|
|
222
|
-
};
|
|
223
|
-
export interface SelectRoleResponse {
|
|
224
|
-
status: ResStatus;
|
|
225
|
-
results: RoleResult[];
|
|
226
|
-
}
|
|
227
|
-
declare type UserResult = {
|
|
228
|
-
user: User;
|
|
229
|
-
roles: RoleEntity[];
|
|
230
|
-
};
|
|
231
|
-
export interface SelectUserResponse {
|
|
232
|
-
status: ResStatus;
|
|
233
|
-
results: UserResult[];
|
|
234
|
-
}
|
|
235
|
-
declare type ObjectEntity = {
|
|
236
|
-
name: RbacObjects;
|
|
237
|
-
};
|
|
238
|
-
declare type PrivilegeEntity = {
|
|
239
|
-
name: Privileges;
|
|
240
|
-
};
|
|
241
|
-
declare type Grantor = {
|
|
242
|
-
user: User;
|
|
243
|
-
privilege: PrivilegeEntity;
|
|
244
|
-
};
|
|
245
|
-
declare type GrantEntity = {
|
|
246
|
-
role: RoleEntity;
|
|
247
|
-
object: ObjectEntity;
|
|
248
|
-
object_name: string;
|
|
249
|
-
grantor: Grantor;
|
|
250
|
-
};
|
|
251
|
-
export interface SelectGrantResponse {
|
|
252
|
-
status: ResStatus;
|
|
253
|
-
entities: GrantEntity[];
|
|
254
|
-
}
|
|
255
|
-
export interface HasRoleResponse {
|
|
256
|
-
status: ResStatus;
|
|
257
|
-
hasRole: boolean;
|
|
258
|
-
}
|
|
259
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;AAAA,IAAY,SA2BX;AA3BD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,8CAAiC,CAAA;IACjC,iDAAoC,CAAA;IACpC,iDAAoC,CAAA;IACpC,qCAAqC;IACrC,2CAA2C;IAC3C,mDAAmD;IACnD,yCAAyC;IACzC,2CAA2C;IAC3C,6CAA6C;IAC7C,uDAAuD;IACvD,iCAAiC;IACjC,2CAA2C;IAC3C,2CAA2C;IAC3C,mDAAmD;IACnD,qCAAqC;IACrC,+BAA+B;IAC/B,iCAAiC;IACjC,iDAAiD;IACjD,6CAA6C;IAC7C,iDAAiD;IACjD,6CAA6C;IAC7C,2CAA2C;IAC3C,mCAAmC;IACnC,+CAA+C;IAC/C,mCAAmC;AACrC,CAAC,EA3BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA2BpB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { GrpcTimeOut, Privileges,
|
|
1
|
+
import { GrpcTimeOut, Privileges, ResStatus } from './Common';
|
|
2
|
+
import { RbacObjects } from '../const/Milvus';
|
|
2
3
|
export interface UpdateUserReq extends GrpcTimeOut {
|
|
3
4
|
username: string;
|
|
4
5
|
oldPassword: string;
|
|
@@ -49,3 +50,54 @@ export interface SelectGrantReq extends OperateRolePrivilegeReq {
|
|
|
49
50
|
export interface ListGrantsReq extends GrpcTimeOut {
|
|
50
51
|
roleName: string;
|
|
51
52
|
}
|
|
53
|
+
export interface ListCredUsersResponse {
|
|
54
|
+
status: ResStatus;
|
|
55
|
+
usernames: string[];
|
|
56
|
+
}
|
|
57
|
+
type RoleEntity = {
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
type User = {
|
|
61
|
+
name: string;
|
|
62
|
+
};
|
|
63
|
+
type RoleResult = {
|
|
64
|
+
users: User[];
|
|
65
|
+
role: RoleEntity;
|
|
66
|
+
};
|
|
67
|
+
export interface SelectRoleResponse {
|
|
68
|
+
status: ResStatus;
|
|
69
|
+
results: RoleResult[];
|
|
70
|
+
}
|
|
71
|
+
type UserResult = {
|
|
72
|
+
user: User;
|
|
73
|
+
roles: RoleEntity[];
|
|
74
|
+
};
|
|
75
|
+
export interface SelectUserResponse {
|
|
76
|
+
status: ResStatus;
|
|
77
|
+
results: UserResult[];
|
|
78
|
+
}
|
|
79
|
+
type ObjectEntity = {
|
|
80
|
+
name: RbacObjects;
|
|
81
|
+
};
|
|
82
|
+
type PrivilegeEntity = {
|
|
83
|
+
name: Privileges;
|
|
84
|
+
};
|
|
85
|
+
type Grantor = {
|
|
86
|
+
user: User;
|
|
87
|
+
privilege: PrivilegeEntity;
|
|
88
|
+
};
|
|
89
|
+
type GrantEntity = {
|
|
90
|
+
role: RoleEntity;
|
|
91
|
+
object: ObjectEntity;
|
|
92
|
+
object_name: string;
|
|
93
|
+
grantor: Grantor;
|
|
94
|
+
};
|
|
95
|
+
export interface SelectGrantResponse {
|
|
96
|
+
status: ResStatus;
|
|
97
|
+
entities: GrantEntity[];
|
|
98
|
+
}
|
|
99
|
+
export interface HasRoleResponse {
|
|
100
|
+
status: ResStatus;
|
|
101
|
+
hasRole: boolean;
|
|
102
|
+
}
|
|
103
|
+
export {};
|
package/dist/milvus/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
1
|
+
export * from './types/Collection';
|
|
2
|
+
export * from './types/Data';
|
|
3
|
+
export * from './types/Common';
|
|
4
|
+
export * from './types/Index';
|
|
5
|
+
export * from './types/Partition';
|
|
6
|
+
export * from './types/Response';
|
|
7
|
+
export * from './types/User';
|
|
8
|
+
export * from './types/Resource';
|
package/dist/milvus/types.js
CHANGED
|
@@ -20,5 +20,6 @@ __exportStar(require("./types/Common"), exports);
|
|
|
20
20
|
__exportStar(require("./types/Index"), exports);
|
|
21
21
|
__exportStar(require("./types/Partition"), exports);
|
|
22
22
|
__exportStar(require("./types/Response"), exports);
|
|
23
|
-
__exportStar(require("./types/
|
|
23
|
+
__exportStar(require("./types/User"), exports);
|
|
24
|
+
__exportStar(require("./types/Resource"), exports);
|
|
24
25
|
//# sourceMappingURL=types.js.map
|
package/dist/milvus/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../milvus/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,+CAA6B;AAE7B,iDAA+B;AAE/B,gDAA8B;AAE9B,oDAAkC;AAElC,mDAAiC;AAEjC,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../milvus/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,+CAA6B;AAE7B,iDAA+B;AAE/B,gDAA8B;AAE9B,oDAAkC;AAElC,mDAAiC;AAEjC,+CAA6B;AAE7B,mDAAiC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyValuePair } from
|
|
1
|
+
import { KeyValuePair } from '../types/Common';
|
|
2
2
|
/**
|
|
3
3
|
* parse [{key:"row_count",value:4}] to {row_count:4}
|
|
4
4
|
* @param data key value pair array
|
|
@@ -11,7 +11,7 @@ export declare const formatKeyValueData: (data: KeyValuePair[], keys: string[])
|
|
|
11
11
|
/**
|
|
12
12
|
* parse {row_count:4} to [{key:"row_count",value:"4"}]
|
|
13
13
|
* @param data Object
|
|
14
|
-
* @
|
|
14
|
+
* @returns {KeyValuePair[]}
|
|
15
15
|
*/
|
|
16
16
|
export declare const parseToKeyValue: (data?: {
|
|
17
17
|
[x: string]: any;
|
|
@@ -27,14 +27,14 @@ export declare const formatNumberPrecision: (number: number, precision: number)
|
|
|
27
27
|
* Convert a hybrid timestamp to UNIX Epoch time ignoring the logic part.
|
|
28
28
|
*
|
|
29
29
|
* @param data
|
|
30
|
-
* | Property | Type
|
|
30
|
+
* | Property | Type | Description |
|
|
31
31
|
* | :---------------- | :---- | :------------------------------- |
|
|
32
32
|
* | hybridts | String or BigInt | The known hybrid timestamp to convert to UNIX Epoch time. Non-negative interger range from 0 to 18446744073709551615. |
|
|
33
33
|
*
|
|
34
34
|
*
|
|
35
35
|
*
|
|
36
|
-
* @
|
|
37
|
-
*
|
|
36
|
+
* @returns
|
|
37
|
+
* | Property | Description |
|
|
38
38
|
* | :-----------| :------------------------------- |
|
|
39
39
|
* | unixtime as string | The Unix Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT). |
|
|
40
40
|
*
|
|
@@ -50,14 +50,14 @@ export declare const hybridtsToUnixtime: (hybridts: bigint | string) => string;
|
|
|
50
50
|
* Generate a hybrid timestamp based on Unix Epoch time, timedelta and incremental time internval.
|
|
51
51
|
*
|
|
52
52
|
* @param data
|
|
53
|
-
* | Property | Type
|
|
53
|
+
* | Property | Type | Description |
|
|
54
54
|
* | :---------------- | :---- | :------------------------------- |
|
|
55
55
|
* | unixtime | string or bigint | The known Unix Epoch time used to generate a hybrid timestamp. The Unix Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT). |
|
|
56
56
|
*
|
|
57
57
|
*
|
|
58
58
|
*
|
|
59
|
-
* @
|
|
60
|
-
* | Property | Type
|
|
59
|
+
* @returns
|
|
60
|
+
* | Property | Type | Description |
|
|
61
61
|
* | :-----------| :--- | :------------------------------- |
|
|
62
62
|
* | Hybrid timetamp | String | Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615. |
|
|
63
63
|
*
|
|
@@ -73,14 +73,14 @@ export declare const unixtimeToHybridts: (unixtime: bigint | string) => string;
|
|
|
73
73
|
* Generate a hybrid timestamp based on datetime。
|
|
74
74
|
*
|
|
75
75
|
* @param data
|
|
76
|
-
* | Property | Type
|
|
76
|
+
* | Property | Type | Description |
|
|
77
77
|
* | :---------------- | :---- | :------------------------------- |
|
|
78
78
|
* | datetime | Date | The known datetime used to generate a hybrid timestamp. |
|
|
79
79
|
*
|
|
80
80
|
*
|
|
81
81
|
*
|
|
82
|
-
* @
|
|
83
|
-
* | Property | Type
|
|
82
|
+
* @returns
|
|
83
|
+
* | Property | Type | Description |
|
|
84
84
|
* | :-----------| :--- | :------------------------------- |
|
|
85
85
|
* | Hybrid timetamp | String | Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615. |
|
|
86
86
|
*
|
|
@@ -93,3 +93,4 @@ export declare const unixtimeToHybridts: (unixtime: bigint | string) => string;
|
|
|
93
93
|
*/
|
|
94
94
|
export declare const datetimeToHybrids: (datetime: Date) => string;
|
|
95
95
|
export declare const stringToBase64: (str: string) => string;
|
|
96
|
+
export declare const formatAddress: (address: string) => string;
|
|
@@ -9,8 +9,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.stringToBase64 = exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
12
|
+
exports.formatAddress = exports.stringToBase64 = exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
13
13
|
var index_1 = require("./index");
|
|
14
|
+
var Milvus_1 = require("../const/Milvus");
|
|
14
15
|
var ErrorReason_1 = require("../const/ErrorReason");
|
|
15
16
|
/**
|
|
16
17
|
* parse [{key:"row_count",value:4}] to {row_count:4}
|
|
@@ -30,7 +31,7 @@ exports.formatKeyValueData = formatKeyValueData;
|
|
|
30
31
|
/**
|
|
31
32
|
* parse {row_count:4} to [{key:"row_count",value:"4"}]
|
|
32
33
|
* @param data Object
|
|
33
|
-
* @
|
|
34
|
+
* @returns {KeyValuePair[]}
|
|
34
35
|
*/
|
|
35
36
|
var parseToKeyValue = function (data) {
|
|
36
37
|
return data
|
|
@@ -47,23 +48,23 @@ exports.parseToKeyValue = parseToKeyValue;
|
|
|
47
48
|
var formatNumberPrecision = function (number, precision) {
|
|
48
49
|
return Number(number
|
|
49
50
|
.toString()
|
|
50
|
-
.split(
|
|
51
|
+
.split('.')
|
|
51
52
|
.map(function (v, i) {
|
|
52
53
|
if (i === 1) {
|
|
53
54
|
return v.slice(0, precision);
|
|
54
55
|
}
|
|
55
56
|
return v;
|
|
56
57
|
})
|
|
57
|
-
.join(
|
|
58
|
+
.join('.'));
|
|
58
59
|
};
|
|
59
60
|
exports.formatNumberPrecision = formatNumberPrecision;
|
|
60
61
|
var LOGICAL_BITS = BigInt(18);
|
|
61
62
|
// const LOGICAL_BITS_MASK = (1 << LOGICAL_BITS) - 1;
|
|
62
63
|
var checkTimeParam = function (ts) {
|
|
63
64
|
switch (typeof ts) {
|
|
64
|
-
case
|
|
65
|
+
case 'bigint':
|
|
65
66
|
return true;
|
|
66
|
-
case
|
|
67
|
+
case 'string':
|
|
67
68
|
return isNaN(Number(ts)) ? false : true;
|
|
68
69
|
default:
|
|
69
70
|
return false;
|
|
@@ -73,14 +74,14 @@ var checkTimeParam = function (ts) {
|
|
|
73
74
|
* Convert a hybrid timestamp to UNIX Epoch time ignoring the logic part.
|
|
74
75
|
*
|
|
75
76
|
* @param data
|
|
76
|
-
* | Property | Type
|
|
77
|
+
* | Property | Type | Description |
|
|
77
78
|
* | :---------------- | :---- | :------------------------------- |
|
|
78
79
|
* | hybridts | String or BigInt | The known hybrid timestamp to convert to UNIX Epoch time. Non-negative interger range from 0 to 18446744073709551615. |
|
|
79
80
|
*
|
|
80
81
|
*
|
|
81
82
|
*
|
|
82
|
-
* @
|
|
83
|
-
*
|
|
83
|
+
* @returns
|
|
84
|
+
* | Property | Description |
|
|
84
85
|
* | :-----------| :------------------------------- |
|
|
85
86
|
* | unixtime as string | The Unix Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT). |
|
|
86
87
|
*
|
|
@@ -95,7 +96,7 @@ var hybridtsToUnixtime = function (hybridts) {
|
|
|
95
96
|
if (!checkTimeParam(hybridts)) {
|
|
96
97
|
throw new Error("hybridts ".concat(ErrorReason_1.ERROR_REASONS.TIMESTAMP_PARAM_CHECK));
|
|
97
98
|
}
|
|
98
|
-
var timestamp = typeof hybridts ===
|
|
99
|
+
var timestamp = typeof hybridts === 'bigint' ? hybridts : BigInt(hybridts);
|
|
99
100
|
var physical = timestamp >> LOGICAL_BITS;
|
|
100
101
|
return (physical / BigInt(1000)).toString();
|
|
101
102
|
};
|
|
@@ -104,14 +105,14 @@ exports.hybridtsToUnixtime = hybridtsToUnixtime;
|
|
|
104
105
|
* Generate a hybrid timestamp based on Unix Epoch time, timedelta and incremental time internval.
|
|
105
106
|
*
|
|
106
107
|
* @param data
|
|
107
|
-
* | Property | Type
|
|
108
|
+
* | Property | Type | Description |
|
|
108
109
|
* | :---------------- | :---- | :------------------------------- |
|
|
109
110
|
* | unixtime | string or bigint | The known Unix Epoch time used to generate a hybrid timestamp. The Unix Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT). |
|
|
110
111
|
*
|
|
111
112
|
*
|
|
112
113
|
*
|
|
113
|
-
* @
|
|
114
|
-
* | Property | Type
|
|
114
|
+
* @returns
|
|
115
|
+
* | Property | Type | Description |
|
|
115
116
|
* | :-----------| :--- | :------------------------------- |
|
|
116
117
|
* | Hybrid timetamp | String | Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615. |
|
|
117
118
|
*
|
|
@@ -126,7 +127,7 @@ var unixtimeToHybridts = function (unixtime) {
|
|
|
126
127
|
if (!checkTimeParam(unixtime)) {
|
|
127
128
|
throw new Error("hybridts ".concat(ErrorReason_1.ERROR_REASONS.TIMESTAMP_PARAM_CHECK));
|
|
128
129
|
}
|
|
129
|
-
var timestamp = typeof unixtime ===
|
|
130
|
+
var timestamp = typeof unixtime === 'bigint' ? unixtime : BigInt(unixtime);
|
|
130
131
|
var physical = (timestamp * BigInt(1000)) << LOGICAL_BITS;
|
|
131
132
|
return physical.toString();
|
|
132
133
|
};
|
|
@@ -135,14 +136,14 @@ exports.unixtimeToHybridts = unixtimeToHybridts;
|
|
|
135
136
|
* Generate a hybrid timestamp based on datetime。
|
|
136
137
|
*
|
|
137
138
|
* @param data
|
|
138
|
-
* | Property | Type
|
|
139
|
+
* | Property | Type | Description |
|
|
139
140
|
* | :---------------- | :---- | :------------------------------- |
|
|
140
141
|
* | datetime | Date | The known datetime used to generate a hybrid timestamp. |
|
|
141
142
|
*
|
|
142
143
|
*
|
|
143
144
|
*
|
|
144
|
-
* @
|
|
145
|
-
* | Property | Type
|
|
145
|
+
* @returns
|
|
146
|
+
* | Property | Type | Description |
|
|
146
147
|
* | :-----------| :--- | :------------------------------- |
|
|
147
148
|
* | Hybrid timetamp | String | Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615. |
|
|
148
149
|
*
|
|
@@ -160,6 +161,14 @@ var datetimeToHybrids = function (datetime) {
|
|
|
160
161
|
return (0, exports.unixtimeToHybridts)((datetime.getTime() / 1000).toString());
|
|
161
162
|
};
|
|
162
163
|
exports.datetimeToHybrids = datetimeToHybrids;
|
|
163
|
-
var stringToBase64 = function (str) {
|
|
164
|
+
var stringToBase64 = function (str) {
|
|
165
|
+
return Buffer.from(str, 'utf-8').toString('base64');
|
|
166
|
+
};
|
|
164
167
|
exports.stringToBase64 = stringToBase64;
|
|
168
|
+
var formatAddress = function (address) {
|
|
169
|
+
// remove http or https prefix from address
|
|
170
|
+
var ip = address.replace(/(http|https)*:\/\//, '');
|
|
171
|
+
return ip.includes(':') ? ip : "".concat(ip, ":").concat(Milvus_1.DEFAULT_MILVUS_PORT);
|
|
172
|
+
};
|
|
173
|
+
exports.formatAddress = formatAddress;
|
|
165
174
|
//# sourceMappingURL=Format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../milvus/utils/Format.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAuC;AACvC,oDAAqD;AAGrD;;;;;GAKG;AACI,IAAM,kBAAkB,GAAG,UAAC,IAAoB,EAAE,IAAc;IACrE,IAAM,MAAM,GAAyB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../milvus/utils/Format.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAuC;AACvC,0CAAsD;AACtD,oDAAqD;AAGrD;;;;;GAKG;AACI,IAAM,kBAAkB,GAAG,UAAC,IAAoB,EAAE,IAAc;IACrE,IAAM,MAAM,GAAyB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAA,CAAC;QACZ,IAAM,KAAK,GAAG,IAAA,oBAAY,EAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,CAAC,CAAC,GAAG,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AAC,eAAe,CAAE,CAAC,CAAC;KAC9D;IACD,OAAO,IAAA,0BAAkB,EAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AACpE,CAAC,CAAC;AALW,QAAA,iBAAiB,qBAK5B;AAEK,IAAM,cAAc,GAAG,UAAC,GAAW;IACxC,OAAA,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAA5C,CAA4C,CAAC;AADlC,QAAA,cAAc,kBACoB;AAExC,IAAM,aAAa,GAAG,UAAC,OAAe;IAC3C,2CAA2C;IAC3C,IAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IACrD,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAG,EAAE,cAAI,4BAAmB,CAAE,CAAC;AAChE,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
|
|
@@ -7,3 +7,15 @@ import { FieldType } from '../types/Collection';
|
|
|
7
7
|
* @param fields
|
|
8
8
|
*/
|
|
9
9
|
export declare const checkCollectionFields: (fields: FieldType[]) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* check if the request contains collection_name
|
|
12
|
+
* otherwise throw an error
|
|
13
|
+
* @param data
|
|
14
|
+
*/
|
|
15
|
+
export declare const checkCollectionName: (data: any) => void;
|
|
16
|
+
/**
|
|
17
|
+
* check if the request contains collection_name and partition_name
|
|
18
|
+
* otherwise throw an error
|
|
19
|
+
* @param data
|
|
20
|
+
*/
|
|
21
|
+
export declare const checkCollectionAndPartitionName: (data: any) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkCollectionFields = void 0;
|
|
3
|
+
exports.checkCollectionAndPartitionName = exports.checkCollectionName = exports.checkCollectionFields = void 0;
|
|
4
4
|
var ErrorReason_1 = require("../const/ErrorReason");
|
|
5
|
-
var
|
|
5
|
+
var Milvus_1 = require("../const/Milvus");
|
|
6
6
|
/**
|
|
7
7
|
* when create collection, field must contain 2 Fields.
|
|
8
8
|
* Type is int64 or varchar and primary_key = true
|
|
@@ -11,9 +11,9 @@ var Common_1 = require("../types/Common");
|
|
|
11
11
|
* @param fields
|
|
12
12
|
*/
|
|
13
13
|
var checkCollectionFields = function (fields) {
|
|
14
|
-
var vectorTypes = [
|
|
14
|
+
var vectorTypes = [Milvus_1.DataType.BinaryVector, Milvus_1.DataType.FloatVector];
|
|
15
15
|
// primary key only support DataType.Int64 and varchar
|
|
16
|
-
var primaryTypes = [
|
|
16
|
+
var primaryTypes = [Milvus_1.DataType.Int64, Milvus_1.DataType.VarChar];
|
|
17
17
|
if (!fields.find(function (v) { return v.data_type && primaryTypes.includes(v.data_type) && v.is_primary_key; })) {
|
|
18
18
|
throw new Error(ErrorReason_1.ERROR_REASONS.CREATE_COLLECTION_CHECK_PRIMARY_KEY);
|
|
19
19
|
}
|
|
@@ -26,7 +26,7 @@ var checkCollectionFields = function (fields) {
|
|
|
26
26
|
if (!dim) {
|
|
27
27
|
throw new Error(ErrorReason_1.ERROR_REASONS.CREATE_COLLECTION_CHECK_MISS_DIM);
|
|
28
28
|
}
|
|
29
|
-
if (v.data_type ===
|
|
29
|
+
if (v.data_type === Milvus_1.DataType.BinaryVector && Number(dim) % 8 > 0) {
|
|
30
30
|
throw new Error(ErrorReason_1.ERROR_REASONS.CREATE_COLLECTION_CHECK_BINARY_DIM);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -34,4 +34,26 @@ var checkCollectionFields = function (fields) {
|
|
|
34
34
|
return true;
|
|
35
35
|
};
|
|
36
36
|
exports.checkCollectionFields = checkCollectionFields;
|
|
37
|
+
/**
|
|
38
|
+
* check if the request contains collection_name
|
|
39
|
+
* otherwise throw an error
|
|
40
|
+
* @param data
|
|
41
|
+
*/
|
|
42
|
+
var checkCollectionName = function (data) {
|
|
43
|
+
if (!data || !data.collection_name) {
|
|
44
|
+
throw new Error(ErrorReason_1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.checkCollectionName = checkCollectionName;
|
|
48
|
+
/**
|
|
49
|
+
* check if the request contains collection_name and partition_name
|
|
50
|
+
* otherwise throw an error
|
|
51
|
+
* @param data
|
|
52
|
+
*/
|
|
53
|
+
var checkCollectionAndPartitionName = function (data) {
|
|
54
|
+
if (!data || !data.collection_name || !data.partition_name) {
|
|
55
|
+
throw new Error(ErrorReason_1.ERROR_REASONS.COLLECTION_PARTITION_NAME_ARE_REQUIRED);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.checkCollectionAndPartitionName = checkCollectionAndPartitionName;
|
|
37
59
|
//# sourceMappingURL=Validate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validate.js","sourceRoot":"","sources":["../../../milvus/utils/Validate.ts"],"names":[],"mappings":";;;AAAA,oDAAqD;AAErD,0CAA2C;AAE3C;;;;;;GAMG;AACI,IAAM,qBAAqB,GAAG,UAAC,MAAmB;IACvD,IAAM,WAAW,GAAG,CAAC,iBAAQ,CAAC,YAAY,EAAE,iBAAQ,CAAC,WAAW,CAAC,CAAC;IAClE,sDAAsD;IACtD,IAAM,YAAY,GAAG,CAAC,iBAAQ,CAAC,KAAK,EAAE,iBAAQ,CAAC,OAAO,CAAC,CAAC;IACxD,IACE,CAAC,MAAM,CAAC,IAAI,CACV,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,SAAS,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,cAAc,EAArE,CAAqE,CAC3E,EACD;QACA,MAAM,IAAI,KAAK,CAAC,2BAAa,CAAC,mCAAmC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