Skip to content

Commit

Permalink
Add docs on multiline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gem-neo4j committed Feb 26, 2024
1 parent 61b4d2c commit a692b70
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions modules/ROOT/pages/syntax/comments.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
:description: This section describes how how to use comments in Cypher.
:description: This section describes how to use comments in Cypher.

[[cypher-comments]]
= Comments

This page describes how how to use comments in Cypher.
This page describes how to use comments in Cypher.

A comment begin with double slash (`//`) and continue to the end of the line.
A single line comment begins with double slash (`//`) and continues to the end of the line.
A multi-line comment begins with a slash and asterisk (`/*`) and continues until the closing of the comment, which is done with an asterisk and a slash ('*/'
)
Comments do not execute, they are for humans to read.

Examples:
Expand All @@ -22,6 +24,14 @@ MATCH (n)
RETURN n
----

[source, cypher, indent=0]
----
MATCH (n) /* This is a multi line comment,
the comment is still going on this line as well
but we are closing it on this line */
RETURN n
----

[source, cypher, indent=0]
----
MATCH (n) WHERE n.property = '//This is NOT a comment' RETURN n
Expand Down

0 comments on commit a692b70

Please sign in to comment.