@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
107 lines (106 loc) • 4.34 kB
TypeScript
import type { Expr } from "../../types";
import { CypherFunction } from "./CypherFunctions";
/** Temporal unit to be used in `.truncate()` functions
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-date-truncate | Cypher Documentation}
* @group Functions
* @category Temporal
*/
export type TemporalUnit = "millennium" | "century" | "decade" | "year" | "weekYear" | "quarter" | "month" | "week" | "day";
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-datetime | Cypher Documentation}
* @group Functions
* @category Temporal
*/
export declare function cypherDatetime(timezone?: Expr): CypherFunction;
export declare namespace cypherDatetime {
var fromepoch: (seconds: number | Expr, nanoseconds: number | Expr) => CypherFunction;
var fromepochmilis: (seconds: number | Expr, nanoseconds: number | Expr) => CypherFunction;
var realtime: (timezone?: Expr) => CypherFunction;
var statement: (timezone?: Expr) => CypherFunction;
var transaction: (timezone?: Expr) => CypherFunction;
var truncate: (unit: TemporalUnit, temporalInstantValue: Expr, mapOfComponentsTimezone?: Expr) => CypherFunction;
}
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-date | Cypher Documentation}
* @group Functions
* @category Temporal
* @example
*
* Date without parameters:
*
* ```ts
* Cypher.date()
* ```
*
* _Cypher:_
* ```cypher
* date()
* ```
*
* @example
* Date with parameters:
*
* ```ts
* Cypher.date(new Cypher.param('9999-01-01'))
* ```
*
* _Cypher:_
* ```cypher
* date($param1)
* ```
*/
export declare function cypherDate(timezone?: Expr): CypherFunction;
export declare namespace cypherDate {
var realtime: (timezone?: Expr) => CypherFunction;
var statement: (timezone?: Expr) => CypherFunction;
var transaction: (timezone?: Expr) => CypherFunction;
var truncate: (unit: TemporalUnit, temporalInstantValue: Expr, mapOfComponentsTimezone?: Expr) => CypherFunction;
}
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localdatetime | Cypher Documentation}
* @group Functions
* @category Temporal
*/
export declare function cypherLocalDatetime(timezone?: Expr): CypherFunction;
export declare namespace cypherLocalDatetime {
var realtime: (timezone?: Expr) => CypherFunction;
var statement: (timezone?: Expr) => CypherFunction;
var transaction: (timezone?: Expr) => CypherFunction;
var truncate: (unit: TemporalUnit, temporalInstantValue: Expr, mapOfComponentsTimezone?: Expr) => CypherFunction;
}
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localtime | Cypher Documentation}
* @group Functions
* @category Temporal
*/
export declare function cypherLocalTime(timezone?: Expr): CypherFunction;
export declare namespace cypherLocalTime {
var realtime: (timezone?: Expr) => CypherFunction;
var statement: (timezone?: Expr) => CypherFunction;
var transaction: (timezone?: Expr) => CypherFunction;
var truncate: (unit: TemporalUnit, temporalInstantValue: Expr, mapOfComponentsTimezone?: Expr) => CypherFunction;
}
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-time | Cypher Documentation}
* @group Functions
* @category Temporal
*/
export declare function cypherTime(timezone?: Expr): CypherFunction;
export declare namespace cypherTime {
var realtime: (timezone?: Expr) => CypherFunction;
var statement: (timezone?: Expr) => CypherFunction;
var transaction: (timezone?: Expr) => CypherFunction;
var truncate: (unit: TemporalUnit, temporalInstantValue: Expr, mapOfComponentsTimezone?: Expr) => CypherFunction;
}
/**
* @see {@link https://neo4j.com/docs/cypher-manual/current/functions/temporal/duration | Cypher Documentation}
* @group Functions
* @category Temporal
*/
export declare function duration(components: Expr): CypherFunction;
export declare namespace duration {
var between: (instant1: Expr, instant2: Expr) => CypherFunction;
var inMonths: (instant1: Expr, instant2: Expr) => CypherFunction;
var inDays: (instant1: Expr, instant2: Expr) => CypherFunction;
var inSeconds: (instant1: Expr, instant2: Expr) => CypherFunction;
}