@zilliz/milvus2-sdk-node 2.2.3 → 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 +270 -0
- package/dist/milvus/const/Milvus.js +370 -1
- package/dist/milvus/const/Milvus.js.map +1 -1
- package/dist/milvus/index.d.ts +3 -1
- package/dist/milvus/index.js +6 -4
- 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 +10 -10
- package/dist/milvus/utils/Format.js +10 -10
- 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 +16 -1
- package/dist/proto/proto/milvus.proto +40 -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 +1 -31
- 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"}
|
|
@@ -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
|
*
|
|
@@ -31,7 +31,7 @@ exports.formatKeyValueData = formatKeyValueData;
|
|
|
31
31
|
/**
|
|
32
32
|
* parse {row_count:4} to [{key:"row_count",value:"4"}]
|
|
33
33
|
* @param data Object
|
|
34
|
-
* @
|
|
34
|
+
* @returns {KeyValuePair[]}
|
|
35
35
|
*/
|
|
36
36
|
var parseToKeyValue = function (data) {
|
|
37
37
|
return data
|
|
@@ -74,14 +74,14 @@ var checkTimeParam = function (ts) {
|
|
|
74
74
|
* Convert a hybrid timestamp to UNIX Epoch time ignoring the logic part.
|
|
75
75
|
*
|
|
76
76
|
* @param data
|
|
77
|
-
* | Property | Type
|
|
77
|
+
* | Property | Type | Description |
|
|
78
78
|
* | :---------------- | :---- | :------------------------------- |
|
|
79
79
|
* | hybridts | String or BigInt | The known hybrid timestamp to convert to UNIX Epoch time. Non-negative interger range from 0 to 18446744073709551615. |
|
|
80
80
|
*
|
|
81
81
|
*
|
|
82
82
|
*
|
|
83
|
-
* @
|
|
84
|
-
*
|
|
83
|
+
* @returns
|
|
84
|
+
* | Property | Description |
|
|
85
85
|
* | :-----------| :------------------------------- |
|
|
86
86
|
* | unixtime as string | The Unix Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT). |
|
|
87
87
|
*
|
|
@@ -105,14 +105,14 @@ exports.hybridtsToUnixtime = hybridtsToUnixtime;
|
|
|
105
105
|
* Generate a hybrid timestamp based on Unix Epoch time, timedelta and incremental time internval.
|
|
106
106
|
*
|
|
107
107
|
* @param data
|
|
108
|
-
* | Property | Type
|
|
108
|
+
* | Property | Type | Description |
|
|
109
109
|
* | :---------------- | :---- | :------------------------------- |
|
|
110
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). |
|
|
111
111
|
*
|
|
112
112
|
*
|
|
113
113
|
*
|
|
114
|
-
* @
|
|
115
|
-
* | Property | Type
|
|
114
|
+
* @returns
|
|
115
|
+
* | Property | Type | Description |
|
|
116
116
|
* | :-----------| :--- | :------------------------------- |
|
|
117
117
|
* | Hybrid timetamp | String | Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615. |
|
|
118
118
|
*
|
|
@@ -136,14 +136,14 @@ exports.unixtimeToHybridts = unixtimeToHybridts;
|
|
|
136
136
|
* Generate a hybrid timestamp based on datetime。
|
|
137
137
|
*
|
|
138
138
|
* @param data
|
|
139
|
-
* | Property | Type
|
|
139
|
+
* | Property | Type | Description |
|
|
140
140
|
* | :---------------- | :---- | :------------------------------- |
|
|
141
141
|
* | datetime | Date | The known datetime used to generate a hybrid timestamp. |
|
|
142
142
|
*
|
|
143
143
|
*
|
|
144
144
|
*
|
|
145
|
-
* @
|
|
146
|
-
* | Property | Type
|
|
145
|
+
* @returns
|
|
146
|
+
* | Property | Type | Description |
|
|
147
147
|
* | :-----------| :--- | :------------------------------- |
|
|
148
148
|
* | Hybrid timetamp | String | Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615. |
|
|
149
149
|
*
|
|
@@ -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 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TimeTickLongDelay = 55;
|
|
71
|
-
|
|
71
|
+
NotReadyServe = 56;
|
|
72
|
+
// Coord is switching from standby mode to active mode
|
|
73
|
+
NotReadyCoordActivating = 57;
|
|
72
74
|
// Service availability.
|
|
73
75
|
// NA: Not Available.
|
|
74
76
|
DataCoordNA = 100;
|
|
@@ -335,6 +337,14 @@ enum ObjectPrivilege {
|
|
|
335
337
|
PrivilegeManageOwnership = 23;
|
|
336
338
|
PrivilegeSelectUser = 24;
|
|
337
339
|
PrivilegeUpsert = 25;
|
|
340
|
+
PrivilegeCreateResourceGroup = 26;
|
|
341
|
+
PrivilegeDropResourceGroup = 27;
|
|
342
|
+
PrivilegeDescribeResourceGroup = 28;
|
|
343
|
+
PrivilegeListResourceGroups = 29;
|
|
344
|
+
PrivilegeTransferNode = 30;
|
|
345
|
+
PrivilegeTransferReplica = 31;
|
|
346
|
+
PrivilegeGetLoadingProgress = 32;
|
|
347
|
+
PrivilegeGetLoadState = 33;
|
|
338
348
|
}
|
|
339
349
|
|
|
340
350
|
message PrivilegeExt {
|
|
@@ -362,3 +372,8 @@ enum LoadState {
|
|
|
362
372
|
LoadStateLoading = 2;
|
|
363
373
|
LoadStateLoaded = 3;
|
|
364
374
|
}
|
|
375
|
+
|
|
376
|
+
message SegmentStats {
|
|
377
|
+
int64 SegmentID = 1;
|
|
378
|
+
int64 NumRows = 2;
|
|
379
|
+
}
|