Class SQLServer_OuterJoin
- All Implemented Interfaces:
ADQLObject
,FromContent
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 the DBColumn
s
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 InnerJoin
, a special implementation
of this class has been also created: SQLServer_InnerJoin
. Both must have exactly the
same behavior when getDBColumns()
is called. That's why the static function
SQLServer_InnerJoin.getDBColumns(ADQLJoin)
has been created.
- Since:
- 1.4
- See Also:
-
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
ConstructorsConstructorDescriptionSQLServer_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, 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
Modifier and TypeMethodDescriptionGets the list of all columns (~ database metadata) available in this FROM part.Methods inherited from class adql.query.from.OuterJoin
getCopy, getFeatureDescription, 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 Details
-
SQLServer_OuterJoin
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:
-
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:
-
SQLServer_OuterJoin
public SQLServer_OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, 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:
-
SQLServer_OuterJoin
Builds a copy of the given OUTER join.- Parameters:
toCopy
- The OUTER join to copy.- Throws:
Exception
- If there is an error during the copy.- See Also:
-
-
Method Details
-
getDBColumns
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.
-