AEQueryOperation Class Reference

This abstract base class represents the top-most "query operations" such as SORT, LIMIT (in the future) or any other relational operations such as PROJECT. More...

Inherits Simba::SQLEngine::AENode.

Inherited by AERelationalExpr.

List of all members.

Public Member Functions

virtual AEQueryOperationClone () const =0
 Creates a clone of this node object.
AutoPtr< Simba::DSI::IColumnsCreateResultSetColumns (const std::vector< simba_uint16 > &in_colNumbers)
 Creates the specified set of result set columns.
AutoPtr< Simba::DSI::IColumnsCreateResultSetColumns ()
 Creates a result set columns for this query operation.
bool FindColumn (const simba_wstring &in_colName, simba_uint16 &out_columnNum, bool in_isCaseSensitive)
 Finds the column number that has the given column name.
virtual const AEQueryOperationGetAsQueryOperation () const
 Gets the object as an AEQueryOperation object.
virtual AEQueryOperationGetAsQueryOperation ()
 Gets the object as an AEQueryOperation object.
virtual const AESortGetAsSort () const
 Gets the object as an AESort object.
virtual AESortGetAsSort ()
 Gets the object as an AESort object.
virtual const AETopNSortGetAsTopNSort () const
 Get the object as an AETopNSort object.
virtual AETopNSortGetAsTopNSort ()
 Get the object as an AETopNSort object.
virtual Simba::DSI::IColumnGetColumn (simba_uint16 in_columnNum)=0
 Gets the column for the given column number.
virtual simba_uint16 GetColumnCount ()=0
 Returns the number of columns in this query operation.
virtual bool IsQueryOperation () const
 Tells whether this is an AEQueryOperation node.
void UpdateResultSetColumns (Simba::DSI::IColumns *in_columns)
 Update the result set columns previous created by this object.
virtual ~AEQueryOperation ()
 Destructor.

Protected Member Functions

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

Detailed Description

This abstract base class represents the top-most "query operations" such as SORT, LIMIT (in the future) or any other relational operations such as PROJECT.

An AEQueryOperation can operate on any other AEQueryOperation nodes. For example, a SORT can operates on LIMIT, PROJECT, etc. A LIMIT can also operate on SORT, or PROJECT. Although it is perfectly "legal" to have a SORT operate on another SORT, it is very undesirable if not meaningless.


Constructor & Destructor Documentation

virtual ~AEQueryOperation (  )  [virtual]

Destructor.

AEQueryOperation (  )  [protected]

Default constructor.

AEQueryOperation ( const AEQueryOperation 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 AEQueryOperation* Clone (  )  const [pure virtual]
AutoPtr<Simba::DSI::IColumns> CreateResultSetColumns ( const std::vector< simba_uint16 > &  in_colNumbers  ) 

Creates the specified set of result set columns.

Parameters:
in_colNumbers The set of column numbers for which to create columns.
Exceptions:
SEInvalidArgumentException if any of the column number is invalid.
Returns:
the specified set of result set columns. (OWN)
AutoPtr<Simba::DSI::IColumns> CreateResultSetColumns (  ) 

Creates a result set columns for this query operation.

Returns:
a result set columns for the query operation. (OWN)
bool FindColumn ( const simba_wstring in_colName,
simba_uint16 &  out_columnNum,
bool  in_isCaseSensitive 
)

Finds the column number that has the given column name.

NOTE: This function needs to do case-insensitive string comparisons. Currently, simba_wstring does not support it. Case-insensitive string comparison has to be supported later.

Parameters:
in_colName The name of the column to find.
out_columnNum The output column number if found, untouched otherwise.
in_isCaseSensitive True if column names are case sensitive; false otherwise.
Exceptions:
SEInvalidArgumentException when in_colName is an empty string
Returns:
true if found, false otherwise.
virtual const AEQueryOperation* GetAsQueryOperation (  )  const [virtual]

Gets the object as an AEQueryOperation object.

Overrides the method defined in AENode. Sub-classes of this class must _NOT_ override this method again.

Returns:
This object always.

Reimplemented from AENode.

virtual AEQueryOperation* GetAsQueryOperation (  )  [virtual]

Gets the object as an AEQueryOperation object.

Overrides the method defined in AENode. Sub-classes of this class must _NOT_ override this method again.

Returns:
This object always.

Reimplemented from AENode.

virtual const AESort* GetAsSort (  )  const [virtual]

Gets the object as an AESort object.

This default implementation always throw an exception. The appropriate sub-class must override this method.

Exceptions:
SEInvalidOperationException always
Returns:
This object as an AESort object. (NOT OWN)

Reimplemented in AESort.

virtual AESort* GetAsSort (  )  [virtual]

Gets the object as an AESort object.

This default implementation always throw an exception. The appropriate sub-class must override this method.

Exceptions:
SEInvalidOperationException always
Returns:
This object as an AESort object. (NOT OWN)

Reimplemented in AESort.

virtual const AETopNSort* GetAsTopNSort (  )  const [virtual]

Get the object as an AETopNSort object.

This default implementation always throw an exception. The appropriate sub-class must override this method.

Exceptions:
SEInvalidOperationException always
Returns:
This object as an AETopNSort object. (NOT OWN)

Reimplemented in AETopNSort.

virtual AETopNSort* GetAsTopNSort (  )  [virtual]

Get the object as an AETopNSort object.

This default implementation always throw an exception. The appropriate sub-class must override this method.

Exceptions:
SEInvalidOperationException always
Returns:
This object as an AETopNSort object. (NOT OWN)

Reimplemented in AETopNSort.

virtual Simba::DSI::IColumn* GetColumn ( simba_uint16  in_columnNum  )  [pure 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)

Implemented in AEAggregate, AECrossJoin, AEDistinct, AEExcept, AEInsertionTable, AEIntersect, AEJoin, AENamedRelationalExpr, AENativeSyntax, AEProcedure, AEProject, AESelect, AESort, AETableConstructor, AETop, and AEUnion.

virtual simba_uint16 GetColumnCount (  )  [pure virtual]

Returns the number of columns in this query operation.

Returns:
The number of columns in this query operation.

Implemented in AEAggregate, AECrossJoin, AEDistinct, AEDummyTable, AEExcept, AEInsertionTable, AEIntersect, AEJoin, AENativeSyntax, AEProcedure, AEProject, AESelect, AESort, AESubQuery, AETable, AETableConstructor, AETop, and AEUnion.

virtual bool IsQueryOperation (  )  const [virtual]

Tells whether this is an AEQueryOperation node.

Overrides the method defined in AENode. Sub-classes of this class must _NOT_ override this method again.

Returns:
True if this is an AEQueryOperation node, false otherwise.

Reimplemented from AENode.

void UpdateResultSetColumns ( Simba::DSI::IColumns in_columns  ) 

Update the result set columns previous created by this object.

NOTE: The columns passed in must be previously created by this object.

Parameters:
in_columns The result set columns previous created. Cannot be NULL. (NOT OWN)

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

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