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/index.d.ts CHANGED
@@ -544,7 +544,7 @@ export interface StreamingParams {
544
544
  offset 与流数据表创建时的第一行对应。如果某些行因为内存限制被删除,在决定订阅开始的位置时,这些行仍然考虑在内。 */
545
545
  offset?: number;
546
546
  filters?: {
547
- /** 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 */
547
+ /** 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 */
548
548
  column?: DdbObj;
549
549
  /** 过滤条件的 DolphinDB 表达式 https://dolphindb1.atlassian.net/wiki/spaces/dev/pages/760840447/WebSocketConsole */
550
550
  expression?: string;
@@ -584,6 +584,8 @@ export interface DdbEvalOptions {
584
584
  listener?: DdbMessageListener;
585
585
  parse_object?: boolean;
586
586
  }
587
+ export interface DdbExecuteOptions extends DdbEvalOptions, ConvertOptions {
588
+ }
587
589
  type DdbRpcType = 'script' | 'function' | 'variable' | 'connect';
588
590
  export interface DdbRpcOptions extends DdbEvalOptions {
589
591
  script?: string;
@@ -631,6 +633,8 @@ export interface DdbCallOptions extends DdbEvalOptions {
631
633
  skip_connection_check?: boolean;
632
634
  on_more_messages?: DdbRpcOptions['on_more_messages'];
633
635
  }
636
+ export interface DdbInvokeOptions extends DdbCallOptions, ConvertOptions {
637
+ }
634
638
  export declare class DDB {
635
639
  /** 当前的 session id (http 或 tcp) */
636
640
  sid: string;
@@ -808,13 +812,13 @@ export declare class DDB {
808
812
  - func_type?: 设置 node 参数且参数数组为空时必传,需指定函数类型,其它情况下不传
809
813
  - add_node_alias?: 设置 nodes 参数时选传,其它情况不传
810
814
  - listener?: 处理本次 rpc 期间的消息 (DdbMessage) */
811
- invoke<TResult = any>(func: string, args?: any[], options?: DdbCallOptions): Promise<TResult>;
815
+ invoke<TResult = any>(func: string, args?: any[], options?: DdbInvokeOptions): Promise<TResult>;
812
816
  /** 执行 dolphindb 脚本,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
813
817
  - script?: 执行的脚本
814
818
  - options?: 执行选项
815
819
  - urgent?: 紧急 flag,确保提交的脚本使用 urgent worker 处理,防止被其它作业阻塞
816
820
  - listener?: 处理本次 rpc 期间的消息 (DdbMessage) */
817
- execute<TResult = any>(script: string, options?: DdbEvalOptions): Promise<TResult>;
821
+ execute<TResult = any>(script: string, options?: DdbExecuteOptions): Promise<TResult>;
818
822
  /** upload variable through websocket (variable command) */
819
823
  upload(
820
824
  /** 上传的变量名 Uploaded variables' name */
package/index.js CHANGED
@@ -3199,7 +3199,7 @@ export class DDB {
3199
3199
  const result = simple
3200
3200
  ? await this.call(func, args, options)
3201
3201
  : await this.call('invoke', [func, JSON.stringify(args)], options);
3202
- return result.data();
3202
+ return result.data(options);
3203
3203
  }
3204
3204
  /** 执行 dolphindb 脚本,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
3205
3205
  - script?: 执行的脚本
@@ -3208,7 +3208,7 @@ export class DDB {
3208
3208
  - listener?: 处理本次 rpc 期间的消息 (DdbMessage) */
3209
3209
  async execute(script, options) {
3210
3210
  return (await this.eval(script, options))
3211
- .data();
3211
+ .data(options);
3212
3212
  }
3213
3213
  /** upload variable through websocket (variable command) */
3214
3214
  async upload(