• Start

Languages

/

Swift

/

Methods

use

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

Switches the connection to a specific namespace and database.

Method Syntax

try await client.use(namespace: ns, database: db)
ArgumentsDescription
namespace The namespace to switch to.
database The database to switch to.
try await client.use(namespace: "myapp", database: "mydb")

Was this page helpful?