Table of Contents

Method Watch

Namespace
PowerSync.Common.Client
Assembly
PowerSync.Common.dll

Watch<T>(string, object?[]?, SQLWatchOptions?)

Executes a read query every time the source tables are modified.

The query's source tables are resolved automatically (or taken from Tables when provided), and are re-resolved whenever the schema changes, so watches keep working across UpdateSchema(Schema) calls.

public IAsyncEnumerable<T[]> Watch<T>(string sql, object?[]? parameters = null, SQLWatchOptions? options = null)

Parameters

sql string
parameters object[]
options SQLWatchOptions

Returns

IAsyncEnumerable<T[]>

Type Parameters

T