dolphindb 2.0.906 → 2.0.908

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
@@ -1082,13 +1082,13 @@ export class DdbObj {
1082
1082
  // av
1083
1083
  const type_ = this.type - 64;
1084
1084
  const limit = 10;
1085
- let items = new Array(Math.min(limit, this.rows));
1085
+ let array_items = new Array(Math.min(limit, this.rows));
1086
1086
  let i_items = 0;
1087
1087
  for (const { lengths, data } of this.value) {
1088
1088
  let acc_len = 0;
1089
1089
  for (const length of lengths) {
1090
- let _items = new Array(Math.min(limit, length));
1091
- for (let i = 0; i < _items.length; i++)
1090
+ let items = new Array(Math.min(limit, length));
1091
+ for (let i = 0; i < items.length; i++)
1092
1092
  switch (type_) {
1093
1093
  case DdbType.decimal32:
1094
1094
  case DdbType.decimal64:
@@ -1099,25 +1099,32 @@ export class DdbObj {
1099
1099
  const { scale } = this.value;
1100
1100
  const s = String(x < 0 ? -x : x).padStart(scale, '0');
1101
1101
  const str = (x < 0 ? '-' : '') + (scale ? `${s.slice(0, -scale) || '0'}.${s.slice(-scale)}` : s);
1102
- _items[i] = options.colors ? green(str) : str;
1102
+ items[i] = options.colors ? green(str) : str;
1103
1103
  break;
1104
1104
  case DdbType.complex:
1105
1105
  case DdbType.point: {
1106
1106
  const index = acc_len + i;
1107
- _items[i] = format(type_, data.subarray(2 * index, 2 * (index + 1)), this.le, options);
1107
+ items[i] = format(type_, data.subarray(2 * index, 2 * (index + 1)), this.le, options);
1108
+ break;
1109
+ }
1110
+ case DdbType.uuid:
1111
+ case DdbType.int128:
1112
+ case DdbType.ipaddr: {
1113
+ const index = acc_len + i;
1114
+ items[i] = format(type_, data.subarray(16 * index, 16 * (index + 1)), this.le, options);
1108
1115
  break;
1109
1116
  }
1110
1117
  default:
1111
- _items[i] = format(type_, data[acc_len + i], this.le, options);
1118
+ items[i] = format(type_, data[acc_len + i], this.le, options);
1112
1119
  break;
1113
1120
  }
1114
- items[i_items++] = format_array(_items, length > limit);
1121
+ array_items[i_items++] = format_array(items, length > limit);
1115
1122
  acc_len += length;
1116
1123
  }
1117
1124
  if (i_items >= limit)
1118
1125
  break;
1119
1126
  }
1120
- return format_array(items, this.rows > limit);
1127
+ return format_array(array_items, this.rows > limit);
1121
1128
  }
1122
1129
  switch (this.type) {
1123
1130
  case DdbType.symbol_extended: {
@@ -1538,6 +1545,13 @@ export function formati(obj, index, options = {}) {
1538
1545
  items[i] = format(type_, data.subarray(2 * index, 2 * (index + 1)), obj.le, options);
1539
1546
  break;
1540
1547
  }
1548
+ case DdbType.uuid:
1549
+ case DdbType.int128:
1550
+ case DdbType.ipaddr: {
1551
+ const index = acc_len + i;
1552
+ items[i] = format(type_, data.subarray(16 * index, 16 * (index + 1)), obj.le, options);
1553
+ break;
1554
+ }
1541
1555
  default:
1542
1556
  items[i] = format(type_, data[acc_len + i], obj.le, options);
1543
1557
  break;