# sgnm-cypher-builder

> A programmatic API for building Cypher queries for Neo4j

Latest version **2.0.4** (published 2024-11-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install sgnm-cypher-builder
pnpm add sgnm-cypher-builder
yarn add sgnm-cypher-builder
bun add sgnm-cypher-builder
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2024-11-20 |
| First published | 2023-10-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 380 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Neo4j Inc. |
| Maintainers | hadializade77, mustafadurmaz |
| Keywords | neo4j, cypher, query, builder |

## Links

- npm: https://www.npmjs.com/package/sgnm-cypher-builder
- Repository: https://github.com/HadiAlizade77/cypher-builder-fork-with-internal-id
- Homepage: https://neo4j.github.io/cypher-builder/
- Issues: https://github.com/neo4j/cypher-builder/issues
- npm.io page: https://npm.io/package/sgnm-cypher-builder

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 2.0.4 (latest) — 2024-11-20
- 2.0.3 — 2024-11-20
- 2.0.2 — 2024-04-18
- 2.0.1 — 2024-04-18
- 2.0.0 — 2024-04-17
- 1.5.3 — 2023-10-30
- 1.5.2 — 2023-10-13
- 1.5.1 — 2023-10-10

## README

# Cypher Builder

[![npm version](https://badge.fury.io/js/@neo4j%2Fcypher-builder.svg)](https://www.npmjs.com/package/@neo4j/cypher-builder)
[![Test](https://github.com/neo4j/cypher-builder/actions/workflows/test.yml/badge.svg)](https://github.com/neo4j/cypher-builder/actions/workflows/test.yml)
[![Lint](https://github.com/neo4j/cypher-builder/actions/workflows/lint.yml/badge.svg)](https://github.com/neo4j/cypher-builder/actions/workflows/lint.yml)

Cypher Builder is a JavaScript programmatic API to create [Cypher](https://neo4j.com/docs/cypher-manual/current/) queries for [Neo4j](https://neo4j.com/).

-   [Documentation](https://neo4j.github.io/cypher-builder/cypher-builder/current/)
-   [Discussions](https://github.com/neo4j/cypher-builder/discussions)

```typescript
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_

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

_Params_

```typescript
{
    "param0": "The Matrix",
}
```

# Examples

You can find usage examples in the [examples](https://github.com/neo4j/cypher-builder/tree/main/examples) folder.

> This library is for JavaScript and TypeScript only. If you are using Java, check [Neo4j Cypher DSL](https://neo4j-contrib.github.io/cypher-dsl).

---
_Source: https://npm.io/package/sgnm-cypher-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
