SurrealQL statements against the database
db.select<T>(thing)
async db.live<T>(table, callback,diff)
async db.subscribeLive<T>(queryUuid,callback)
async db.kill(queryUuid)
Method | Description |
---|---|
db.create<T,U>(thing,data) | Creates a record in the database |
db.insert<T,U>(thing,data) | Inserts one or multiple records in the database |
db.update<T,U>(thing,data) | Updates all records in a table, or a specific record |
db.merge<T,U>(thing,data) | Modifies all records in a table, or a specific record |
db.patch<T,U>(thing,data) | Applies JSON Patch changes to all records in a table, or a specific record |
db.delete<T,U>(thing,data) | Deletes all records, or a specific record |
Method | Description |
---|---|
db.signup(vars) | Signs this connection up to a specific authentication scope |
db.signin(vars) | Signs this connection in to a specific authentication scope |
db.invalidate() | Invalidates the authentication for the current connection |
db.authenticate(token) | Authenticates the current connection with a JWT token |
db.info<T>() | Returns the record of an authenticated scope user |