• Start

Methods

kill

The kill() method for the SurrealDB Mojo SDK stops a running live query.

Stops a running live query, using the query id returned by live_query().

Method Syntax
client.kill(query_id, session)

Argument

Description

query_id

The id of the live query to stop.

session

An optional session id.

var query_id = client.live_query("person")
# ... later ...
client.kill(query_id)
Note

Live queries run over a stateful WebSocket session. WebSocket support is rolling out. On the HTTP transport, the SDK raises an UnsupportedFeatureError.

Was this page helpful?