dolphindb 3.0.114 → 3.0.115

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
@@ -555,7 +555,7 @@ export interface StreamingParams {
555
555
  offset 与流数据表创建时的第一行对应。如果某些行因为内存限制被删除,在决定订阅开始的位置时,这些行仍然考虑在内。 */
556
556
  offset?: number;
557
557
  filters?: {
558
- /** https://docs.dolphindb.cn/zh/help/FunctionsandCommands/FunctionReferences/s/subscribeTable.html#:~:text=%E8%BF%9E%E6%8E%A5%E6%96%B0%E7%9A%84%20leader%E3%80%82-,filter%20%E5%8F%82%E6%95%B0%E9%9C%80%E8%A6%81%E9%85%8D%E5%90%88,-setStreamTableFilterColumn%20%E5%87%BD%E6%95%B0%E4%B8%80%E8%B5%B7 */
558
+ /** https://test.dolphindb.cn/zh/funcs/s/subscribeTable.html#:~:text=filter%20%E5%8F%82%E6%95%B0%E9%9C%80%E8%A6%81%E9%85%8D%E5%90%88%20setStreamTableFilterColumn%20%E5%87%BD%E6%95%B0%E4%B8%80%E8%B5%B7%E4%BD%BF%E7%94%A8 */
559
559
  column?: DdbObj;
560
560
  /** 过滤条件的 DolphinDB 表达式 https://dolphindb1.atlassian.net/wiki/spaces/dev/pages/760840447/WebSocketConsole */
561
561
  expression?: string;
@@ -595,6 +595,8 @@ export interface DdbEvalOptions {
595
595
  listener?: DdbMessageListener;
596
596
  parse_object?: boolean;
597
597
  }
598
+ export interface DdbExecuteOptions extends DdbEvalOptions, ConvertOptions {
599
+ }
598
600
  type DdbRpcType = 'script' | 'function' | 'variable' | 'connect';
599
601
  export interface DdbRpcOptions extends DdbEvalOptions {
600
602
  script?: string;
@@ -642,6 +644,8 @@ export interface DdbCallOptions extends DdbEvalOptions {
642
644
  skip_connection_check?: boolean;
643
645
  on_more_messages?: DdbRpcOptions['on_more_messages'];
644
646
  }
647
+ export interface DdbInvokeOptions extends DdbCallOptions, ConvertOptions {
648
+ }
645
649
  export declare class DDB {
646
650
  /** 当前的 session id (http 或 tcp) */
647
651
  sid: string;
@@ -818,13 +822,13 @@ export declare class DDB {
818
822
  - func_type?: 设置 node 参数且参数数组为空时必传,需指定函数类型,其它情况下不传
819
823
  - add_node_alias?: 设置 nodes 参数时选传,其它情况不传
820
824
  - listener?: 处理本次 rpc 期间的消息 (DdbMessage) */
821
- invoke<TResult = any>(func: string, args?: any[], options?: DdbCallOptions): Promise<TResult>;
825
+ invoke<TResult = any>(func: string, args?: any[], options?: DdbInvokeOptions): Promise<TResult>;
822
826
  /** 执行 dolphindb 脚本,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
823
827
  - script?: 执行的脚本
824
828
  - options?: 执行选项
825
829
  - urgent?: 紧急 flag,确保提交的脚本使用 urgent worker 处理,防止被其它作业阻塞
826
830
  - listener?: 处理本次 rpc 期间的消息 (DdbMessage) */
827
- execute<TResult = any>(script: string, options?: DdbEvalOptions): Promise<TResult>;
831
+ execute<TResult = any>(script: string, options?: DdbExecuteOptions): Promise<TResult>;
828
832
  /** upload variable through websocket (variable command) */
829
833
  upload(
830
834
  /** 上传的变量名 Uploaded variables' name */
package/browser.js CHANGED
@@ -3221,7 +3221,7 @@ export class DDB {
3221
3221
  const result = simple
3222
3222
  ? await this.call(func, args, options)
3223
3223
  : await this.call('invoke', [func, JSON.stringify(args)], options);
3224
- return result.data();
3224
+ return result.data(options);
3225
3225
  }
3226
3226
  /** 执行 dolphindb 脚本,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
3227
3227
  - script?: 执行的脚本
@@ -3230,7 +3230,7 @@ export class DDB {
3230
3230
  - listener?: 处理本次 rpc 期间的消息 (DdbMessage) */
3231
3231
  async execute(script, options) {
3232
3232
  return (await this.eval(script, options))
3233
- .data();
3233
+ .data(options);
3234
3234
  }
3235
3235
  /** upload variable through websocket (variable command) */
3236
3236
  async upload(