@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
183 lines (182 loc) • 8.01 kB
TypeScript
import type { Expr } from "../../Cypher";
import { CypherFunction } from "./CypherFunctions";
/** Returns the absolute value of an `INTEGER` or `FLOAT`
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-abs | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function abs(expr: Expr): CypherFunction;
/** Returns the smallest FLOAT that is greater than or equal to a number and equal to an `INTEGER`
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-ceil | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function ceil(expr: Expr): CypherFunction;
/** Returns the largest `FLOAT` that is less than or equal to a number and equal to an `INTEGER`
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-floor | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function floor(expr: Expr): CypherFunction;
/** Returns whether the given `INTEGER` or `FLOAT` is `NaN`
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-isnan | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function cypherIsNaN(expr: Expr): CypherFunction;
/** Returns a random `FLOAT` in the range from 0 (inclusive) to 1 (exclusive)
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-rand | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function rand(): CypherFunction;
/** Precision mode for `Cypher.round()`
* @group Functions
* @category Math
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-round3 | Cypher Documentation}
* @see {@link round}
*/
export type ROUND_PRECISION_MODE = "UP" | "DOWN" | "CEILING" | "FLOOR" | "HALF_UP" | "HALF_DOWN" | "HALF_EVEN";
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-round | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function round(expr: Expr, precision?: Expr | number, mode?: ROUND_PRECISION_MODE): CypherFunction;
/** Returns the signum of an `INTEGER` or `FLOAT`: 0 if the number is 0, -1 for any negative number, and 1 for any positive number
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-sign | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function sign(expr: Expr): CypherFunction;
/** Cypher function `e()` that returns the returns the base of the natural logarithm.
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-logarithmic/#functions-e | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function e(): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-logarithmic/#functions-exp | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function exp(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-logarithmic/#functions-log | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function log(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-logarithmic/#functions-log10 | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function log10(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-logarithmic/#functions-sqrt | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function sqrt(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-acos | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function acos(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-asin | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function asin(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-atan | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function atan(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-atan2 | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function atan2(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-cos | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function cos(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-cot | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function cot(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-degrees | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function degrees(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-haversin | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function haversin(expr: Expr): CypherFunction;
/** 3.141592653589793
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-pi | Cypher Documentation}
* @see https://www.piday.org/
* @group Functions
* @category Math
*/
export declare function pi(): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-radians | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function radians(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-sin | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function sin(expr: Expr): CypherFunction;
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/#functions-tan | Cypher Documentation}
* @group Functions
* @category Math
*/
export declare function tan(expr: Expr): CypherFunction;
/** Returns the hyperbolic cosine
* @see {@link https://neo4j.com/docs/cypher-manual/25/functions/mathematical-trigonometric/#functions-cosh | Cypher Documentation}
* @group Functions
* @category Math
* @since Neo4j 2025.06
*/
export declare function cosh(expr: Expr): CypherFunction;
/** Returns the hyperbolic cotangent
* @see {@link https://neo4j.com/docs/cypher-manual/25/functions/mathematical-trigonometric/#functions-coth | Cypher Documentation}
* @group Functions
* @category Math
* @since Neo4j 2025.06
*/
export declare function coth(expr: Expr): CypherFunction;
/** Returns the hyperbolic sine
* @see {@link https://neo4j.com/docs/cypher-manual/25/functions/mathematical-trigonometric/#functions-sinh | Cypher Documentation}
* @group Functions
* @category Math
* @since Neo4j 2025.06
*/
export declare function sinh(expr: Expr): CypherFunction;
/** Returns the hyperbolic tangent
* @see {@link https://neo4j.com/docs/cypher-manual/25/functions/mathematical-trigonometric/#functions-tanh | Cypher Documentation}
* @group Functions
* @category Math
* @since Neo4j 2025.06
*/
export declare function tanh(expr: Expr): CypherFunction;