@neo4j/cypher-builder
Advanced tools
Comparing version 1.12.0 to 1.13.0
@@ -24,2 +24,3 @@ export { Call } from "./clauses/Call"; | ||
export { CypherTypes as TYPE, isNotType, isType } from "./expressions/IsType"; | ||
export { Collect } from "./expressions/subquery/Collect"; | ||
export { Count } from "./expressions/subquery/Count"; | ||
@@ -26,0 +27,0 @@ export { Exists } from "./expressions/subquery/Exists"; |
@@ -47,5 +47,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.endsWith = exports.contains = exports.xor = exports.or = exports.not = exports.and = exports.MapProjection = exports.Map = exports.PatternComprehension = exports.List = exports.ListComprehension = exports.cdc = exports.apoc = exports.Exists = exports.Count = exports.isType = exports.isNotType = exports.TYPE = exports.Case = exports.Variable = exports.NamedVariable = exports.Relationship = exports.NamedRelationship = exports.Property = exports.Path = exports.NamedPath = exports.Param = exports.NamedParam = exports.Node = exports.NamedNode = exports.true = exports.false = exports.Null = exports.Literal = exports.Pattern = exports.labelExpr = exports.concat = exports.With = exports.Use = exports.Unwind = exports.Union = exports.Return = exports.RawCypher = exports.Raw = exports.Merge = exports.OptionalMatch = exports.Match = exports.Foreach = exports.Create = exports.Call = void 0; | ||
exports.sign = exports.round = exports.rand = exports.radians = exports.pi = exports.log10 = exports.log = exports.isNaN = exports.haversin = exports.floor = exports.exp = exports.e = exports.degrees = exports.cot = exports.cos = exports.ceil = exports.atan2 = exports.atan = exports.asin = exports.acos = exports.abs = exports.graph = exports.sum = exports.stDevP = exports.stDev = exports.percentileDisc = exports.percentileCont = exports.min = exports.max = exports.count = exports.collect = exports.avg = exports.Function = exports.pow = exports.plus = exports.multiply = exports.mod = exports.minus = exports.divide = exports.startsWith = exports.neq = exports.matches = exports.lte = exports.lt = exports.isNull = exports.isNotNull = exports.in = exports.gte = exports.gt = exports.eq = void 0; | ||
exports.utils = exports.db = exports.VoidProcedure = exports.Procedure = exports.single = exports.none = exports.isEmpty = exports.exists = exports.any = exports.all = exports.time = exports.localtime = exports.localdatetime = exports.duration = exports.datetime = exports.date = exports.tan = exports.sqrt = exports.sin = void 0; | ||
exports.contains = exports.xor = exports.or = exports.not = exports.and = exports.MapProjection = exports.Map = exports.PatternComprehension = exports.List = exports.ListComprehension = exports.cdc = exports.apoc = exports.Exists = exports.Count = exports.Collect = exports.isType = exports.isNotType = exports.TYPE = exports.Case = exports.Variable = exports.NamedVariable = exports.Relationship = exports.NamedRelationship = exports.Property = exports.Path = exports.NamedPath = exports.Param = exports.NamedParam = exports.Node = exports.NamedNode = exports.true = exports.false = exports.Null = exports.Literal = exports.Pattern = exports.labelExpr = exports.concat = exports.With = exports.Use = exports.Unwind = exports.Union = exports.Return = exports.RawCypher = exports.Raw = exports.Merge = exports.OptionalMatch = exports.Match = exports.Foreach = exports.Create = exports.Call = void 0; | ||
exports.round = exports.rand = exports.radians = exports.pi = exports.log10 = exports.log = exports.isNaN = exports.haversin = exports.floor = exports.exp = exports.e = exports.degrees = exports.cot = exports.cos = exports.ceil = exports.atan2 = exports.atan = exports.asin = exports.acos = exports.abs = exports.graph = exports.sum = exports.stDevP = exports.stDev = exports.percentileDisc = exports.percentileCont = exports.min = exports.max = exports.count = exports.collect = exports.avg = exports.Function = exports.pow = exports.plus = exports.multiply = exports.mod = exports.minus = exports.divide = exports.startsWith = exports.neq = exports.matches = exports.lte = exports.lt = exports.isNull = exports.isNotNull = exports.in = exports.gte = exports.gt = exports.eq = exports.endsWith = void 0; | ||
exports.utils = exports.db = exports.VoidProcedure = exports.Procedure = exports.single = exports.none = exports.isEmpty = exports.exists = exports.any = exports.all = exports.time = exports.localtime = exports.localdatetime = exports.duration = exports.datetime = exports.date = exports.tan = exports.sqrt = exports.sin = exports.sign = void 0; | ||
// Clauses | ||
@@ -113,2 +113,5 @@ var Call_1 = require("./clauses/Call"); | ||
Object.defineProperty(exports, "isType", { enumerable: true, get: function () { return IsType_1.isType; } }); | ||
// Subquery Expressions | ||
var Collect_1 = require("./expressions/subquery/Collect"); | ||
Object.defineProperty(exports, "Collect", { enumerable: true, get: function () { return Collect_1.Collect; } }); | ||
var Count_1 = require("./expressions/subquery/Count"); | ||
@@ -115,0 +118,0 @@ Object.defineProperty(exports, "Count", { enumerable: true, get: function () { return Count_1.Count; } }); |
import type { CypherEnvironment } from "../../Environment"; | ||
import type { Clause } from "../../clauses/Clause"; | ||
import { CypherASTNode } from "../../CypherASTNode"; | ||
import { Subquery } from "./Subquery"; | ||
/** COUNT subquery expression | ||
@@ -8,5 +7,3 @@ * @see [Cypher Documentation](https://neo4j.com/docs/cypher-manual/current/syntax/expressions/#count-subqueries) | ||
*/ | ||
export declare class Count extends CypherASTNode { | ||
private subQuery; | ||
constructor(subQuery: Clause); | ||
export declare class Count extends Subquery { | ||
/** | ||
@@ -13,0 +10,0 @@ * @internal |
@@ -22,4 +22,4 @@ "use strict"; | ||
exports.Count = void 0; | ||
const CypherASTNode_1 = require("../../CypherASTNode"); | ||
const pad_block_1 = require("../../utils/pad-block"); | ||
const Subquery_1 = require("./Subquery"); | ||
/** COUNT subquery expression | ||
@@ -29,9 +29,3 @@ * @see [Cypher Documentation](https://neo4j.com/docs/cypher-manual/current/syntax/expressions/#count-subqueries) | ||
*/ | ||
class Count extends CypherASTNode_1.CypherASTNode { | ||
constructor(subQuery) { | ||
super(); | ||
const rootQuery = subQuery.getRoot(); | ||
this.addChildren(rootQuery); | ||
this.subQuery = rootQuery; | ||
} | ||
class Count extends Subquery_1.Subquery { | ||
/** | ||
@@ -41,3 +35,3 @@ * @internal | ||
getCypher(env) { | ||
const subQueryStr = this.subQuery.getCypher(env); | ||
const subQueryStr = this.subquery.getCypher(env); | ||
const paddedSubQuery = (0, pad_block_1.padBlock)(subQueryStr); | ||
@@ -44,0 +38,0 @@ return `COUNT {\n${paddedSubQuery}\n}`; |
import type { CypherEnvironment } from "../../Environment"; | ||
import type { Clause } from "../../clauses/Clause"; | ||
import { CypherASTNode } from "../../CypherASTNode"; | ||
import { Subquery } from "./Subquery"; | ||
/** | ||
@@ -8,5 +7,3 @@ * @see [Cypher Documentation](https://neo4j.com/docs/cypher-manual/current/syntax/expressions/#existential-subqueries) | ||
*/ | ||
export declare class Exists extends CypherASTNode { | ||
private subQuery; | ||
constructor(subQuery: Clause); | ||
export declare class Exists extends Subquery { | ||
/** | ||
@@ -13,0 +10,0 @@ * @internal |
@@ -22,4 +22,4 @@ "use strict"; | ||
exports.Exists = void 0; | ||
const CypherASTNode_1 = require("../../CypherASTNode"); | ||
const pad_block_1 = require("../../utils/pad-block"); | ||
const Subquery_1 = require("./Subquery"); | ||
/** | ||
@@ -29,9 +29,3 @@ * @see [Cypher Documentation](https://neo4j.com/docs/cypher-manual/current/syntax/expressions/#existential-subqueries) | ||
*/ | ||
class Exists extends CypherASTNode_1.CypherASTNode { | ||
constructor(subQuery) { | ||
super(); | ||
const rootQuery = subQuery.getRoot(); | ||
this.addChildren(rootQuery); | ||
this.subQuery = rootQuery; | ||
} | ||
class Exists extends Subquery_1.Subquery { | ||
/** | ||
@@ -41,3 +35,3 @@ * @internal | ||
getCypher(env) { | ||
const subQueryStr = this.subQuery.getCypher(env); | ||
const subQueryStr = this.subquery.getCypher(env); | ||
const paddedSubQuery = (0, pad_block_1.padBlock)(subQueryStr); | ||
@@ -44,0 +38,0 @@ return `EXISTS {\n${paddedSubQuery}\n}`; |
@@ -17,2 +17,3 @@ import type { Raw, RawCypher } from "."; | ||
import type { MathOp } from "./expressions/operations/math"; | ||
import type { Collect } from "./expressions/subquery/Collect"; | ||
import type { Count } from "./expressions/subquery/Count"; | ||
@@ -27,3 +28,3 @@ import type { Exists } from "./expressions/subquery/Exists"; | ||
*/ | ||
export type Expr = Operation | Variable | Literal | PropertyRef | CypherFunction | Predicate | ListComprehension | PatternComprehension | MapExpr | MapProjection | ListExpr | ListIndex | Case<ComparisonOp>; | ||
export type Expr = Operation | Variable | Literal | PropertyRef | CypherFunction | Predicate | ListComprehension | PatternComprehension | MapExpr | MapProjection | ListExpr | ListIndex | Case<ComparisonOp> | Collect; | ||
/** Represents a predicate statement (i.e returns a boolean). Note that Raw is only added for compatibility */ | ||
@@ -30,0 +31,0 @@ export type Predicate = BooleanOp | ComparisonOp | Raw | RawCypher | Exists | Count | PredicateFunction | Literal<boolean> | Case | HasLabel | IsType; |
{ | ||
"name": "@neo4j/cypher-builder", | ||
"version": "1.12.0", | ||
"version": "1.13.0", | ||
"description": "A programmatic API for building Cypher queries for Neo4j", | ||
@@ -5,0 +5,0 @@ "exports": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
410927
217
10059