dolphindb 3.0.113 → 3.0.114
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.d.ts +5 -0
- package/browser.js +4 -4
- package/browser.js.map +1 -1
- package/index.d.ts +5 -0
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/eslint.config.d.ts +0 -2
package/index.d.ts
CHANGED
|
@@ -538,6 +538,11 @@ export declare function int1282str(buffer: Uint8Array, le?: boolean): string;
|
|
|
538
538
|
export interface StreamingParams {
|
|
539
539
|
table: string;
|
|
540
540
|
action?: string;
|
|
541
|
+
/** offset 是订阅任务开始后的第一条消息所在的位置。消息是流数据表中的行。
|
|
542
|
+
如果未指定,或设为-1,订阅将会从流数据表的当前行开始。
|
|
543
|
+
如果 offset = -2,系统会获取持久化到磁盘上的 offset,并从该位置开始订阅。注意:须同时设置 persistOffset = true,offset = -2 才会生效;否则 offset 会变为 -1。
|
|
544
|
+
offset 与流数据表创建时的第一行对应。如果某些行因为内存限制被删除,在决定订阅开始的位置时,这些行仍然考虑在内。 */
|
|
545
|
+
offset?: number;
|
|
541
546
|
filters?: {
|
|
542
547
|
/** https://docs.dolphindb.cn/zh/help/FunctionsandCommands/FunctionReferences/s/subscribeTable.html#:~:text=%E8%BF%9E%E6%8E%A5%E6%96%B0%E7%9A%84%20leader%E3%80%82-,filter%20%E5%8F%82%E6%95%B0%E9%9C%80%E8%A6%81%E9%85%8D%E5%90%88,-setStreamTableFilterColumn%20%E5%87%BD%E6%95%B0%E4%B8%80%E8%B5%B7 */
|
|
543
548
|
column?: DdbObj;
|
package/index.js
CHANGED
|
@@ -3308,10 +3308,10 @@ export class DDB {
|
|
|
3308
3308
|
new DdbInt(0),
|
|
3309
3309
|
this.streaming.table,
|
|
3310
3310
|
(this.streaming.action ||= `api_js_${new Date().getTime()}`),
|
|
3311
|
-
|
|
3312
|
-
new DdbVoid()
|
|
3313
|
-
this.streaming.
|
|
3314
|
-
|
|
3311
|
+
(this.streaming.offset === undefined || this.streaming.offset === null)
|
|
3312
|
+
? new DdbVoid()
|
|
3313
|
+
: new DdbInt(this.streaming.offset), // offset
|
|
3314
|
+
this.streaming.filters?.column || new DdbVoid(), // filter
|
|
3315
3315
|
], {
|
|
3316
3316
|
skip_connection_check: true,
|
|
3317
3317
|
// 先准备好收到 websocket message 的 callback
|