.use()
Switch to a specific namespace and database. If only the ns or db property is specified, the current connection details will be used to fill the other property.
Method Syntaxdb.use(namespace, database)
Arguments | Description | ||
---|---|---|---|
namespace Required | Switches to a specific namespace. | ||
database Required | Switches to a specific database. |
db.use('surrealdb', 'docs') # Async await db.use('surrealdb', 'docs')