AENamedRelationalExpr Class Reference

An abstract base class for all relational expressions that have a name. More...

Inherits Simba::SQLEngine::AERelationalExpr.

Inherited by AETerminalExprT< AENamedRelationalExpr >, and AEUnaryExprT< AENamedRelationalExpr, AERelationalExpr >.

List of all members.

Public Member Functions

virtual AENamedRelationalExprClone () const =0
 Creates a clone of this node object.
virtual bool FindQColumn (const AEQColumnName &in_qColName, bool in_unquotedCaseSensitive, bool in_quotedCaseSensitive, AEColumnInfo &out_colInfo)
 Finds the qualified column.
virtual const
AENamedRelationalExpr
GetAsNamedRelationalExpr () const
 Gets the relational expression as an AENamedRelationalExpr object.
virtual AENamedRelationalExprGetAsNamedRelationalExpr ()
 Gets the relational expression as an AENamedRelationalExpr object.
virtual void GetCatalogName (simba_wstring &out_catalogName)=0
 Gets the table catalog.
virtual Simba::DSI::IColumnGetColumn (simba_uint16 in_columnNum)
 Gets the column for the given column number.
void GetQTableName (AEQTableName &out_qTabName)
virtual void GetSchemaName (simba_wstring &out_schemaName)=0
 Gets the table schema.
virtual void GetTableName (simba_wstring &out_tableName)=0
 Gets the table name.
virtual bool IsNamed () const
 Indicates whether the relational expression has a name. It overrides the method from AERelationalExpr.
bool MatchName (const AEQTableName &in_qTabName, bool in_unquotedCaseSensitive, const bool in_quotedCaseSensitive)
 Tests whether this named relational expression matches the given name.
void OverrideColumnNames (const std::vector< simba_wstring > &in_renamedColumns, bool in_isCaseSensitive)
 Overrides the names of the columns as renamed by the correlation spec.
void OverrideCorrelationSpec (AENamedRelationalExpr *in_node)
 Override the correlation specification with the names from the give AENamedRelationalExpr node.
void OverrideCorrelationSpec (AENamedRelationalExpr *in_node, const std::vector< simba_uint16 > &in_renamedColumnIndexes)
 Override the correlation specification with the names from the given AENamedRelationalExpr node.
void SetCorName (const simba_wstring &in_corName)
 Sets the correlation name.
virtual ~AENamedRelationalExpr ()
 Destructor.

Protected Member Functions

 AENamedRelationalExpr (const AENamedRelationalExpr &in_other)
 Copy constructor.
 AENamedRelationalExpr ()
 Default constructor.

Protected Attributes

simba_wstring m_corName

Detailed Description

An abstract base class for all relational expressions that have a name.

Known sub-classes are AETable and AESubQuery.

Furthermore, an AEColumn always has a reference to an AENamedRelationalExpr. This is to ensure that the pointers are still valid after AE tree manipulation during the query optimization process.


Constructor & Destructor Documentation

virtual ~AENamedRelationalExpr (  )  [virtual]

Destructor.

AENamedRelationalExpr (  )  [protected]

Default constructor.

AENamedRelationalExpr ( const AENamedRelationalExpr in_other  )  [protected]

Copy constructor.

To support "cloning". See Clone() method.

Parameters:
in_other The other node to create copy from.

Member Function Documentation

virtual AENamedRelationalExpr* Clone (  )  const [pure virtual]

Creates a clone of this node object.

Returns:
A clone of this node object. (OWN)

Implements AERelationalExpr.

Implemented in AEDummyTable, AESubQuery, and AETable.

virtual bool FindQColumn ( const AEQColumnName in_qColName,
bool  in_unquotedCaseSensitive,
bool  in_quotedCaseSensitive,
AEColumnInfo out_colInfo 
) [virtual]

Finds the qualified column.

Parameters:
in_qColName The qualified column name to find.
in_unquotedCaseSensitive True if unquoted column names are case sensitive; false otherwise.
in_quotedCaseSensitive Whether quoted columns should be case sensitive
out_colInfo The output column info if the column if found, untouched otherwise. Specifically, m_namedRelExpr and m_columnNum will be set if found. m_qsResolved and m_isOuterRef will _NOT_ be set.
Exceptions:
SEInvalidArgumentException when column name in in_qColName is empty.
Returns:
true if the qualified column is found, false otherwise.

Reimplemented from AERelationalExpr.

virtual const AENamedRelationalExpr* GetAsNamedRelationalExpr (  )  const [virtual]

Gets the relational expression as an AENamedRelationalExpr object.

Overrides the method defined in AERelationalExpr. Sub-classes should not override this method again.

Returns:
This object always.

Reimplemented from AERelationalExpr.

virtual AENamedRelationalExpr* GetAsNamedRelationalExpr (  )  [virtual]

Gets the relational expression as an AENamedRelationalExpr object.

Overrides the method defined in AERelationalExpr. Sub-classes should not override this method again.

Returns:
This object always.

Reimplemented from AERelationalExpr.

virtual void GetCatalogName ( simba_wstring out_catalogName  )  [pure virtual]

Gets the table catalog.

Parameters:
out_catalogName Output table catalog.

Implemented in AEDummyTable, AESubQuery, and AETable.

virtual Simba::DSI::IColumn* GetColumn ( simba_uint16  in_columnNum  )  [virtual]

Gets the column for the given column number.

The caller of this method does not own the returned object.

Parameters:
in_columnNum The zero-base column index.
Exceptions:
SEInvalidArgumentException when the given column number is invalid
Returns:
the column at the given column index (NOT OWN)

Implements AEQueryOperation.

void GetQTableName ( AEQTableName out_qTabName  ) 

Get the qualified table name.

Parameters:
out_qTabName Output "qualified" table name.
virtual void GetSchemaName ( simba_wstring out_schemaName  )  [pure virtual]

Gets the table schema.

Parameters:
out_schemaName Output table schema.

Implemented in AEDummyTable, AESubQuery, and AETable.

virtual void GetTableName ( simba_wstring out_tableName  )  [pure virtual]

Gets the table name.

Parameters:
out_tableName Output table name.

Implemented in AEDummyTable, AESubQuery, and AETable.

virtual bool IsNamed (  )  const [virtual]

Indicates whether the relational expression has a name. It overrides the method from AERelationalExpr.

Overrides the method defined in AERelationalExpr. Sub-classes should not override this method again.

Returns:
true always.

Reimplemented from AERelationalExpr.

bool MatchName ( const AEQTableName in_qTabName,
bool  in_unquotedCaseSensitive,
const bool  in_quotedCaseSensitive 
)

Tests whether this named relational expression matches the given name.

To have a match, the table name must be the same and if any of the catalog or schema name is specified, they should also match. In other words, the given catalog and schema names are served as independent "filters". They are used in matching only if they are not empty strings.

Parameters:
in_qTabName The qualified table name to match against.
in_unquotedCaseSensitive True for performing unquoted case-sensitive symbol comparisons, false otherwise.
in_quotedCaseSensitive True for performing quoted case-sensitive symbol comparisons, false otherwise
Exceptions:
SEInvalidArgumentException if the table name is an empty string
Returns:
true if the named relational expression bears the names, false otherwise.
void OverrideColumnNames ( const std::vector< simba_wstring > &  in_renamedColumns,
bool  in_isCaseSensitive 
)

Overrides the names of the columns as renamed by the correlation spec.

Parameters:
in_renamedColumns The new names of the columns.
in_isCaseSensitive True if column names are case sensitive; false otherwise.
Exceptions:
SEInvalidOperationException If a correlation name was not set before this method was called.
SESqlErrorException If the number of elements in in_renamedColumns doesn't match the number of columns in the relational expression.
SESqlErrorException If the elements in in_renamedColumns are not distinct.
void OverrideCorrelationSpec ( AENamedRelationalExpr in_node  ) 

Override the correlation specification with the names from the give AENamedRelationalExpr node.

Parameters:
in_node The named relational expression to get names from. Cannot be NULL. (NOT OWN)
Exceptions:
SEInvalidArgumentException when the number of columns of in_node is different from the number of columns of this named relational expression, or when in_node is NULL.
void OverrideCorrelationSpec ( AENamedRelationalExpr in_node,
const std::vector< simba_uint16 > &  in_renamedColumnIndexes 
)

Override the correlation specification with the names from the given AENamedRelationalExpr node.

Parameters:
in_node The named relational expression to get names from. Cannot be NULL. (NOT OWN)
in_renamedColumnIndexes The renamed column indexes on the give named relational expression.
Exceptions:
SEInvalidArgumentException when the size of in_renamedColumnIndexes is _not_ equal to the number of columns of this named relational expression, or when in_node is NULL.
void SetCorName ( const simba_wstring in_corName  ) 

Sets the correlation name.

Parameters:
in_corName The correlation name.
Exceptions:
SEInvalidArgumentException if in_corName is an empty string

Member Data Documentation

simba_wstring m_corName [protected]

The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:16 2017 for SimbaEngine 10.1.3.1011 by simba