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
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,6 @@ For example, to grant the role `regularUsers` the ability to create indexes on t
GRANT CREATE INDEX ON DATABASE neo4j TO regularUsers
----

The `SHOW INDEXES` privilege only affects the xref::indexes-for-search-performance.adoc#administration-indexes-list-indexes[`SHOW INDEXES` command], and not the older procedures for listing indexes, such as `db.indexes`.


[[access-control-database-administration-constraints]]
== The `CONSTRAINT MANAGEMENT` privileges
Expand Down Expand Up @@ -743,8 +741,6 @@ For example, to grant the role `regularUsers` the ability to create constraints
GRANT CREATE CONSTRAINT ON DATABASE neo4j TO regularUsers
----

The `SHOW CONSTRAINTS` privilege only affects the xref::constraints/syntax.adoc#administration-constraints-syntax-list[`SHOW CONSTRAINTS` command], and not the older procedures for listing constraints, such as `db.constraints`.


[[access-control-database-administration-tokens]]
== The `NAME MANAGEMENT` privileges
Expand Down
6 changes: 3 additions & 3 deletions modules/ROOT/pages/clauses/listing-procedures.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ SHOW PROCEDURES
4+d|Rows: 15
|===

The above table only displays the first 15 results of the query.
The above table only displays the first 15 results of the query.
For a full list of all built-in procedures in Neo4j, visit the {neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures#/#_list_of_procedures[Operations Manual -> List of procedures].

== Listing procedures with filtering on output columns
Expand Down Expand Up @@ -252,7 +252,7 @@ WHERE admin
2+d|Rows: 15
|===

The above table only displays the first 15 results of the query.
The above table only displays the first 15 results of the query.
For a full list of all procedures which require `admin` privileges in Neo4j, visit the {neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures#/#_list_of_procedures[Operations Manual -> List of procedures].

== Listing procedures with other filtering
Expand Down Expand Up @@ -353,7 +353,7 @@ SHOW PROCEDURES EXECUTABLE BY CURRENT USER YIELD *
4+d|Rows: 15
|===

The above table only displays the first 15 results of the query.
The above table only displays the first 15 results of the query.
Note that the two `roles` columns are empty due to missing the xref::access-control/dbms-administration.adoc#access-control-dbms-administration-role-management[`SHOW ROLE`] privilege.
Also note that the following columns are not present in the table: `mode`, `worksOnSystem`, `signature`, `argumentDescription`, `returnDescription`, `admin`, and `options`.

Expand Down
38 changes: 19 additions & 19 deletions modules/ROOT/pages/clauses/merge.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Either the pattern already exists, or it needs to be created.
** xref::clauses/merge.adoc#merge-merge-on-an-undirected-relationship[Merge on an undirected relationship]
** xref::clauses/merge.adoc#merge-merge-on-a-relationship-between-two-existing-nodes[Merge on a relationship between two existing nodes]
** xref::clauses/merge.adoc#merge-merge-on-a-relationship-between-an-existing-node-and-a-merged-node-derived-from-a-node-property[Merge on a relationship between an existing node and a merged node derived from a node property]
* xref::clauses/merge.adoc#query-merge-using-unique-constraints[Using unique constraints with `MERGE`]
** xref::clauses/merge.adoc#merge-merge-using-unique-constraints-creates-a-new-node-if-no-node-is-found[Merge using unique constraints creates a new node if no node is found]
** xref::clauses/merge.adoc#merge-merge-using-unique-constraints-matches-an-existing-node[Merge using unique constraints matches an existing node]
** xref::clauses/merge.adoc#merge-merge-with-unique-constraints-and-partial-matches[Merge with unique constraints and partial matches]
** xref::clauses/merge.adoc#merge-merge-with-unique-constraints-and-conflicting-matches[Merge with unique constraints and conflicting matches]
* xref::clauses/merge.adoc#query-merge-using-unique-constraints[Using property uniqueness constraints with `MERGE`]
** xref::clauses/merge.adoc#merge-merge-using-unique-constraints-creates-a-new-node-if-no-node-is-found[Merge using property uniqueness constraints creates a new node if no node is found]
** xref::clauses/merge.adoc#merge-merge-using-unique-constraints-matches-an-existing-node[Merge using property uniqueness constraints matches an existing node]
** xref::clauses/merge.adoc#merge-merge-with-unique-constraints-and-partial-matches[Merge with property uniqueness constraints and partial matches]
** xref::clauses/merge.adoc#merge-merge-with-unique-constraints-and-conflicting-matches[Merge with property uniqueness constraints and conflicting matches]
* xref::clauses/merge.adoc#merge-using-map-parameters-with-merge[Using map parameters with `MERGE`]

[[query-merge-introduction]]
Expand All @@ -55,8 +55,8 @@ If partial matches are needed, this can be accomplished by splitting a pattern u
[IMPORTANT]
====
Under concurrent updates, `MERGE` only guarantees existence of the `MERGE` pattern, but not uniqueness.
To guarantee uniqueness of nodes with certain properties, a xref::constraints/index.adoc[unique constraint] should be used.
See xref::clauses/merge.adoc#query-merge-using-unique-constraints[Using unique constraints with `MERGE`] to see how `MERGE` can be used in combination with a unique constraint.
To guarantee uniqueness of nodes with certain properties, a xref::constraints/index.adoc[property uniqueness constraint] should be used.
See xref::clauses/merge.adoc#query-merge-using-unique-constraints[Using property uniqueness constraints with `MERGE`] to see how `MERGE` can be used in combination with a property uniqueness constraint.
====

As with `MATCH`, `MERGE` can match multiple occurrences of a pattern.
Expand Down Expand Up @@ -489,15 +489,15 @@ Labels added: 5


[[query-merge-using-unique-constraints]]
== Using unique constraints with `MERGE`
== Using property uniqueness constraints with `MERGE`

Cypher prevents getting conflicting results from `MERGE` when using patterns that involve unique constraints.
Cypher prevents getting conflicting results from `MERGE` when using patterns that involve property uniqueness constraints.
In this case, there must be at most one node that matches that pattern.

For example, given two unique constraints on `:Person(id)` and `:Person(ssn)`, a query such as `MERGE (n:Person {id: 12, ssn: 437})` will fail, if there are two different nodes (one with `id` 12 and one with `ssn` 437) or if there is only one node with only one of the properties.
For example, given two property uniqueness constraints on `:Person(id)` and `:Person(ssn)`, a query such as `MERGE (n:Person {id: 12, ssn: 437})` will fail, if there are two different nodes (one with `id` 12 and one with `ssn` 437), or if there is only one node with only one of the properties.
In other words, there must be exactly one node that matches the pattern, or no matching nodes.

Note that the following examples assume the existence of unique constraints that have been created using:
Note that the following examples assume the existence of property uniqueness constraints that have been created using:

[source, cypher, indent=0]
----
Expand All @@ -507,9 +507,9 @@ CREATE CONSTRAINT FOR (n:Person) REQUIRE n.role IS UNIQUE;


[[merge-merge-using-unique-constraints-creates-a-new-node-if-no-node-is-found]]
=== Merge using unique constraints creates a new node if no node is found
=== Merge using property uniqueness constraints creates a new node if no node is found

Merge using unique constraints creates a new node if no node is found.
Merge using property uniqueness constraints creates a new node if no node is found.

.Query
[source, cypher, indent=0]
Expand All @@ -534,9 +534,9 @@ Labels added: 1


[[merge-merge-using-unique-constraints-matches-an-existing-node]]
=== Merge using unique constraints matches an existing node
=== Merge using property uniqueness constraints matches an existing node

Merge using unique constraints matches an existing node.
Merge using property uniqueness constraints matches an existing node.

.Query
[source, cypher, indent=0]
Expand All @@ -557,9 +557,9 @@ The `'oliver'` node already exists, so `MERGE` just matches it.


[[merge-merge-with-unique-constraints-and-partial-matches]]
=== Merge with unique constraints and partial matches
=== Merge with property uniqueness constraints and partial matches

Merge using unique constraints fails when finding partial matches.
Merge using property uniqueness constraints fails when finding partial matches.

.Query
[source, cypher, indent=0]
Expand Down Expand Up @@ -588,9 +588,9 @@ SET michael.role = 'Gordon Gekko'


[[merge-merge-with-unique-constraints-and-conflicting-matches]]
=== Merge with unique constraints and conflicting matches
=== Merge with property uniqueness constraints and conflicting matches

Merge using unique constraints fails when finding conflicting matches.
Merge using property uniqueness constraints fails when finding conflicting matches.

.Query
[source, cypher, indent=0]
Expand Down
Loading