dolphindb 3.0.213 → 3.0.214

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
@@ -408,7 +408,7 @@ export interface ConvertOptions {
408
408
  /** `'ms'` timestamp 类型转换为字符串表示时显示到秒还是毫秒 */
409
409
  timestamp?: 's' | 'ms';
410
410
  }
411
- export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob, char, timestamp }?: ConvertOptions): string | number | bigint | boolean | number[] | string[] | Uint8Array<ArrayBufferLike> | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | Int8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike> | BigInt64Array<ArrayBufferLike> | BigInt128Array | Uint8Array<ArrayBufferLike>[] | DdbObj<DdbValue>[] | IotVectorItemValue | DdbSymbolExtendedValue | DdbArrayVectorValue | DdbDecimal32VectorValue | DdbDecimal64VectorValue | DdbDecimal128VectorValue | DdbDurationVectorValue | DdbMatrixValue | DdbChartValue | DdbTensorValue;
411
+ export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob, char, timestamp }?: ConvertOptions): string | number | bigint | boolean | string[] | number[] | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | DdbDecimal32VectorValue | DdbDecimal64VectorValue | DdbDecimal128VectorValue | BigInt128Array | DdbSymbolExtendedValue | DdbArrayVectorValue | DdbMatrixValue | Uint8Array<ArrayBufferLike> | Int8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike> | BigInt64Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike>[] | DdbObj<DdbValue>[] | IotVectorItemValue | DdbDurationVectorValue | DdbTensorValue | DdbChartValue;
412
412
  /** 转换一个向量到 js 原生数组 */
413
413
  export declare function converts(type: DdbType, value: DdbVectorValue, rows: number, le: boolean, options?: ConvertOptions): any[] | Uint8Array;
414
414
  /** 构造 void 类型,默认为 `DdbVoidType.undefined` */
@@ -472,6 +472,9 @@ export declare class DdbVectorAny extends DdbObj {
472
472
  export declare class DdbVectorSymbol extends DdbObj<DdbSymbolExtendedValue> {
473
473
  constructor(strings: string[], name?: string);
474
474
  }
475
+ export declare class DdbVectorChar extends DdbObj<Int8Array> {
476
+ constructor(chars?: Uint8Array | Int8Array | ArrayBuffer, name?: string);
477
+ }
475
478
  export declare class DdbSetInt extends DdbObj<Int32Array> {
476
479
  constructor(ints: (number | null)[] | Set<number> | Int32Array);
477
480
  }
package/index.js CHANGED
@@ -2395,6 +2395,29 @@ export class DdbVectorSymbol extends DdbObj {
2395
2395
  });
2396
2396
  }
2397
2397
  }
2398
+ export class DdbVectorChar extends DdbObj {
2399
+ constructor(chars, name) {
2400
+ let ints;
2401
+ if (!chars)
2402
+ ints = new Int8Array();
2403
+ else if (chars instanceof ArrayBuffer)
2404
+ ints = new Int8Array(chars);
2405
+ else if (chars instanceof Uint8Array)
2406
+ ints = new Int8Array(chars.buffer, chars.byteOffset, chars.byteLength);
2407
+ else {
2408
+ check(chars instanceof Int8Array);
2409
+ ints = chars;
2410
+ }
2411
+ super({
2412
+ form: DdbForm.vector,
2413
+ type: DdbType.char,
2414
+ rows: ints.length,
2415
+ cols: 1,
2416
+ value: ints,
2417
+ name
2418
+ });
2419
+ }
2420
+ }
2398
2421
  export class DdbSetInt extends DdbObj {
2399
2422
  constructor(ints) {
2400
2423
  super({