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