Class FromClause
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.query.FromClause
-
public class FromClause extends java.lang.Object
The FromClause SQL definition
-
-
Constructor Summary
Constructors Constructor Description FromClause()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFrom(Select sub, Alias alias)
Add the sub-query as an item in the from listvoid
addInnerJoin(java.lang.String tableName, Alias alias, ExpNode joinOnPredicate)
Add an inner join clause to the FROM items listvoid
addInnerJoin(Select sub, Alias alias, ExpNode joinOnPredicate)
Add an inner join clause to the FROM items listvoid
addLeftOuterJoin(java.lang.String tableName, Alias alias, ExpNode joinOnPredicate)
Add a left outer join clause to the FROM items listvoid
addTable(java.lang.String tableName)
Add a table to the FROM items listvoid
addTable(java.lang.String schemaName, java.lang.String tableName)
Add a table without an alias.void
addTable(java.lang.String schemaName, java.lang.String tableName, Alias alias)
Add a qualified schema.table with an alias.void
addTable(java.lang.String tableName, Alias alias)
Add a table to the FROM items list<T> T
render(StatementRenderer<T> renderer)
Render this FROM clause using the given rendererjava.lang.String
toString()
-
-
-
Method Detail
-
addTable
public void addTable(java.lang.String schemaName, java.lang.String tableName)
Add a table without an alias. Tsk tsk.- Parameters:
schemaName
- the schema qualifier for the tabletableName
- the table name
-
addTable
public void addTable(java.lang.String schemaName, java.lang.String tableName, Alias alias)
Add a qualified schema.table with an alias.- Parameters:
schemaName
- the schema qualifier for the tabletableName
- the table namealias
- the alias to use in select expressions and join predicates
-
addTable
public void addTable(java.lang.String tableName, Alias alias)
Add a table to the FROM items list- Parameters:
tableName
-alias
-
-
addTable
public void addTable(java.lang.String tableName)
Add a table to the FROM items list- Parameters:
tableName
-alias
-
-
addFrom
public void addFrom(Select sub, Alias alias)
Add the sub-query as an item in the from list- Parameters:
sub
-alias
-
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
render
public <T> T render(StatementRenderer<T> renderer)
Render this FROM clause using the given renderer- Type Parameters:
T
-- Parameters:
renderer
-- Returns:
-
addInnerJoin
public void addInnerJoin(java.lang.String tableName, Alias alias, ExpNode joinOnPredicate)
Add an inner join clause to the FROM items list- Parameters:
tableName
-alias
-joinOnPredicate
-
-
addInnerJoin
public void addInnerJoin(Select sub, Alias alias, ExpNode joinOnPredicate)
Add an inner join clause to the FROM items list- Parameters:
sub
-alias
-joinOnPredicate
-
-
-