Package org.neo4j.cypherdsl.core
Class Functions
- java.lang.Object
-
- org.neo4j.cypherdsl.core.Functions
-
@API(status=EXPERIMENTAL, since="1.0") public final class Functions extends java.lang.ObjectFactory methods for creating instances offunctions.- Since:
- 1.0
- Author:
- Michael J. Simons, Gerrit Meier, Romain Rossi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FunctionInvocationavg(Expression expression)Creates a function invocation for theavg()function.static FunctionInvocationcoalesce(Expression... expressions)Creates a function invocation for thecoalesce()function.static FunctionInvocationcollect(Expression expression)Creates a function invocation for thecollect()function.static FunctionInvocationcollect(Named variable)static FunctionInvocationcount(Expression expression)Creates a function invocation for thecount()function.static FunctionInvocationcount(Node node)static FunctionInvocationcountDistinct(Expression expression)Creates a function invocation for acount()function withDISTINCTadded.static FunctionInvocationcountDistinct(Node node)Creates a function invocation for acount()function withDISTINCTadded.static FunctionInvocationdistance(Expression point1, Expression point2)Creates a function invocation for thedistance()function.static FunctionInvocationexists(Expression expression)Creates a function invocation for theexists()function.static FunctionInvocationhead(Expression expression)Creates a function invocation for thehead()function.static FunctionInvocationid(Node node)Creates a function invocation forid{}.static FunctionInvocationid(Relationship relationship)Creates a function invocation forid{}.static FunctionInvocationlabels(Node node)Creates a function invocation forlabels{}.static FunctionInvocationlast(Expression expression)Creates a function invocation for thelast()function.static FunctionInvocationmax(Expression expression)Creates a function invocation for themax()function.static FunctionInvocationmin(Expression expression)Creates a function invocation for themin()function.static FunctionInvocationnodes(NamedPath path)Creates a function invocation fornodes{}.static FunctionInvocationpercentileCont(Expression expression, java.lang.Number percentile)Creates a function invocation for thepercentileCont()function.static FunctionInvocationpercentileDisc(Expression expression, java.lang.Number percentile)Creates a function invocation for thepercentileDisc()function.static FunctionInvocationpoint(MapExpression parameterMap)Creates a function invocation for thepoint()function.static FunctionInvocationrange(Expression start, Expression end)static FunctionInvocationrange(Expression start, Expression end, Expression step)Creates a function invocation for therange()function.static FunctionInvocationshortestPath(Relationship relationship)static FunctionInvocationsize(Expression expression)Creates a function invocation for thesize()function.static FunctionInvocationsize(RelationshipPattern pattern)Creates a function invocation for thesize()function.static FunctionInvocationstDev(Expression expression)Creates a function invocation for thestDev()function.static FunctionInvocationstDevP(Expression expression)Creates a function invocation for thestDevP()function.static FunctionInvocationsum(Expression expression)Creates a function invocation for thesum()function.static FunctionInvocationtoLower(Expression expression)Creates a function invocation for thetoLower()function.static FunctionInvocationtype(Relationship relationship)Creates a function invocation fortype{}.
-
-
-
Method Detail
-
id
public static FunctionInvocation id(Node node)
Creates a function invocation forid{}. See id.- Parameters:
node- The node for which the internal id should be retrieved- Returns:
- A function call for
id()on a node.
-
id
public static FunctionInvocation id(Relationship relationship)
Creates a function invocation forid{}. See id.- Parameters:
relationship- The relationship for which the internal id should be retrieved- Returns:
- A function call for
id()on a relationship.
-
labels
public static FunctionInvocation labels(Node node)
Creates a function invocation forlabels{}. See labels.- Parameters:
node- The node for which the labels should be retrieved- Returns:
- A function call for
labels()on a node.
-
type
public static FunctionInvocation type(Relationship relationship)
Creates a function invocation fortype{}. See type.- Parameters:
relationship- The relationship for which the type should be retrieved- Returns:
- A function call for
type()on a relationship.
-
count
public static FunctionInvocation count(Node node)
- Parameters:
node- The named node to be counted- Returns:
- A function call for
count()for one named node - See Also:
count(Expression)
-
count
public static FunctionInvocation count(Expression expression)
Creates a function invocation for thecount()function. See count.- Parameters:
expression- An expression describing the things to count.- Returns:
- A function call for
count()for an expression likeCypher.asterisk()etc.
-
countDistinct
public static FunctionInvocation countDistinct(Node node)
Creates a function invocation for acount()function withDISTINCTadded.- Parameters:
node- The named node to be counted- Returns:
- A function call for
count()for one named node - See Also:
countDistinct(Expression)
-
countDistinct
public static FunctionInvocation countDistinct(Expression expression)
- Parameters:
expression- An expression describing the things to count.- Returns:
- A function call for
count()for an expression likeCypher.asterisk()etc.
-
coalesce
public static FunctionInvocation coalesce(Expression... expressions)
Creates a function invocation for thecoalesce()function. See coalesce.- Parameters:
expressions- One or more expressions to be coalesced- Returns:
- A function call for
coalesce.
-
toLower
public static FunctionInvocation toLower(Expression expression)
Creates a function invocation for thetoLower()function. See toLower.- Parameters:
expression- An expression resolving to a string- Returns:
- A function call for
toLower()for one expression
-
size
public static FunctionInvocation size(Expression expression)
- Parameters:
expression- The expression who's size is to be returned- Returns:
- A function call for
size()for one expression
-
size
public static FunctionInvocation size(RelationshipPattern pattern)
Creates a function invocation for thesize()function.sizecan be applied to- Parameters:
pattern- The pattern for whichsize()should be invoked.- Returns:
- A function call for
size()for a pattern
-
exists
public static FunctionInvocation exists(Expression expression)
Creates a function invocation for theexists()function. See exists.- Parameters:
expression- The expression who's existence is to be evaluated- Returns:
- A function call for
exists()for one expression
-
distance
public static FunctionInvocation distance(Expression point1, Expression point2)
Creates a function invocation for thedistance()function. See exists. Both points need to be in the same coordinate system.- Parameters:
point1- Point 1point2- Point 2- Returns:
- A function call for
distance()
-
point
public static FunctionInvocation point(MapExpression parameterMap)
Creates a function invocation for thepoint()function. See point.- Parameters:
parameterMap- The map of parameters forpoint()- Returns:
- A function call for
point()
-
avg
public static FunctionInvocation avg(Expression expression)
Creates a function invocation for theavg()function. See avg.- Parameters:
expression- The things to average- Returns:
- A function call for
avg()
-
collect
public static FunctionInvocation collect(Named variable)
- Parameters:
variable- The named thing to collect- Returns:
- A function call for
collect() - See Also:
collect(Expression)
-
collect
public static FunctionInvocation collect(Expression expression)
Creates a function invocation for thecollect()function. See collect.- Parameters:
expression- The things to collect- Returns:
- A function call for
collect()
-
max
public static FunctionInvocation max(Expression expression)
Creates a function invocation for themax()function. See max.- Parameters:
expression- A list from which the maximum element value is returned- Returns:
- A function call for
max()
-
min
public static FunctionInvocation min(Expression expression)
Creates a function invocation for themin()function. See min.- Parameters:
expression- A list from which the minimum element value is returned- Returns:
- A function call for
min()
-
percentileCont
public static FunctionInvocation percentileCont(Expression expression, java.lang.Number percentile)
Creates a function invocation for thepercentileCont()function. See percentileCont.- Parameters:
expression- A numeric expressionpercentile- A numeric value between 0.0 and 1.0- Returns:
- A function call for
percentileCont()
-
percentileDisc
public static FunctionInvocation percentileDisc(Expression expression, java.lang.Number percentile)
Creates a function invocation for thepercentileDisc()function. See percentileDisc.- Parameters:
expression- A numeric expressionpercentile- A numeric value between 0.0 and 1.0- Returns:
- A function call for
percentileDisc()
-
stDev
public static FunctionInvocation stDev(Expression expression)
Creates a function invocation for thestDev()function. See stDev.- Parameters:
expression- A numeric expression- Returns:
- A function call for
stDev()
-
stDevP
public static FunctionInvocation stDevP(Expression expression)
Creates a function invocation for thestDevP()function. See stDevP.- Parameters:
expression- A numeric expression- Returns:
- A function call for
stDevP()
-
sum
public static FunctionInvocation sum(Expression expression)
Creates a function invocation for thesum()function. See sum.- Parameters:
expression- An expression returning a set of numeric values- Returns:
- A function call for
sum()
-
range
public static FunctionInvocation range(Expression start, Expression end)
- Parameters:
start- the range's startend- the range's end- Returns:
- A function call for
range() - See Also:
range(Expression, Expression, Expression)
-
range
public static FunctionInvocation range(Expression start, Expression end, Expression step)
Creates a function invocation for therange()function. See range.- Parameters:
start- the range's startend- the range's endstep- the range's step- Returns:
- A function call for
range()
-
head
public static FunctionInvocation head(Expression expression)
Creates a function invocation for thehead()function. See head.- Parameters:
expression- A list from which the head element is returned- Returns:
- A function call for
head()
-
last
public static FunctionInvocation last(Expression expression)
Creates a function invocation for thelast()function. See last.- Parameters:
expression- A list from which the last element is returned- Returns:
- A function call for
last()
-
nodes
public static FunctionInvocation nodes(NamedPath path)
Creates a function invocation fornodes{}. See labels.- Parameters:
path- The path for which the number of nodes should be retrieved- Returns:
- A function call for
nodes()on a node. - Since:
- 1.1
-
shortestPath
public static FunctionInvocation shortestPath(Relationship relationship)
-
-