public class SQLServer_InnerJoin extends InnerJoin
Special implementation of InnerJoin for MS SQL Server.
Important:
Instances of this class are created only by SQLServer_ADQLQueryFactory.
This implementation just changes the behavior the getDBColumns().
In MS SQL Server, there is no keyword NATURAL and USING. That's why the DBColumns
returned by DBColumn can not contain any DBCommonColumn. Instead,
the DBColumn of the first joined table (i.e. the left one) is returned.
Since this special behavior is also valid for OuterJoin, a special implementation
of this class has been also created: SQLServer_OuterJoin. Both must have exactly the
same behavior when getDBColumns() is called. That's why the static function
getDBColumns(ADQLJoin) has been created. It is called by SQLServer_InnerJoin
and SQLServer_OuterJoin.
SQLServer_ADQLQueryFactorycondition, lstColumns, natural| Constructor and Description |
|---|
SQLServer_InnerJoin(FromContent left,
FromContent right)
Builds a NATURAL INNER JOIN between the two given "tables".
|
SQLServer_InnerJoin(FromContent left,
FromContent right,
ClauseConstraints condition)
Builds an INNER JOIN between the two given "tables" with the given condition.
|
SQLServer_InnerJoin(FromContent left,
FromContent right,
java.util.Collection<ADQLColumn> lstColumns)
Builds an INNER JOIN between the two given "tables" with the given condition.
|
SQLServer_InnerJoin(InnerJoin toCopy)
Builds a copy of the given INNER join.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addAllExcept2(SearchColumnList itemsToAdd,
SearchColumnList target,
java.util.Map<java.lang.String,DBColumn> exception) |
SearchColumnList |
getDBColumns()
Gets the list of all columns (~ database metadata) available in this FROM part.
|
static SearchColumnList |
getDBColumns(ADQLJoin join)
Gets the list of all columns (~ database metadata) available in this FROM part.
|
getCopy, getJoinTypeaddAllExcept, adqlIterator, findAtMostOneColumn, findExactlyOneColumn, getJoinCondition, getJoinedColumns, getLeftTable, getName, getPosition, getRightTable, getTables, getTablesByAlias, hasJoinedColumns, isCommonColumn, isNatural, setJoinCondition, setJoinedColumns, setLeftTable, setNatural, setPosition, setRightTable, toADQLpublic SQLServer_InnerJoin(FromContent left, FromContent right)
left - Left "table".right - Right "table".InnerJoin.InnerJoin(FromContent, FromContent)public SQLServer_InnerJoin(FromContent left, FromContent right, ClauseConstraints condition)
left - Left "table".right - Right "table".condition - Join condition.InnerJoin.InnerJoin(FromContent, FromContent, ClauseConstraints)public SQLServer_InnerJoin(FromContent left, FromContent right, java.util.Collection<ADQLColumn> lstColumns)
left - Left "table".right - Right "table".lstColumns - List of columns to join.InnerJoin.InnerJoin(FromContent, FromContent, Collection)public SQLServer_InnerJoin(InnerJoin toCopy) throws java.lang.Exception
toCopy - The INNER join to copy.java.lang.Exception - If there is an error during the copy.InnerJoin.InnerJoin(InnerJoin)public SearchColumnList getDBColumns() throws UnresolvedJoinException
FromContentGets the list of all columns (~ database metadata) available in this FROM part.
Note: In the most cases, this list is generated on the fly !
getDBColumns in interface FromContentgetDBColumns in class ADQLJoinDBColumns.UnresolvedJoinException - If a join is not possible.public static SearchColumnList getDBColumns(ADQLJoin join) throws UnresolvedJoinException
Gets the list of all columns (~ database metadata) available in this FROM part.
Columns implied in a NATURAL join or in a USING list, are not returned as a DBCommonColumn ;
actually, just the corresponding DBColumn of the left table is returned.
DBColumns.UnresolvedJoinException - If a join is not possible.public static final void addAllExcept2(SearchColumnList itemsToAdd, SearchColumnList target, java.util.Map<java.lang.String,DBColumn> exception)