Module spring.data.relational
Class SimpleFunction
java.lang.Object
org.springframework.data.relational.core.sql.SimpleFunction
- All Implemented Interfaces:
Expression,Segment,Visitable
Simple function accepting one or more
Expressions.- Since:
- 1.1
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionExpose this function result under a columnalias.as(SqlIdentifier alias) Expose this function result under a columnalias.static SimpleFunctioncreate(String functionName, List<? extends Expression> expressions) booleaninthashCode()Generate a hash code from thisSegment.toString()Return a SQL string representation of thisSegment.voidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Method Details
-
create
- Parameters:
functionName- must not be null.expressions- zero or manyExpressions, must not be null.- Returns:
-
as
Expose this function result under a columnalias.- Parameters:
alias- column alias name, must not null or empty.- Returns:
- the aliased
SimpleFunction.
-
as
Expose this function result under a columnalias.- Parameters:
alias- column alias name, must not null.- Returns:
- the aliased
SimpleFunction. - Since:
- 2.0
-
getFunctionName
- Returns:
- the function name.
-
getExpressions
- Returns:
- the function arguments.
- Since:
- 2.0
-
toString
Description copied from interface:SegmentReturn a SQL string representation of thisSegment.The representation is intended for debugging purposes and an approximation to the generated SQL. While it might work in the context of a specific dialect, you should not assume that the
Segment.toString()representation works across multiple databases. -
visit
Description copied from interface:Visitable -
hashCode
public int hashCode()Description copied from interface:SegmentGenerate a hash code from thisSegment.Hashcode typically derives from the
Segment.toString()representation so twoSegments yield the sameSegment.hashCode()if theirSegment.toString()representation matches. -
equals
Description copied from interface:SegmentCheck whether thisSegmentis equal to anotherSegment.Equality is typically given if the
Segment.toString()representation matches.
-