Skip to content
Merged
Show file tree
Hide file tree
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
109 changes: 109 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/42N17.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,115 @@
== Status description
error: syntax error or access rule violation - unsupported request. `{ <<input>> }` is not allowed on the system database.

== Explanation

This error occurs when you try to run a query on the system database, which is not allowed.

== Example scenarios

Comment thread
Hunterness marked this conversation as resolved.
Let's take the following example scenarios:

=== Invalid clause

You try to run a query containing a Cypher clause that is not allowed on the system database.
For example, `MATCH` clauses are not allowed on the system database:

[source,cypher]
----
MATCH (n) RETURN n
----

The query returns a chain of errors where GQLSTATUS xref:errors/gql-errors/42NA9.adoc[42NA9] is the cause of GQLSTATUS 42N17, which is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]:

.GQLSTATUS error chain
[source, error]
----
42NA9: error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. YIELD and RETURN are also permitted when combined with procedure calls, show, or terminate commands.
42N17: error: syntax error or access rule violation - unsupported request. `MATCH` is not allowed on the system database.
42001: error: syntax error or access rule violation - invalid syntax
----

To solve this, run the query against a standard database.

=== Invalid procedure

You try to run a procedure that is not allowed on the system database.
For example, you run the following query that contains the `db.createLabel()` procedure, which is not allowed, and `db.index.fulltext.listAvailableAnalyzers()`, which is allowed:

[source,cypher]
----
CALL db.createLabel('Label')
CALL db.index.fulltext.listAvailableAnalyzers()
YIELD analyzer
RETURN analyzer
----

The query returns a chain of errors where GQLSTATUS xref:errors/gql-errors/42NA9.adoc[42NA9] is the cause of GQLSTATUS 42N17, which is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]:

.GQLSTATUS error chain
[source, error]
----
42NA9: error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. YIELD and RETURN are also permitted when combined with procedure calls, show, or terminate commands.
42N17: error: syntax error or access rule violation - unsupported request. `CALL db.createLabel` is not allowed on the system database.
42001: error: syntax error or access rule violation - invalid syntax
----

To solve this, either remove the disallowed procedure or run the query against a standard database.

=== Invalid procedure call structure

You try to run a query that contains an allowed procedure but an unallowed clause.
For example, the `YIELD` clause in the following query is allowed for procedure calls, but the `WHERE` clause is not:

[source,cypher]
----
CALL db.index.fulltext.listAvailableAnalyzers()
YIELD analyzer, description
WHERE analyzer = 'swedish'
RETURN description
----

The query returns a chain of errors where GQLSTATUS xref:errors/gql-errors/42NA9.adoc[42NA9] is the cause of GQLSTATUS 42N17, which is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]:

.GQLSTATUS error chain
[source, error]
----
42NA9: error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. YIELD and RETURN are also permitted when combined with procedure calls, show, or terminate commands.
42N17: error: syntax error or access rule violation - unsupported request. `WHERE` is not allowed on the system database.
42001: error: syntax error or access rule violation - invalid syntax
----

To solve this, either remove the `WHERE` clause or run the query against a standard database.

[NOTE]
====
In contrast to procedure calls, the `WHERE` clause is allowed for the `SHOW` and `TERMINATE` commands.
====

=== Invalid show command

You try to run a `SHOW` command that is not allowed on the system database, for example, `SHOW INDEXES`:

[source,cypher]
----
SHOW INDEXES
YIELD type, createStatement
WHERE type <> 'LOOKUP'
RETURN createStatement
----

The query returns a chain of errors where GQLSTATUS xref:errors/gql-errors/42NA9.adoc[42NA9] is the cause of GQLSTATUS 42N17, which is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]:

.GQLSTATUS error chain
[source, error]
----
42NA9: error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. YIELD and RETURN are also permitted when combined with procedure calls, show, or terminate commands.
42N17: error: syntax error or access rule violation - unsupported request. `SHOW INDEXES` is not allowed on the system database.
Comment thread
Hunterness marked this conversation as resolved.
42001: error: syntax error or access rule violation - invalid syntax
----

To solve this, run the query against a standard database.

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary
Expand Down
57 changes: 56 additions & 1 deletion modules/ROOT/pages/errors/gql-errors/42NA9.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,62 @@
= 42NA9

== Status description
error: syntax error or access rule violation - system database procedure rules. The system database supports a restricted set of Cypher clauses. The supported clause structure for procedure calls is: `CALL`, `YIELD`, `RETURN`. `YIELD` and `RETURN` clauses are optional. The order of the clauses is fixed and each can only occur once.
error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. `YIELD` and `RETURN` are also permitted when combined with procedure calls, show, or terminate commands.

== Explanation

This error occurs as the cause of xref:errors/gql-errors/42N17.adoc[42N17], when you try to run a query on the system database, which is not allowed.

== Example scenarios

Comment thread
Hunterness marked this conversation as resolved.
Let's take the following example scenarios:

=== Invalid clause

You try to run a query containing a Cypher clause that is not allowed on the system database.
For example, `MATCH` clauses are not allowed on the system database:

[source,cypher]
----
MATCH (n) RETURN n
----

The query returns a chain of errors where GQLSTATUS 42NA9 is the cause of GQLSTATUS xref:errors/gql-errors/42N17.adoc[42N17], which is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]:

.GQLSTATUS error chain
[source, error]
----
42NA9: error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. YIELD and RETURN are also permitted when combined with procedure calls, show, or terminate commands.
42N17: error: syntax error or access rule violation - unsupported request. `MATCH` is not allowed on the system database.
42001: error: syntax error or access rule violation - invalid syntax
----

To solve this, run the query against a standard database.

=== Invalid procedure

You try to run a procedure that is not allowed on the system database.
For example, you run the following query that contains the `db.createLabel()` procedure, which is not allowed, and `db.index.fulltext.listAvailableAnalyzers()`, which is allowed:

[source,cypher]
----
CALL db.createLabel('Label')
CALL db.index.fulltext.listAvailableAnalyzers()
YIELD analyzer
RETURN analyzer
----

The query returns a chain of errors where GQLSTATUS 42NA9 is the cause of GQLSTATUS xref:errors/gql-errors/42N17.adoc[42N17], which is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]:

.GQLSTATUS error chain
[source, error]
----
42NA9: error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. YIELD and RETURN are also permitted when combined with procedure calls, show, or terminate commands.
42N17: error: syntax error or access rule violation - unsupported request. `CALL db.createLabel` is not allowed on the system database.
42001: error: syntax error or access rule violation - invalid syntax
----

To solve this, either remove the disallowed procedure or run the query against a standard database.

ifndef::backend-pdf[]
[discrete.glossary]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/errors/gql-errors/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ Status description:: error: syntax error or access rule violation - invalid refe

=== xref:errors/gql-errors/42NA9.adoc[42NA9]

Status description:: error: syntax error or access rule violation - system database procedure rules. The system database supports a restricted set of Cypher clauses. The supported clause structure for procedure calls is: `CALL`, `YIELD`, `RETURN`. `YIELD` and `RETURN` clauses are optional. The order of the clauses is fixed and each can only occur once.
Status description:: error: syntax error or access rule violation - system database rules. The system database supports a restricted set of Cypher clauses. The supported clauses include procedure calls (if the procedure is allowed), a subset of show and terminate commands, and combinations of the two. `YIELD` and `RETURN` are also permitted when combined with procedure calls, show, or terminate commands.

=== xref:errors/gql-errors/42NAA.adoc[42NAA]

Expand Down
Loading