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
0
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

23
8

2.3.1

Diff

Changelog

Source

2.3.1

Patch Changes

neo4j-organization
published 2.3.0 •

Changelog

Source

2.3.0

Minor Changes

  • #494 a775b64 Thanks @angrykoala! - Add cypherVersion parameter in build:

    const { cypher } = matchQuery.build({
        cypherVersion: "5",
    });
    

    This prepends the Cypher version to the query:

    CYPHER 5
    MATCH (this0:Movie)
    RETURN this0
    

Patch Changes

  • #493 69ecd03 Thanks @angrykoala! - Export the following types: When, IsType, ListType, BooleanOp MathOp. These types were returned by some functions or methods, but the types themselves were not exported.
neo4j-organization
published 2.2.1 •

Changelog

Source

2.2.1

Patch Changes

  • #490 98694cb Thanks @angrykoala! - Add support for WITH HEADERS in LoadCSV:

    new Cypher.LoadCSV("https://data.neo4j.com/bands/artists.csv", new Cypher.Variable()).withHeaders();
    
    LOAD CSV WITH HEADERS FROM \\"https://data.neo4j.com/bands/artists.csv\\" AS var0
    
neo4j-organization
published 2.2.0 •

Changelog

Source

2.2.0

Minor Changes

  • #477 8723c78 Thanks @angrykoala! - Add support for trim expressions in trim:

    Cypher.trim("BOTH", new Cypher.Literal("x"), new Cypher.Literal("xxxhelloxxx"));
    
    trim(BOTH "x" FROM "xxxhelloxxx")
    

Patch Changes

  • #482 85ff6e0 Thanks @angrykoala! - Deprecate Foreach extra constructor parameters in favor of methods in and do:

    Before:

    new Cypher.Foreach(variable, list, createMovie);
    

    Now:

    new Cypher.Foreach(variable).in(list).do(createMovie);
    
  • #482 85ff6e0 Thanks @angrykoala! - Add support for chaining FOREACH after MATCH with .foreach

neo4j-organization
published 2.1.0 •

Changelog

Source

2.1.0

Minor Changes

  • #471 1c671f1 Thanks @angrykoala! - Add support for dynamic labels by passing an expression to node.label:

    new Cypher.Match(new Cypher.Pattern(movie)).set(movie.label(Cypher.labels(anotherNode)));
    
    MATCH (this0)
    SET
        this0:$(labels(this1))
    

Patch Changes

  • #476 79e1e87 Thanks @angrykoala! - Escapes variables using the following reserved words (case insensitive):

    • where
    • is
    • contains
    • in

    For example:

    new Cypher.NamedVariable("Where").property("title");
    

    Generates the following Cypher

    `Where`.title
    
neo4j-organization
published 2.0.2 •

Changelog

Source

2.0.2

Patch Changes

  • #463 57a3f9c Thanks @angrykoala! - Fix order of set remove subclauses. The generated cypher will now maintain the order of multiple SET and REMOVE statements.

    For example:

    const matchQuery = new Cypher.Match(new Cypher.Pattern(personNode, { labels: ["Person"] }))
        .where(personNode, { name: nameParam })
        .set([personNode.property("name"), evilKeanu])
        .remove(personNode.property("anotherName"))
        .set([personNode.property("anotherName"), new Cypher.Param(nameParam)])
        .set([personNode.property("oldName"), new Cypher.Param(nameParam)])
        .return(personNode);
    

    Before

    MATCH (this0:Person)
    WHERE this0.name = $param0
    SET
        this0.name = $param1
        this0.anotherName = $param2,
        this0.oldName = $param3
    REMOVE this0.anotherName
    RETURN this0
    

    After

    MATCH (this0:Person)
    WHERE this0.name = $param0
    SET
        this0.name = $param1
    REMOVE this0.anotherName
    SET
        this0.anotherName = $param2,
        this0.oldName = $param3
    RETURN this0
    
neo4j-organization
published 2.0.1 •

Changelog

Source

2.0.1

Patch Changes

  • #457 85aa393 Thanks @angrykoala! - Fix types in Unwind to reflect its behaviour in Cypher:

    • Unwind without alias is not supported in Cypher.
    • Unwind does not support *
    • Unwind does not support multiple columns
neo4j-organization
published 2.0.0 •

Changelog

Source

2.0.0

Major Changes

  • #389 88f4928 Thanks @angrykoala! - Patterns no longer create a variable by default

    const pattern = new Cypher.Pattern();
    

    Before:

    (this0)
    

    Now:

    ()
    
  • #390 038d8b5 Thanks @angrykoala! - Clause build options are now passed as an object rather than parameters:

    myClause.build({
        prefix: "another-this",
        extraParams: {
            myParam: "hello",
        },
        labelOperator: "&",
    });
    

    All parameters are optional, and build can still be called without parameters

  • #389 f5135f5 Thanks @angrykoala! - Remove support for adding new columns into an existing with clause with .with, the method addColumns should be used instead

  • #408 bba9d81 Thanks @angrykoala! - Escape literal strings if they contain invalid characters:

    new Cypher.Literal(`Hello "World"`);
    

    Would get translated into the following Cypher:

    "Hello \"World\""
    
  • #409 adf599f Thanks @angrykoala! - Cypher.Raw no longer exposes Cypher.Environment variable. It provides a CypherRawContext instance with a compile method to compile nested elements in custom cypher instead

  • #407 88a300a Thanks @angrykoala! - Remove method Cypher.concat, Cypher.utils.concat should be used instead

  • #447 b82be57 Thanks @angrykoala! - Remove Path and NamedPath in favor of PathVariable and NamedPathVariable

  • #389 f5135f5 Thanks @angrykoala! - Removes the following deprecated features:

    • pointDistance
    • utils.compileCypher
    • RawCypher
    • onCreate method in Merge clauses
    • innerWith method in Call clauses
    • PatternComprehension second parameter
    • cdc namespace:
      • cdc.current
      • cdc.earliest
      • cdc.query
    • rTrim and lTrim
    • Pattern.withoutLabels
    • Pattern.withoutVariable
    • Pattern.withProperties
    • Pattern.withVariables
    • Pattern.related().withoutType
    • Pattern.related().withDirection
    • Pattern.related().withLength
    • Pattern.related().getVariables
    • Relationship.type
    • Labels, types and properties in Node and Relationship classes
    • Using Node directly in constructor of clauses
  • #453 f8a8120 Thanks @angrykoala! - Remove support for fine-grained prefix configuration

    No longer supported:

    myClause.build({
        variable: "var_prefix_",
        params: "param_prefix_",
    });
    
  • #410 961933f Thanks @angrykoala! - Removes previous argument from Pattern constructor. This argument was never meant to be used externally and now it is not accessible

  • #391 d416ee6 Thanks @angrykoala! - Fix TypeScript typings for boolean operators when using array spread:

    • Cypher.and
    • Cypher.or
    • Cypher.xor

    The following:

    const predicates: Cypher.Predicate[] = [];
    const andPredicate = Cypher.and(...predicates);
    

    Will now return the correct type Cypher.Predicate | undefined. This change means that additional checks may be needed when using boolean operators:

    const predicates = [Cypher.true, Cypher.false];
    const andPredicate = Cypher.and(...predicates); // type Cypher.Predicate | undefined
    

    Passing parameters without spread will still return a defined type

  • #447 b82be57 Thanks @angrykoala! - Remove assignToPath method from clauses, in favor of assignTo in Patterns for the following clauses:

    • Match
    • Merge
    • Create

    Before:

    new Cypher.Match(pattern).assignToPath(pathVariable).return(pathVariable);
    

    Now:

    new Cypher.Match(pattern.assignTo(pathVariable)).return(pathVariable);
    

    Generates the Cypher:

    MATCH p = ()-[]-()
    RETURN p
    

Patch Changes

neo4j-organization
published 1.22.4 •

Changelog

Source

1.22.4

Patch Changes

  • #451 e0d7f4b Thanks @angrykoala! - Deprecates CypherEnvironment exported types in favor of RawCypherContext for usage in Cypher.Raw
neo4j-organization
published 1.22.3 •

Changelog

Source

1.22.3

Patch Changes

  • #444 be3c49e Thanks @angrykoala! - Deprecate assignToPath in clauses in favor of assignTo in Pattern

    Before:

    new Cypher.Match(pattern).assignToPath(path).return(path);
    

    Now:

    new Cypher.Match(pattern.assignTo(path)).return(path);
    

    Generates the Cypher:

    MATCH p = ()-[]-()
    RETURN p
    
  • #444 0a5bf6c Thanks @angrykoala! - Deprecate Cypher.Path and Cypher.NamedPath in favor of Cypher.PathVariable and Cypher.NamedPathVariable respectively

23
8
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