Class SQLServer_OuterJoin
- java.lang.Object
-
- adql.query.from.ADQLJoin
-
- adql.query.from.OuterJoin
-
- adql.query.from.SQLServer_OuterJoin
-
- All Implemented Interfaces:
ADQLObject
,FromContent
public class SQLServer_OuterJoin extends OuterJoin
Special implementation of
OuterJoin
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 theDBColumn
s returned byDBColumn
can not contain anyDBCommonColumn
. Instead, theDBColumn
of the first joined table (i.e. the left one) is returned.Since this special behavior is also valid for
InnerJoin
, a special implementation of this class has been also created:SQLServer_InnerJoin
. Both must have exactly the same behavior whengetDBColumns()
is called. That's why the static functionSQLServer_InnerJoin.getDBColumns(ADQLJoin)
has been created.- Since:
- 1.4
- Version:
- 1.4 (03/2016)
- Author:
- Grégory Mantelet (ARI)
- See Also:
SQLServer_ADQLQueryFactory
,SQLServer_InnerJoin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adql.query.from.OuterJoin
OuterJoin.OuterType
-
-
Field Summary
-
Fields inherited from class adql.query.from.ADQLJoin
condition, lstColumns, natural
-
-
Constructor Summary
Constructors Constructor Description SQLServer_OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type)
Builds a NATURAL OUTER join between the two given "tables".SQLServer_OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, ClauseConstraints condition)
Builds an OUTER join between the two given "tables" with the given condition.SQLServer_OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, java.util.Collection<ADQLColumn> lstColumns)
Builds an OUTER join between the two given "tables" with a list of columns to join.SQLServer_OuterJoin(OuterJoin toCopy)
Builds a copy of the given OUTER join.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchColumnList
getDBColumns()
Gets the list of all columns (~ database metadata) available in this FROM part.-
Methods inherited from class adql.query.from.OuterJoin
getCopy, getJoinType, getType, setType
-
Methods inherited from class adql.query.from.ADQLJoin
addAllExcept, adqlIterator, findAtMostOneColumn, findExactlyOneColumn, getJoinCondition, getJoinedColumns, getLeftTable, getName, getPosition, getRightTable, getTables, getTablesByAlias, hasJoinedColumns, isCommonColumn, isNatural, setJoinCondition, setJoinedColumns, setLeftTable, setNatural, setPosition, setRightTable, toADQL
-
-
-
-
Constructor Detail
-
SQLServer_OuterJoin
public SQLServer_OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type)
Builds a NATURAL OUTER join between the two given "tables".- Parameters:
left
- Left "table".right
- Right "table".type
- OUTER join type (left, right or full).- See Also:
OuterJoin(FromContent, FromContent, OuterType)
-
SQLServer_OuterJoin
public SQLServer_OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, ClauseConstraints condition)
Builds an OUTER join between the two given "tables" with the given condition.- Parameters:
left
- Left "table".right
- Right "table".type
- Outer join type (left, right or full).condition
- Join condition.- See Also:
OuterJoin(FromContent, FromContent, OuterType, ClauseConstraints)
-
SQLServer_OuterJoin
public SQLServer_OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, java.util.Collection<ADQLColumn> lstColumns)
Builds an OUTER join between the two given "tables" with a list of columns to join.- Parameters:
left
- Left "table".right
- Right "table".type
- Outer join type.lstColumns
- List of columns to join.- See Also:
OuterJoin(FromContent, FromContent, OuterType, Collection)
-
SQLServer_OuterJoin
public SQLServer_OuterJoin(OuterJoin toCopy) throws java.lang.Exception
Builds a copy of the given OUTER join.- Parameters:
toCopy
- The OUTER join to copy.- Throws:
java.lang.Exception
- If there is an error during the copy.- See Also:
OuterJoin(OuterJoin)
-
-
Method Detail
-
getDBColumns
public SearchColumnList getDBColumns() throws UnresolvedJoinException
Description copied from interface:FromContent
Gets the list of all columns (~ database metadata) available in this FROM part.
Note: In the most cases, this list is generated on the fly !
- Specified by:
getDBColumns
in interfaceFromContent
- Overrides:
getDBColumns
in classADQLJoin
- Returns:
- All the available
DBColumn
s. - Throws:
UnresolvedJoinException
- If a join is not possible.
-
-