.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 Syntaxawait db.use({ namespace: 'surrealdb', database: 'docs' });
Arguments | Description | ||
---|---|---|---|
namespace initially required | Switches to a specific namespace. | ||
database initially required | Switches to a specific database. |
await db.use({ namespace: 'surrealdb', database: 'docs' });