UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

39 lines (38 loc) 1.1 kB
"use strict"; /* * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WithDistinctAll = void 0; const Mixin_1 = require("./Mixin"); var ProjectionMode; (function (ProjectionMode) { ProjectionMode[ProjectionMode["ALL"] = 0] = "ALL"; ProjectionMode[ProjectionMode["DISTINCT"] = 1] = "DISTINCT"; })(ProjectionMode || (ProjectionMode = {})); class WithDistinctAll extends Mixin_1.Mixin { projectionMode; distinct() { this.projectionMode = ProjectionMode.DISTINCT; return this; } /** Explicitly project all values bound to a variable * @since Neo4j 2025.06 */ all() { this.projectionMode = ProjectionMode.ALL; return this; } projectionModeStr() { switch (this.projectionMode) { case ProjectionMode.ALL: return " ALL"; case ProjectionMode.DISTINCT: return " DISTINCT"; default: return ""; } } } exports.WithDistinctAll = WithDistinctAll;