SurrealDB Docs Logo

Enter a search query

.live()

Initiates a live query for a specified table name.

db.live(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.

Example usage

db.live('person') # Async await db.live('person')