Class ExpressionSubquery
java.lang.Object
io.github.torand.fastersql.subquery.ExpressionSubquery
- All Implemented Interfaces:
Expression
,Projection
,Sql
,Subquery
Implements a subquery to be used as projection or as operand for a predicate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalias()
Gets the column alias (label) assigned for this projection.Gets the column aliases referenced by this fragment.Assigns a column alias (label) for this projection.Gets the columns referenced by this fragment.Gets the statement parameters introduced by this fragment.query()
Gets the SELECT statement of this subquery.Formats object as an SQL fragment.
-
Constructor Details
-
ExpressionSubquery
Creates an expression subquery.- Parameters:
query
- the query.
-
-
Method Details
-
sql
Description copied from interface:Sql
Formats object as an SQL fragment. -
params
Description copied from interface:Sql
Gets the statement parameters introduced by this fragment. -
columnRefs
Description copied from interface:Sql
Gets the columns referenced by this fragment. For validation purposes.- Specified by:
columnRefs
in interfaceSql
- Returns:
- the columns referenced by this fragment.
-
aliasRefs
Description copied from interface:Sql
Gets the column aliases referenced by this fragment. For validation purposes. -
query
Description copied from interface:Subquery
Gets the SELECT statement of this subquery. -
as
Description copied from interface:Projection
Assigns a column alias (label) for this projection.- Specified by:
as
in interfaceProjection
- Parameters:
alias
- the column alias or label.- Returns:
- the projection with specified alias assigned.
-
alias
Description copied from interface:Projection
Gets the column alias (label) assigned for this projection.- Specified by:
alias
in interfaceProjection
- Returns:
- the column alias (label) assigned for this projection.
-