Query methods on a session or transaction return a builder rather than a plain promise. Each builder exposes chainable methods for configuring the operation, and is awaited to execute it.
Builders
SelectPromise - Configures
SELECTqueries.CreatePromise - Configures
CREATEoperations.UpdatePromise - Configures
UPDATEoperations.UpsertPromise - Configures
UPSERToperations (insert or replace).InsertPromise - Configures
INSERToperations.DeletePromise - Configures
DELETEoperations.RelatePromise - Configures
RELATEoperations for graph relationships.Query - Executes raw SurrealQL, with streaming and batch processing support.
LivePromise - Manages real-time live query subscriptions.
RunPromise - Executes SurrealDB functions and SurrealML models.
ApiPromise - Executes user-defined API calls.
See also
Core classes - The classes these builders are created from
Executing queries - Conceptual overview with examples
SurrealQL statements - The query language reference