Skip to content

Commit e2ecdaf

Browse files
committed
Mark as experimental
1 parent 56ebf61 commit e2ecdaf

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/common/src/client/AbstractPowerSyncDatabase.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,14 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
544544
this.iterateListeners((l) => l.statusChanged?.(this.currentStatus));
545545
}
546546

547+
/**
548+
* Create a sync stream to query its status or to subscribe to it.
549+
*
550+
* @param name The name of the stream to subscribe to.
551+
* @param params Optional parameters for the stream subscription.
552+
* @returns A {@link SyncStream} instance that can be subscribed to.
553+
* @experimental Sync streams are currently in alpha.
554+
*/
547555
syncStream(name: string, params?: Record<string, any>): SyncStream {
548556
return this.connectionManager.stream(this.subscriptions, name, params ?? null);
549557
}

packages/common/src/db/crud/SyncStatus.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,17 @@ export class SyncStatus {
122122
*
123123
* This returns null when the database is currently being opened and we don't have reliable information about all
124124
* included streams yet.
125+
*
126+
* @experimental Sync streams are currently in alpha.
125127
*/
126128
get syncStreams(): SyncStreamStatus[] | undefined {
127129
return this.options.dataFlow?.internalStreamSubscriptions?.map((core) => new SyncStreamStatusView(this, core));
128130
}
129131

130132
/**
131133
* If the `stream` appears in {@link syncStreams}, returns the current status for that stream.
134+
*
135+
* @experimental Sync streams are currently in alpha.
132136
*/
133137
forStream(stream: SyncStreamDescription): SyncStreamStatus | undefined {
134138
const asJson = JSON.stringify(stream.parameters);

0 commit comments

Comments
 (0)