Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs on multiline comments #893

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions modules/ROOT/pages/syntax/comments.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
: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 it ends with an asterisk and a slash ('*/').
Comments do not execute, they are for humans to read.

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

[source, cypher, indent=0]
----
MATCH (n) /* This is a multi line comment,
the comment continues on this line
but it ends on this line. */
RETURN n
----

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