dolphindb 2.0.1010 → 2.0.1012
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 +10 -2
- package/browser.js.map +1 -1
- package/package.json +4 -4
package/browser.js
CHANGED
|
@@ -987,7 +987,11 @@ export class DdbObj {
|
|
|
987
987
|
const data = (() => {
|
|
988
988
|
switch (this.form) {
|
|
989
989
|
case DdbForm.scalar:
|
|
990
|
-
|
|
990
|
+
// 如果类型为 string, 则不进行格式化处理
|
|
991
|
+
if (this.type === DdbType.string)
|
|
992
|
+
return this.value;
|
|
993
|
+
else
|
|
994
|
+
return format(this.type, this.value, this.le, options);
|
|
991
995
|
case DdbForm.vector:
|
|
992
996
|
case DdbForm.pair:
|
|
993
997
|
case DdbForm.set: {
|
|
@@ -1113,7 +1117,11 @@ export class DdbObj {
|
|
|
1113
1117
|
}
|
|
1114
1118
|
return String(this.value);
|
|
1115
1119
|
})();
|
|
1116
|
-
|
|
1120
|
+
// 如果类型为 string 则不需要加上类型名
|
|
1121
|
+
if (this.form === DdbForm.scalar && this.type === DdbType.string)
|
|
1122
|
+
return data;
|
|
1123
|
+
else
|
|
1124
|
+
return `${options?.colors ? blue(type) : type}(${this.name ? `'${this.name}', ` : ''}${data})`;
|
|
1117
1125
|
}
|
|
1118
1126
|
inspect_type() {
|
|
1119
1127
|
const tname = DdbType[this.type];
|