Skip to content

Releases: neo4j/cypher-builder

v1.10.2

17 Jan 15:16
3889edd
Compare
Choose a tag to compare

Patch Changes

v1.10.1

17 Jan 11:33
a11672a
Compare
Choose a tag to compare

Patch Changes

  • #271 5834c61 Thanks @angrykoala! - Add labelOperator option on build to change the default label AND operator:

    const node = new Cypher.Node({ labels: ["Movie", "Film"] });
    const query = new Cypher.Match(node);
    
    const queryResult = new TestClause(query).build(
      undefined,
      {},
      {
        labelOperator: "&",
      },
    );

    Will return:

    MATCH (this:Movie&Film)

v1.10.0

16 Jan 17:20
e86bb9e
Compare
Choose a tag to compare

Minor Changes

  • #269 6d9d3e2 Thanks @angrykoala! - Add chained clauses to Procedures after YIELD:

    • .unwind
    • .match
    • .optionalMatch
    • .delete
    • .detachDelete
    • .set
    • .merge
    • .create
    • .remove

v1.9.0

14 Dec 17:31
e68dfcf
Compare
Choose a tag to compare

Minor Changes

v1.8.0

05 Dec 13:48
dc8ecf7
Compare
Choose a tag to compare

Minor Changes

  • #253 da0b3ab Thanks @angrykoala! - Add support for type filtering on relationships

    new Cypher.Match(new Cypher.Pattern().related(new Cypher.Relationship()).to()).where(
        relationship.hasType("ACTED_IN")
    );
    MATCH(this0)-[this1]->(this2)
    WHERE this1:ACTED_IN
  • #251 80e1bca Thanks @angrykoala! - Add support for label expressions on hasLabel:

    const query = new Cypher.Match(node).where(node.hasLabel(Cypher.labelExpr.or("Movie", "Film")));
    MATCH (this0:Movie)
    WHERE this0:(Movie|Film)
  • #256 602c237 Thanks @angrykoala! - Add support for ON MATCH SET after MERGE:

    const node = new Cypher.Node({
        labels: ["MyLabel"],
    });
    
    const countProp = node.property("count");
    const query = new Cypher.Merge(node)
        .onCreateSet([countProp, new Cypher.Literal(1)])
        .onMatchSet([countProp, Cypher.plus(countProp, new Cypher.Literal(1))]);
    MERGE (this0:MyLabel)
    ON MATCH SET
        this0.count = (this0.count + 1)
    ON CREATE SET
        this0.count = 1

v1.7.4

27 Nov 16:21
20c063b
Compare
Choose a tag to compare

Patch Changes

  • #245 a63337d Thanks @angrykoala! - Deprecate Merge.onCreate in favor of Merge.onCreateSet to better reflect the resulting Cypher ON CREATE SET

  • #244 347ae01 Thanks @angrykoala! - Fix clauses order when using Merge.onCreate along with .set

    For example:

    const query = new Cypher.Merge(node)
        .onCreate([node.property("age"), new Cypher.Param(23)])
        .set([node.property("age"), new Cypher.Param(10)]);
    MERGE (this0:MyLabel)
    ON CREATE SET
        this0.age = $param1
    SET
        this0.age = $param0

v1.7.3

15 Nov 16:57
67e16d6
Compare
Choose a tag to compare

Patch Changes

  • #236 34552dc Thanks @angrykoala! - Support for chained .yield:

    const customProcedure = new Cypher.Procedure("customProcedure", []).yield("result1").yield(["result2", "aliased"]);

    is equivalent to:

    const customProcedure = new Cypher.Procedure("customProcedure", []).yield("result1", ["result2", "aliased"]);

    and results in the Cypher:

    CALL customProcedure() YIELD result1, result2 AS aliased

v1.7.2

08 Nov 13:29
7a9a8f0
Compare
Choose a tag to compare

Patch Changes

  • #230 f37cc99 Thanks @angrykoala! - Support for passing undefined to .where:

    const n = new Cypher.Node();
    new Cypher.Match(n).where(undefined).return(n);

    This will generate the following Cypher:

    MATCH(n)
    RETURN n
    

    Note that the WHERE clause is omitted if the predicate is undefined

v1.7.1

03 Nov 09:14
a579bb9
Compare
Choose a tag to compare

Patch Changes

  • #226 84b1534 Thanks @angrykoala! - Support for new Call().innerWith("*") to generate WITH * inside a CALL subquery

v1.7.0

02 Nov 12:05
f1c5704
Compare
Choose a tag to compare

Minor Changes

Patch Changes