UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

25 lines (24 loc) 732 B
"use strict"; /* * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Exists = void 0; const pad_block_1 = require("../../utils/pad-block"); const Subquery_1 = require("./Subquery"); /** * @see {@link https://neo4j.com/docs/cypher-manual/current/syntax/expressions/#existential-subqueries | Cypher Documentation} * @group Subqueries */ class Exists extends Subquery_1.Subquery { /** * @internal */ getCypher(env) { const subQueryStr = this.subquery.getCypher(env); const paddedSubQuery = (0, pad_block_1.padBlock)(subQueryStr); return `EXISTS {\n${paddedSubQuery}\n}`; } } exports.Exists = Exists;