2.0.2 • Published 1 month ago

sgnm-cypher-builder v2.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

Cypher Builder

npm version Test Lint

Cypher Builder is a JavaScript programmatic API to create Cypher queries for Neo4j.

import Cypher from "@neo4j/cypher-builder";

const movieNode = new Cypher.Node({
    labels: ["Movie"],
});

const matchQuery = new Cypher.Match(movieNode)
    .where(movieNode, {
        title: new Cypher.Param("The Matrix"),
    })
    .return(movieNode.property("title"));

const { cypher, params } = matchQuery.build();

console.log(cypher);
console.log(params);

Cypher

MATCH (this0:Movie)
WHERE this0.title = $param0
RETURN this0.title

Params

{
    "param0": "The Matrix",
}

Examples

You can find usage examples in the examples folder.

This library is for JavaScript and TypeScript only. If you are using Java, check Neo4j Cypher DSL.

2.0.2

1 month ago

2.0.1

1 month ago

2.0.0

1 month ago

1.5.3

7 months ago

1.5.2

7 months ago

1.5.1

7 months ago