Actions36
- Record Actions
- Table Actions
- Field Actions
- Index Actions
- Relationship Actions
- Query Actions
- System Actions
- Batch Actions
Query → Execute Query
AI-generatedSummary
Execute a SurrealQL query against SurrealDB with optional parameters, query execution options, and connection pooling configurations.
Inputs
- Query (required) — The SurrealQL query string to execute, such as a SELECT or other commands.
- Parameters (JSON) — Optional JSON object of parameters to pass into the query for interpolation.
- Options — Additional options affecting query execution, including Limit (max records to return if no LIMIT in query), Start (records to skip if no START in query), Namespace and Database overrides, and treatment of missing tables as empty results instead of errors.
- Connection Pooling — Configuration settings to control connection pooling behavior for performance, such as max/min connections, timeouts, retries, and validation options.
Output shape
A JSON array or object containing the results returned by the SurrealQL query execution.
The query result corresponds to the executed SurrealQL command and may vary in shape depending on the query. Options like Limit and Start apply only if the query does not already specify them. Namespace and Database, if provided, override credential defaults for this execution. Connection pooling settings optimize performance but do not affect query semantics.
Examples
Example 1: Retrieve all persons older than 18, limiting results to 100 records, skipping the first 0 records.
Set Query to 'SELECT * FROM person WHERE age > $age', Parameters to '{ "age": 18 }', Limit to 100, and Start to 0.