Package com.github.eikecochu.sqlbuilder
Class Join
- java.lang.Object
-
- com.github.eikecochu.sqlbuilder.QueryPartImpl<T>
-
- com.github.eikecochu.sqlbuilder.Conditionable<Join>
-
- com.github.eikecochu.sqlbuilder.Join
-
- All Implemented Interfaces:
BeforeGroupBy,BeforeJoin,BeforeOrderBy,BeforeUnion,BeforeWhere,QueryBuilder,QueryPart
public class Join extends Conditionable<Join> implements QueryBuilder, BeforeJoin, BeforeWhere, BeforeGroupBy, BeforeOrderBy, BeforeUnion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJoin.JoinMode-
Nested classes/interfaces inherited from class com.github.eikecochu.sqlbuilder.Conditionable
Conditionable.Operator
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJoin(BeforeJoin parent)protectedJoin(BeforeJoin parent, Join.JoinMode joinMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Conditionable<Join>on()Set join conditionsjava.lang.Stringstring(QueryOptions options)Transforms this statement into an SQL stringJoinsubquery(Query query, java.lang.String name)Add a subquery as join targetJointable(java.lang.String name)Join to a table by name-
Methods inherited from class com.github.eikecochu.sqlbuilder.Conditionable
and, col, col, col, group, groupStart, or, values
-
Methods inherited from class com.github.eikecochu.sqlbuilder.QueryPartImpl
ext, parent, sql
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeGroupBy
groupBy, groupBy, groupBy, groupBySQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeJoin
crossJoin, crossJoin, crossJoin, fullOuterJoin, fullOuterJoin, fullOuterJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, joinSQL, leftJoin, leftJoin, leftJoin, leftOuterJoin, leftOuterJoin, leftOuterJoin, outerJoin, outerJoin, outerJoin, rightJoin, rightJoin, rightJoin, rightOuterJoin, rightOuterJoin, rightOuterJoin
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeOrderBy
orderBy, orderBy, orderBy, orderBySQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeUnion
union, union, unionAll, unionSQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeWhere
where, where, where, whereSQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.QueryBuilder
query
-
-
-
-
Constructor Detail
-
Join
protected Join(BeforeJoin parent)
-
Join
protected Join(BeforeJoin parent, Join.JoinMode joinMode)
-
-
Method Detail
-
subquery
public Join subquery(Query query, java.lang.String name)
Add a subquery as join target- Parameters:
query- The subquery to join toname- The name of the subquery- Returns:
- This JOIN statement
-
table
public Join table(java.lang.String name)
Join to a table by name- Parameters:
name- The name of the table to join to- Returns:
- This JOIN statement
-
on
public Conditionable<Join> on()
Set join conditions- Returns:
- The ON statement
-
string
public java.lang.String string(QueryOptions options)
Description copied from interface:QueryPartTransforms this statement into an SQL string- Specified by:
stringin interfaceQueryPart- Overrides:
stringin classConditionable<Join>- Parameters:
options- The QueryOptions to apply for transformation- Returns:
- The created SQL string
-
-