AESort Class Reference

Models the ORDER BY clause of a query (i.e., SELECT statement). More...

Inherits Simba::SQLEngine::AEUnaryRelationalExpr.

Inherited by AETopNSort.

List of all members.

Public Member Functions

virtual void AcceptVisitor (AENodeVisitor &in_visitor)
 Calls the correct method on the visitor.
 AESort (const AESort &in_other)
 Copy constructor.
 AESort (AutoPtr< AERelationalExpr > in_operand, AutoPtr< SESortSpecs > in_sortSpecs, simba_uint16 in_restrictedColCount=0)
 Constructor.
virtual AESortClone () const
 Creates a clone of this node object.
virtual const AESortGetAsSort () const
 Get the object as an AESort object.
virtual AESortGetAsSort ()
 Get the object as an AESort object.
virtual Simba::DSI::IColumnGetColumn (simba_uint16 in_columnNum)
 Get the column metadata for the given column. The caller of this method does not own the returned object.
virtual simba_uint16 GetColumnCount ()
 Returns the number of columns in this query operation.
virtual simba_wstring GetLogString () const
 Returns a string name for this node for the purpose of logging.
virtual AENodeType GetNodeType () const
 Returns an integer that uniquely identifies the node class.
simba_uint16 GetRestrictedColumnCount () const
 The number of columns to restrict access to. 0 for no restriction.
simba_uint16 GetSortedPrefix () const
 Get the number of the prefix columns sorted by the underlying DSII during pass-down optimization.
const SESortSpecsGetSortSpecs () const
 Return the list of sort specs.
void SetSortedPrefix (simba_uint16 in_sortedPrefix)
 Set the number of the prefix columns sorted by the underlying DSII during pass-down optimization.
virtual ~AESort ()
 Destructor.

Detailed Description

Models the ORDER BY clause of a query (i.e., SELECT statement).

A sort operation is not a relational operator since it results in a list rather than a multiset. In the SQL-92 spec, ORDER BY can only be the last "operation" applied to a result set represented by a <query expression>. It cannot appear in a subquery.

A "sort" operation can operate on other AEQueryOperation's such as LIMIT (in the future).

An AESort operation does not change the metadata of the relational expression that it operates on.

Will always have one child (GetChildCount() returns 1):


Constructor & Destructor Documentation

AESort ( AutoPtr< AERelationalExpr in_operand,
AutoPtr< SESortSpecs in_sortSpecs,
simba_uint16  in_restrictedColCount = 0 
)

Constructor.

Parameters:
in_operand The relational expression that the operator operates on.
in_sortSpecs The list of sort specifications.
in_restrictedColCount The number of columns to restrict access to. 0 for no restriction.
Exceptions:
SEInvalidArgumentException when either of the arguments does not own an object.
AESort ( const AESort in_other  ) 

Copy constructor.

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

Parameters:
in_other The other node to create copy from.
virtual ~AESort (  )  [virtual]

Destructor.


Member Function Documentation

virtual void AcceptVisitor ( AENodeVisitor in_visitor  )  [virtual]

Calls the correct method on the visitor.

Parameters:
in_visitor The visiting object.

Implements AENode.

Reimplemented in AETopNSort.

virtual AESort* Clone (  )  const [virtual]

Creates a clone of this node object.

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

Implements AEUnaryRelationalExpr.

Reimplemented in AETopNSort.

virtual const AESort* GetAsSort (  )  const [inline, virtual]

Get the object as an AESort object.

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

Reimplemented from AEQueryOperation.

virtual AESort* GetAsSort (  )  [inline, virtual]

Get the object as an AESort object.

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

Reimplemented from AEQueryOperation.

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

Get the column metadata for the given column. The caller of this method does not own the returned object.

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

Implements AEQueryOperation.

virtual simba_uint16 GetColumnCount (  )  [virtual]

Returns the number of columns in this query operation.

Returns:
The number of columns in this query operation.

Implements AEQueryOperation.

virtual simba_wstring GetLogString (  )  const [virtual]

Returns a string name for this node for the purpose of logging.

Returns:
A string representation of this node for logging purposes.

Implements AENode.

Reimplemented in AETopNSort.

virtual AENodeType GetNodeType (  )  const [virtual]

Returns an integer that uniquely identifies the node class.

See the definition of AENodeType for values defined.

Returns:
The ID that uniquely identifies this type of nodes.

Implements AENode.

Reimplemented in AETopNSort.

simba_uint16 GetRestrictedColumnCount (  )  const [inline]

The number of columns to restrict access to. 0 for no restriction.

Returns:
The number of columns to restrict access to. 0 for no restriction.
simba_uint16 GetSortedPrefix (  )  const

Get the number of the prefix columns sorted by the underlying DSII during pass-down optimization.

Returns:
The number of sorted prefix columns.
const SESortSpecs* GetSortSpecs (  )  const

Return the list of sort specs.

Returns:
A pointer reference to the sport specs. (NOT OWN)
void SetSortedPrefix ( simba_uint16  in_sortedPrefix  ) 

Set the number of the prefix columns sorted by the underlying DSII during pass-down optimization.

NOTE: This method should be called only if sort pass-down occurs during pass-down optimizations.

Parameters:
in_colCount The number of sorted prefix columns.

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