Class TupleExpression
java.lang.Object
org.springframework.data.relational.core.sql.TupleExpression
- All Implemented Interfaces:
Expression, Segment, Visitable
A tuple as used for
IN predicates. For example:
WHERE (one, two) IN (select x, y from some_table)
- Since:
- 4.0
- Author:
- Jens Schauder
-
Method Summary
Modifier and TypeMethodDescriptionstatic TupleExpressioncreate(Collection<? extends Expression> expressions) Creates aTupleExpressionfrom the given expressions.static TupleExpressioncreate(Expression... expressions) Creates aTupleExpressionfrom the given expressions.booleaninthashCode()Generate a hash code from thisSegment.toString()Return a SQL string representation of thisSegment.void
-
Method Details
-
create
Creates aTupleExpressionfrom the given expressions.- Parameters:
expressions- must not be null or empty.- Returns:
- the new
TupleExpression.
-
create
Creates aTupleExpressionfrom the given expressions.- Parameters:
expressions- must not be null or empty.- Returns:
- the new
TupleExpression.
-
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
-
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.
-