dolphindb 3.1.11 → 3.1.12
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.js +3 -3
- package/browser.js.map +1 -1
- package/common.d.ts +5 -1
- package/common.js +6 -1
- package/common.js.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
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, delay, 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 { date2str, datehour2str, datetime2str, ddb_tensor_bytes, DdbChartType, DdbDurationUnit, DdbForm, DdbFunctionType, DdbType, DdbVoidType, dictables,
|
|
6
|
+
import { date2str, datehour2str, datetime2str, ddb_tensor_bytes, DdbChartType, DdbDurationUnit, DdbForm, DdbFunctionType, DdbType, DdbVoidType, dictables, function_definition_patterns, generate_array_type, get_big_int_128, get_time_ddbobj, get_duration_unit, get_type_name, int1282str, ipaddr2str, is_decimal_null_value, is_decimal_type, minute2str, month2str, nanotime2str, nanotimestamp2str, nulls, second2str, set_big_int_128, time2str, timestamp2str, uuid2str, get_times_ddbobj, funcdefs } 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 {
|
|
@@ -2953,7 +2953,7 @@ export class DDB {
|
|
|
2953
2953
|
convertable = false;
|
|
2954
2954
|
}
|
|
2955
2955
|
let result;
|
|
2956
|
-
if (
|
|
2956
|
+
if (function_definition_patterns[this.language].test(func))
|
|
2957
2957
|
func = await this.define(func, { urgent: options?.urgent });
|
|
2958
2958
|
if (convertable)
|
|
2959
2959
|
result = await this.call(func, args, options);
|
|
@@ -3164,7 +3164,7 @@ export class DDB {
|
|
|
3164
3164
|
'}\n'),
|
|
3165
3165
|
['hello']) */
|
|
3166
3166
|
async define(definition, { urgent } = {}) {
|
|
3167
|
-
const matches =
|
|
3167
|
+
const matches = function_definition_patterns[this.language].exec(definition);
|
|
3168
3168
|
if (!matches)
|
|
3169
3169
|
throw new Error(t('DDB.define 方法传入的 definition 不符合函数定义格式 def xxx ()'));
|
|
3170
3170
|
const func_name = matches[1];
|