Class InlineQuery
FROM
or JOIN
clauses.
Renders to: (>SELECT<) AS >ALIAS<
in a from or join clause, and to >ALIAS<
when
used in an expression.
Note that this does not implement Aliased
because the Alias is not optional but required and therefore more
like a name although the SQL term is "alias".
- Since:
- 2.3
- Author:
- Jens Schauder
-
Method Summary
Modifier and TypeMethodDescriptionstatic InlineQuery
Creates a newInlineQuery
using analias
.static InlineQuery
create
(Select select, SqlIdentifier alias) Creates a newInlineQuery
using analias
.boolean
getName()
int
hashCode()
Generate a hash code from thisSegment
.toString()
Return a SQL string representation of thisSegment
.void
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.relational.core.sql.Segment
equals, hashCode
-
Method Details
-
create
Creates a newInlineQuery
using analias
.- Parameters:
select
- must not be null.alias
- must not be null or empty.- Returns:
- the new
InlineQuery
using thealias
.
-
create
Creates a newInlineQuery
using analias
.- Parameters:
select
- must not be null or empty.alias
- must not be null or empty.- Returns:
- the new
InlineQuery
using thealias
.
-
getName
-
getReferenceName
- Specified by:
getReferenceName
in interfaceTableLike
- Returns:
- the table name as it is used in references. This can be the actual
name
or analias
.
-
toString
Description copied from interface:Segment
Return 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:Segment
Generate a hash code from thisSegment
.Hashcode typically derives from the
Segment.toString()
representation so twoSegment
s yield the sameSegment.hashCode()
if theirSegment.toString()
representation matches. -
equals
Description copied from interface:Segment
Check whether thisSegment
is equal to anotherSegment
.Equality is typically given if the
Segment.toString()
representation matches.
-