Most methods in the SurrealDB Mojo SDK are called on an instance of AsyncSurrealClient or its blocking wrapper SurrealClient. Both expose the same surface.
The table below lists documented methods in alphabetical order (by page name).
All methods
| Method | Description |
|---|---|
client.api() | Calls a custom API handler defined on the database |
client.authenticate() | Authenticates the current connection with a token |
client.begin_transaction() | Starts a session-scoped transaction, returning a handle |
client.call() | Runs a SurrealQL function |
client.close() | Closes the connection |
client.connect() | Connects to a database endpoint |
client.create() | Creates a record in the database |
client.delete() | Deletes all records, or a specific record |
client.health() | Runs a health check against the server |
client.insert() | Inserts one or more records into a table |
client.insert_relation() | Inserts one or more relations into a table |
client.invalidate() | Invalidates the authentication for the current connection |
client.kill() | Stops a running live query |
client.live_query() | Starts a live query on a table |
client.merge() | Merges data into a record |
client.patch() | Applies a JSON Patch to a record |
client.query() | Runs a set of SurrealQL statements against the database |
client.select() | Selects all records in a table, or a specific record |
client.set() | Assigns a value as a parameter for this connection |
client.signin() | Signs in to the database with credentials |
client.signup() | Signs up to a record-access method |
client.transaction_multi() | Runs a list of statements as one atomic transaction |
client.unset() | Removes a parameter for this connection |
client.update() | Updates all records in a table, or a specific record |
client.upsert() | Upserts all records in a table, or a specific record |
client.use() | Switches to a specific namespace and database |
client.version() | Returns the database version |