Skip to content

Commit e96839f

Browse files
committed
Change examples/tests to remove explicit calls to query
1 parent 07d2302 commit e96839f

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

lib/examples/concurrent_writes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async fn main() {
3535

3636
async fn work(i: u64, graph: Graph) -> (u64, u64, u64) {
3737
graph
38-
.run(query(
38+
.run(
3939
"
4040
CREATE
4141
(dan:Person {name: 'Dan'}),
@@ -77,12 +77,12 @@ CREATE
7777
(elsa)-[:BUYS {amount: 3}]->(chocolate),
7878
(elsa)-[:BUYS {amount: 3}]->(milk)
7979
",
80-
))
80+
)
8181
.await
8282
.unwrap();
8383

8484
let node_count = graph
85-
.execute(query("MATCH (n) RETURN count(n) AS count"))
85+
.execute("MATCH (n) RETURN count(n) AS count")
8686
.await
8787
.unwrap()
8888
.column_into_stream::<u64>("count")

lib/tests/node_property_parsing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ async fn node_property_parsing() {
99
let graph = neo4j.graph();
1010

1111
graph
12-
.run(query(
12+
.run(
1313
"CREATE
1414
(:Datetime {p1:DATETIME('2024-12-31T08:10:35')}),
1515
(:Point2D {a:Point ({x:2,y:3})}),
1616
(:Point3D {a:Point ({x:3,y:4,z:5})})
1717
",
18-
))
18+
)
1919
.await
2020
.unwrap();
2121

lib/tests/use_default_db.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@ async fn use_default_db() {
2727

2828
#[cfg(feature = "unstable-bolt-protocol-impl-v2")]
2929
let query_stream = graph
30-
.execute_on("system", query("SHOW DEFAULT DATABASE"), Operation::Read)
30+
.execute_on("system", "SHOW DEFAULT DATABASE", Operation::Read)
3131
.await;
3232

3333
#[cfg(not(feature = "unstable-bolt-protocol-impl-v2"))]
34-
let query_stream = graph
35-
.execute_on("system", query("SHOW DEFAULT DATABASE"))
36-
.await;
34+
let query_stream = graph.execute_on("system", "SHOW DEFAULT DATABASE").await;
3735

3836
let default_db = query_stream
3937
.unwrap()

0 commit comments

Comments
 (0)