Cypher Query Language Commands
Neo4j Read CQL Clauses
- MATCH
- This clause is used to search the data with a specified pattern.
- Syntax: Match (n)
- OPTIONAL MATCH
- This is the same as match
- The only difference being it can use nulls in case of missing parts of the pattern.
- WHERE
- This clause id is used to add contents to the CQL queries.
- START
- This clause is used to find the starting points through the legacy indexes.
- LOAD CSV
- This clause is used to import data from CSV files.
Neo4j Write CQL Clauses
- CREATE
- This clause is used to create nodes, relationships, and properties.
- MERGE
- This clause verifies whether the specified pattern exists in the graph. If not, it creates the pattern.
- SET
- This clause is used to update labels on nodes, properties on nodes and relationships.
- DELETE
- This clause is used to delete nodes and relationships or paths etc. from the graph.
- REMOVE
- This clause is used to remove properties and elements from nodes and relationships.
- FOREACH
- This class is used to update the data within a list.
- CREATE UNIQUE
- Using the clauses CREATE and MATCH, you can get a unique pattern by matching the existing pattern and creating the missing one.
Neo4j General CQL Clauses
- RETURN
- This clause is used to define what to include in the query result set.
- ORDER BY
- This clause is used to arrange the output of a query in order. It is used along with the clauses RETURN or WITH.
- LIMIT
- This clause is used to limit the rows in the result to a specific value.
- SKIP
- This clause is used to define from which row to start including the rows in the output.
- WITH
- This clause is used to chain the query parts together.
- UNWIND
- This clause is used to expand a list into a sequence of rows.
- UNION
- This clause is used to combine the result of multiple queries.
- CALL
- This clause is used to invoke a procedure deployed in the database.
Operators in Cypher Query Language
- Mathematical +, -, *, /, %, ^
- Comparison +, <>, <, >, <=, >=
- Boolean AND, OR, XOR, NOT
- String +
- List +, IN, [X], [X…..Y]
- Regular Expression =-
- String matching STARTS WITH, ENDS WITH, CONSTRAINTS
No comments:
Write commentsPlease do not enter spam links