SurrealDB Docs Logo

Enter a search query

.close()

Closes the persistent connection to the database.

Method Syntax
db.close()

Example usage

db.close() # async await db.close()

You can establish the connection using the connect() method.