dolphindb 3.1.28 → 3.1.30
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 +1 -1
- package/browser.js +9 -9
- package/browser.js.map +1 -1
- package/common.d.ts +1 -1
- package/common.js +1 -1
- package/common.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +9 -9
- package/index.js.map +1 -1
- package/language.js +1 -0
- package/language.js.map +1 -1
- package/package.json +1 -1
package/browser.d.ts
CHANGED
|
@@ -569,7 +569,7 @@ export declare class DDB {
|
|
|
569
569
|
将这个 flag 设为 true 跳过连接状态检查
|
|
570
570
|
(internal use) When await ddb.connect() establishes a connection for the first time, you cannot call await this.connect() again to ensure the connection status, which will lead to circular dependencies.
|
|
571
571
|
Set this flag to true to skip connection status checks */
|
|
572
|
-
call<TResult extends DdbObj>(func: string, args?: (DdbObj | string | boolean)[], { urgent, node, nodes, add_node_alias, listener, parse_object, skip_connection_check, on_more_messages }?: DdbCallOptions): Promise<TResult>;
|
|
572
|
+
call<TResult extends DdbObj>(func: string, args?: (DdbObj | string | boolean)[], { urgent: u, node, nodes, add_node_alias, listener, parse_object, skip_connection_check, on_more_messages }?: DdbCallOptions): Promise<TResult>;
|
|
573
573
|
/** 调用 dolphindb 函数,传入 js 原生数组作为参数,返回 js 原生对象或值(调用 DdbObj.data() 后的结果)
|
|
574
574
|
- func: 函数名,或者函数完整实现,会间接调用 define 进行预定义
|
|
575
575
|
- args?: `[ ]` 调用参数,可以是 js 原生数组,参数在中间且想用 server 函数的默认参数值时可以传 null 占位
|
package/browser.js
CHANGED
|
@@ -3,7 +3,7 @@ import { blue, cyan, green, grey, magenta } from 'xshell/chalk.browser.js';
|
|
|
3
3
|
import { concat, assert, Lock, genid, seq, zip_object, decode, check } from 'xshell/utils.browser.js';
|
|
4
4
|
import { connect_websocket } from 'xshell/net.browser.js';
|
|
5
5
|
import { t } from "./i18n/index.js";
|
|
6
|
-
import { ddb_tensor_bytes, DdbChartType, DdbDurationUnit, DdbForm, generate_array_type, DdbFunctionType, DdbType, DdbVoidType, dictables, function_definition_patterns, get_big_int_128, get_time_ddbobj, get_duration_unit, get_type_name, int1282str, ipaddr2str, is_decimal_null_value, is_decimal_type, time_formatters, number_nulls, nulls, set_big_int_128, uuid2str, get_times_ddbobj, funcdefs, get_number_formatter,
|
|
6
|
+
import { ddb_tensor_bytes, DdbChartType, DdbDurationUnit, DdbForm, generate_array_type, DdbFunctionType, DdbType, DdbVoidType, dictables, function_definition_patterns, get_big_int_128, get_time_ddbobj, get_duration_unit, get_type_name, int1282str, ipaddr2str, is_decimal_null_value, is_decimal_type, time_formatters, number_nulls, nulls, set_big_int_128, uuid2str, get_times_ddbobj, funcdefs, get_number_formatter, urgent } from "./common.js";
|
|
7
7
|
export * from "./common.js";
|
|
8
8
|
/** 可以表示所有 DolphinDB 数据库中的数据类型 Can represent data types in all DolphinDB databases */
|
|
9
9
|
export class DdbObj {
|
|
@@ -2660,10 +2660,10 @@ export class DDB {
|
|
|
2660
2660
|
let error = new DdbDatabaseError('', this.url, type, options, id);
|
|
2661
2661
|
if (!options.skip_connection_check)
|
|
2662
2662
|
await this.connect();
|
|
2663
|
-
const { script, func, args: _args = [], vars = [], urgent, listener, on_more_messages, } = options;
|
|
2663
|
+
const { script, func, args: _args = [], vars = [], urgent: u, listener, on_more_messages, } = options;
|
|
2664
2664
|
if (func === 'pnode_run')
|
|
2665
2665
|
try {
|
|
2666
|
-
await (this.ppnode_run ??= this.eval(funcdefs.pnode_run[this.language],
|
|
2666
|
+
await (this.ppnode_run ??= this.eval(funcdefs.pnode_run[this.language], urgent));
|
|
2667
2667
|
}
|
|
2668
2668
|
catch (error) {
|
|
2669
2669
|
this.ppnode_run = undefined;
|
|
@@ -2772,7 +2772,7 @@ export class DDB {
|
|
|
2772
2772
|
on_more_messages(buffer);
|
|
2773
2773
|
};
|
|
2774
2774
|
websocket.send(concat([
|
|
2775
|
-
this.enc.encode(`API2 ${this.sid} ${command.length} / ${this.get_rpc_options({ urgent })}\n`),
|
|
2775
|
+
this.enc.encode(`API2 ${this.sid} ${command.length} / ${this.get_rpc_options({ urgent: u })}\n`),
|
|
2776
2776
|
command,
|
|
2777
2777
|
...args.map(arg => arg.pack())
|
|
2778
2778
|
]));
|
|
@@ -2831,12 +2831,12 @@ export class DDB {
|
|
|
2831
2831
|
将这个 flag 设为 true 跳过连接状态检查
|
|
2832
2832
|
(internal use) When await ddb.connect() establishes a connection for the first time, you cannot call await this.connect() again to ensure the connection status, which will lead to circular dependencies.
|
|
2833
2833
|
Set this flag to true to skip connection status checks */
|
|
2834
|
-
async call(func, args = [], { urgent, node, nodes, add_node_alias, listener, parse_object, skip_connection_check, on_more_messages } = {}) {
|
|
2834
|
+
async call(func, args = [], { urgent: u, node, nodes, add_node_alias, listener, parse_object, skip_connection_check, on_more_messages } = {}) {
|
|
2835
2835
|
let func_ = func;
|
|
2836
2836
|
let args_ = args;
|
|
2837
2837
|
if (node) {
|
|
2838
2838
|
try {
|
|
2839
|
-
await (this.pjsrpc ??= this.eval(funcdefs.jsrpc[this.language],
|
|
2839
|
+
await (this.pjsrpc ??= this.eval(funcdefs.jsrpc[this.language], urgent));
|
|
2840
2840
|
}
|
|
2841
2841
|
catch (error) {
|
|
2842
2842
|
this.pjsrpc = undefined;
|
|
@@ -2867,7 +2867,7 @@ export class DDB {
|
|
|
2867
2867
|
return this.rpc('function', {
|
|
2868
2868
|
func: func_,
|
|
2869
2869
|
args: args_,
|
|
2870
|
-
urgent,
|
|
2870
|
+
urgent: u,
|
|
2871
2871
|
listener,
|
|
2872
2872
|
parse_object,
|
|
2873
2873
|
skip_connection_check,
|
|
@@ -2910,7 +2910,7 @@ export class DDB {
|
|
|
2910
2910
|
if (has_ddbobj)
|
|
2911
2911
|
throw new Error(t('调用 ddb.invoke 的参数中不能同时有 DdbObj 与复杂 js 原生对象'));
|
|
2912
2912
|
try {
|
|
2913
|
-
await (this.pinvoke ??= this.eval(funcdefs.invoke[this.language],
|
|
2913
|
+
await (this.pinvoke ??= this.eval(funcdefs.invoke[this.language], urgent));
|
|
2914
2914
|
}
|
|
2915
2915
|
catch (error) {
|
|
2916
2916
|
// invoke 没有正确执行时,重新将 pinvoke 赋值为 undefined
|
|
@@ -2952,7 +2952,7 @@ export class DDB {
|
|
|
2952
2952
|
// 因为是新建的连接,而且执行完脚本之后马上就关闭了,所以不用考虑变量泄漏的问题
|
|
2953
2953
|
await ddb.eval(`jobs = exec rootJobId from getConsoleJobs() where sessionId = ${this.sid}\n` +
|
|
2954
2954
|
'if (size(jobs))\n' +
|
|
2955
|
-
' cancelConsoleJob(jobs)\n',
|
|
2955
|
+
' cancelConsoleJob(jobs)\n', urgent);
|
|
2956
2956
|
}
|
|
2957
2957
|
finally {
|
|
2958
2958
|
ddb.disconnect();
|