-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
13 changed files
with
228 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
docs/asciidoc/modules/ROOT/examples/generated-documentation/apoc.meta.nodes-lite.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
¦signature | ||
¦apoc.meta.nodes.count(nodes = [] :: LIST? OF STRING?, config = {} :: MAP?) :: (INTEGER?) |
2 changes: 2 additions & 0 deletions
2
docs/asciidoc/modules/ROOT/examples/generated-documentation/apoc.meta.nodes.count-lite.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
¦signature | ||
¦apoc.meta.nodes.count(nodes = [] :: LIST? OF STRING?, config = {} :: MAP?) :: (INTEGER?) |
5 changes: 5 additions & 0 deletions
5
...ciidoc/modules/ROOT/examples/generated-documentation/apoc.meta.nodes.count.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
¦xref::overview/apoc.meta/apoc.meta.nodes.count.adoc[apoc.meta.nodes.count icon:book[]] + | ||
|
||
- Returns the sum of the nodes with a label present in the list. | ||
¦label:function[] | ||
¦label:apoc-core[] |
6 changes: 6 additions & 0 deletions
6
docs/asciidoc/modules/ROOT/examples/generated-documentation/apoc.meta.nodes.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
¦Qualified Name¦Type¦Release | ||
|xref::overview/apoc.meta.nodes/apoc.meta.adoc[apoc.meta.nodes.count icon:book[]] | ||
|
||
apoc.meta.nodes.count([labels], $config) - Returns the sum of the nodes with a label present in the list. | ||
|label:function[] | ||
|label:apoc-core[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
docs/asciidoc/modules/ROOT/pages/overview/apoc.meta/apoc.meta.nodes.count.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//// | ||
This file is generated by DocsTest, so don't change it! | ||
//// | ||
|
||
= apoc.meta.nodes.count | ||
:description: This section contains reference documentation for the apoc.meta.nodes.count function. | ||
|
||
label:function[] label:apoc-core[] | ||
|
||
[.emphasis] | ||
apoc.meta.nodes.count([labels], $config) - Returns the sum of the nodes with a label present in the list. | ||
|
||
== Signature | ||
|
||
[source] | ||
---- | ||
apoc.meta.nodes.count(nodes = [] :: LIST? OF STRING?, config = {} :: MAP?) :: (INTEGER?) | ||
---- | ||
|
||
== Input parameters | ||
[.procedures, opts=header] | ||
|=== | ||
| Name | Type | Default | ||
|nodes|LIST? OF STRING?|[] | ||
|config|MAP?|{} | ||
|=== | ||
|
||
== Config parameters | ||
include::partial$usage/config/apoc.meta.nodes.count.adoc[] | ||
|
||
[[usage-apoc.meta.nodes.count]] | ||
== Usage Examples | ||
include::partial$usage/apoc.meta.nodes.count.adoc[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
docs/asciidoc/modules/ROOT/partials/usage/apoc.meta.nodes.count.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
The examples in this section are based on the following sample graph: | ||
|
||
[source,cypher] | ||
---- | ||
CREATE (n:MyCountLabel {id: 1}), (:MyCountLabel {id: 2}), (m:ThirdLabel {id: 3}) | ||
WITH n,m | ||
CREATE (n)-[:MY_COUNT_REL]->(m), (n)-[:ANOTHER_MY_COUNT_REL]->(m), (n)<-[:ANOTHER_MY_COUNT_REL]-(m) | ||
---- | ||
|
||
We can return all nodes with a label `MyCountLabel` or a label `ThirdLabel` | ||
|
||
[source,cypher] | ||
---- | ||
RETURN apoc.meta.nodes.count(['MyCountLabel', 'ThirdLabel']) AS count; | ||
---- | ||
|
||
.Results | ||
[opts="header"] | ||
|=== | ||
| count | relationships | ||
| 3 | ||
|=== | ||
|
||
|
||
We can return all nodes with a label `MyCountLabel` and a relationship `MY_COUNT_REL` through the config param `rel` | ||
|
||
[source,cypher] | ||
---- | ||
RETURN apoc.meta.nodes.count(['MyCountLabel'], {rels: ['MY_COUNT_REL']}) AS count; | ||
---- | ||
|
||
.Results | ||
[opts="header"] | ||
|=== | ||
| count | relationships | ||
| 1 | ||
|=== | ||
|
||
Moreover, we can return all nodes with a `outcome` relationship `MY_COUNT_REL` (with the suffix `>`): | ||
|
||
[source,cypher] | ||
---- | ||
RETURN apoc.meta.nodes.count(['MyCountLabel'], {rels: ['MY_COUNT_REL>']}) AS count; | ||
---- | ||
|
||
.Results | ||
[opts="header"] | ||
|=== | ||
| count | relationships | ||
| 1 | ||
|=== | ||
|
||
otherwise with an `incoming` relationship `MY_COUNT_REL` (with the suffix `<`): | ||
|
||
[source,cypher] | ||
---- | ||
RETURN apoc.meta.nodes.count(['MyCountLabel'], {rels: ['MY_COUNT_REL<']}) AS count; | ||
---- | ||
|
||
.Results | ||
[opts="header"] | ||
|=== | ||
| count | relationships | ||
| 0 | ||
|=== | ||
|
9 changes: 9 additions & 0 deletions
9
docs/asciidoc/modules/ROOT/partials/usage/config/apoc.meta.nodes.count.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The procedure support the following config parameters: | ||
|
||
.Config parameters | ||
[opts=header, cols="1,1,1,5"] | ||
|=== | ||
| name | type | default | description | ||
| rels | Set<String> | `EmptySet` | The rel types to consider in the count. | ||
We can add to the suffix `>` or `<` to the rel type name to indicate an outgoing or incoming relationship. | ||
|=== |