dolphindb 2.0.531 → 2.0.532

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 CHANGED
@@ -416,7 +416,9 @@ export class DdbObj {
416
416
  case DdbType.symbol:
417
417
  case DdbType.code:
418
418
  case DdbType.handle:
419
- case DdbType.functiondef: {
419
+ case DdbType.functiondef:
420
+ // mysql 插件 connect 方法会返回 resource 类型的对象
421
+ case DdbType.resource: {
420
422
  const i_head = type === DdbType.functiondef ? 1 : 0;
421
423
  let i_zero = buf.indexOf(0, i_head);
422
424
  let i_end; // 整个字符串(包括 0)的末尾,excluding
@@ -794,6 +796,7 @@ export class DdbObj {
794
796
  case DdbType.symbol:
795
797
  case DdbType.code:
796
798
  case DdbType.handle:
799
+ case DdbType.resource:
797
800
  return [
798
801
  DdbObj.enc.encode(value),
799
802
  Uint8Array.of(0),
@@ -1293,6 +1296,7 @@ export function format(type, value, le) {
1293
1296
  return value.name.quote('single');
1294
1297
  case DdbType.handle:
1295
1298
  case DdbType.code:
1299
+ case DdbType.resource:
1296
1300
  return value.quote('single');
1297
1301
  case DdbType.datehour:
1298
1302
  return (value === null || value === nulls.int32) ?
@@ -1951,7 +1955,7 @@ export class DDB {
1951
1955
  this.websocket = websocket;
1952
1956
  await this.rpc('connect', {});
1953
1957
  },
1954
- on_message: event => {
1958
+ on_message: (event) => {
1955
1959
  this.on_message(event);
1956
1960
  }
1957
1961
  });