dolphindb 2.0.1028 → 2.0.1030
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 +7 -2
- package/browser.js.map +1 -1
- package/index.js +7 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/test.js +8 -8
- package/test.js.map +1 -1
package/index.js
CHANGED
|
@@ -723,7 +723,10 @@ export class DdbObj {
|
|
|
723
723
|
case DdbForm.scalar:
|
|
724
724
|
switch (type) {
|
|
725
725
|
case DdbType.void:
|
|
726
|
-
|
|
726
|
+
// Server 实现中区分了 explicitNull
|
|
727
|
+
// Void::serialize()
|
|
728
|
+
// isNothing() ? 0 : 1;
|
|
729
|
+
return [Uint8Array.of(0)];
|
|
727
730
|
case DdbType.bool:
|
|
728
731
|
return [
|
|
729
732
|
Int8Array.of(value === null ?
|
|
@@ -2693,6 +2696,7 @@ export class DDB {
|
|
|
2693
2696
|
segments: [],
|
|
2694
2697
|
};
|
|
2695
2698
|
let schema;
|
|
2699
|
+
let first_message = true;
|
|
2696
2700
|
const { value: colnames } = await this.call('publishTable', [
|
|
2697
2701
|
'localhost',
|
|
2698
2702
|
new DdbInt(0),
|
|
@@ -2710,8 +2714,9 @@ export class DDB {
|
|
|
2710
2714
|
const i_topic_end = buffer.indexOf(0, 17);
|
|
2711
2715
|
// 首个 message 一定是 table schema, 后续消息是 column 片段组成的 any vector
|
|
2712
2716
|
const data = DdbObj.parse(buffer.subarray(i_topic_end + 1), this.le);
|
|
2713
|
-
if (
|
|
2717
|
+
if (first_message) {
|
|
2714
2718
|
schema = data;
|
|
2719
|
+
first_message = false;
|
|
2715
2720
|
return;
|
|
2716
2721
|
}
|
|
2717
2722
|
assert(schema, t('流数据订阅后一定先返回 schema'));
|