• Start

Languages

/

.NET

/

Methods

LiveRawQuery

The .NET SDK for SurrealDB enables you to listen for changes to records in a table.

Initiate a live query from a SurrealQL statement, based on a raw SurrealQL query.

Method Syntax
await db.LiveRawQuery<T>(sql, params)

Arguments

Description

sql

Specifies the SurrealQL statements.

params

Assigns variables which can be used in the query.

cancellationToken

The cancellationToken enables graceful cancellation of asynchronous operations.

await using var liveQuery = await db.LiveRawQuery<Person>("LIVE SELECT * FROM person;");

// Consume the live query...

Was this page helpful?