Table of contents
1.
Introduction
2.
Patterns
2.1.
Structural Types
2.2.
Composite Types
2.3.
Literal Types
3.
Clauses
3.1.
Reading Clauses
3.2.
Projecting Clauses
3.3.
Writing Clauses 
3.4.
Reading/Writing Clauses
4.
Functions
4.1.
Scalar Functions
4.2.
Aggregating Functions
4.3.
Math Functions
4.4.
List Functions
4.5.
String Functions
4.6.
Predicate Functions
5.
Operators
5.1.
Mathematical Operators
5.2.
String Operators
5.3.
Boolean Operators
6.
Non-cipher Queries
7.
Frequently Asked Questions
7.1.
Name the different types of clauses supported by Redis Query Language.
7.2.
Explain the purpose of GRAPH.EXPLAIN command.
7.3.
List down the various mathematical operators
7.4.
Explain the purpose of GRAPH.DELETE command.
7.5.
Name the different types of Predicate Functions
8.
Conclusion
Last Updated: Mar 27, 2024

Cypher Coverage

Author Prachi Singh
0 upvote

Introduction

RedisGraph helps implement the subset of Cypher language, which continues its development and advancement. This article is based on the reference for Cypher Query Language.

Patterns

These are fully supported and are of different types, as listed below.

Structural Types

  1. Nodes
  2. Relationships
  3. Path Variables (defined as an alternating sequence of relationships and nodes)

Composite Types

  1. Lists
  2. Maps
  3. Temporal Types (classified into the category of unsupported patterns)

Literal Types

  1. Numeric Types
  2. Booleans
  3. String Literals
  4. Octal and Hexadecimal Numerics

Clauses

The various types of clauses are listed below.

Reading Clauses

  1. MATCH
  2. OPTIONAL MATCH

Projecting Clauses

  1. RETURN
  2. WITH
  3. UNWIND
  4. AS

Writing Clauses 

  1. CREATE
  2. DELETE
  3. SET
  4. REMOVE(classified into the category of unsupported clauses) 

Reading/Writing Clauses

  1. MERGE
  2. CALL

Functions

The functions can be classified into five broad categories.

Scalar Functions

  • id 
  • labels
  • type
  • timestamp
  • startNode
  • endNode

Aggregating Functions

  • avg
  • sum
  • collect
  • count
  • max
  • min

Math Functions

  • abs
  • floor
  • sign
  • round
  • rand

List Functions

  • head
  • range
  • reverse
  • size
  • tail

String Functions

  • right
  • left
  • trim
  • reverse
  • substring

Predicate Functions

  • exists
  • any
  • all
  • single
  • none

Operators

The various operators supported by Redis Query Language are listed below.

Mathematical Operators

  • Multiplication
  • Addition
  • Subtraction
  • Division
  • Modulo

String Operators

  • STARTS WITH
  • ENDS WITH
  • CONTAINS

Boolean Operators

  • AND
  • OR
  • NOT 
  • XOR

Non-cipher Queries

GRAPH.EXPLAIN: This command helps in printing the execution plan of a printed query.

GRAPH.DELETE: This command helps in removing a graph and keys associated with it.

Frequently Asked Questions

Name the different types of clauses supported by Redis Query Language.

The various types of clauses are reading clauses, writing clauses, projecting clauses, and reading/writing clauses.

Explain the purpose of GRAPH.EXPLAIN command.

This command helps to print the execution plan of a printed query.

List down the various mathematical operators

The various mathematical operators are multiplication, addition, subtraction, division, and modulo.

Explain the purpose of GRAPH.DELETE command.

This command helps to remove a graph and keys associated with it.

Name the different types of Predicate Functions

The different types of predicate functions are exists, any, all, single, and none.

Conclusion

After reading about Cypher Query Language, are you not feeling excited to read/explore more articles on Cypher Coverage? Don't worry; Coding Ninjas has you covered.

However, you may want to pursue our premium courses to give your job an advantage over the competition!

With our Coding Ninjas Studio Guided Path, you may learn about Data Structures and Algorithms, Competitive Programming, JavaScript, System Design, and more! Check out the mock test series and participate in the contests on Coding Ninjas Studio if you want to put your coding talents to the test! However, if you've just started school and are looking for answers to concerns raised by digital behemoths such as Amazon, Microsoft, Uber, and others. As part of your placement preparations, you must evaluate the obstaclesinterview experiences, and interview package in this case. Please vote for our blogs if you find them valuable and exciting.

Happy studying!!

Live masterclass