Run SurrealQL queries
The methods below are used to interact with the database and perform CRUD operations. You can also use the query method to run SurrealQL statements against the database.
| Method | Description |
|---|---|
db.Query() | Runs a set of SurrealQL statements against the database |
db.RawQuery() | Runs a set of SurrealQL statements against the database, based on a raw SurrealQL query |
.Query()
Runs a set of SurrealQL statements against the database.
Arguments
| Arguments | Description |
|---|---|
sql
| Specifies the SurrealQL statements. |
cancellationToken
| The cancellationToken enables graceful cancellation of asynchronous operations. |
Example usage
.RawQuery()
Runs a set of SurrealQL statements against the database, based on a raw SurrealQL query.
Arguments
| Arguments | Description |
|---|---|
sql
| Specifies the SurrealQL statements. |
params
| Assigns variables which can be used in the query. |
cancellationToken
| The cancellationToken enables graceful cancellation of asynchronous operations. |