Skip to content

Commit a9af397

Browse files
committed
Deprecate apoc methods
1 parent e3278f8 commit a9af397

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

.changeset/lazy-buckets-peel.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@neo4j/cypher-builder": patch
3+
---
4+
5+
Deprecate apoc functions and procedures. These will no longer be supported in version 3 of Cypher Builder:
6+
7+
- `apoc.date.convertFormat`
8+
- `apoc.util.validate`
9+
- `apoc.util.validatePredicate`
10+
- `apoc.cypher.runFirstColumnMany`
11+
- `apoc.cypher.runFirstColumnSingle`

docs/modules/ROOT/pages/functions.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ This differentiates functions from clauses and other elements of the Cypher Buil
2626
====
2727

2828
Exposed functions have the closest possible name to their Cypher counterpart, and reside in the same namespace.
29-
For example, this query:
29+
For example:
3030

3131
[source, javascript]
3232
----
33-
Cypher.apoc.cypher.runFirstColumnSingle()
33+
Cypher.db.nameFromElementId("1234")
3434
----
3535

36-
Is equivalent to the Cypher function:
36+
Generates the Cypher function:
3737

3838
[source, cypher]
3939
----
40-
apoc.cypher.runFirstColumnSingle()
40+
db.nameFromElementId("1234")
4141
----
4242

4343
== Custom functions

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ CALL (*) {
6969
}
7070
----
7171

72+
[role=label--deprecated]
7273
== `.importWith`
7374

7475
[WARNING]

src/namespaces/apoc/cypher/run-first-column.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import type { Expr } from "../../../types";
2626

2727
/**
2828
* @group Functions
29+
* @deprecated apoc methods will no longer be supported in Cypher Builder version 3
2930
* @see [Apoc Documentation](https://neo4j.com/docs/apoc/current/overview/apoc.cypher/apoc.cypher.runFirstColumnMany/)
3031
*/
3132
export function runFirstColumnMany(
@@ -37,6 +38,7 @@ export function runFirstColumnMany(
3738

3839
/**
3940
* @group Functions
41+
* @deprecated apoc methods will no longer be supported in Cypher Builder version 3
4042
* @see [Apoc Documentation](https://neo4j.com/docs/apoc/current/overview/apoc.cypher/apoc.cypher.runFirstColumnSingle/)
4143
*/
4244
export function runFirstColumnSingle(

src/namespaces/apoc/date.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import type { Expr } from "../../types";
2525
/**
2626
* @group Functions
2727
* @see [Apoc Documentation](https://neo4j.com/docs/apoc/current/overview/apoc.date/apoc.date.convertFormat/)
28+
* @deprecated apoc methods will no longer be supported in Cypher Builder version 3
2829
* @example
2930
* ```ts
3031
* Cypher.apoc.date.convertFormat(

src/namespaces/apoc/util.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { normalizeVariable } from "../../utils/normalize-variable";
2727

2828
/**
2929
* @group Procedures
30+
* @deprecated apoc methods will no longer be supported in Cypher Builder version 3
3031
* @see [Apoc Documentation](https://neo4j.com/docs/apoc/current/overview/apoc.util/apoc.util.validate/)
3132
*/
3233
export function validate(
@@ -40,6 +41,7 @@ export function validate(
4041

4142
/**
4243
* @group Functions
44+
* @deprecated apoc methods will no longer be supported in Cypher Builder version 3
4345
* @see [Apoc Documentation](https://neo4j.com/docs/apoc/current/overview/apoc.util/apoc.util.validatePredicate/)
4446
*/
4547
export function validatePredicate(predicate: Predicate, message: string): CypherFunction {

0 commit comments

Comments
 (0)