SurrealDB Docs Logo

Enter a search query

.LiveQuery<T>()

Initiate a live query from a SurrealQL statement.

Method Syntax
await db.LiveQuery<T>(sql)

Arguments

ArgumentsDescription
sql required

Specifies the SurrealQL statements.

cancellationToken optional

The cancellationToken enables graceful cancellation of asynchronous operations.

Example usage

const string table = "person"; await using var liveQuery = await db.LiveQuery<Person>($"LIVE SELECT * FROM type::table({table});"); // Consume the live query...

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install