select().live()
Initiate live queries for a live stream of notifications.
Arguments
| Argument | Description |
|---|---|
resource
| The table name or a record ID to select. |
Example usage: Listen for live updates
The following example requires adding the futures crate with cargo add futures in order to work with the results of the async stream. Once run, the program will continue to wait and listen for events for the person table to happen.
Then connect to it using Surrealist or open a new terminal window with the following command.
You can then use queries like the following to work with some person records.
The following output will then show up in the terminal window running the Rust example.