You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the `PG_CONNECTION_STRING` environment variable to a valid PostgreSQL connection string (e.g. `user=postgres dbname=bhe password=bhe4eva host=localhost`), then run:
50
+
51
+
```bash
52
+
PG_CONNECTION_STRING="<connection-string>" make test_pg
53
+
```
54
+
55
+
To run a specific test directly:
56
+
57
+
```bash
58
+
PG_CONNECTION_STRING="<connection-string>" go test -tags pg_integration ./cypher/models/pgsql/test/...
59
+
```
60
+
61
+
##### Neo4j Integration Tests
62
+
63
+
The following test requires a live Neo4j instance:
64
+
65
+
-`drivers/neo4j/batch_integration_test.go`
66
+
67
+
Set the `NEO4J_CONNECTION_STRING` environment variable to a valid Neo4j connection string (e.g.
68
+
`neo4j://user:password@host:port`), then run:
69
+
70
+
```bash
71
+
NEO4J_CONNECTION_STRING="<connection-string>" make test_neo4j
72
+
```
73
+
74
+
To run the batch integration test directly:
75
+
76
+
```bash
77
+
NEO4J_CONNECTION_STRING="<connection-string>" go test -tags neo4j_integration ./drivers/neo4j/...
Copy file name to clipboardExpand all lines: cypher/models/pgsql/test/translation_cases/delete.sql
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,11 @@
15
15
-- SPDX-License-Identifier: Apache-2.0
16
16
17
17
-- case: match (s:NodeKind1) detach delete s
18
-
with s0 as (select (n0.id, n0.kind_ids, n0.properties)::nodecomposite as n0from node n0 wheren0.kind_ids operator (pg_catalog.@>) array [1]::int2[]), s1 as (deletefrom node n1 using s0 where(s0.n0).id=n1.id) select1;
18
+
with s0 as (select (n0.id, n0.kind_ids, n0.properties)::nodecomposite as n0, n0.idas n0_id from node n0 wheren0.kind_ids operator (pg_catalog.@>) array [1]::int2[]), s1 as (deletefrom node n1 using s0 wheres0.n0_id=n1.id) select1;
19
19
20
20
-- case: match ()-[r:EdgeKind1]->() delete r
21
-
with s0 as (select (e0.id, e0.start_id, e0.end_id, e0.kind_id, e0.properties)::edgecomposite as e0, (n0.id, n0.kind_ids, n0.properties)::nodecomposite as n0, (n1.id, n1.kind_ids, n1.properties)::nodecomposite as n1 from edge e0 join node n0 onn0.id=e0.start_idjoin node n1 onn1.id=e0.end_idwheree0.kind_id= any (array [3]::int2[])), s1 as (deletefrom edge e1 using s0 where (s0.e0).id =e1.id) select1;
21
+
with s0 as (select (e0.id, e0.start_id, e0.end_id, e0.kind_id, e0.properties)::edgecomposite as e0, (n0.id, n0.kind_ids, n0.properties)::nodecomposite as n0, n0.idas n0_id, (n1.id, n1.kind_ids, n1.properties)::nodecomposite as n1, n1.idas n1_idfrom edge e0 join node n0 onn0.id=e0.start_idjoin node n1 onn1.id=e0.end_idwheree0.kind_id= any (array [3]::int2[])), s1 as (deletefrom edge e1 using s0 where (s0.e0).id =e1.id) select1;
22
22
23
23
-- case: match ()-[]->()-[r:EdgeKind1]->() delete r
24
-
with s0 as (select (e0.id, e0.start_id, e0.end_id, e0.kind_id, e0.properties)::edgecomposite as e0, (n0.id, n0.kind_ids, n0.properties)::nodecomposite as n0, (n1.id, n1.kind_ids, n1.properties)::nodecomposite as n1from edge e0 join node n0 onn0.id=e0.start_idjoin node n1 onn1.id=e0.end_id), s1 as (selects0.e0as e0, (e1.id, e1.start_id, e1.end_id, e1.kind_id, e1.properties)::edgecomposite as e1, s0.n0as n0, s0.n1as n1, (n2.id, n2.kind_ids, n2.properties)::nodecomposite as n2from s0 join edge e1 on(s0.n1).id=e1.start_idjoin node n2 onn2.id=e1.end_idwheree1.kind_id= any (array [3]::int2[])), s2 as (deletefrom edge e2 using s1 where (s1.e1).id =e2.id) select1;
24
+
with s0 as (select (e0.id, e0.start_id, e0.end_id, e0.kind_id, e0.properties)::edgecomposite as e0, (n0.id, n0.kind_ids, n0.properties)::nodecomposite as n0, n0.idas n0_id, (n1.id, n1.kind_ids, n1.properties)::nodecomposite as n1, n1.idas n1_id from edge e0 join node n0 onn0.id=e0.start_idjoin node n1 onn1.id=e0.end_id), s1 as (selects0.e0as e0, (e1.id, e1.start_id, e1.end_id, e1.kind_id, e1.properties)::edgecomposite as e1, s0.n0as n0, s0.n0_idas n0_id, s0.n1as n1, s0.n1_idas n1_id, (n2.id, n2.kind_ids, n2.properties)::nodecomposite as n2, n2.idas n2_id from s0 join edge e1 ons0.n1_id=e1.start_idjoin node n2 onn2.id=e1.end_idwheree1.kind_id= any (array [3]::int2[])), s2 as (deletefrom edge e2 using s1 where (s1.e1).id =e2.id) select1;
0 commit comments