Class TableQuerySource
java.lang.Object
com.northconcepts.datapipeline.jdbc.sql.SqlPart
com.northconcepts.datapipeline.jdbc.sql.select.QuerySource
com.northconcepts.datapipeline.jdbc.sql.select.TableQuerySource
A single table in the FROM clause of a
Select.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectParameterValues(List<Object> values) Appends the values for this part's?parameters to the list in order; adds nothing by default.voidcollectSqlFragment(CodeWriter writer) Writes this part's SQL to the writer; used bySqlPart.getSqlFragment()and by enclosing parts.booleancontainsTable(String table) Returns true if this source, a nested source or a join refers to the table (ignoring case).getTable()Returns the first table in the list of tables.Returns the tables this source reads from, including those of nested sources but not joined tables.setNestedAlias(String nestedAlias) Sets the alias written after this source in a FROM clause (nullfor none).setPretty(boolean pretty) Indicates ifSqlPart.getSqlFragment()adds line breaks and indentation instead of using one line (default is false).booleanIndicates if this source is parenthesized when used in a FROM clause (true except for a plain table).Methods inherited from class com.northconcepts.datapipeline.jdbc.sql.select.QuerySource
getNestedAliasMethods inherited from class com.northconcepts.datapipeline.jdbc.sql.SqlPart
getParameterValues, getSqlFragment, isPretty, printSqlParts, toString
-
Constructor Details
-
TableQuerySource
-
-
Method Details
-
setPretty
Description copied from class:SqlPartIndicates ifSqlPart.getSqlFragment()adds line breaks and indentation instead of using one line (default is false).- Overrides:
setPrettyin classQuerySource
-
setNestedAlias
Description copied from class:QuerySourceSets the alias written after this source in a FROM clause (nullfor none).- Overrides:
setNestedAliasin classQuerySource
-
getTables
Description copied from class:QuerySourceReturns the tables this source reads from, including those of nested sources but not joined tables.- Specified by:
getTablesin classQuerySource
-
getTable
Description copied from class:QuerySourceReturns the first table in the list of tables.
If this query source involves more than one table, useQuerySource.getTables()instead of this method.- Specified by:
getTablein classQuerySource
-
containsTable
Description copied from class:QuerySourceReturns true if this source, a nested source or a join refers to the table (ignoring case).- Specified by:
containsTablein classQuerySource
-
collectSqlFragment
Description copied from class:SqlPartWrites this part's SQL to the writer; used bySqlPart.getSqlFragment()and by enclosing parts.- Specified by:
collectSqlFragmentin classSqlPart
-
collectParameterValues
Description copied from class:SqlPartAppends the values for this part's?parameters to the list in order; adds nothing by default.- Overrides:
collectParameterValuesin classSqlPart
-
shouldWrapWhenNested
public boolean shouldWrapWhenNested()Description copied from class:QuerySourceIndicates if this source is parenthesized when used in a FROM clause (true except for a plain table).- Overrides:
shouldWrapWhenNestedin classQuerySource
-