Expand description
SurrealQL statement builders.
Each builder is reached from Table (itself produced by the derived
Type::table()) and rendered to a string with to_surrealql():
Select—SELECT … FROM …Create—CREATE …Insert—INSERT INTO …Update—UPDATE …(andUPSERT …viaTable::upsert)Delete—DELETE …Relate/RelateEdge—RELATE a -> edge -> bBatch— several statements joined with;
Mutations also offer then_select(...) to chain a reselect as a batch.
Structs§
- Batch
- Concatenates SurrealQL statements with
;separators. The store’s typical pattern is a mutation followed by a SELECT that re-projects the row. - Create
CREATE <target> [CONTENT … | SET …] [RETURN …].- Delete
- A
DELETE <target> [WHERE …] [RETURN …]builder. - Insert
- An
INSERT INTO <table> …builder. Records are serialized inline as object literals; rendering requiresT: serde::Serialize. - Relate
- Builds a graph edge statement
RELATE a -> edge -> bfor an edge typeE. For edges that carry their own fields, seeRelateEdge. - Relate
Edge - Build a RELATE query with edge content.
- Select
- A
SELECTstatement builder: projections,WHERE,ORDER BY,LIMIT,START,FETCH,GROUP BY/GROUP ALL, andcount(). - Table
- Entry point to the query builder for a record type
T— the value returned by the derivedT::table(). Each method starts a statement builder. - Update
- An
UPDATE/UPSERTbuilder:SET/MERGE/CONTENT, an optionalWHERE, andRETURN. Built viaTable::updateorTable::upsert.
Enums§
- Returning
- How a mutating statement should return its affected rows.