New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@neo4j/cypher-builder

Package Overview
Dependencies
Maintainers
7
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neo4j/cypher-builder - npm Package Versions

1
8

1.17.2

Diff

Changelog

Source

1.17.2

Patch Changes

neo4j-organization
published 1.17.1 •

Changelog

Source

1.17.1

Patch Changes

  • #346 65661c3 Thanks @mjfwebb! - Add callProcedure method to With and Match clauses

    const withQuery = new Cypher.With("*").callProcedure(Cypher.db.labels()).yield("label");
    
neo4j-organization
published 1.17.0 •

Changelog

Source

1.17.0

Minor Changes

  • #340 b1b7acf Thanks @angrykoala! - Add vector similarity functions:

    Cypher.vector.similarity.euclidean(param1, param2);
    Cypher.vector.similarity.cosine(param1, param2);
    
  • #342 5bba4b5 Thanks @angrykoala! - Add support for FINISH clauses:

    new Cypher.Finish()
    
    new Cypher.Match(...).finish()
    new Cypher.Create(...).finish()
    new Cypher.Merge(...).finish()
    
neo4j-organization
published 1.16.0 •

Changelog

Source

1.16.0

Minor Changes

  • #333 2593296 Thanks @mjfwebb! - Adds support for genai function genai.vector.encode() and procedure genai.vector.encodeBatch()

  • #328 628ec62 Thanks @mjfwebb! - Adds support for vector index functions db.index.vector.queryNodes() and db.index.vector.queryRelationships()

  • #310 13fd317 Thanks @angrykoala! - Add support for arbitrary variables in Patterns instead of only Node and Relationship:

Patch Changes

  • #310 13fd317 Thanks @angrykoala! - The following methods in Pattern class and chains are deprecated:

    • withoutLabels
    • withoutVariable
    • withProperties
    • getVariables
    • withoutType
    • withDirection
    • withLength

    Instead, these properties should be passed as an object, for example:

    const a = new Cypher.Variable();
    const rel = new Cypher.Variable();
    const b = new Cypher.Variable();
    
    const pattern = new Cypher.Pattern(a, { labels: ["Movie"] }).related(rel, { type: "ACTED_IN" }).to(b);
    
  • #310 98a8b2f Thanks @angrykoala! - Deprecate using Node directly on Match, Create and Merge clauses. Use a Pattern instead

  • #310 7574aee Thanks @angrykoala! - Deprecate setting up labels and types in Node and Relationship. The following examples are now deprecated:

    new Cypher.Node({ labels: ["Movie"] });
    
    new Cypher.Relationship({ type: "ACTED_IN" });
    

    Instead, Nodes and Relationships should be created without parameters. Labels and types should be set in a Pattern:

    const n = new Cypher.Node();
    const r = new Cypher.Relationship();
    
    const pattern = new Cypher.Pattern(n, { labels: ["Movie"] }).related(r, { type: "ACTED_IN" }).to();
    
neo4j-organization
published 1.15.0 •

Changelog

Source

1.15.0

Minor Changes

  • #321 0acf69b Thanks @angrykoala! - Add support for IN TRANSACTIONS in CALL statements using the method inTransactions()
neo4j-organization
published 1.14.0 •

Changelog

Source

1.14.0

Minor Changes

  • #312 3060a56 Thanks @angrykoala! - Add support for normalize function:

    Cypher.normalize(new Cypher.Param("my string"), "NFC");
    
  • #314 dbb6a4a Thanks @angrykoala! - Add isNormalized and isNotNormalized operators:

    const stringLiteral = new Cypher.Literal("the \\u212B char");
    const query = new Cypher.Return([Cypher.isNormalized(stringLiteral, "NFC"), "normalized"]);
    const { cypher } = query.build();
    
    RETURN "the \u212B char" IS NFC NORMALIZED AS normalized
    

Patch Changes

  • #315 e3a7505 Thanks @angrykoala! - Deprecate Cypher.cdc Procedures in favor of Cypher.db.cdc:

    • Cypher.cdc.current in favor of Cypher.db.cdc.current
    • Cypher.cdc.earliest in favor of Cypher.db.cdc.earliest
    • Cypher.cdc.query in favor of Cypher.db.cdc.query

    This new procedures also update the generated Cypher namespace to db.cdc

neo4j-organization
published 1.13.0 •

Changelog

Source

1.13.0

Minor Changes

  • #301 f2f679b Thanks @angrykoala! - Add support for Collect subqueries:

    const dog = new Cypher.Node({ labels: ["Dog"] });
    const person = new Cypher.Node({ labels: ["Person"] });
    
    const subquery = new Cypher.Match(
        new Cypher.Pattern(person).related(new Cypher.Relationship({ type: "HAS_DOG" })).to(dog)
    ).return(dog.property("name"));
    
    const match = new Cypher.Match(person)
        .where(Cypher.in(new Cypher.Literal("Ozzy"), new Cypher.Collect(subquery)))
        .return(person);
    
    MATCH (this0:Person)
    WHERE "Ozzy" IN COLLECT {
        MATCH (this0:Person)-[this1:HAS_DOG]->(this2:Dog)
        RETURN this2.name
    }
    RETURN this0
    
neo4j-organization
published 1.12.0 •

Changelog

Source

1.12.0

Minor Changes

  • #294 07280b6 Thanks @angrykoala! - Support for WHERE predicates in patters:

    const movie = new Cypher.Node({ labels: ["Movie"] });
    
    new Cypher.Pattern(movie).where(Cypher.eq(movie.property("title"), new Cypher.Literal("The Matrix")));
    
    (this0:Movie WHERE this0.title = "The Matrix")
    
neo4j-organization
published 1.11.0 •

Changelog

Source

1.11.0

Minor Changes

  • #277 f97c229 Thanks @angrykoala! - Add support for type predicate expressions with the functions Cypher.isType and Cypher.isNotType:

    const variable = new Cypher.Variable();
    const unwindClause = new Cypher.Unwind([new Cypher.Literal([42, true, "abc", null]), variable]).return(
        variable,
        Cypher.isType(variable, Cypher.TYPE.INTEGER)
    );
    
    UNWIND [42, true, \\"abc\\", NULL] AS var0
    RETURN var0, var0 IS :: INTEGER
    

Patch Changes

  • #283 566e1d4 Thanks @angrykoala! - Prepends WITH on each UNION subquery when .importWith is set in parent CALL:

    const returnVar = new Cypher.Variable();
    const n1 = new Cypher.Node({ labels: ["Movie"] });
    const query1 = new Cypher.Match(n1).return([n1, returnVar]);
    const n2 = new Cypher.Node({ labels: ["Movie"] });
    const query2 = new Cypher.Match(n2).return([n2, returnVar]);
    
    const unionQuery = new Cypher.Union(query1, query2);
    const callQuery = new Cypher.Call(unionQuery).importWith(new Cypher.Variable());
    

    The statement WITH var0 will be added to each UNION subquery

    CALL {
        WITH var0
        MATCH (this1:Movie)
        RETURN this1 AS var2
        UNION
        WITH var0
        MATCH (this3:Movie)
        RETURN this3 AS var2
    }
    
  • #283 566e1d4 Thanks @angrykoala! - Deprecate Call.innerWith in favor of Call.importWith

  • #289 b9a2ad6 Thanks @angrykoala! - Deprecates the second parameter of patternComprehensions in favor of new .map method:

    old

    new Cypher.PatternComprehension(pattern, expr);
    

    new

    new Cypher.PatternComprehension(pattern).map(expr);
    
neo4j-organization
published 1.10.3 •

Changelog

Source

1.10.3

Patch Changes

  • #279 4620a2e Thanks @angrykoala! - Add support for "*" parameter in MapProjection:

    new Cypher.MapProjection(new Cypher.Variable(), "*");
    
    var0 { .* }
    
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc