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