SurrealDB Docs Logo

Enter a search query

.LiveTable<T>()

Initiate a live query from a table.

Method Syntax
await db.LiveTable<T>(table, diff)

Arguments

ArgumentsDescription
table required

The table name to listen for changes for.

diff optional

If set to true, live notifications will include an array of JSON Patch objects, rather than the entire record for each notification.

cancellationToken optional

The cancellationToken enables graceful cancellation of asynchronous operations.

Example usage

await using var liveQuery = await db.LiveTable<Person>("person"); // Consume the live query...

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install