dolphindb 2.0.1029 → 2.0.1031
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 +9 -8
- package/browser.js.map +1 -1
- package/index.js +9 -8
- 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,15 +2696,15 @@ export class DDB {
|
|
|
2693
2696
|
segments: [],
|
|
2694
2697
|
};
|
|
2695
2698
|
let schema;
|
|
2696
|
-
let first_message = true;
|
|
2697
2699
|
const { value: colnames } = await this.call('publishTable', [
|
|
2698
2700
|
'localhost',
|
|
2699
2701
|
new DdbInt(0),
|
|
2700
2702
|
this.streaming.table,
|
|
2701
2703
|
(this.streaming.action ||= `api_js_${new Date().getTime()}`),
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2704
|
+
...this.streaming?.filters?.column ? [
|
|
2705
|
+
new DdbVoid(),
|
|
2706
|
+
this.streaming.filters.column // filter
|
|
2707
|
+
] : []
|
|
2705
2708
|
], {
|
|
2706
2709
|
skip_connection_check: true,
|
|
2707
2710
|
// 先准备好收到 websocket message 的 callback
|
|
@@ -2711,12 +2714,10 @@ export class DDB {
|
|
|
2711
2714
|
const i_topic_end = buffer.indexOf(0, 17);
|
|
2712
2715
|
// 首个 message 一定是 table schema, 后续消息是 column 片段组成的 any vector
|
|
2713
2716
|
const data = DdbObj.parse(buffer.subarray(i_topic_end + 1), this.le);
|
|
2714
|
-
if (
|
|
2717
|
+
if (!schema) {
|
|
2715
2718
|
schema = data;
|
|
2716
|
-
first_message = false;
|
|
2717
2719
|
return;
|
|
2718
2720
|
}
|
|
2719
|
-
assert(schema, t('流数据订阅后一定先返回 schema'));
|
|
2720
2721
|
const { rows } = data.value[0];
|
|
2721
2722
|
win.rows += rows;
|
|
2722
2723
|
win.segments.push(data);
|