Class StringStatementRenderer
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.query.expression.StringStatementRenderer
-
- All Implemented Interfaces:
StatementRenderer<java.lang.String>
public class StringStatementRenderer extends java.lang.Object implements StatementRenderer<java.lang.String>
Helps to render a select statement as a string
-
-
Constructor Summary
Constructors Constructor Description StringStatementRenderer(IDatabaseTranslator translator, java.util.List<BindMarkerNode> collectBindMarkersInto, boolean pretty)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
alias(java.lang.String alias)
java.lang.String
from(java.util.List<FromItem> items)
java.lang.String
fromItem(java.lang.String subValue, java.lang.String aliasValue)
java.lang.String
fromItem(FromItem item)
Render the given itemjava.lang.String
fullOuterJoin(java.lang.String joinFromValue, java.lang.String joinOnValue)
java.lang.String
innerJoin(java.lang.String joinFromValue, java.lang.String joinOnValue)
java.lang.String
leftOuterJoin(java.lang.String joinFromValue, java.lang.String joinOnValue)
java.lang.String
render(ExpNode expression)
java.lang.String
rowSource(java.lang.String sub)
java.lang.String
rowSource(java.lang.String schemaName, java.lang.String tableName)
java.lang.String
select(java.util.List<With> withClauses, boolean distinct, SelectList selectList, FromClause fromClause, WhereClause whereClause, GroupByClause groupByClause, HavingClause havingClause, OrderByClause orderByClause, PaginationClause paginationClause, boolean unionAll, Select union)
Render the select statement using each of the components, some of which may be optional (null)java.lang.String
with(java.lang.String subSelect, java.lang.String aliasValue)
Render a WITH foo AS (select ...) clause
-
-
-
Constructor Detail
-
StringStatementRenderer
public StringStatementRenderer(IDatabaseTranslator translator, java.util.List<BindMarkerNode> collectBindMarkersInto, boolean pretty)
Public constructor- Parameters:
translator
-collectBindMarkersInto
-pretty
-
-
-
Method Detail
-
select
public java.lang.String select(java.util.List<With> withClauses, boolean distinct, SelectList selectList, FromClause fromClause, WhereClause whereClause, GroupByClause groupByClause, HavingClause havingClause, OrderByClause orderByClause, PaginationClause paginationClause, boolean unionAll, Select union)
Description copied from interface:StatementRenderer
Render the select statement using each of the components, some of which may be optional (null)- Specified by:
select
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
from
public java.lang.String from(java.util.List<FromItem> items)
- Specified by:
from
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
fromItem
public java.lang.String fromItem(FromItem item)
Description copied from interface:StatementRenderer
Render the given item- Specified by:
fromItem
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
rowSource
public java.lang.String rowSource(java.lang.String sub)
- Specified by:
rowSource
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
fromItem
public java.lang.String fromItem(java.lang.String subValue, java.lang.String aliasValue)
- Specified by:
fromItem
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
alias
public java.lang.String alias(java.lang.String alias)
- Specified by:
alias
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
rowSource
public java.lang.String rowSource(java.lang.String schemaName, java.lang.String tableName)
- Specified by:
rowSource
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
render
public java.lang.String render(ExpNode expression)
- Specified by:
render
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
innerJoin
public java.lang.String innerJoin(java.lang.String joinFromValue, java.lang.String joinOnValue)
- Specified by:
innerJoin
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
leftOuterJoin
public java.lang.String leftOuterJoin(java.lang.String joinFromValue, java.lang.String joinOnValue)
- Specified by:
leftOuterJoin
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
fullOuterJoin
public java.lang.String fullOuterJoin(java.lang.String joinFromValue, java.lang.String joinOnValue)
- Specified by:
fullOuterJoin
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
with
public java.lang.String with(java.lang.String subSelect, java.lang.String aliasValue)
Description copied from interface:StatementRenderer
Render a WITH foo AS (select ...) clause- Specified by:
with
in interfaceStatementRenderer<java.lang.String>
- Returns:
-
-