Skip to main content

Clause

Enum Clause 

Source
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.

Implementations§

Source§

impl Clause

Source

pub fn keyword(&self) -> &'static str

The Cypher clause keyword(s) for this clause — e.g. "MATCH", "SHOW INDEXES", "LOAD CSV". Exhaustive over the enum, so a new clause cannot ship without a renderable name; the planner’s clause_keyword delegates here rather than keeping a second table.

Trait Implementations§

Source§

impl Clone for Clause

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Clause

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Clause

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Clause

Auto Trait Implementations§

§

impl Forget for Clause

§

impl Freeze for Clause

§

impl Move for Clause

§

impl RefUnwindSafe for Clause

§

impl Send for Clause

§

impl Sync for Clause

§

impl Unpin for Clause

§

impl UnsafeUnpin for Clause

§

impl UnwindSafe for Clause

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.