dolphindb 3.0.26 → 3.0.28
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/browser.d.ts +4 -2
- package/browser.js +4 -1
- package/browser.js.map +1 -1
- package/index.d.ts +4 -2
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -347,7 +347,7 @@ export interface ConvertOptions {
|
|
|
347
347
|
/** `'string'` blob 类型数据的格式 */
|
|
348
348
|
blob?: 'string' | 'binary';
|
|
349
349
|
}
|
|
350
|
-
export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob }?: ConvertOptions): string | number | bigint | boolean |
|
|
350
|
+
export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob }?: ConvertOptions): string | number | bigint | boolean | Uint8Array | Int32Array | BigInt64Array | string[] | Int8Array | Int16Array | Float32Array | Float64Array | Uint8Array[] | number[] | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | DdbDecimal32VectorValue | DdbDecimal64VectorValue | DdbDecimal128VectorValue | BigInt128Array | DdbSymbolExtendedValue | DdbArrayVectorValue | DdbMatrixValue | DdbObj<DdbValue>[] | DdbDurationVectorValue | DdbChartValue;
|
|
351
351
|
/** 转换一个向量到 js 原生数组 */
|
|
352
352
|
export declare function converts(type: DdbType, value: DdbVectorValue, rows: number, le: boolean, options?: ConvertOptions): any[];
|
|
353
353
|
export declare class DdbVoid extends DdbObj<undefined> {
|
|
@@ -515,6 +515,8 @@ export interface StreamingMessage<TRows = any> extends StreamingParams {
|
|
|
515
515
|
rows: number;
|
|
516
516
|
/** 每次接收到的 data 组成的数组 An array of data received each time */
|
|
517
517
|
segments: DdbTableData<TRows>[];
|
|
518
|
+
/** 每次接收到的 obj 组成的数组 An array of obj received each time */
|
|
519
|
+
objs: DdbObj<DdbVectorObj[]>[];
|
|
518
520
|
};
|
|
519
521
|
/** 成功订阅后,后续推送过来的 message 解析错误,则会设置 error 并调用 handler
|
|
520
522
|
After successfully subscribed, if the subsequently pushed message is parsed incorrectly, the error will be set and the handler will be called. */
|
|
@@ -741,7 +743,7 @@ export declare class DDB {
|
|
|
741
743
|
call<TResult extends DdbObj>(func: string, args?: (DdbObj | string | boolean)[], { urgent, node, nodes, func_type, add_node_alias, listener, parse_object, skip_connection_check, on_more_messages }?: DdbCallOptions): Promise<TResult>;
|
|
742
744
|
/** 调用 dolphindb 函数,传入 js 原生数组作为参数,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
|
|
743
745
|
- func: 函数名
|
|
744
|
-
- args?: `[ ]` 调用参数,可以是 js
|
|
746
|
+
- args?: `[ ]` 调用参数,可以是 js 原生数组,参数在中间且想用 server 函数的默认参数值时可以传 null 占位
|
|
745
747
|
- options?: 调用选项
|
|
746
748
|
- urgent?: 紧急 flag。使用 urgent worker 执行,防止被其它作业阻塞
|
|
747
749
|
- node?: 设置结点 alias 时发送到集群中对应的结点执行 (使用 DolphinDB 中的 rpc 方法)
|
package/index.js
CHANGED
|
@@ -2922,7 +2922,7 @@ export class DDB {
|
|
|
2922
2922
|
}
|
|
2923
2923
|
/** 调用 dolphindb 函数,传入 js 原生数组作为参数,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
|
|
2924
2924
|
- func: 函数名
|
|
2925
|
-
- args?: `[ ]` 调用参数,可以是 js
|
|
2925
|
+
- args?: `[ ]` 调用参数,可以是 js 原生数组,参数在中间且想用 server 函数的默认参数值时可以传 null 占位
|
|
2926
2926
|
- options?: 调用选项
|
|
2927
2927
|
- urgent?: 紧急 flag。使用 urgent worker 执行,防止被其它作业阻塞
|
|
2928
2928
|
- node?: 设置结点 alias 时发送到集群中对应的结点执行 (使用 DolphinDB 中的 rpc 方法)
|
|
@@ -3044,6 +3044,7 @@ export class DDB {
|
|
|
3044
3044
|
offset: 0,
|
|
3045
3045
|
rows: 0,
|
|
3046
3046
|
segments: [],
|
|
3047
|
+
objs: []
|
|
3047
3048
|
};
|
|
3048
3049
|
let schema;
|
|
3049
3050
|
console.log(t('订阅流表成功:'),
|
|
@@ -3089,6 +3090,7 @@ export class DDB {
|
|
|
3089
3090
|
};
|
|
3090
3091
|
win.rows += rows;
|
|
3091
3092
|
win.segments.push(data);
|
|
3093
|
+
win.objs.push(obj);
|
|
3092
3094
|
if (win.rows >= winsize * 2 && win.segments.length >= 2) {
|
|
3093
3095
|
let winsize_ = 0;
|
|
3094
3096
|
let i = win.segments.length - 1;
|
|
@@ -3096,6 +3098,7 @@ export class DDB {
|
|
|
3096
3098
|
for (; winsize_ < winsize; i--)
|
|
3097
3099
|
winsize_ += win.segments[i].data.length;
|
|
3098
3100
|
win.segments = win.segments.slice(i);
|
|
3101
|
+
win.objs = win.objs.slice(i);
|
|
3099
3102
|
win.offset += win.rows - winsize_;
|
|
3100
3103
|
win.rows = winsize_;
|
|
3101
3104
|
}
|