Releases: neo4j/cypher-builder
v2.8.0
Minor Changes
-
#559
137a908
Thanks @angrykoala! - Support for dynamic labels in patternsconst query = new Cypher.Match( new Cypher.Pattern(new Cypher.Node(), { labels: new Cypher.Param("Movie"), }) );
MATCH (this0:$($param0))
-
#559
0223ca9
Thanks @angrykoala! - Add support for dynamic types in patternsconst query = new Cypher.Match( new Cypher.Pattern(new Cypher.Node()) .related({ type: new Cypher.Param("ACTED_IN"), }) .to() );
MATCH (this0)-[:$($param1)]->()
Patch Changes
- #561
83774e8
Thanks @angrykoala! - Deprecates the optionlabelOperator
, this option only exists for compatibility with Cypher 4 and is no longer relevant for Cypher 5 or 25
v2.7.2
Patch Changes
-
#554
e3278f8
Thanks @angrykoala! - DeprecatesCall.importWith
in favor of scope variables inCall
constructor -
#554
a9af397
Thanks @angrykoala! - Deprecate apoc functions and procedures. These will no longer be supported in version 3 of Cypher Builder:-
apoc.date.convertFormat
-
apoc.util.validate
-
apoc.util.validatePredicate
-
apoc.cypher.runFirstColumnMany
-
apoc.cypher.runFirstColumnSingle
These can still be used by using the
Function
class directly:const convertFormat = new Cypher.Function("apoc.date.convertFormat", [ new Cypher.Variable(), new Cypher.Literal("iso_zoned_date_time"), new Cypher.Literal("iso_offset_date_time"), ]);
-
v2.7.1
Patch Changes
- #549
7b5b625
Thanks @angrykoala! - Makes value ofCypher.Param
writable so it can be overwritten before the query is built
v2.7.0
Minor Changes
-
#541
6b02a4a
Thanks @angrykoala! - Add support forOPTIONAL CALL
on procedures:Cypher.db.labels().optional().yield("*");
OPTIONAL CALL db.labels() YIELD *
v2.6.0
Minor Changes
-
#528
2f8dfa6
Thanks @angrykoala! - Add optionretry
toCall.inTransactions
configuration to add aRETRY
statement toCALL {} IN TRANSACTIONS
.
This option can be a boolean set to true or a number to define the retry seconds:new Cypher.Call(subquery).inTransactions({ retry: true, });
CALL { // ... } IN TRANSACTIONS ON ERROR RETRY
Using it in conjuntion with
onError
and with a defined seconds of retry:new Cypher.Call(subquery).inTransactions({ retry: 10, onError: "break", });
CALL { // ... } IN TRANSACTIONS ON ERROR RETRY FOR 10 SECONDS THEN BREAK
v2.5.2
Patch Changes
-
#530
35fdd7e
Thanks @angrykoala! - Fix types to support paths on chained.match
and.optionalMatch
:const path = new Cypher.PathVariable(); const query = new Cypher.Match(new Cypher.Node()).match(pattern.assignTo(path)).return(path);
MATCH (this0) MATCH p3 = (this0)-[this1:ACTED_IN]->(this2) RETURN p3
v2.5.1
Patch Changes
- #523
5805532
Thanks @angrykoala! - Deprecates typeOperation
in favor of the more generalExpr
v2.5.0
Minor Changes
-
#515
5f95867
Thanks @angrykoala! - Add support for concatenation operator (||
) withCypher.concat
Cypher.concat(new Cypher.Literal("Hello"), new Cypher.Literal("World!"));
("Hello" || "World!")
This is functionally equivalent to
Cypher.plus
with uses the operator+
instead.
Patch Changes
-
#517
a5a0d83
Thanks @angrykoala! - Deprecate.children
fromCompositeClause
generated fromutils.concat
with no replacement.The clauses generated by
utils.concat
provide a public property.children
that exposes the internals of the CompositeClause as well as the internal typeCypherASTNode
:const query = Cypher.utils.concat(clause, returnClause); const children = query.children; // Has 2 elements of type CypherASTNode
Using this method as part of query building can lead to incorrect behaviour and it is generally a bad practice.
-
#518
a48f9ed
Thanks @angrykoala! - Explicitly exports some types that were used or returned by public functions and methods:-
CallInTransactionOptions
-
ForeachClauses
-
PartialPattern
-
LiteralValue
-
ListIndex
-
DeleteInput
-
NodePatternOptions
-
RelationshipPatternOptions
-
YieldProjectionColumn
Some methods and internal types have also been changed to better reflect the exposed types and avoid using internal types in public API
-
v2.4.1
Patch Changes
- #514
9f6966e
Thanks @i-like-robots! - Refactored SetParam type definition to allow PropertyRef values
v2.4.0
Minor Changes
-
#508
12a78f0
Thanks @angrykoala! - Add support for+=
operator onSET
const movie = new Cypher.Node(); const clause = new Cypher.Match(new Cypher.Pattern(movie)).set([ movie, "+=", new Cypher.Map({ title: new Cypher.Param("The Matrix"), year: new Cypher.Param(1999), }), ]);
MATCH (this0) SET this0 += { title: $param0, year: $param1 }
Patch Changes
-
#513
d4337b9
Thanks @angrykoala! - RenamedisableLabelEscaping
todisableNodeLabelEscaping
inunsafeEscapeOptions
:const queryResult = matchQuery.build({ unsafeEscapeOptions: { disableNodeLabelEscaping: true, disableRelationshipTypeEscaping: true, }, });