Skip to content

Releases: neo4j/cypher-builder

v2.8.0

19 Aug 15:37
131c372
Compare
Choose a tag to compare

Minor Changes

  • #559 137a908 Thanks @angrykoala! - Support for dynamic labels in patterns

    const 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 patterns

    const 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 option labelOperator, this option only exists for compatibility with Cypher 4 and is no longer relevant for Cypher 5 or 25

v2.7.2

04 Aug 09:05
b2101df
Compare
Choose a tag to compare

Patch Changes

  • #554 e3278f8 Thanks @angrykoala! - Deprecates Call.importWith in favor of scope variables in Call 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

25 Jun 16:30
478a4f5
Compare
Choose a tag to compare

Patch Changes

  • #549 7b5b625 Thanks @angrykoala! - Makes value of Cypher.Param writable so it can be overwritten before the query is built

v2.7.0

30 May 10:54
ad5e04e
Compare
Choose a tag to compare

Minor Changes

  • #541 6b02a4a Thanks @angrykoala! - Add support for OPTIONAL CALL on procedures:

    Cypher.db.labels().optional().yield("*");
    OPTIONAL CALL db.labels() YIELD *

v2.6.0

19 May 14:48
c340e47
Compare
Choose a tag to compare

Minor Changes

  • #528 2f8dfa6 Thanks @angrykoala! - Add option retry to Call.inTransactions configuration to add a RETRY statement to CALL {} 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

22 Apr 14:47
bce377d
Compare
Choose a tag to compare

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

01 Apr 13:40
402c8b2
Compare
Choose a tag to compare

Patch Changes

v2.5.0

18 Mar 10:51
4efbaf3
Compare
Choose a tag to compare

Minor Changes

  • #515 5f95867 Thanks @angrykoala! - Add support for concatenation operator (||) with Cypher.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 from CompositeClause generated from utils.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 type CypherASTNode:

    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

10 Mar 15:10
dc5e45c
Compare
Choose a tag to compare

Patch Changes

v2.4.0

05 Mar 13:42
6bc3f1f
Compare
Choose a tag to compare

Minor Changes

  • #508 12a78f0 Thanks @angrykoala! - Add support for += operator on SET

    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! - Rename disableLabelEscaping to disableNodeLabelEscaping in unsafeEscapeOptions:

    const queryResult = matchQuery.build({
        unsafeEscapeOptions: {
            disableNodeLabelEscaping: true,
            disableRelationshipTypeEscaping: true,
        },
    });