UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

29 lines (28 loc) 743 B
"use strict"; /* * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Use = void 0; const Clause_1 = require("./Clause"); /** * @see {@link https://neo4j.com/docs/cypher-manual/5/clauses/use/ | Cypher Documentation} * @group Clauses */ class Use extends Clause_1.Clause { graph; subClause; constructor(graph, subClause) { super(); this.subClause = subClause.getRoot(); this.graph = graph; this.addChildren(this.subClause); } /** @internal */ getCypher(env) { const subClauseStr = this.subClause.getCypher(env); return `USE ${this.graph}\n${subClauseStr}`; } } exports.Use = Use;