Set parameters
Within your application, you can define parameters that can be used to store and retrieve data from SurrealDB. Parameters are used to store data in a structured format, and can be used to store data in a key-value pair format.
Important
| Method | Description |
|---|---|
db.Set(key, value) | Assigns a value as a parameter for this connection |
db.Unset(key) | Removes a parameter for this connection |
.Set()
Assigns a value as a parameter for this connection.
Arguments
| Arguments | Description |
|---|---|
key
| Specifies the name of the variable. |
value
| Assigns the value to the variable name. |
cancellationToken
| The cancellationToken enables graceful cancellation of asynchronous operations. |
Example usage
.Unset()
Removes a parameter for this connection.
Arguments
| Arguments | Description |
|---|---|
key
| Specifies the SurrealQL statements. |
cancellationToken
| The cancellationToken enables graceful cancellation of asynchronous operations. |