dolphindb 3.1.41 → 3.1.42
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 +4 -2
- package/browser.js +4 -15
- package/browser.js.map +1 -1
- package/index.d.ts +4 -2
- package/index.js +5 -14
- package/index.js.map +1 -1
- package/package.json +4 -4
- package/unused.js +1 -0
- package/unused.js.map +1 -1
package/browser.d.ts
CHANGED
|
@@ -47,7 +47,9 @@ export interface DdbChartValue {
|
|
|
47
47
|
z_axis?: string;
|
|
48
48
|
};
|
|
49
49
|
extras?: {
|
|
50
|
-
multi_y_axes
|
|
50
|
+
multi_y_axes?: boolean;
|
|
51
|
+
/** 自适应 y 轴,而不是从 0 刻度开始 */
|
|
52
|
+
auto_scale_y_axes?: boolean;
|
|
51
53
|
};
|
|
52
54
|
data: DdbMatrixObj;
|
|
53
55
|
}
|
|
@@ -185,7 +187,7 @@ export interface InspectOptions {
|
|
|
185
187
|
export declare function format(type: DdbType, value: DdbValue, le: boolean, options?: InspectOptions): string;
|
|
186
188
|
/** 格式化向量、集合中的第 index 项为字符串,空值返回 'null' 字符串 formatted vector, the index-th item in the collection is a string, a null value returns a 'null' string */
|
|
187
189
|
export declare function formati(obj: DdbVectorObj, index: number, options?: InspectOptions): string;
|
|
188
|
-
export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob, char, timestamp }?: ConvertOptions): string | number | bigint | boolean | number[] | string[] | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | DdbDecimal32VectorValue | DdbDecimal64VectorValue | DdbSymbolExtendedValue | DdbExtObjValue | DdbTensorValue | Uint8Array<ArrayBufferLike> |
|
|
190
|
+
export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob, char, timestamp }?: ConvertOptions): string | number | bigint | boolean | number[] | string[] | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | DdbDecimal32VectorValue | DdbDecimal64VectorValue | DdbSymbolExtendedValue | DdbExtObjValue | DdbTensorValue | Uint8Array<ArrayBufferLike> | Int8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike> | BigInt64Array<ArrayBufferLike> | BigInt128Array | Uint8Array<ArrayBufferLike>[] | DdbObj<DdbValue>[] | IotVectorItemValue | DdbArrayVectorValue | DdbDecimal128VectorValue | DdbDurationVectorValue | DdbMatrixValue | DdbChartValue;
|
|
189
191
|
/** 转换一个向量到 js 原生数组 */
|
|
190
192
|
export declare function converts(type: DdbType, value: DdbVectorValue, rows: number, le: boolean, options?: ConvertOptions): any[] | Uint8Array;
|
|
191
193
|
/** 构造 void 类型,默认为 `DdbVoidType.undefined` */
|
package/browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { empty } from 'xshell/prototype.browser.js';
|
|
1
|
+
import { empty, to_lower_camel_case } from 'xshell/prototype.browser.js';
|
|
2
2
|
import { blue, cyan, green, gray, magenta } from 'xshell/chalk.browser.js';
|
|
3
|
-
import { concat, assert, Lock, genid, seq, zip_object, decode, check } from 'xshell/utils.browser.js';
|
|
3
|
+
import { concat, assert, Lock, genid, seq, zip_object, decode, check, map_keys } from 'xshell/utils.browser.js';
|
|
4
4
|
import { connect_websocket } from 'xshell/net.browser.js';
|
|
5
5
|
import { t } from "./i18n/index.js";
|
|
6
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, SqlStandard, uuid2str, get_times_ddbobj, funcdefs, get_number_formatter, urgent } from "./common.js";
|
|
@@ -172,15 +172,7 @@ export class DdbObj {
|
|
|
172
172
|
},
|
|
173
173
|
...bin_start ? { bin_start, bin_end, } : {},
|
|
174
174
|
...bin_count ? { bin_count } : {},
|
|
175
|
-
...extras ? (()
|
|
176
|
-
const { multiYAxes: multi_y_axes = false, ...extras_others } = extras.to_dict({ strip: true });
|
|
177
|
-
return {
|
|
178
|
-
extras: {
|
|
179
|
-
multi_y_axes,
|
|
180
|
-
...extras_others,
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
})() : {},
|
|
175
|
+
...extras ? { extras: map_keys(extras.data()) } : {},
|
|
184
176
|
data,
|
|
185
177
|
...others,
|
|
186
178
|
};
|
|
@@ -956,10 +948,7 @@ export class DdbObj {
|
|
|
956
948
|
...bin_start ? { binStart: bin_start, binEnd: bin_end } : {},
|
|
957
949
|
...bin_count ? { binCount: bin_count } : {},
|
|
958
950
|
title: new DdbVectorString([chart, x_axis, y_axis, z_axis]),
|
|
959
|
-
...extras ? (()
|
|
960
|
-
const { multi_y_axes, ...extras_other } = extras;
|
|
961
|
-
return { extras: new DdbDict({ multiYAxes: multi_y_axes, ...extras_other }) };
|
|
962
|
-
})() : {},
|
|
951
|
+
...extras ? { extras: new DdbDict(map_keys(extras, to_lower_camel_case)) } : {},
|
|
963
952
|
data,
|
|
964
953
|
});
|
|
965
954
|
return [keys.pack(), values.pack()];
|