dolphindb 3.0.210 → 3.0.212
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/README.md +6 -6
- package/README.zh.md +5 -2
- package/browser.d.ts +4 -4
- package/browser.js +4 -4
- package/browser.js.map +1 -1
- package/docs.js.map +1 -1
- package/index.d.ts +4 -4
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -612,12 +612,12 @@ To close streaming data subscription, use the following two methods to disconnec
|
|
|
612
612
|
- Manually disconnect by calling `sddb.disconnect()`
|
|
613
613
|
|
|
614
614
|
|
|
615
|
-
|
|
615
|
+
### Development method
|
|
616
616
|
|
|
617
617
|
```shell
|
|
618
618
|
# Install the latest version of nodejs (see above)
|
|
619
619
|
|
|
620
|
-
# Install pnpm package manager
|
|
620
|
+
# Install the pnpm package manager
|
|
621
621
|
npm install -g pnpm
|
|
622
622
|
|
|
623
623
|
git clone https://github.com/dolphindb/api-javascript.git
|
|
@@ -630,13 +630,13 @@ pnpm install
|
|
|
630
630
|
# Copy .vscode/settings.template.json to .vscode/settings.json
|
|
631
631
|
cp .vscode/settings.template.json .vscode/settings.json
|
|
632
632
|
|
|
633
|
-
# Refer to
|
|
633
|
+
# Refer to scripts in package.json
|
|
634
634
|
|
|
635
635
|
# Build
|
|
636
636
|
pnpm run build
|
|
637
637
|
|
|
638
|
-
#
|
|
639
|
-
pnpm run
|
|
638
|
+
# Format code and automatically fix code errors
|
|
639
|
+
pnpm run fix
|
|
640
640
|
|
|
641
641
|
# Test
|
|
642
642
|
pnpm run test
|
|
@@ -644,6 +644,6 @@ pnpm run test
|
|
|
644
644
|
# Scan entries
|
|
645
645
|
pnpm run scan
|
|
646
646
|
# Manually complete untranslated entries
|
|
647
|
-
# Run
|
|
647
|
+
# Run scan again to update the dictionary file dict.json
|
|
648
648
|
pnpm run scan
|
|
649
649
|
```
|
package/README.zh.md
CHANGED
|
@@ -606,6 +606,9 @@ git clone https://github.com/dolphindb/api-javascript.git
|
|
|
606
606
|
|
|
607
607
|
cd api-javascript
|
|
608
608
|
|
|
609
|
+
# 国内网络推荐配置 registry
|
|
610
|
+
pnpm config set registry https://registry.npmmirror.com
|
|
611
|
+
|
|
609
612
|
# 安装项目依赖
|
|
610
613
|
pnpm install
|
|
611
614
|
|
|
@@ -617,8 +620,8 @@ cp .vscode/settings.template.json .vscode/settings.json
|
|
|
617
620
|
# 构建
|
|
618
621
|
pnpm run build
|
|
619
622
|
|
|
620
|
-
#
|
|
621
|
-
pnpm run
|
|
623
|
+
# 格式化代码并自动修复代码错误
|
|
624
|
+
pnpm run fix
|
|
622
625
|
|
|
623
626
|
# 测试
|
|
624
627
|
pnpm run test
|
package/browser.d.ts
CHANGED
|
@@ -281,7 +281,7 @@ export interface DdbMatrixData {
|
|
|
281
281
|
}
|
|
282
282
|
export type IotVectorItemValue = [number | string | bigint | boolean][];
|
|
283
283
|
export type DdbIotAnyVector = DdbObj<IotVectorItemValue>;
|
|
284
|
-
export type
|
|
284
|
+
export type Convertable = DdbObj | string | boolean | null | undefined;
|
|
285
285
|
/** 可以表示所有 DolphinDB 数据库中的数据类型 Can represent data types in all DolphinDB databases */
|
|
286
286
|
export declare class DdbObj<TValue extends DdbValue = DdbValue> {
|
|
287
287
|
static dec: TextDecoder;
|
|
@@ -358,10 +358,10 @@ export declare class DdbObj<TValue extends DdbValue = DdbValue> {
|
|
|
358
358
|
}, limit?: number): TensorData;
|
|
359
359
|
toString(options?: InspectOptions): string;
|
|
360
360
|
inspect_type(): string;
|
|
361
|
-
/** 自动转换
|
|
362
|
-
static to_ddbobj(value:
|
|
361
|
+
/** 自动转换 Convertable 为 DdbObj */
|
|
362
|
+
static to_ddbobj(value: Convertable): DdbObj;
|
|
363
363
|
/** 转换 js 数组为 DdbObj[] */
|
|
364
|
-
static to_ddbobjs(values:
|
|
364
|
+
static to_ddbobjs(values: Convertable[]): DdbObj<DdbValue>[];
|
|
365
365
|
/** @deprecated 用 data() */
|
|
366
366
|
to_cols(): {
|
|
367
367
|
title: string;
|
package/browser.js
CHANGED
|
@@ -1549,7 +1549,7 @@ export class DdbObj {
|
|
|
1549
1549
|
return `${DdbForm[this.form]} ${tname}`;
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
|
-
/** 自动转换
|
|
1552
|
+
/** 自动转换 Convertable 为 DdbObj */
|
|
1553
1553
|
static to_ddbobj(value) {
|
|
1554
1554
|
if (value && value instanceof DdbObj)
|
|
1555
1555
|
return value;
|
|
@@ -3300,7 +3300,7 @@ export class DDB {
|
|
|
3300
3300
|
async invoke(func, args, options) {
|
|
3301
3301
|
// 检查 args 是否全部为简单参数,是则直接调用 call,避免 invoke 间接调用
|
|
3302
3302
|
// 逻辑类似 DdbObj.to_ddbobjs, 需要同步修改
|
|
3303
|
-
let
|
|
3303
|
+
let convertable = true;
|
|
3304
3304
|
let has_ddbobj = false;
|
|
3305
3305
|
if (args)
|
|
3306
3306
|
for (const arg of args)
|
|
@@ -3313,10 +3313,10 @@ export class DDB {
|
|
|
3313
3313
|
const type = typeof arg;
|
|
3314
3314
|
if (type === 'string' || type === 'boolean') { } // simple
|
|
3315
3315
|
else
|
|
3316
|
-
|
|
3316
|
+
convertable = false;
|
|
3317
3317
|
}
|
|
3318
3318
|
let result;
|
|
3319
|
-
if (
|
|
3319
|
+
if (convertable)
|
|
3320
3320
|
result = await this.call(func, args, options);
|
|
3321
3321
|
else {
|
|
3322
3322
|
if (has_ddbobj)
|