SurrealQL statements against the database
db.run() | Runs a SurrealQL function |
db.select() | Selects all records in a table, or a specific record |
db.select().live() | Performs a LIVE SELECT query on the database |
Mutation methods
Function | Description |
---|
db.create() | Creates a record in the database |
db.delete() | Deletes all records, or a specific record |
db.insert() | Inserts one or multiple records or relations in the database |
db.update() | Updates all records in a table, or a specific record |
db.upsert() | Upserts all records in a table, or a specific record |
Authentication methods
Function | Description |
---|
db.authenticate() | Authenticates the current connection with a JWT token |
db.invalidate() | Invalidates the authentication for the current connection |
db.signin() | Signs this connection in to a specific authentication scope |
db.signup() | Signs this connection up to a specific authentication scope |
Data methods
Function | Description |
---|
db.export() | Exports the database to a file or a live stream of bytes |
db.import() | Imports the contents of another database from a file= |
Other methods
Function | Description |
---|
db.version() | Returns the current database version |