Method Watch
Watch(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<QueryResult> Watch(string sql, object?[]? parameters = null, SQLWatchOptions? options = null)
Parameters
sqlstringparametersobject[]optionsSQLWatchOptions
Returns
Watch<T>(string, object?[]?, SqlMapper<T>, 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<List<T>> Watch<T>(string sql, object?[]? parameters, SqlMapper<T> mapper, SQLWatchOptions? options = null)
Parameters
sqlstringparametersobject[]mapperSqlMapper<T>optionsSQLWatchOptions
Returns
- IAsyncEnumerable<List<T>>
Type Parameters
T
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<List<T>> Watch<T>(string sql, object?[]? parameters = null, SQLWatchOptions? options = null) where T : IFromRow<T>
Parameters
sqlstringparametersobject[]optionsSQLWatchOptions
Returns
- IAsyncEnumerable<List<T>>
Type Parameters
T