• Start

Languages

/

Mojo

/

Methods

use

The use() method for the SurrealDB Mojo SDK switches to a specific namespace and database.

Switches the connection to a specific namespace and database.

Method Syntax

client.use(namespace, database, session)
ArgumentDescription
namespaceThe namespace to switch to.
databaseThe database to switch to.
sessionAn optional session id to scope the change to a specific session.
client.use("test", "test")

Was this page helpful?