Skip to content

Commit e3278f8

Browse files
committed
Deprecate call.importWith
1 parent c53836f commit e3278f8

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.changeset/crazy-signs-kick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@neo4j/cypher-builder": patch
3+
---
4+
5+
Deprecates `Call.importWith` in favor of scope variables in `Call` constructor

docs/modules/ROOT/pages/subqueries/call.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ CALL (*) {
7373

7474
[WARNING]
7575
====
76-
Import with cannot be used if scope variables are defined and will throw an error
76+
This method is deprecated in favor of <<_variable_scope>>
77+
====
78+
79+
[WARNING]
80+
====
81+
Import with cannot be used if scope variables are defined and will throw an error.
7782
====
7883

7984

src/clauses/Call.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export type CallInTransactionOptions = {
6060
retry?: number | boolean;
6161
};
6262

63-
/**
63+
/** Adds a `CALL` subquery
64+
* @param subquery - A clause to be wrapped in a `CALL` clause
65+
* @param variableScope - A list of variables to pass to the scope of the clause: `CALL (var0) {`
6466
* @see {@link https://neo4j.com/docs/cypher-manual/current/clauses/call-subquery/ | Cypher Documentation}
6567
* @group Subqueries
6668
*/
@@ -81,7 +83,8 @@ export class Call extends Clause {
8183
}
8284

8385
/** Adds a `WITH` statement inside `CALL {`, this `WITH` can is used to import variables outside of the subquery
84-
* @see {@link https://neo4j.com/docs/cypher-manual/current/subqueries/call-subquery/#call-importing-variables | Cypher Documentation}
86+
* @see {@link https://neo4j.com/docs/cypher-manual/current/subqueries/call-subquery/#call-importing-variables | Cypher Documentation}
87+
* @deprecated Use constructor parameter `variableScope` instead
8588
*/
8689
public importWith(...params: Array<Variable | "*">): this {
8790
if (this._importWith) {

0 commit comments

Comments
 (0)