@0xobelisk/grpc-client 1.2.0-pre.68
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 +92 -0
- package/README.md +407 -0
- package/dist/client.d.ts +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1712 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1682 -0
- package/dist/index.mjs.map +1 -0
- package/dist/proto/dubhe_grpc.client.d.ts +54 -0
- package/dist/proto/dubhe_grpc.d.ts +575 -0
- package/dist/proto/google/protobuf/struct.d.ts +186 -0
- package/dist/types.d.ts +11 -0
- package/package.json +69 -0
- package/src/client.ts +12 -0
- package/src/index.ts +24 -0
- package/src/proto/dubhe_grpc.client.ts +82 -0
- package/src/proto/dubhe_grpc.ts +1646 -0
- package/src/proto/google/protobuf/struct.ts +584 -0
- package/src/types.ts +22 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1682 @@
|
|
|
1
|
+
// src/proto/dubhe_grpc.ts
|
|
2
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
3
|
+
import { WireType as WireType2 } from "@protobuf-ts/runtime";
|
|
4
|
+
import { UnknownFieldHandler as UnknownFieldHandler2 } from "@protobuf-ts/runtime";
|
|
5
|
+
import { reflectionMergePartial as reflectionMergePartial2 } from "@protobuf-ts/runtime";
|
|
6
|
+
import { MessageType as MessageType2 } from "@protobuf-ts/runtime";
|
|
7
|
+
|
|
8
|
+
// src/proto/google/protobuf/struct.ts
|
|
9
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
|
+
import { isJsonObject } from "@protobuf-ts/runtime";
|
|
13
|
+
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
|
14
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
15
|
+
var NullValue = /* @__PURE__ */ ((NullValue2) => {
|
|
16
|
+
NullValue2[NullValue2["NULL_VALUE"] = 0] = "NULL_VALUE";
|
|
17
|
+
return NullValue2;
|
|
18
|
+
})(NullValue || {});
|
|
19
|
+
var Struct$Type = class extends MessageType {
|
|
20
|
+
constructor() {
|
|
21
|
+
super("google.protobuf.Struct", [
|
|
22
|
+
{
|
|
23
|
+
no: 1,
|
|
24
|
+
name: "fields",
|
|
25
|
+
kind: "map",
|
|
26
|
+
K: 9,
|
|
27
|
+
V: { kind: "message", T: () => Value }
|
|
28
|
+
}
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Encode `Struct` to JSON object.
|
|
33
|
+
*/
|
|
34
|
+
internalJsonWrite(message, options) {
|
|
35
|
+
let json = {};
|
|
36
|
+
for (let [k, v] of Object.entries(message.fields)) {
|
|
37
|
+
json[k] = Value.toJson(v);
|
|
38
|
+
}
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Decode `Struct` from JSON object.
|
|
43
|
+
*/
|
|
44
|
+
internalJsonRead(json, options, target) {
|
|
45
|
+
if (!isJsonObject(json))
|
|
46
|
+
throw new globalThis.Error(
|
|
47
|
+
"Unable to parse message " + this.typeName + " from JSON " + typeofJsonValue(json) + "."
|
|
48
|
+
);
|
|
49
|
+
if (!target)
|
|
50
|
+
target = this.create();
|
|
51
|
+
for (let [k, v] of globalThis.Object.entries(json)) {
|
|
52
|
+
target.fields[k] = Value.fromJson(v);
|
|
53
|
+
}
|
|
54
|
+
return target;
|
|
55
|
+
}
|
|
56
|
+
create(value) {
|
|
57
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
58
|
+
message.fields = {};
|
|
59
|
+
if (value !== void 0)
|
|
60
|
+
reflectionMergePartial(this, message, value);
|
|
61
|
+
return message;
|
|
62
|
+
}
|
|
63
|
+
internalBinaryRead(reader, length, options, target) {
|
|
64
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
65
|
+
while (reader.pos < end) {
|
|
66
|
+
let [fieldNo, wireType] = reader.tag();
|
|
67
|
+
switch (fieldNo) {
|
|
68
|
+
case /* map<string, google.protobuf.Value> fields */
|
|
69
|
+
1:
|
|
70
|
+
this.binaryReadMap1(message.fields, reader, options);
|
|
71
|
+
break;
|
|
72
|
+
default:
|
|
73
|
+
let u = options.readUnknownField;
|
|
74
|
+
if (u === "throw")
|
|
75
|
+
throw new globalThis.Error(
|
|
76
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
77
|
+
);
|
|
78
|
+
let d = reader.skip(wireType);
|
|
79
|
+
if (u !== false)
|
|
80
|
+
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
81
|
+
this.typeName,
|
|
82
|
+
message,
|
|
83
|
+
fieldNo,
|
|
84
|
+
wireType,
|
|
85
|
+
d
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return message;
|
|
90
|
+
}
|
|
91
|
+
binaryReadMap1(map, reader, options) {
|
|
92
|
+
let len = reader.uint32(), end = reader.pos + len, key, val;
|
|
93
|
+
while (reader.pos < end) {
|
|
94
|
+
let [fieldNo, wireType] = reader.tag();
|
|
95
|
+
switch (fieldNo) {
|
|
96
|
+
case 1:
|
|
97
|
+
key = reader.string();
|
|
98
|
+
break;
|
|
99
|
+
case 2:
|
|
100
|
+
val = Value.internalBinaryRead(reader, reader.uint32(), options);
|
|
101
|
+
break;
|
|
102
|
+
default:
|
|
103
|
+
throw new globalThis.Error("unknown map entry field for google.protobuf.Struct.fields");
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
map[key ?? ""] = val ?? Value.create();
|
|
107
|
+
}
|
|
108
|
+
internalBinaryWrite(message, writer, options) {
|
|
109
|
+
for (let k of globalThis.Object.keys(message.fields)) {
|
|
110
|
+
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
|
|
111
|
+
writer.tag(2, WireType.LengthDelimited).fork();
|
|
112
|
+
Value.internalBinaryWrite(message.fields[k], writer, options);
|
|
113
|
+
writer.join().join();
|
|
114
|
+
}
|
|
115
|
+
let u = options.writeUnknownFields;
|
|
116
|
+
if (u !== false)
|
|
117
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
118
|
+
return writer;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
var Struct = new Struct$Type();
|
|
122
|
+
var Value$Type = class extends MessageType {
|
|
123
|
+
constructor() {
|
|
124
|
+
super("google.protobuf.Value", [
|
|
125
|
+
{
|
|
126
|
+
no: 1,
|
|
127
|
+
name: "null_value",
|
|
128
|
+
kind: "enum",
|
|
129
|
+
oneof: "kind",
|
|
130
|
+
T: () => ["google.protobuf.NullValue", NullValue]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
no: 2,
|
|
134
|
+
name: "number_value",
|
|
135
|
+
kind: "scalar",
|
|
136
|
+
oneof: "kind",
|
|
137
|
+
T: 1
|
|
138
|
+
/*ScalarType.DOUBLE*/
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
no: 3,
|
|
142
|
+
name: "string_value",
|
|
143
|
+
kind: "scalar",
|
|
144
|
+
oneof: "kind",
|
|
145
|
+
T: 9
|
|
146
|
+
/*ScalarType.STRING*/
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
no: 4,
|
|
150
|
+
name: "bool_value",
|
|
151
|
+
kind: "scalar",
|
|
152
|
+
oneof: "kind",
|
|
153
|
+
T: 8
|
|
154
|
+
/*ScalarType.BOOL*/
|
|
155
|
+
},
|
|
156
|
+
{ no: 5, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct },
|
|
157
|
+
{ no: 6, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue }
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Encode `Value` to JSON value.
|
|
162
|
+
*/
|
|
163
|
+
internalJsonWrite(message, options) {
|
|
164
|
+
if (message.kind.oneofKind === void 0)
|
|
165
|
+
throw new globalThis.Error();
|
|
166
|
+
switch (message.kind.oneofKind) {
|
|
167
|
+
case void 0:
|
|
168
|
+
throw new globalThis.Error();
|
|
169
|
+
case "boolValue":
|
|
170
|
+
return message.kind.boolValue;
|
|
171
|
+
case "nullValue":
|
|
172
|
+
return null;
|
|
173
|
+
case "numberValue":
|
|
174
|
+
let numberValue = message.kind.numberValue;
|
|
175
|
+
if (typeof numberValue == "number" && !Number.isFinite(numberValue))
|
|
176
|
+
throw new globalThis.Error();
|
|
177
|
+
return numberValue;
|
|
178
|
+
case "stringValue":
|
|
179
|
+
return message.kind.stringValue;
|
|
180
|
+
case "listValue":
|
|
181
|
+
let listValueField = this.fields.find((f) => f.no === 6);
|
|
182
|
+
if (listValueField?.kind !== "message")
|
|
183
|
+
throw new globalThis.Error();
|
|
184
|
+
return listValueField.T().toJson(message.kind.listValue);
|
|
185
|
+
case "structValue":
|
|
186
|
+
let structValueField = this.fields.find((f) => f.no === 5);
|
|
187
|
+
if (structValueField?.kind !== "message")
|
|
188
|
+
throw new globalThis.Error();
|
|
189
|
+
return structValueField.T().toJson(message.kind.structValue);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Decode `Value` from JSON value.
|
|
194
|
+
*/
|
|
195
|
+
internalJsonRead(json, options, target) {
|
|
196
|
+
if (!target)
|
|
197
|
+
target = this.create();
|
|
198
|
+
switch (typeof json) {
|
|
199
|
+
case "number":
|
|
200
|
+
target.kind = { oneofKind: "numberValue", numberValue: json };
|
|
201
|
+
break;
|
|
202
|
+
case "string":
|
|
203
|
+
target.kind = { oneofKind: "stringValue", stringValue: json };
|
|
204
|
+
break;
|
|
205
|
+
case "boolean":
|
|
206
|
+
target.kind = { oneofKind: "boolValue", boolValue: json };
|
|
207
|
+
break;
|
|
208
|
+
case "object":
|
|
209
|
+
if (json === null) {
|
|
210
|
+
target.kind = { oneofKind: "nullValue", nullValue: 0 /* NULL_VALUE */ };
|
|
211
|
+
} else if (globalThis.Array.isArray(json)) {
|
|
212
|
+
target.kind = { oneofKind: "listValue", listValue: ListValue.fromJson(json) };
|
|
213
|
+
} else {
|
|
214
|
+
target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) };
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
default:
|
|
218
|
+
throw new globalThis.Error(
|
|
219
|
+
"Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json)
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
return target;
|
|
223
|
+
}
|
|
224
|
+
create(value) {
|
|
225
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
226
|
+
message.kind = { oneofKind: void 0 };
|
|
227
|
+
if (value !== void 0)
|
|
228
|
+
reflectionMergePartial(this, message, value);
|
|
229
|
+
return message;
|
|
230
|
+
}
|
|
231
|
+
internalBinaryRead(reader, length, options, target) {
|
|
232
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
233
|
+
while (reader.pos < end) {
|
|
234
|
+
let [fieldNo, wireType] = reader.tag();
|
|
235
|
+
switch (fieldNo) {
|
|
236
|
+
case /* google.protobuf.NullValue null_value */
|
|
237
|
+
1:
|
|
238
|
+
message.kind = {
|
|
239
|
+
oneofKind: "nullValue",
|
|
240
|
+
nullValue: reader.int32()
|
|
241
|
+
};
|
|
242
|
+
break;
|
|
243
|
+
case /* double number_value */
|
|
244
|
+
2:
|
|
245
|
+
message.kind = {
|
|
246
|
+
oneofKind: "numberValue",
|
|
247
|
+
numberValue: reader.double()
|
|
248
|
+
};
|
|
249
|
+
break;
|
|
250
|
+
case /* string string_value */
|
|
251
|
+
3:
|
|
252
|
+
message.kind = {
|
|
253
|
+
oneofKind: "stringValue",
|
|
254
|
+
stringValue: reader.string()
|
|
255
|
+
};
|
|
256
|
+
break;
|
|
257
|
+
case /* bool bool_value */
|
|
258
|
+
4:
|
|
259
|
+
message.kind = {
|
|
260
|
+
oneofKind: "boolValue",
|
|
261
|
+
boolValue: reader.bool()
|
|
262
|
+
};
|
|
263
|
+
break;
|
|
264
|
+
case /* google.protobuf.Struct struct_value */
|
|
265
|
+
5:
|
|
266
|
+
message.kind = {
|
|
267
|
+
oneofKind: "structValue",
|
|
268
|
+
structValue: Struct.internalBinaryRead(
|
|
269
|
+
reader,
|
|
270
|
+
reader.uint32(),
|
|
271
|
+
options,
|
|
272
|
+
message.kind.structValue
|
|
273
|
+
)
|
|
274
|
+
};
|
|
275
|
+
break;
|
|
276
|
+
case /* google.protobuf.ListValue list_value */
|
|
277
|
+
6:
|
|
278
|
+
message.kind = {
|
|
279
|
+
oneofKind: "listValue",
|
|
280
|
+
listValue: ListValue.internalBinaryRead(
|
|
281
|
+
reader,
|
|
282
|
+
reader.uint32(),
|
|
283
|
+
options,
|
|
284
|
+
message.kind.listValue
|
|
285
|
+
)
|
|
286
|
+
};
|
|
287
|
+
break;
|
|
288
|
+
default:
|
|
289
|
+
let u = options.readUnknownField;
|
|
290
|
+
if (u === "throw")
|
|
291
|
+
throw new globalThis.Error(
|
|
292
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
293
|
+
);
|
|
294
|
+
let d = reader.skip(wireType);
|
|
295
|
+
if (u !== false)
|
|
296
|
+
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
297
|
+
this.typeName,
|
|
298
|
+
message,
|
|
299
|
+
fieldNo,
|
|
300
|
+
wireType,
|
|
301
|
+
d
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return message;
|
|
306
|
+
}
|
|
307
|
+
internalBinaryWrite(message, writer, options) {
|
|
308
|
+
if (message.kind.oneofKind === "nullValue")
|
|
309
|
+
writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
|
|
310
|
+
if (message.kind.oneofKind === "numberValue")
|
|
311
|
+
writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
|
|
312
|
+
if (message.kind.oneofKind === "stringValue")
|
|
313
|
+
writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
|
|
314
|
+
if (message.kind.oneofKind === "boolValue")
|
|
315
|
+
writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
|
|
316
|
+
if (message.kind.oneofKind === "structValue")
|
|
317
|
+
Struct.internalBinaryWrite(
|
|
318
|
+
message.kind.structValue,
|
|
319
|
+
writer.tag(5, WireType.LengthDelimited).fork(),
|
|
320
|
+
options
|
|
321
|
+
).join();
|
|
322
|
+
if (message.kind.oneofKind === "listValue")
|
|
323
|
+
ListValue.internalBinaryWrite(
|
|
324
|
+
message.kind.listValue,
|
|
325
|
+
writer.tag(6, WireType.LengthDelimited).fork(),
|
|
326
|
+
options
|
|
327
|
+
).join();
|
|
328
|
+
let u = options.writeUnknownFields;
|
|
329
|
+
if (u !== false)
|
|
330
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
331
|
+
return writer;
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
var Value = new Value$Type();
|
|
335
|
+
var ListValue$Type = class extends MessageType {
|
|
336
|
+
constructor() {
|
|
337
|
+
super("google.protobuf.ListValue", [
|
|
338
|
+
{ no: 1, name: "values", kind: "message", repeat: 2, T: () => Value }
|
|
339
|
+
]);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Encode `ListValue` to JSON array.
|
|
343
|
+
*/
|
|
344
|
+
internalJsonWrite(message, options) {
|
|
345
|
+
return message.values.map((v) => Value.toJson(v));
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Decode `ListValue` from JSON array.
|
|
349
|
+
*/
|
|
350
|
+
internalJsonRead(json, options, target) {
|
|
351
|
+
if (!globalThis.Array.isArray(json))
|
|
352
|
+
throw new globalThis.Error(
|
|
353
|
+
"Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json)
|
|
354
|
+
);
|
|
355
|
+
if (!target)
|
|
356
|
+
target = this.create();
|
|
357
|
+
let values = json.map((v) => Value.fromJson(v));
|
|
358
|
+
target.values.push(...values);
|
|
359
|
+
return target;
|
|
360
|
+
}
|
|
361
|
+
create(value) {
|
|
362
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
363
|
+
message.values = [];
|
|
364
|
+
if (value !== void 0)
|
|
365
|
+
reflectionMergePartial(this, message, value);
|
|
366
|
+
return message;
|
|
367
|
+
}
|
|
368
|
+
internalBinaryRead(reader, length, options, target) {
|
|
369
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
370
|
+
while (reader.pos < end) {
|
|
371
|
+
let [fieldNo, wireType] = reader.tag();
|
|
372
|
+
switch (fieldNo) {
|
|
373
|
+
case /* repeated google.protobuf.Value values */
|
|
374
|
+
1:
|
|
375
|
+
message.values.push(Value.internalBinaryRead(reader, reader.uint32(), options));
|
|
376
|
+
break;
|
|
377
|
+
default:
|
|
378
|
+
let u = options.readUnknownField;
|
|
379
|
+
if (u === "throw")
|
|
380
|
+
throw new globalThis.Error(
|
|
381
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
382
|
+
);
|
|
383
|
+
let d = reader.skip(wireType);
|
|
384
|
+
if (u !== false)
|
|
385
|
+
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
386
|
+
this.typeName,
|
|
387
|
+
message,
|
|
388
|
+
fieldNo,
|
|
389
|
+
wireType,
|
|
390
|
+
d
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return message;
|
|
395
|
+
}
|
|
396
|
+
internalBinaryWrite(message, writer, options) {
|
|
397
|
+
for (let i = 0; i < message.values.length; i++)
|
|
398
|
+
Value.internalBinaryWrite(
|
|
399
|
+
message.values[i],
|
|
400
|
+
writer.tag(1, WireType.LengthDelimited).fork(),
|
|
401
|
+
options
|
|
402
|
+
).join();
|
|
403
|
+
let u = options.writeUnknownFields;
|
|
404
|
+
if (u !== false)
|
|
405
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
406
|
+
return writer;
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
var ListValue = new ListValue$Type();
|
|
410
|
+
|
|
411
|
+
// src/proto/dubhe_grpc.ts
|
|
412
|
+
var FilterOperator = /* @__PURE__ */ ((FilterOperator2) => {
|
|
413
|
+
FilterOperator2[FilterOperator2["EQUALS"] = 0] = "EQUALS";
|
|
414
|
+
FilterOperator2[FilterOperator2["NOT_EQUALS"] = 1] = "NOT_EQUALS";
|
|
415
|
+
FilterOperator2[FilterOperator2["GREATER_THAN"] = 2] = "GREATER_THAN";
|
|
416
|
+
FilterOperator2[FilterOperator2["GREATER_THAN_EQUAL"] = 3] = "GREATER_THAN_EQUAL";
|
|
417
|
+
FilterOperator2[FilterOperator2["LESS_THAN"] = 4] = "LESS_THAN";
|
|
418
|
+
FilterOperator2[FilterOperator2["LESS_THAN_EQUAL"] = 5] = "LESS_THAN_EQUAL";
|
|
419
|
+
FilterOperator2[FilterOperator2["LIKE"] = 6] = "LIKE";
|
|
420
|
+
FilterOperator2[FilterOperator2["NOT_LIKE"] = 7] = "NOT_LIKE";
|
|
421
|
+
FilterOperator2[FilterOperator2["IN"] = 8] = "IN";
|
|
422
|
+
FilterOperator2[FilterOperator2["NOT_IN"] = 9] = "NOT_IN";
|
|
423
|
+
FilterOperator2[FilterOperator2["IS_NULL"] = 10] = "IS_NULL";
|
|
424
|
+
FilterOperator2[FilterOperator2["IS_NOT_NULL"] = 11] = "IS_NOT_NULL";
|
|
425
|
+
FilterOperator2[FilterOperator2["BETWEEN"] = 12] = "BETWEEN";
|
|
426
|
+
FilterOperator2[FilterOperator2["NOT_BETWEEN"] = 13] = "NOT_BETWEEN";
|
|
427
|
+
return FilterOperator2;
|
|
428
|
+
})(FilterOperator || {});
|
|
429
|
+
var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
|
|
430
|
+
SortDirection2[SortDirection2["ASCENDING"] = 0] = "ASCENDING";
|
|
431
|
+
SortDirection2[SortDirection2["DESCENDING"] = 1] = "DESCENDING";
|
|
432
|
+
return SortDirection2;
|
|
433
|
+
})(SortDirection || {});
|
|
434
|
+
var QueryRequest$Type = class extends MessageType2 {
|
|
435
|
+
constructor() {
|
|
436
|
+
super("dubhe_grpc.QueryRequest", [
|
|
437
|
+
{
|
|
438
|
+
no: 1,
|
|
439
|
+
name: "table_name",
|
|
440
|
+
kind: "scalar",
|
|
441
|
+
T: 9
|
|
442
|
+
/*ScalarType.STRING*/
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
no: 2,
|
|
446
|
+
name: "select_fields",
|
|
447
|
+
kind: "scalar",
|
|
448
|
+
repeat: 2,
|
|
449
|
+
T: 9
|
|
450
|
+
/*ScalarType.STRING*/
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
no: 3,
|
|
454
|
+
name: "filters",
|
|
455
|
+
kind: "message",
|
|
456
|
+
repeat: 2,
|
|
457
|
+
T: () => FilterCondition
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
no: 4,
|
|
461
|
+
name: "sorts",
|
|
462
|
+
kind: "message",
|
|
463
|
+
repeat: 2,
|
|
464
|
+
T: () => SortSpecification
|
|
465
|
+
},
|
|
466
|
+
{ no: 5, name: "pagination", kind: "message", T: () => PaginationRequest },
|
|
467
|
+
{
|
|
468
|
+
no: 6,
|
|
469
|
+
name: "include_total_count",
|
|
470
|
+
kind: "scalar",
|
|
471
|
+
T: 8
|
|
472
|
+
/*ScalarType.BOOL*/
|
|
473
|
+
}
|
|
474
|
+
]);
|
|
475
|
+
}
|
|
476
|
+
create(value) {
|
|
477
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
478
|
+
message.tableName = "";
|
|
479
|
+
message.selectFields = [];
|
|
480
|
+
message.filters = [];
|
|
481
|
+
message.sorts = [];
|
|
482
|
+
message.includeTotalCount = false;
|
|
483
|
+
if (value !== void 0)
|
|
484
|
+
reflectionMergePartial2(this, message, value);
|
|
485
|
+
return message;
|
|
486
|
+
}
|
|
487
|
+
internalBinaryRead(reader, length, options, target) {
|
|
488
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
489
|
+
while (reader.pos < end) {
|
|
490
|
+
let [fieldNo, wireType] = reader.tag();
|
|
491
|
+
switch (fieldNo) {
|
|
492
|
+
case /* string table_name */
|
|
493
|
+
1:
|
|
494
|
+
message.tableName = reader.string();
|
|
495
|
+
break;
|
|
496
|
+
case /* repeated string select_fields */
|
|
497
|
+
2:
|
|
498
|
+
message.selectFields.push(reader.string());
|
|
499
|
+
break;
|
|
500
|
+
case /* repeated dubhe_grpc.FilterCondition filters */
|
|
501
|
+
3:
|
|
502
|
+
message.filters.push(
|
|
503
|
+
FilterCondition.internalBinaryRead(reader, reader.uint32(), options)
|
|
504
|
+
);
|
|
505
|
+
break;
|
|
506
|
+
case /* repeated dubhe_grpc.SortSpecification sorts */
|
|
507
|
+
4:
|
|
508
|
+
message.sorts.push(
|
|
509
|
+
SortSpecification.internalBinaryRead(reader, reader.uint32(), options)
|
|
510
|
+
);
|
|
511
|
+
break;
|
|
512
|
+
case /* optional dubhe_grpc.PaginationRequest pagination */
|
|
513
|
+
5:
|
|
514
|
+
message.pagination = PaginationRequest.internalBinaryRead(
|
|
515
|
+
reader,
|
|
516
|
+
reader.uint32(),
|
|
517
|
+
options,
|
|
518
|
+
message.pagination
|
|
519
|
+
);
|
|
520
|
+
break;
|
|
521
|
+
case /* bool include_total_count */
|
|
522
|
+
6:
|
|
523
|
+
message.includeTotalCount = reader.bool();
|
|
524
|
+
break;
|
|
525
|
+
default:
|
|
526
|
+
let u = options.readUnknownField;
|
|
527
|
+
if (u === "throw")
|
|
528
|
+
throw new globalThis.Error(
|
|
529
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
530
|
+
);
|
|
531
|
+
let d = reader.skip(wireType);
|
|
532
|
+
if (u !== false)
|
|
533
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
534
|
+
this.typeName,
|
|
535
|
+
message,
|
|
536
|
+
fieldNo,
|
|
537
|
+
wireType,
|
|
538
|
+
d
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
return message;
|
|
543
|
+
}
|
|
544
|
+
internalBinaryWrite(message, writer, options) {
|
|
545
|
+
if (message.tableName !== "")
|
|
546
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.tableName);
|
|
547
|
+
for (let i = 0; i < message.selectFields.length; i++)
|
|
548
|
+
writer.tag(2, WireType2.LengthDelimited).string(message.selectFields[i]);
|
|
549
|
+
for (let i = 0; i < message.filters.length; i++)
|
|
550
|
+
FilterCondition.internalBinaryWrite(
|
|
551
|
+
message.filters[i],
|
|
552
|
+
writer.tag(3, WireType2.LengthDelimited).fork(),
|
|
553
|
+
options
|
|
554
|
+
).join();
|
|
555
|
+
for (let i = 0; i < message.sorts.length; i++)
|
|
556
|
+
SortSpecification.internalBinaryWrite(
|
|
557
|
+
message.sorts[i],
|
|
558
|
+
writer.tag(4, WireType2.LengthDelimited).fork(),
|
|
559
|
+
options
|
|
560
|
+
).join();
|
|
561
|
+
if (message.pagination)
|
|
562
|
+
PaginationRequest.internalBinaryWrite(
|
|
563
|
+
message.pagination,
|
|
564
|
+
writer.tag(5, WireType2.LengthDelimited).fork(),
|
|
565
|
+
options
|
|
566
|
+
).join();
|
|
567
|
+
if (message.includeTotalCount !== false)
|
|
568
|
+
writer.tag(6, WireType2.Varint).bool(message.includeTotalCount);
|
|
569
|
+
let u = options.writeUnknownFields;
|
|
570
|
+
if (u !== false)
|
|
571
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
572
|
+
return writer;
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
var QueryRequest = new QueryRequest$Type();
|
|
576
|
+
var FilterCondition$Type = class extends MessageType2 {
|
|
577
|
+
constructor() {
|
|
578
|
+
super("dubhe_grpc.FilterCondition", [
|
|
579
|
+
{
|
|
580
|
+
no: 1,
|
|
581
|
+
name: "field_name",
|
|
582
|
+
kind: "scalar",
|
|
583
|
+
T: 9
|
|
584
|
+
/*ScalarType.STRING*/
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
no: 2,
|
|
588
|
+
name: "operator",
|
|
589
|
+
kind: "enum",
|
|
590
|
+
T: () => ["dubhe_grpc.FilterOperator", FilterOperator]
|
|
591
|
+
},
|
|
592
|
+
{ no: 3, name: "value", kind: "message", T: () => FilterValue }
|
|
593
|
+
]);
|
|
594
|
+
}
|
|
595
|
+
create(value) {
|
|
596
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
597
|
+
message.fieldName = "";
|
|
598
|
+
message.operator = 0;
|
|
599
|
+
if (value !== void 0)
|
|
600
|
+
reflectionMergePartial2(this, message, value);
|
|
601
|
+
return message;
|
|
602
|
+
}
|
|
603
|
+
internalBinaryRead(reader, length, options, target) {
|
|
604
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
605
|
+
while (reader.pos < end) {
|
|
606
|
+
let [fieldNo, wireType] = reader.tag();
|
|
607
|
+
switch (fieldNo) {
|
|
608
|
+
case /* string field_name */
|
|
609
|
+
1:
|
|
610
|
+
message.fieldName = reader.string();
|
|
611
|
+
break;
|
|
612
|
+
case /* dubhe_grpc.FilterOperator operator */
|
|
613
|
+
2:
|
|
614
|
+
message.operator = reader.int32();
|
|
615
|
+
break;
|
|
616
|
+
case /* dubhe_grpc.FilterValue value */
|
|
617
|
+
3:
|
|
618
|
+
message.value = FilterValue.internalBinaryRead(
|
|
619
|
+
reader,
|
|
620
|
+
reader.uint32(),
|
|
621
|
+
options,
|
|
622
|
+
message.value
|
|
623
|
+
);
|
|
624
|
+
break;
|
|
625
|
+
default:
|
|
626
|
+
let u = options.readUnknownField;
|
|
627
|
+
if (u === "throw")
|
|
628
|
+
throw new globalThis.Error(
|
|
629
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
630
|
+
);
|
|
631
|
+
let d = reader.skip(wireType);
|
|
632
|
+
if (u !== false)
|
|
633
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
634
|
+
this.typeName,
|
|
635
|
+
message,
|
|
636
|
+
fieldNo,
|
|
637
|
+
wireType,
|
|
638
|
+
d
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return message;
|
|
643
|
+
}
|
|
644
|
+
internalBinaryWrite(message, writer, options) {
|
|
645
|
+
if (message.fieldName !== "")
|
|
646
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.fieldName);
|
|
647
|
+
if (message.operator !== 0)
|
|
648
|
+
writer.tag(2, WireType2.Varint).int32(message.operator);
|
|
649
|
+
if (message.value)
|
|
650
|
+
FilterValue.internalBinaryWrite(
|
|
651
|
+
message.value,
|
|
652
|
+
writer.tag(3, WireType2.LengthDelimited).fork(),
|
|
653
|
+
options
|
|
654
|
+
).join();
|
|
655
|
+
let u = options.writeUnknownFields;
|
|
656
|
+
if (u !== false)
|
|
657
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
658
|
+
return writer;
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
var FilterCondition = new FilterCondition$Type();
|
|
662
|
+
var FilterValue$Type = class extends MessageType2 {
|
|
663
|
+
constructor() {
|
|
664
|
+
super("dubhe_grpc.FilterValue", [
|
|
665
|
+
{
|
|
666
|
+
no: 1,
|
|
667
|
+
name: "string_value",
|
|
668
|
+
kind: "scalar",
|
|
669
|
+
oneof: "value",
|
|
670
|
+
T: 9
|
|
671
|
+
/*ScalarType.STRING*/
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
no: 2,
|
|
675
|
+
name: "int_value",
|
|
676
|
+
kind: "scalar",
|
|
677
|
+
oneof: "value",
|
|
678
|
+
T: 3,
|
|
679
|
+
L: 0
|
|
680
|
+
/*LongType.BIGINT*/
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
no: 3,
|
|
684
|
+
name: "float_value",
|
|
685
|
+
kind: "scalar",
|
|
686
|
+
oneof: "value",
|
|
687
|
+
T: 1
|
|
688
|
+
/*ScalarType.DOUBLE*/
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
no: 4,
|
|
692
|
+
name: "bool_value",
|
|
693
|
+
kind: "scalar",
|
|
694
|
+
oneof: "value",
|
|
695
|
+
T: 8
|
|
696
|
+
/*ScalarType.BOOL*/
|
|
697
|
+
},
|
|
698
|
+
{ no: 5, name: "string_list", kind: "message", oneof: "value", T: () => StringList },
|
|
699
|
+
{ no: 6, name: "int_list", kind: "message", oneof: "value", T: () => IntList },
|
|
700
|
+
{ no: 7, name: "range", kind: "message", oneof: "value", T: () => ValueRange },
|
|
701
|
+
{
|
|
702
|
+
no: 8,
|
|
703
|
+
name: "null_value",
|
|
704
|
+
kind: "scalar",
|
|
705
|
+
oneof: "value",
|
|
706
|
+
T: 8
|
|
707
|
+
/*ScalarType.BOOL*/
|
|
708
|
+
}
|
|
709
|
+
]);
|
|
710
|
+
}
|
|
711
|
+
create(value) {
|
|
712
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
713
|
+
message.value = { oneofKind: void 0 };
|
|
714
|
+
if (value !== void 0)
|
|
715
|
+
reflectionMergePartial2(this, message, value);
|
|
716
|
+
return message;
|
|
717
|
+
}
|
|
718
|
+
internalBinaryRead(reader, length, options, target) {
|
|
719
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
720
|
+
while (reader.pos < end) {
|
|
721
|
+
let [fieldNo, wireType] = reader.tag();
|
|
722
|
+
switch (fieldNo) {
|
|
723
|
+
case /* string string_value */
|
|
724
|
+
1:
|
|
725
|
+
message.value = {
|
|
726
|
+
oneofKind: "stringValue",
|
|
727
|
+
stringValue: reader.string()
|
|
728
|
+
};
|
|
729
|
+
break;
|
|
730
|
+
case /* int64 int_value */
|
|
731
|
+
2:
|
|
732
|
+
message.value = {
|
|
733
|
+
oneofKind: "intValue",
|
|
734
|
+
intValue: reader.int64().toBigInt()
|
|
735
|
+
};
|
|
736
|
+
break;
|
|
737
|
+
case /* double float_value */
|
|
738
|
+
3:
|
|
739
|
+
message.value = {
|
|
740
|
+
oneofKind: "floatValue",
|
|
741
|
+
floatValue: reader.double()
|
|
742
|
+
};
|
|
743
|
+
break;
|
|
744
|
+
case /* bool bool_value */
|
|
745
|
+
4:
|
|
746
|
+
message.value = {
|
|
747
|
+
oneofKind: "boolValue",
|
|
748
|
+
boolValue: reader.bool()
|
|
749
|
+
};
|
|
750
|
+
break;
|
|
751
|
+
case /* dubhe_grpc.StringList string_list */
|
|
752
|
+
5:
|
|
753
|
+
message.value = {
|
|
754
|
+
oneofKind: "stringList",
|
|
755
|
+
stringList: StringList.internalBinaryRead(
|
|
756
|
+
reader,
|
|
757
|
+
reader.uint32(),
|
|
758
|
+
options,
|
|
759
|
+
message.value.stringList
|
|
760
|
+
)
|
|
761
|
+
};
|
|
762
|
+
break;
|
|
763
|
+
case /* dubhe_grpc.IntList int_list */
|
|
764
|
+
6:
|
|
765
|
+
message.value = {
|
|
766
|
+
oneofKind: "intList",
|
|
767
|
+
intList: IntList.internalBinaryRead(
|
|
768
|
+
reader,
|
|
769
|
+
reader.uint32(),
|
|
770
|
+
options,
|
|
771
|
+
message.value.intList
|
|
772
|
+
)
|
|
773
|
+
};
|
|
774
|
+
break;
|
|
775
|
+
case /* dubhe_grpc.ValueRange range */
|
|
776
|
+
7:
|
|
777
|
+
message.value = {
|
|
778
|
+
oneofKind: "range",
|
|
779
|
+
range: ValueRange.internalBinaryRead(
|
|
780
|
+
reader,
|
|
781
|
+
reader.uint32(),
|
|
782
|
+
options,
|
|
783
|
+
message.value.range
|
|
784
|
+
)
|
|
785
|
+
};
|
|
786
|
+
break;
|
|
787
|
+
case /* bool null_value */
|
|
788
|
+
8:
|
|
789
|
+
message.value = {
|
|
790
|
+
oneofKind: "nullValue",
|
|
791
|
+
nullValue: reader.bool()
|
|
792
|
+
};
|
|
793
|
+
break;
|
|
794
|
+
default:
|
|
795
|
+
let u = options.readUnknownField;
|
|
796
|
+
if (u === "throw")
|
|
797
|
+
throw new globalThis.Error(
|
|
798
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
799
|
+
);
|
|
800
|
+
let d = reader.skip(wireType);
|
|
801
|
+
if (u !== false)
|
|
802
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
803
|
+
this.typeName,
|
|
804
|
+
message,
|
|
805
|
+
fieldNo,
|
|
806
|
+
wireType,
|
|
807
|
+
d
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
return message;
|
|
812
|
+
}
|
|
813
|
+
internalBinaryWrite(message, writer, options) {
|
|
814
|
+
if (message.value.oneofKind === "stringValue")
|
|
815
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.value.stringValue);
|
|
816
|
+
if (message.value.oneofKind === "intValue")
|
|
817
|
+
writer.tag(2, WireType2.Varint).int64(message.value.intValue);
|
|
818
|
+
if (message.value.oneofKind === "floatValue")
|
|
819
|
+
writer.tag(3, WireType2.Bit64).double(message.value.floatValue);
|
|
820
|
+
if (message.value.oneofKind === "boolValue")
|
|
821
|
+
writer.tag(4, WireType2.Varint).bool(message.value.boolValue);
|
|
822
|
+
if (message.value.oneofKind === "stringList")
|
|
823
|
+
StringList.internalBinaryWrite(
|
|
824
|
+
message.value.stringList,
|
|
825
|
+
writer.tag(5, WireType2.LengthDelimited).fork(),
|
|
826
|
+
options
|
|
827
|
+
).join();
|
|
828
|
+
if (message.value.oneofKind === "intList")
|
|
829
|
+
IntList.internalBinaryWrite(
|
|
830
|
+
message.value.intList,
|
|
831
|
+
writer.tag(6, WireType2.LengthDelimited).fork(),
|
|
832
|
+
options
|
|
833
|
+
).join();
|
|
834
|
+
if (message.value.oneofKind === "range")
|
|
835
|
+
ValueRange.internalBinaryWrite(
|
|
836
|
+
message.value.range,
|
|
837
|
+
writer.tag(7, WireType2.LengthDelimited).fork(),
|
|
838
|
+
options
|
|
839
|
+
).join();
|
|
840
|
+
if (message.value.oneofKind === "nullValue")
|
|
841
|
+
writer.tag(8, WireType2.Varint).bool(message.value.nullValue);
|
|
842
|
+
let u = options.writeUnknownFields;
|
|
843
|
+
if (u !== false)
|
|
844
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
845
|
+
return writer;
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
var FilterValue = new FilterValue$Type();
|
|
849
|
+
var StringList$Type = class extends MessageType2 {
|
|
850
|
+
constructor() {
|
|
851
|
+
super("dubhe_grpc.StringList", [
|
|
852
|
+
{
|
|
853
|
+
no: 1,
|
|
854
|
+
name: "values",
|
|
855
|
+
kind: "scalar",
|
|
856
|
+
repeat: 2,
|
|
857
|
+
T: 9
|
|
858
|
+
/*ScalarType.STRING*/
|
|
859
|
+
}
|
|
860
|
+
]);
|
|
861
|
+
}
|
|
862
|
+
create(value) {
|
|
863
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
864
|
+
message.values = [];
|
|
865
|
+
if (value !== void 0)
|
|
866
|
+
reflectionMergePartial2(this, message, value);
|
|
867
|
+
return message;
|
|
868
|
+
}
|
|
869
|
+
internalBinaryRead(reader, length, options, target) {
|
|
870
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
871
|
+
while (reader.pos < end) {
|
|
872
|
+
let [fieldNo, wireType] = reader.tag();
|
|
873
|
+
switch (fieldNo) {
|
|
874
|
+
case /* repeated string values */
|
|
875
|
+
1:
|
|
876
|
+
message.values.push(reader.string());
|
|
877
|
+
break;
|
|
878
|
+
default:
|
|
879
|
+
let u = options.readUnknownField;
|
|
880
|
+
if (u === "throw")
|
|
881
|
+
throw new globalThis.Error(
|
|
882
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
883
|
+
);
|
|
884
|
+
let d = reader.skip(wireType);
|
|
885
|
+
if (u !== false)
|
|
886
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
887
|
+
this.typeName,
|
|
888
|
+
message,
|
|
889
|
+
fieldNo,
|
|
890
|
+
wireType,
|
|
891
|
+
d
|
|
892
|
+
);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
return message;
|
|
896
|
+
}
|
|
897
|
+
internalBinaryWrite(message, writer, options) {
|
|
898
|
+
for (let i = 0; i < message.values.length; i++)
|
|
899
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.values[i]);
|
|
900
|
+
let u = options.writeUnknownFields;
|
|
901
|
+
if (u !== false)
|
|
902
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
903
|
+
return writer;
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
var StringList = new StringList$Type();
|
|
907
|
+
var IntList$Type = class extends MessageType2 {
|
|
908
|
+
constructor() {
|
|
909
|
+
super("dubhe_grpc.IntList", [
|
|
910
|
+
{
|
|
911
|
+
no: 1,
|
|
912
|
+
name: "values",
|
|
913
|
+
kind: "scalar",
|
|
914
|
+
repeat: 1,
|
|
915
|
+
T: 3,
|
|
916
|
+
L: 0
|
|
917
|
+
/*LongType.BIGINT*/
|
|
918
|
+
}
|
|
919
|
+
]);
|
|
920
|
+
}
|
|
921
|
+
create(value) {
|
|
922
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
923
|
+
message.values = [];
|
|
924
|
+
if (value !== void 0)
|
|
925
|
+
reflectionMergePartial2(this, message, value);
|
|
926
|
+
return message;
|
|
927
|
+
}
|
|
928
|
+
internalBinaryRead(reader, length, options, target) {
|
|
929
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
930
|
+
while (reader.pos < end) {
|
|
931
|
+
let [fieldNo, wireType] = reader.tag();
|
|
932
|
+
switch (fieldNo) {
|
|
933
|
+
case /* repeated int64 values */
|
|
934
|
+
1:
|
|
935
|
+
if (wireType === WireType2.LengthDelimited)
|
|
936
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e; )
|
|
937
|
+
message.values.push(reader.int64().toBigInt());
|
|
938
|
+
else
|
|
939
|
+
message.values.push(reader.int64().toBigInt());
|
|
940
|
+
break;
|
|
941
|
+
default:
|
|
942
|
+
let u = options.readUnknownField;
|
|
943
|
+
if (u === "throw")
|
|
944
|
+
throw new globalThis.Error(
|
|
945
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
946
|
+
);
|
|
947
|
+
let d = reader.skip(wireType);
|
|
948
|
+
if (u !== false)
|
|
949
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
950
|
+
this.typeName,
|
|
951
|
+
message,
|
|
952
|
+
fieldNo,
|
|
953
|
+
wireType,
|
|
954
|
+
d
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
return message;
|
|
959
|
+
}
|
|
960
|
+
internalBinaryWrite(message, writer, options) {
|
|
961
|
+
if (message.values.length) {
|
|
962
|
+
writer.tag(1, WireType2.LengthDelimited).fork();
|
|
963
|
+
for (let i = 0; i < message.values.length; i++)
|
|
964
|
+
writer.int64(message.values[i]);
|
|
965
|
+
writer.join();
|
|
966
|
+
}
|
|
967
|
+
let u = options.writeUnknownFields;
|
|
968
|
+
if (u !== false)
|
|
969
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
970
|
+
return writer;
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
var IntList = new IntList$Type();
|
|
974
|
+
var ValueRange$Type = class extends MessageType2 {
|
|
975
|
+
constructor() {
|
|
976
|
+
super("dubhe_grpc.ValueRange", [
|
|
977
|
+
{
|
|
978
|
+
no: 1,
|
|
979
|
+
name: "string_start",
|
|
980
|
+
kind: "scalar",
|
|
981
|
+
oneof: "start",
|
|
982
|
+
T: 9
|
|
983
|
+
/*ScalarType.STRING*/
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
no: 2,
|
|
987
|
+
name: "int_start",
|
|
988
|
+
kind: "scalar",
|
|
989
|
+
oneof: "start",
|
|
990
|
+
T: 3,
|
|
991
|
+
L: 0
|
|
992
|
+
/*LongType.BIGINT*/
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
no: 3,
|
|
996
|
+
name: "float_start",
|
|
997
|
+
kind: "scalar",
|
|
998
|
+
oneof: "start",
|
|
999
|
+
T: 1
|
|
1000
|
+
/*ScalarType.DOUBLE*/
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
no: 4,
|
|
1004
|
+
name: "string_end",
|
|
1005
|
+
kind: "scalar",
|
|
1006
|
+
oneof: "end",
|
|
1007
|
+
T: 9
|
|
1008
|
+
/*ScalarType.STRING*/
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
no: 5,
|
|
1012
|
+
name: "int_end",
|
|
1013
|
+
kind: "scalar",
|
|
1014
|
+
oneof: "end",
|
|
1015
|
+
T: 3,
|
|
1016
|
+
L: 0
|
|
1017
|
+
/*LongType.BIGINT*/
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
no: 6,
|
|
1021
|
+
name: "float_end",
|
|
1022
|
+
kind: "scalar",
|
|
1023
|
+
oneof: "end",
|
|
1024
|
+
T: 1
|
|
1025
|
+
/*ScalarType.DOUBLE*/
|
|
1026
|
+
}
|
|
1027
|
+
]);
|
|
1028
|
+
}
|
|
1029
|
+
create(value) {
|
|
1030
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1031
|
+
message.start = { oneofKind: void 0 };
|
|
1032
|
+
message.end = { oneofKind: void 0 };
|
|
1033
|
+
if (value !== void 0)
|
|
1034
|
+
reflectionMergePartial2(this, message, value);
|
|
1035
|
+
return message;
|
|
1036
|
+
}
|
|
1037
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1038
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1039
|
+
while (reader.pos < end) {
|
|
1040
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1041
|
+
switch (fieldNo) {
|
|
1042
|
+
case /* string string_start */
|
|
1043
|
+
1:
|
|
1044
|
+
message.start = {
|
|
1045
|
+
oneofKind: "stringStart",
|
|
1046
|
+
stringStart: reader.string()
|
|
1047
|
+
};
|
|
1048
|
+
break;
|
|
1049
|
+
case /* int64 int_start */
|
|
1050
|
+
2:
|
|
1051
|
+
message.start = {
|
|
1052
|
+
oneofKind: "intStart",
|
|
1053
|
+
intStart: reader.int64().toBigInt()
|
|
1054
|
+
};
|
|
1055
|
+
break;
|
|
1056
|
+
case /* double float_start */
|
|
1057
|
+
3:
|
|
1058
|
+
message.start = {
|
|
1059
|
+
oneofKind: "floatStart",
|
|
1060
|
+
floatStart: reader.double()
|
|
1061
|
+
};
|
|
1062
|
+
break;
|
|
1063
|
+
case /* string string_end */
|
|
1064
|
+
4:
|
|
1065
|
+
message.end = {
|
|
1066
|
+
oneofKind: "stringEnd",
|
|
1067
|
+
stringEnd: reader.string()
|
|
1068
|
+
};
|
|
1069
|
+
break;
|
|
1070
|
+
case /* int64 int_end */
|
|
1071
|
+
5:
|
|
1072
|
+
message.end = {
|
|
1073
|
+
oneofKind: "intEnd",
|
|
1074
|
+
intEnd: reader.int64().toBigInt()
|
|
1075
|
+
};
|
|
1076
|
+
break;
|
|
1077
|
+
case /* double float_end */
|
|
1078
|
+
6:
|
|
1079
|
+
message.end = {
|
|
1080
|
+
oneofKind: "floatEnd",
|
|
1081
|
+
floatEnd: reader.double()
|
|
1082
|
+
};
|
|
1083
|
+
break;
|
|
1084
|
+
default:
|
|
1085
|
+
let u = options.readUnknownField;
|
|
1086
|
+
if (u === "throw")
|
|
1087
|
+
throw new globalThis.Error(
|
|
1088
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
1089
|
+
);
|
|
1090
|
+
let d = reader.skip(wireType);
|
|
1091
|
+
if (u !== false)
|
|
1092
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
1093
|
+
this.typeName,
|
|
1094
|
+
message,
|
|
1095
|
+
fieldNo,
|
|
1096
|
+
wireType,
|
|
1097
|
+
d
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
return message;
|
|
1102
|
+
}
|
|
1103
|
+
internalBinaryWrite(message, writer, options) {
|
|
1104
|
+
if (message.start.oneofKind === "stringStart")
|
|
1105
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.start.stringStart);
|
|
1106
|
+
if (message.start.oneofKind === "intStart")
|
|
1107
|
+
writer.tag(2, WireType2.Varint).int64(message.start.intStart);
|
|
1108
|
+
if (message.start.oneofKind === "floatStart")
|
|
1109
|
+
writer.tag(3, WireType2.Bit64).double(message.start.floatStart);
|
|
1110
|
+
if (message.end.oneofKind === "stringEnd")
|
|
1111
|
+
writer.tag(4, WireType2.LengthDelimited).string(message.end.stringEnd);
|
|
1112
|
+
if (message.end.oneofKind === "intEnd")
|
|
1113
|
+
writer.tag(5, WireType2.Varint).int64(message.end.intEnd);
|
|
1114
|
+
if (message.end.oneofKind === "floatEnd")
|
|
1115
|
+
writer.tag(6, WireType2.Bit64).double(message.end.floatEnd);
|
|
1116
|
+
let u = options.writeUnknownFields;
|
|
1117
|
+
if (u !== false)
|
|
1118
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
1119
|
+
return writer;
|
|
1120
|
+
}
|
|
1121
|
+
};
|
|
1122
|
+
var ValueRange = new ValueRange$Type();
|
|
1123
|
+
var SortSpecification$Type = class extends MessageType2 {
|
|
1124
|
+
constructor() {
|
|
1125
|
+
super("dubhe_grpc.SortSpecification", [
|
|
1126
|
+
{
|
|
1127
|
+
no: 1,
|
|
1128
|
+
name: "field_name",
|
|
1129
|
+
kind: "scalar",
|
|
1130
|
+
T: 9
|
|
1131
|
+
/*ScalarType.STRING*/
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
no: 2,
|
|
1135
|
+
name: "direction",
|
|
1136
|
+
kind: "enum",
|
|
1137
|
+
T: () => ["dubhe_grpc.SortDirection", SortDirection]
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
no: 3,
|
|
1141
|
+
name: "priority",
|
|
1142
|
+
kind: "scalar",
|
|
1143
|
+
opt: true,
|
|
1144
|
+
T: 5
|
|
1145
|
+
/*ScalarType.INT32*/
|
|
1146
|
+
}
|
|
1147
|
+
]);
|
|
1148
|
+
}
|
|
1149
|
+
create(value) {
|
|
1150
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1151
|
+
message.fieldName = "";
|
|
1152
|
+
message.direction = 0;
|
|
1153
|
+
if (value !== void 0)
|
|
1154
|
+
reflectionMergePartial2(this, message, value);
|
|
1155
|
+
return message;
|
|
1156
|
+
}
|
|
1157
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1158
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1159
|
+
while (reader.pos < end) {
|
|
1160
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1161
|
+
switch (fieldNo) {
|
|
1162
|
+
case /* string field_name */
|
|
1163
|
+
1:
|
|
1164
|
+
message.fieldName = reader.string();
|
|
1165
|
+
break;
|
|
1166
|
+
case /* dubhe_grpc.SortDirection direction */
|
|
1167
|
+
2:
|
|
1168
|
+
message.direction = reader.int32();
|
|
1169
|
+
break;
|
|
1170
|
+
case /* optional int32 priority */
|
|
1171
|
+
3:
|
|
1172
|
+
message.priority = reader.int32();
|
|
1173
|
+
break;
|
|
1174
|
+
default:
|
|
1175
|
+
let u = options.readUnknownField;
|
|
1176
|
+
if (u === "throw")
|
|
1177
|
+
throw new globalThis.Error(
|
|
1178
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
1179
|
+
);
|
|
1180
|
+
let d = reader.skip(wireType);
|
|
1181
|
+
if (u !== false)
|
|
1182
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
1183
|
+
this.typeName,
|
|
1184
|
+
message,
|
|
1185
|
+
fieldNo,
|
|
1186
|
+
wireType,
|
|
1187
|
+
d
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
return message;
|
|
1192
|
+
}
|
|
1193
|
+
internalBinaryWrite(message, writer, options) {
|
|
1194
|
+
if (message.fieldName !== "")
|
|
1195
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.fieldName);
|
|
1196
|
+
if (message.direction !== 0)
|
|
1197
|
+
writer.tag(2, WireType2.Varint).int32(message.direction);
|
|
1198
|
+
if (message.priority !== void 0)
|
|
1199
|
+
writer.tag(3, WireType2.Varint).int32(message.priority);
|
|
1200
|
+
let u = options.writeUnknownFields;
|
|
1201
|
+
if (u !== false)
|
|
1202
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
1203
|
+
return writer;
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
var SortSpecification = new SortSpecification$Type();
|
|
1207
|
+
var PaginationRequest$Type = class extends MessageType2 {
|
|
1208
|
+
constructor() {
|
|
1209
|
+
super("dubhe_grpc.PaginationRequest", [
|
|
1210
|
+
{
|
|
1211
|
+
no: 1,
|
|
1212
|
+
name: "page",
|
|
1213
|
+
kind: "scalar",
|
|
1214
|
+
T: 5
|
|
1215
|
+
/*ScalarType.INT32*/
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
no: 2,
|
|
1219
|
+
name: "page_size",
|
|
1220
|
+
kind: "scalar",
|
|
1221
|
+
T: 5
|
|
1222
|
+
/*ScalarType.INT32*/
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
no: 3,
|
|
1226
|
+
name: "offset",
|
|
1227
|
+
kind: "scalar",
|
|
1228
|
+
opt: true,
|
|
1229
|
+
T: 5
|
|
1230
|
+
/*ScalarType.INT32*/
|
|
1231
|
+
}
|
|
1232
|
+
]);
|
|
1233
|
+
}
|
|
1234
|
+
create(value) {
|
|
1235
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1236
|
+
message.page = 0;
|
|
1237
|
+
message.pageSize = 0;
|
|
1238
|
+
if (value !== void 0)
|
|
1239
|
+
reflectionMergePartial2(this, message, value);
|
|
1240
|
+
return message;
|
|
1241
|
+
}
|
|
1242
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1243
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1244
|
+
while (reader.pos < end) {
|
|
1245
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1246
|
+
switch (fieldNo) {
|
|
1247
|
+
case /* int32 page */
|
|
1248
|
+
1:
|
|
1249
|
+
message.page = reader.int32();
|
|
1250
|
+
break;
|
|
1251
|
+
case /* int32 page_size */
|
|
1252
|
+
2:
|
|
1253
|
+
message.pageSize = reader.int32();
|
|
1254
|
+
break;
|
|
1255
|
+
case /* optional int32 offset */
|
|
1256
|
+
3:
|
|
1257
|
+
message.offset = reader.int32();
|
|
1258
|
+
break;
|
|
1259
|
+
default:
|
|
1260
|
+
let u = options.readUnknownField;
|
|
1261
|
+
if (u === "throw")
|
|
1262
|
+
throw new globalThis.Error(
|
|
1263
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
1264
|
+
);
|
|
1265
|
+
let d = reader.skip(wireType);
|
|
1266
|
+
if (u !== false)
|
|
1267
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
1268
|
+
this.typeName,
|
|
1269
|
+
message,
|
|
1270
|
+
fieldNo,
|
|
1271
|
+
wireType,
|
|
1272
|
+
d
|
|
1273
|
+
);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
return message;
|
|
1277
|
+
}
|
|
1278
|
+
internalBinaryWrite(message, writer, options) {
|
|
1279
|
+
if (message.page !== 0)
|
|
1280
|
+
writer.tag(1, WireType2.Varint).int32(message.page);
|
|
1281
|
+
if (message.pageSize !== 0)
|
|
1282
|
+
writer.tag(2, WireType2.Varint).int32(message.pageSize);
|
|
1283
|
+
if (message.offset !== void 0)
|
|
1284
|
+
writer.tag(3, WireType2.Varint).int32(message.offset);
|
|
1285
|
+
let u = options.writeUnknownFields;
|
|
1286
|
+
if (u !== false)
|
|
1287
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
1288
|
+
return writer;
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
var PaginationRequest = new PaginationRequest$Type();
|
|
1292
|
+
var QueryResponse$Type = class extends MessageType2 {
|
|
1293
|
+
constructor() {
|
|
1294
|
+
super("dubhe_grpc.QueryResponse", [
|
|
1295
|
+
{ no: 1, name: "rows", kind: "message", repeat: 2, T: () => Struct },
|
|
1296
|
+
{ no: 2, name: "pagination", kind: "message", T: () => PaginationResponse }
|
|
1297
|
+
]);
|
|
1298
|
+
}
|
|
1299
|
+
create(value) {
|
|
1300
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1301
|
+
message.rows = [];
|
|
1302
|
+
if (value !== void 0)
|
|
1303
|
+
reflectionMergePartial2(this, message, value);
|
|
1304
|
+
return message;
|
|
1305
|
+
}
|
|
1306
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1307
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1308
|
+
while (reader.pos < end) {
|
|
1309
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1310
|
+
switch (fieldNo) {
|
|
1311
|
+
case /* repeated google.protobuf.Struct rows */
|
|
1312
|
+
1:
|
|
1313
|
+
message.rows.push(Struct.internalBinaryRead(reader, reader.uint32(), options));
|
|
1314
|
+
break;
|
|
1315
|
+
case /* optional dubhe_grpc.PaginationResponse pagination */
|
|
1316
|
+
2:
|
|
1317
|
+
message.pagination = PaginationResponse.internalBinaryRead(
|
|
1318
|
+
reader,
|
|
1319
|
+
reader.uint32(),
|
|
1320
|
+
options,
|
|
1321
|
+
message.pagination
|
|
1322
|
+
);
|
|
1323
|
+
break;
|
|
1324
|
+
default:
|
|
1325
|
+
let u = options.readUnknownField;
|
|
1326
|
+
if (u === "throw")
|
|
1327
|
+
throw new globalThis.Error(
|
|
1328
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
1329
|
+
);
|
|
1330
|
+
let d = reader.skip(wireType);
|
|
1331
|
+
if (u !== false)
|
|
1332
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
1333
|
+
this.typeName,
|
|
1334
|
+
message,
|
|
1335
|
+
fieldNo,
|
|
1336
|
+
wireType,
|
|
1337
|
+
d
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
return message;
|
|
1342
|
+
}
|
|
1343
|
+
internalBinaryWrite(message, writer, options) {
|
|
1344
|
+
for (let i = 0; i < message.rows.length; i++)
|
|
1345
|
+
Struct.internalBinaryWrite(
|
|
1346
|
+
message.rows[i],
|
|
1347
|
+
writer.tag(1, WireType2.LengthDelimited).fork(),
|
|
1348
|
+
options
|
|
1349
|
+
).join();
|
|
1350
|
+
if (message.pagination)
|
|
1351
|
+
PaginationResponse.internalBinaryWrite(
|
|
1352
|
+
message.pagination,
|
|
1353
|
+
writer.tag(2, WireType2.LengthDelimited).fork(),
|
|
1354
|
+
options
|
|
1355
|
+
).join();
|
|
1356
|
+
let u = options.writeUnknownFields;
|
|
1357
|
+
if (u !== false)
|
|
1358
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
1359
|
+
return writer;
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
var QueryResponse = new QueryResponse$Type();
|
|
1363
|
+
var PaginationResponse$Type = class extends MessageType2 {
|
|
1364
|
+
constructor() {
|
|
1365
|
+
super("dubhe_grpc.PaginationResponse", [
|
|
1366
|
+
{
|
|
1367
|
+
no: 1,
|
|
1368
|
+
name: "current_page",
|
|
1369
|
+
kind: "scalar",
|
|
1370
|
+
T: 5
|
|
1371
|
+
/*ScalarType.INT32*/
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
no: 2,
|
|
1375
|
+
name: "page_size",
|
|
1376
|
+
kind: "scalar",
|
|
1377
|
+
T: 5
|
|
1378
|
+
/*ScalarType.INT32*/
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
no: 3,
|
|
1382
|
+
name: "total_items",
|
|
1383
|
+
kind: "scalar",
|
|
1384
|
+
T: 3,
|
|
1385
|
+
L: 0
|
|
1386
|
+
/*LongType.BIGINT*/
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
no: 4,
|
|
1390
|
+
name: "total_pages",
|
|
1391
|
+
kind: "scalar",
|
|
1392
|
+
T: 5
|
|
1393
|
+
/*ScalarType.INT32*/
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
no: 5,
|
|
1397
|
+
name: "has_next_page",
|
|
1398
|
+
kind: "scalar",
|
|
1399
|
+
T: 8
|
|
1400
|
+
/*ScalarType.BOOL*/
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
no: 6,
|
|
1404
|
+
name: "has_previous_page",
|
|
1405
|
+
kind: "scalar",
|
|
1406
|
+
T: 8
|
|
1407
|
+
/*ScalarType.BOOL*/
|
|
1408
|
+
}
|
|
1409
|
+
]);
|
|
1410
|
+
}
|
|
1411
|
+
create(value) {
|
|
1412
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1413
|
+
message.currentPage = 0;
|
|
1414
|
+
message.pageSize = 0;
|
|
1415
|
+
message.totalItems = 0n;
|
|
1416
|
+
message.totalPages = 0;
|
|
1417
|
+
message.hasNextPage = false;
|
|
1418
|
+
message.hasPreviousPage = false;
|
|
1419
|
+
if (value !== void 0)
|
|
1420
|
+
reflectionMergePartial2(this, message, value);
|
|
1421
|
+
return message;
|
|
1422
|
+
}
|
|
1423
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1424
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1425
|
+
while (reader.pos < end) {
|
|
1426
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1427
|
+
switch (fieldNo) {
|
|
1428
|
+
case /* int32 current_page */
|
|
1429
|
+
1:
|
|
1430
|
+
message.currentPage = reader.int32();
|
|
1431
|
+
break;
|
|
1432
|
+
case /* int32 page_size */
|
|
1433
|
+
2:
|
|
1434
|
+
message.pageSize = reader.int32();
|
|
1435
|
+
break;
|
|
1436
|
+
case /* int64 total_items */
|
|
1437
|
+
3:
|
|
1438
|
+
message.totalItems = reader.int64().toBigInt();
|
|
1439
|
+
break;
|
|
1440
|
+
case /* int32 total_pages */
|
|
1441
|
+
4:
|
|
1442
|
+
message.totalPages = reader.int32();
|
|
1443
|
+
break;
|
|
1444
|
+
case /* bool has_next_page */
|
|
1445
|
+
5:
|
|
1446
|
+
message.hasNextPage = reader.bool();
|
|
1447
|
+
break;
|
|
1448
|
+
case /* bool has_previous_page */
|
|
1449
|
+
6:
|
|
1450
|
+
message.hasPreviousPage = reader.bool();
|
|
1451
|
+
break;
|
|
1452
|
+
default:
|
|
1453
|
+
let u = options.readUnknownField;
|
|
1454
|
+
if (u === "throw")
|
|
1455
|
+
throw new globalThis.Error(
|
|
1456
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
1457
|
+
);
|
|
1458
|
+
let d = reader.skip(wireType);
|
|
1459
|
+
if (u !== false)
|
|
1460
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
1461
|
+
this.typeName,
|
|
1462
|
+
message,
|
|
1463
|
+
fieldNo,
|
|
1464
|
+
wireType,
|
|
1465
|
+
d
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
return message;
|
|
1470
|
+
}
|
|
1471
|
+
internalBinaryWrite(message, writer, options) {
|
|
1472
|
+
if (message.currentPage !== 0)
|
|
1473
|
+
writer.tag(1, WireType2.Varint).int32(message.currentPage);
|
|
1474
|
+
if (message.pageSize !== 0)
|
|
1475
|
+
writer.tag(2, WireType2.Varint).int32(message.pageSize);
|
|
1476
|
+
if (message.totalItems !== 0n)
|
|
1477
|
+
writer.tag(3, WireType2.Varint).int64(message.totalItems);
|
|
1478
|
+
if (message.totalPages !== 0)
|
|
1479
|
+
writer.tag(4, WireType2.Varint).int32(message.totalPages);
|
|
1480
|
+
if (message.hasNextPage !== false)
|
|
1481
|
+
writer.tag(5, WireType2.Varint).bool(message.hasNextPage);
|
|
1482
|
+
if (message.hasPreviousPage !== false)
|
|
1483
|
+
writer.tag(6, WireType2.Varint).bool(message.hasPreviousPage);
|
|
1484
|
+
let u = options.writeUnknownFields;
|
|
1485
|
+
if (u !== false)
|
|
1486
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
1487
|
+
return writer;
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1490
|
+
var PaginationResponse = new PaginationResponse$Type();
|
|
1491
|
+
var SubscribeRequest$Type = class extends MessageType2 {
|
|
1492
|
+
constructor() {
|
|
1493
|
+
super("dubhe_grpc.SubscribeRequest", [
|
|
1494
|
+
{
|
|
1495
|
+
no: 1,
|
|
1496
|
+
name: "table_ids",
|
|
1497
|
+
kind: "scalar",
|
|
1498
|
+
repeat: 2,
|
|
1499
|
+
T: 9
|
|
1500
|
+
/*ScalarType.STRING*/
|
|
1501
|
+
}
|
|
1502
|
+
]);
|
|
1503
|
+
}
|
|
1504
|
+
create(value) {
|
|
1505
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1506
|
+
message.tableIds = [];
|
|
1507
|
+
if (value !== void 0)
|
|
1508
|
+
reflectionMergePartial2(this, message, value);
|
|
1509
|
+
return message;
|
|
1510
|
+
}
|
|
1511
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1512
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1513
|
+
while (reader.pos < end) {
|
|
1514
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1515
|
+
switch (fieldNo) {
|
|
1516
|
+
case /* repeated string table_ids */
|
|
1517
|
+
1:
|
|
1518
|
+
message.tableIds.push(reader.string());
|
|
1519
|
+
break;
|
|
1520
|
+
default:
|
|
1521
|
+
let u = options.readUnknownField;
|
|
1522
|
+
if (u === "throw")
|
|
1523
|
+
throw new globalThis.Error(
|
|
1524
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
1525
|
+
);
|
|
1526
|
+
let d = reader.skip(wireType);
|
|
1527
|
+
if (u !== false)
|
|
1528
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
1529
|
+
this.typeName,
|
|
1530
|
+
message,
|
|
1531
|
+
fieldNo,
|
|
1532
|
+
wireType,
|
|
1533
|
+
d
|
|
1534
|
+
);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
return message;
|
|
1538
|
+
}
|
|
1539
|
+
internalBinaryWrite(message, writer, options) {
|
|
1540
|
+
for (let i = 0; i < message.tableIds.length; i++)
|
|
1541
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.tableIds[i]);
|
|
1542
|
+
let u = options.writeUnknownFields;
|
|
1543
|
+
if (u !== false)
|
|
1544
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
1545
|
+
return writer;
|
|
1546
|
+
}
|
|
1547
|
+
};
|
|
1548
|
+
var SubscribeRequest = new SubscribeRequest$Type();
|
|
1549
|
+
var TableChange$Type = class extends MessageType2 {
|
|
1550
|
+
constructor() {
|
|
1551
|
+
super("dubhe_grpc.TableChange", [
|
|
1552
|
+
{
|
|
1553
|
+
no: 1,
|
|
1554
|
+
name: "table_id",
|
|
1555
|
+
kind: "scalar",
|
|
1556
|
+
T: 9
|
|
1557
|
+
/*ScalarType.STRING*/
|
|
1558
|
+
},
|
|
1559
|
+
{ no: 2, name: "data", kind: "message", T: () => Struct }
|
|
1560
|
+
]);
|
|
1561
|
+
}
|
|
1562
|
+
create(value) {
|
|
1563
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1564
|
+
message.tableId = "";
|
|
1565
|
+
if (value !== void 0)
|
|
1566
|
+
reflectionMergePartial2(this, message, value);
|
|
1567
|
+
return message;
|
|
1568
|
+
}
|
|
1569
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1570
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1571
|
+
while (reader.pos < end) {
|
|
1572
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1573
|
+
switch (fieldNo) {
|
|
1574
|
+
case /* string table_id */
|
|
1575
|
+
1:
|
|
1576
|
+
message.tableId = reader.string();
|
|
1577
|
+
break;
|
|
1578
|
+
case /* google.protobuf.Struct data */
|
|
1579
|
+
2:
|
|
1580
|
+
message.data = Struct.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
1581
|
+
break;
|
|
1582
|
+
default:
|
|
1583
|
+
let u = options.readUnknownField;
|
|
1584
|
+
if (u === "throw")
|
|
1585
|
+
throw new globalThis.Error(
|
|
1586
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
|
|
1587
|
+
);
|
|
1588
|
+
let d = reader.skip(wireType);
|
|
1589
|
+
if (u !== false)
|
|
1590
|
+
(u === true ? UnknownFieldHandler2.onRead : u)(
|
|
1591
|
+
this.typeName,
|
|
1592
|
+
message,
|
|
1593
|
+
fieldNo,
|
|
1594
|
+
wireType,
|
|
1595
|
+
d
|
|
1596
|
+
);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
return message;
|
|
1600
|
+
}
|
|
1601
|
+
internalBinaryWrite(message, writer, options) {
|
|
1602
|
+
if (message.tableId !== "")
|
|
1603
|
+
writer.tag(1, WireType2.LengthDelimited).string(message.tableId);
|
|
1604
|
+
if (message.data)
|
|
1605
|
+
Struct.internalBinaryWrite(
|
|
1606
|
+
message.data,
|
|
1607
|
+
writer.tag(2, WireType2.LengthDelimited).fork(),
|
|
1608
|
+
options
|
|
1609
|
+
).join();
|
|
1610
|
+
let u = options.writeUnknownFields;
|
|
1611
|
+
if (u !== false)
|
|
1612
|
+
(u == true ? UnknownFieldHandler2.onWrite : u)(this.typeName, message, writer);
|
|
1613
|
+
return writer;
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
var TableChange = new TableChange$Type();
|
|
1617
|
+
var DubheGrpc = new ServiceType("dubhe_grpc.DubheGrpc", [
|
|
1618
|
+
{ name: "QueryTable", options: {}, I: QueryRequest, O: QueryResponse },
|
|
1619
|
+
{
|
|
1620
|
+
name: "SubscribeTable",
|
|
1621
|
+
serverStreaming: true,
|
|
1622
|
+
options: {},
|
|
1623
|
+
I: SubscribeRequest,
|
|
1624
|
+
O: TableChange
|
|
1625
|
+
}
|
|
1626
|
+
]);
|
|
1627
|
+
|
|
1628
|
+
// src/proto/dubhe_grpc.client.ts
|
|
1629
|
+
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
1630
|
+
var DubheGrpcClient = class {
|
|
1631
|
+
constructor(_transport) {
|
|
1632
|
+
this._transport = _transport;
|
|
1633
|
+
this.typeName = DubheGrpc.typeName;
|
|
1634
|
+
this.methods = DubheGrpc.methods;
|
|
1635
|
+
this.options = DubheGrpc.options;
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Query data from a specific table with filters, sorting, and pagination
|
|
1639
|
+
*
|
|
1640
|
+
* @generated from protobuf rpc: QueryTable
|
|
1641
|
+
*/
|
|
1642
|
+
queryTable(input, options) {
|
|
1643
|
+
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
1644
|
+
return stackIntercept(
|
|
1645
|
+
"unary",
|
|
1646
|
+
this._transport,
|
|
1647
|
+
method,
|
|
1648
|
+
opt,
|
|
1649
|
+
input
|
|
1650
|
+
);
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Subscribe to table updates
|
|
1654
|
+
*
|
|
1655
|
+
* @generated from protobuf rpc: SubscribeTable
|
|
1656
|
+
*/
|
|
1657
|
+
subscribeTable(input, options) {
|
|
1658
|
+
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
1659
|
+
return stackIntercept(
|
|
1660
|
+
"serverStreaming",
|
|
1661
|
+
this._transport,
|
|
1662
|
+
method,
|
|
1663
|
+
opt,
|
|
1664
|
+
input
|
|
1665
|
+
);
|
|
1666
|
+
}
|
|
1667
|
+
};
|
|
1668
|
+
|
|
1669
|
+
// src/client.ts
|
|
1670
|
+
import { GrpcWebFetchTransport } from "@protobuf-ts/grpcweb-transport";
|
|
1671
|
+
var DubheGrpcClient2 = class {
|
|
1672
|
+
constructor(options) {
|
|
1673
|
+
this.dubheGrpcClient = new DubheGrpcClient(new GrpcWebFetchTransport(options));
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
export {
|
|
1677
|
+
DubheGrpcClient2 as DubheGrpcClient,
|
|
1678
|
+
FilterOperator,
|
|
1679
|
+
DubheGrpcClient as ProtoDubheGrpcClient,
|
|
1680
|
+
SortDirection
|
|
1681
|
+
};
|
|
1682
|
+
//# sourceMappingURL=index.mjs.map
|