Skip to content

Commit c3a7b2e

Browse files
Version Packages
1 parent 5afb06c commit c3a7b2e

File tree

4 files changed

+36
-36
lines changed

4 files changed

+36
-36
lines changed

.changeset/eight-socks-work.md

-30
This file was deleted.

.changeset/shy-emus-laugh.md

-5
This file was deleted.

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# @neo4j/cypher-builder
22

3+
## 1.10.4
4+
5+
### Patch Changes
6+
7+
- [#283](https://github.com/neo4j/cypher-builder/pull/283) [`566e1d4`](https://github.com/neo4j/cypher-builder/commit/566e1d400c4639631989f9fe41d8ab8f94a02306) Thanks [@angrykoala](https://github.com/angrykoala)! - Prepends WITH on each UNION subquery when `.importWith` is set in parent CALL:
8+
9+
```js
10+
const returnVar = new Cypher.Variable();
11+
const n1 = new Cypher.Node({ labels: ["Movie"] });
12+
const query1 = new Cypher.Match(n1).return([n1, returnVar]);
13+
const n2 = new Cypher.Node({ labels: ["Movie"] });
14+
const query2 = new Cypher.Match(n2).return([n2, returnVar]);
15+
16+
const unionQuery = new Cypher.Union(query1, query2);
17+
const callQuery = new Cypher.Call(unionQuery).importWith(
18+
new Cypher.Variable(),
19+
);
20+
```
21+
22+
The statement `WITH var0` will be added to each UNION subquery
23+
24+
```cypher
25+
CALL {
26+
WITH var0
27+
MATCH (this1:Movie)
28+
RETURN this1 AS var2
29+
UNION
30+
WITH var0
31+
MATCH (this3:Movie)
32+
RETURN this3 AS var2
33+
}
34+
```
35+
36+
- [#283](https://github.com/neo4j/cypher-builder/pull/283) [`566e1d4`](https://github.com/neo4j/cypher-builder/commit/566e1d400c4639631989f9fe41d8ab8f94a02306) Thanks [@angrykoala](https://github.com/angrykoala)! - Deprecate `Call.innerWith` in favor of `Call.importWith`
37+
338
## 1.10.3
439

540
### Patch Changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@neo4j/cypher-builder",
3-
"version": "1.10.3",
3+
"version": "1.10.4",
44
"description": "A programmatic API for building Cypher queries for Neo4j",
55
"exports": "./dist/index.js",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)