pub enum Clause {
Show 37 variants
Match(MatchClause),
Create(CreateClause),
Merge(MergeClause),
Delete(DeleteClause),
Set(SetClause),
Remove(RemoveClause),
Return(ReturnClause),
With(WithClause),
Unwind(UnwindClause),
CreateIndex(CreateIndexClause),
DropIndex(DropIndexClause),
CreateConstraint(CreateConstraintClause),
DropConstraint(DropConstraintClause),
Foreach(ForeachClause),
LoadCSV(LoadCSVClause),
CallSubquery(CallSubqueryClause),
CallProcedure(CallProcedureClause),
ShowFunctions(ShowFunctionsClause),
ShowConstraints(ShowConstraintsClause),
ShowIndexes(ShowIndexesClause),
ShowDatabases(ShowDatabasesClause),
ShowRoles(ShowRolesClause),
ShowServers(ShowServersClause),
ShowUsers(ShowUsersClause),
ShowProcedures(ShowProceduresClause),
ShowSettings(ShowSettingsClause),
ShowTransactions(ShowTransactionsClause),
TerminateTransactions(TerminateTransactionsClause),
Use(UseClause),
Finish,
StandaloneOrderBy(StandaloneOrderByClause),
Conditional(ConditionalClause),
AlterCurrentGraphType(AlterCurrentGraphTypeClause),
CreateGraphType(CreateGraphTypeClause),
ShowGraphType(ShowGraphTypeClause),
ShowCurrentGraphType(ShowCurrentGraphTypeClause),
AlterDatabase(AlterDatabaseClause),
}Expand description
All clause types in the Cypher language.
Variants§
Match(MatchClause)
Create(CreateClause)
Merge(MergeClause)
Delete(DeleteClause)
Set(SetClause)
Remove(RemoveClause)
Return(ReturnClause)
With(WithClause)
Unwind(UnwindClause)
CreateIndex(CreateIndexClause)
DropIndex(DropIndexClause)
CreateConstraint(CreateConstraintClause)
DropConstraint(DropConstraintClause)
Foreach(ForeachClause)
LoadCSV(LoadCSVClause)
CallSubquery(CallSubqueryClause)
CallProcedure(CallProcedureClause)
ShowFunctions(ShowFunctionsClause)
ShowConstraints(ShowConstraintsClause)
ShowIndexes(ShowIndexesClause)
ShowDatabases(ShowDatabasesClause)
SHOW DATABASE[S] [<name>] [YIELD ...] [WHERE ...] / SHOW DEFAULT DATABASE / SHOW HOME DATABASE (CIP-68’s singular/plural KIND
acceptance; CIP-42’s four non-default columns). A minimal virtual
catalog – Relate is a single-database engine, so this reports a
small set of deterministic built-in databases rather than modeling
real multi-database administration.
ShowRoles(ShowRolesClause)
SHOW [ALL|POPULATED] ROLE[S] [WITH USER[S]] [YIELD ...] [WHERE ...]
(CIP-68). A minimal virtual catalog of built-in roles.
ShowServers(ShowServersClause)
SHOW SERVER[S] [YIELD ...] [WHERE ...] (CIP-68). Reports a single
row, matching a single-process embedded engine.
ShowUsers(ShowUsersClause)
SHOW USER[S] [YIELD ...] [WHERE ...] / SHOW CURRENT USER
(CIP-68). A minimal virtual catalog of a single built-in user.
ShowProcedures(ShowProceduresClause)
SHOW PROCEDURE[S] [YIELD ...] [WHERE ...] (CIP-68 grammar
foundation). Lists the built-in procedure names the engine’s CALL
handler recognizes.
ShowSettings(ShowSettingsClause)
SHOW SETTING[S] [<names>] [YIELD ...] [WHERE ...] (CIP-68 grammar
foundation). Relate has no configurable settings surface, so
this always reports an empty catalog.
ShowTransactions(ShowTransactionsClause)
SHOW TRANSACTION[S] [<ids>] [YIELD ...] [WHERE ...] (CIP-68
grammar foundation). Relate executes each statement to
completion without exposing concurrent transaction identifiers, so
this always reports an empty catalog.
TerminateTransactions(TerminateTransactionsClause)
TERMINATE TRANSACTION[S] <ids> [YIELD ...] (CIP-68 grammar
foundation). Since ShowTransactions never reports a live
transaction, every requested id is reported as not found.
Use(UseClause)
USE <graph-expr> (CIP-141 feature-interaction scenarios) – a
graph-selector clause. Relate is a single-database engine, so
this is parsed and scope-checked (its expression’s variables must
be in scope, same as any other clause) but has no runtime effect
beyond that: there is no composite/multi-graph database to switch
to.
Finish
FINISH (CIP-140) – a terminal clause producing a truly empty
result (0 rows, 0 columns) instead of RETURN’s projected rows,
while still running any earlier updating clauses. Only the minimal
semantics needed by CIP-218’s CALL (a) { FINISH } scenario are
implemented: cardinality is preserved (one output row per input
row) but that row carries no columns, so it contributes nothing
when merged back into an enclosing CALL’s outer row.
StandaloneOrderBy(StandaloneOrderByClause)
CIP-168: a standalone <order by and page statement> – e.g.
ORDER BY n.name SKIP 1 LIMIT 3 appearing as its own clause, not
attached to WITH/RETURN/YIELD. Acts as an implicit WITH *
horizon clause: changes row order/count but never the column set,
and may sit between any two other clauses (including two write
clauses). See StandaloneOrderByClause for why this is a sequence
of stages rather than three fixed fields.
Conditional(ConditionalClause)
CIP-135: a standalone conditional clause chain –
<when query> ::= <when>, {<when>}, [<else>]. This is a sibling
alternative to <union query>/<single query> at the <regular query> grammar level (see parse_regular_query), not an ordinary
mid-statement clause – so this variant only ever appears as the
sole element of a Statement.clauses vec, never alongside other
clauses in the same statement.
AlterCurrentGraphType(AlterCurrentGraphTypeClause)
ALTER CURRENT GRAPH TYPE SET/ADD/ALTER/DROP { <graph type specification body> } (CIP-176/182/183’s mechanism; CIP-187’s
constraint derivation builds on it). body is the full CIP-178
<graph type specification body> grammar (node/edge type specs,
property types, and constraint specs) – see GraphTypeBody.
CreateGraphType(CreateGraphTypeClause)
CREATE GRAPH TYPE <name> [AS] { <graph type specification body> }
(CIP-178 grammar; the AS keyword is CIP-180’s spelling of the same
body-introducing form). Registers a named graph type, independent
of the database’s single unnamed “current” graph type that ALTER CURRENT GRAPH TYPE manages.
ShowGraphType(ShowGraphTypeClause)
SHOW GRAPH TYPE <name> [YIELD ...] (CIP-180’s SHOW surface): a
single-row catalog whose name/body columns report the named
graph type’s own name and its CIP-180 canonical specification
string.
ShowCurrentGraphType(ShowCurrentGraphTypeClause)
SHOW CURRENT GRAPH TYPE [YIELD ...] (CIP-176 overview / CIP-184):
the database’s persistent current graph type, reported as a single
specification column (the CIP-180 canonical body string wrapped in
{ }, or the literal {} when empty).
AlterDatabase(AlterDatabaseClause)
ALTER DATABASE <name> [IF EXISTS] SET DEFAULT LANGUAGE CYPHER <n> (CIP-170). Under ADR-0116 §2’s fixed namespaces this is the
only supported ALTER DATABASE form; every other form is
recognized and rejected at parse time with CE’s
UnsupportedAdministrationCommand.