flowquery 1.0.78 → 1.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -854,6 +854,23 @@ WHERE 'Alice' IN COLLECT { MATCH (p)-[:KNOWS]->(f:Person) RETURN f.name }
854
854
  RETURN p.name
855
855
  ```
856
856
 
857
+ **Bare-pattern shorthand:** `EXISTS` and `COUNT` also accept a graph pattern directly, without the `MATCH` keyword (with an optional trailing `WHERE`). `COLLECT` does not support this form because it needs a `RETURN` to know which value to collect.
858
+
859
+ ```cypher
860
+ // EXISTS with a bare pattern
861
+ MATCH (p:Person)
862
+ WHERE EXISTS { (p)-[:KNOWS]->(:Person) }
863
+ RETURN p.name
864
+
865
+ // COUNT with a bare pattern, in RETURN
866
+ MATCH (p:Person)
867
+ RETURN p.name, COUNT { (p)-[:KNOWS]->(:Person) } AS friendCount
868
+
869
+ // COUNT with a bare pattern and inner WHERE
870
+ MATCH (p:Person)
871
+ RETURN p.name, COUNT { (p)-[:KNOWS]->(f:Person) WHERE f.age > 30 } AS closeFriends
872
+ ```
873
+
857
874
  **Node reference reuse across MATCH clauses:**
858
875
 
859
876
  ```cypher
@@ -992,6 +1009,7 @@ RETURN f.name, f.description, f.category
992
1009
  │ ENDS WITH · NOT ENDS WITH │
993
1010
  │ EXISTS { subquery } · NOT EXISTS { subquery } │
994
1011
  │ COUNT { subquery } · COLLECT { subquery } │
1012
+ │ EXISTS { pattern } · COUNT { pattern } -- bare pattern │
995
1013
  ├─────────────────────────────────────────────────────────────┤
996
1014
  │ EXPRESSIONS │
997
1015
  ├─────────────────────────────────────────────────────────────┤