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 CHANGED
@@ -357,7 +357,7 @@ export interface ConvertOptions {
357
357
  /** `'string'` blob 类型数据的格式 */
358
358
  blob?: 'string' | 'binary';
359
359
  }
360
- export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob }?: ConvertOptions): string | number | bigint | boolean | string[] | Uint8Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array | BigInt64Array | Uint8Array[] | number[] | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | DdbDecimal32VectorValue | DdbDecimal64VectorValue | DdbDecimal128VectorValue | BigInt128Array | DdbSymbolExtendedValue | DdbArrayVectorValue | DdbMatrixValue | DdbObj<DdbValue>[] | DdbDurationVectorValue | DdbChartValue;
360
+ export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob }?: ConvertOptions): string | number | bigint | boolean | Uint8Array | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | DdbDecimal32VectorValue | Int32Array | DdbDecimal64VectorValue | BigInt64Array | DdbDecimal128VectorValue | BigInt128Array | DdbSymbolExtendedValue | string[] | Int8Array | Int16Array | Float32Array | Float64Array | DdbArrayVectorValue | DdbMatrixValue | Uint8Array[] | DdbObj<DdbValue>[] | DdbDurationVectorValue | DdbChartValue | number[];
361
361
  /** 转换一个向量到 js 原生数组 */
362
362
  export declare function converts(type: DdbType, value: DdbVectorValue, rows: number, le: boolean, options?: ConvertOptions): any[];
363
363
  export declare class DdbVoid extends DdbObj<undefined> {
@@ -525,6 +525,8 @@ export interface StreamingMessage<TRows = any> extends StreamingParams {
525
525
  rows: number;
526
526
  /** 每次接收到的 data 组成的数组 An array of data received each time */
527
527
  segments: DdbTableData<TRows>[];
528
+ /** 每次接收到的 obj 组成的数组 An array of obj received each time */
529
+ objs: DdbObj<DdbVectorObj[]>[];
528
530
  };
529
531
  /** 成功订阅后,后续推送过来的 message 解析错误,则会设置 error 并调用 handler
530
532
  After successfully subscribed, if the subsequently pushed message is parsed incorrectly, the error will be set and the handler will be called. */
@@ -750,7 +752,7 @@ export declare class DDB {
750
752
  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>;
751
753
  /** 调用 dolphindb 函数,传入 js 原生数组作为参数,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
752
754
  - func: 函数名
753
- - args?: `[ ]` 调用参数,可以是 js 原生数组
755
+ - args?: `[ ]` 调用参数,可以是 js 原生数组,参数在中间且想用 server 函数的默认参数值时可以传 null 占位
754
756
  - options?: 调用选项
755
757
  - urgent?: 紧急 flag。使用 urgent worker 执行,防止被其它作业阻塞
756
758
  - node?: 设置结点 alias 时发送到集群中对应的结点执行 (使用 DolphinDB 中的 rpc 方法)
package/browser.js CHANGED
@@ -2944,7 +2944,7 @@ export class DDB {
2944
2944
  }
2945
2945
  /** 调用 dolphindb 函数,传入 js 原生数组作为参数,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
2946
2946
  - func: 函数名
2947
- - args?: `[ ]` 调用参数,可以是 js 原生数组
2947
+ - args?: `[ ]` 调用参数,可以是 js 原生数组,参数在中间且想用 server 函数的默认参数值时可以传 null 占位
2948
2948
  - options?: 调用选项
2949
2949
  - urgent?: 紧急 flag。使用 urgent worker 执行,防止被其它作业阻塞
2950
2950
  - node?: 设置结点 alias 时发送到集群中对应的结点执行 (使用 DolphinDB 中的 rpc 方法)
@@ -3066,6 +3066,7 @@ export class DDB {
3066
3066
  offset: 0,
3067
3067
  rows: 0,
3068
3068
  segments: [],
3069
+ objs: []
3069
3070
  };
3070
3071
  let schema;
3071
3072
  console.log(t('订阅流表成功:'),
@@ -3111,6 +3112,7 @@ export class DDB {
3111
3112
  };
3112
3113
  win.rows += rows;
3113
3114
  win.segments.push(data);
3115
+ win.objs.push(obj);
3114
3116
  if (win.rows >= winsize * 2 && win.segments.length >= 2) {
3115
3117
  let winsize_ = 0;
3116
3118
  let i = win.segments.length - 1;
@@ -3118,6 +3120,7 @@ export class DDB {
3118
3120
  for (; winsize_ < winsize; i--)
3119
3121
  winsize_ += win.segments[i].data.length;
3120
3122
  win.segments = win.segments.slice(i);
3123
+ win.objs = win.objs.slice(i);
3121
3124
  win.offset += win.rows - winsize_;
3122
3125
  win.rows = winsize_;
3123
3126
  }