dolphindb 2.0.967 → 2.0.968
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 +8 -4
- package/browser.js.map +1 -1
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/package.json +4 -3
- package/shared/bigint-128-array.js.map +1 -1
- package/test.js.map +1 -1
package/index.js
CHANGED
|
@@ -1031,8 +1031,10 @@ class DdbObj {
|
|
|
1031
1031
|
case DdbType.decimal64:
|
|
1032
1032
|
case DdbType.decimal128:
|
|
1033
1033
|
const x = data[acc_len + i];
|
|
1034
|
-
if (is_decimal_null_value(type_, x))
|
|
1035
|
-
|
|
1034
|
+
if (is_decimal_null_value(type_, x)) {
|
|
1035
|
+
items[i] = '';
|
|
1036
|
+
break;
|
|
1037
|
+
}
|
|
1036
1038
|
const { scale } = this.value;
|
|
1037
1039
|
const s = String(x < 0 ? -x : x).padStart(scale, '0');
|
|
1038
1040
|
const str = (x < 0 ? '-' : '') + (scale ? `${s.slice(0, -scale) || '0'}.${s.slice(-scale)}` : s);
|
|
@@ -1461,8 +1463,10 @@ export function formati(obj, index, options = {}) {
|
|
|
1461
1463
|
case DdbType.decimal64:
|
|
1462
1464
|
case DdbType.decimal128:
|
|
1463
1465
|
const x = data[acc_len + i];
|
|
1464
|
-
if (is_decimal_null_value(type_, x))
|
|
1465
|
-
|
|
1466
|
+
if (is_decimal_null_value(type_, x)) {
|
|
1467
|
+
items[i] = '';
|
|
1468
|
+
break;
|
|
1469
|
+
}
|
|
1466
1470
|
const { scale } = obj.value;
|
|
1467
1471
|
const s = String(x < 0 ? -x : x).padStart(scale, '0');
|
|
1468
1472
|
const str = (x < 0 ? '-' : '') + (scale ? `${s.slice(0, -scale) || '0'}.${s.slice(-scale)}` : s);
|