diff --git a/.changeset/chatty-islands-drop.md b/.changeset/chatty-islands-drop.md deleted file mode 100644 index 7d71491e..00000000 --- a/.changeset/chatty-islands-drop.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@neo4j/cypher-builder": minor ---- - -Add support for LOAD CSV: - -```js -const row = new Cypher.Variable(); -const loadClause = new Cypher.LoadCSV("https://data.neo4j.com/bands/artists.csv", row).return(row); -``` diff --git a/.changeset/clean-candles-hang.md b/.changeset/clean-candles-hang.md deleted file mode 100644 index 15ddba25..00000000 --- a/.changeset/clean-candles-hang.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@neo4j/cypher-builder": patch ---- - -Add `LOAD CSV` related functions: - -- `file()` -- `linenumber()` diff --git a/.changeset/orange-ads-lick.md b/.changeset/orange-ads-lick.md deleted file mode 100644 index a5882dbd..00000000 --- a/.changeset/orange-ads-lick.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -"@neo4j/cypher-builder": minor ---- - -Add support for quantifier patterns: - -```js -const m = new Cypher.Node(); -const m2 = new Cypher.Node(); - -const quantifiedPath = new Cypher.QuantifiedPath( - new Cypher.Pattern(m, { labels: ["Movie"], properties: { title: new Cypher.Param("V for Vendetta") } }), - new Cypher.Pattern({ labels: ["Movie"] }) - .related({ type: "ACTED_IN" }) - .to({ labels: ["Person"] }) - .quantifier({ min: 1, max: 2 }), - new Cypher.Pattern(m2, { - labels: ["Movie"], - properties: { title: new Cypher.Param("Something's Gotta Give") }, - }) -); - -const query = new Cypher.Match(quantifiedPath).return(m2); -``` - -_Cypher_ - -```cypher -MATCH (this0:Movie { title: $param0 }) - ((:Movie)-[:ACTED_IN]->(:Person)){1,2} - (this1:Movie { title: $param1 }) -RETURN this1 -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index de0a4534..44509c39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,53 @@ # @neo4j/cypher-builder +## 1.19.0 + +### Minor Changes + +- [#369](https://github.com/neo4j/cypher-builder/pull/369) [`3514bdd`](https://github.com/neo4j/cypher-builder/commit/3514bdd6574a43f05c1eed7da1359a2e327bc047) Thanks [@angrykoala](https://github.com/angrykoala)! - Add support for LOAD CSV: + + ```js + const row = new Cypher.Variable(); + const loadClause = new Cypher.LoadCSV("https://data.neo4j.com/bands/artists.csv", row).return(row); + ``` + +- [#354](https://github.com/neo4j/cypher-builder/pull/354) [`ef49a96`](https://github.com/neo4j/cypher-builder/commit/ef49a96ec8a88676fa731f4d17030e7e01718b77) Thanks [@angrykoala](https://github.com/angrykoala)! - Add support for quantifier patterns: + + ```js + const m = new Cypher.Node(); + const m2 = new Cypher.Node(); + + const quantifiedPath = new Cypher.QuantifiedPath( + new Cypher.Pattern(m, { labels: ["Movie"], properties: { title: new Cypher.Param("V for Vendetta") } }), + new Cypher.Pattern({ labels: ["Movie"] }) + .related({ type: "ACTED_IN" }) + .to({ labels: ["Person"] }) + .quantifier({ min: 1, max: 2 }), + new Cypher.Pattern(m2, { + labels: ["Movie"], + properties: { title: new Cypher.Param("Something's Gotta Give") }, + }) + ); + + const query = new Cypher.Match(quantifiedPath).return(m2); + ``` + + _Cypher_ + + ```cypher + MATCH (this0:Movie { title: $param0 }) + ((:Movie)-[:ACTED_IN]->(:Person)){1,2} + (this1:Movie { title: $param1 }) + RETURN this1 + ``` + +### Patch Changes + +- [#371](https://github.com/neo4j/cypher-builder/pull/371) [`6d1b0c4`](https://github.com/neo4j/cypher-builder/commit/6d1b0c44d0c7d8862dbbcf7e1c29897cb2e17c5c) Thanks [@angrykoala](https://github.com/angrykoala)! - Add `LOAD CSV` related functions: + + - `file()` + - `linenumber()` + ## 1.18.1 ### Patch Changes diff --git a/package.json b/package.json index 02c26f37..e4d09015 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/cypher-builder", - "version": "1.18.1", + "version": "1.19.0", "description": "A programmatic API for building Cypher queries for Neo4j", "exports": "./dist/index.js", "main": "./dist/index.js",