AESelect Class Reference

This class models the standard "selection" relational operation: SIGMA_(c)(R), where c is the selection condition and R is the relation to operate on. More...

Inherits Simba::SQLEngine::AEUnaryRelationalExpr.

List of all members.

Public Member Functions

virtual void AcceptVisitor (AENodeVisitor &in_visitor)
 Calls the correct method on the visitor.
 AESelect (const AESelect &in_other)
 Copy constructor.
 AESelect (AutoPtr< AERelationalExpr > in_operand, AutoPtr< AEBooleanExpr > in_selectCond)
 Constructor.
virtual AESelectClone () const
 Creates a clone of this node object.
virtual const AESelectGetAsSelect () const
 Retrieves the object as an AESelect object.
virtual AESelectGetAsSelect ()
 Retrieves the object as an AESelect object.
virtual const AENodeGetChild (simba_size_t in_index) const
 Returns the specified child node.
virtual AENodeGetChild (simba_size_t in_index)
 Returns the specified child node.
virtual simba_size_t GetChildCount () const
 Returns the number of child nodes. In this case, it always return 1.
virtual Simba::DSI::IColumnGetColumn (simba_uint16 in_columnNum)
 Get the column metadata for the given column.
virtual simba_uint16 GetColumnCount ()
 Returns the number of columns in this query operation.
virtual const
Simba::SQLEngine::IIndexMetadataList
GetIndexes () const
 Get the indexes for this relational expression.
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.
AEBooleanExprGetSelectCond ()
 Get the select condition for the node.
void SetSelectCond (AutoPtr< AEBooleanExpr > in_selectCond)
 Grants the ownership of the select condition boolean expression to this object.
AutoPtr< AEBooleanExprTakeSelectCond ()
 Takes the ownership of the selection condition away from this object.
virtual ~AESelect ()
 Destructor.

Detailed Description

This class models the standard "selection" relational operation: SIGMA_(c)(R), where c is the selection condition and R is the relation to operate on.

AESelect models a simple SELECT(*)-FROM-WHERE query that does not involve any table joins. For example, the following SQL query can be translated to an AESelect operation directly,

SELECT * FROM T WHERE cond

It is apparent that a SELECT operation only affects the set of rows returned. All columns of a row is returned if it satisfies the selection criterion.

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

Will always have two children (GetChildCount() returns 2):


Constructor & Destructor Documentation

AESelect ( AutoPtr< AERelationalExpr in_operand,
AutoPtr< AEBooleanExpr in_selectCond 
)

Constructor.

The ownerships of the operand object and the select condition object passed in through the constructor are transferred to this object.

Parameters:
in_operand The operand.
in_selectCond The select condition boolean expression.
Exceptions:
SEInvalidArgumentException when either in_operand or in_selectCond does not own an appropriate object.
AESelect ( const AESelect in_other  ) 

Copy constructor.

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

Parameters:
in_other The other node to create a copy from.
virtual ~AESelect (  )  [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.

virtual AESelect* Clone (  )  const [virtual]

Creates a clone of this node object.

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

Implements AEUnaryRelationalExpr.

virtual const AESelect* GetAsSelect (  )  const [virtual]

Retrieves the object as an AESelect object.

Overrides the method defined in AERelationalExpr.

Returns:
this object always. (NOT OWN)

Reimplemented from AERelationalExpr.

virtual AESelect* GetAsSelect (  )  [virtual]

Retrieves the object as an AESelect object.

Overrides the method defined in AERelationalExpr.

Returns:
this object always. (NOT OWN)

Reimplemented from AERelationalExpr.

virtual const AENode* GetChild ( simba_size_t  in_index  )  const [virtual]

Returns the specified child node.

Since the only child available is operand 0, a value of 0 is allowed for in_index.

This method is designed to override the method defined in BaseNodeT as seen in AENode.

Parameters:
in_index The zero-based index for the child node.
Exceptions:
SEInvalidArgumentException when in_index is invalid.
Returns:
The child node indexed by in_index. (NOT OWN)

Reimplemented from AEUnaryExprT< AERelationalExpr, AERelationalExpr >.

virtual AENode* GetChild ( simba_size_t  in_index  )  [virtual]

Returns the specified child node.

Since the only child available is operand 0, a value of 0 is allowed for in_index.

This method is designed to override the method defined in BaseNodeT as seen in AENode.

Parameters:
in_index The zero-based index for the child node.
Exceptions:
SEInvalidArgumentException when in_index is invalid.
Returns:
The child node indexed by in_index. (NOT OWN)

Reimplemented from AEUnaryExprT< AERelationalExpr, AERelationalExpr >.

virtual simba_size_t GetChildCount (  )  const [virtual]

Returns the number of child nodes. In this case, it always return 1.

This method is designed to override the method defined in BaseNodeT as seen in AENode.

Returns:
the number of child nodes.

Reimplemented from AEUnaryExprT< AERelationalExpr, AERelationalExpr >.

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

Get the column metadata for the given column.

Parameters:
in_columnNum The zero-base column index.
Exceptions:
SEInvalidArgumentException when the given column number is invalid
AEInvalidAetException when the operands is NULL
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.

Exceptions:
AEInvalidAetException when the operands is NULL
Returns:
The number of columns in this query operation.

Implements AEQueryOperation.

virtual const Simba::SQLEngine::IIndexMetadataList& GetIndexes (  )  const [virtual]

Get the indexes for this relational expression.

Return an empty collection of indexes if indexes are not supported.

Returns:
The indexes for this result set.

Reimplemented from AERelationalExpr.

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.

virtual AENodeType GetNodeType (  )  const [virtual]

Returns an integer that uniquely identifies the node class.

See the definition of AENode for values defined.

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

Implements AENode.

AEBooleanExpr* GetSelectCond (  ) 

Get the select condition for the node.

Returns:
The select condition for the node. (NOT OWN)
void SetSelectCond ( AutoPtr< AEBooleanExpr in_selectCond  ) 

Grants the ownership of the select condition boolean expression to this object.

Parameters:
in_selectCond The select condition. (OWN)
Exceptions:
SEInvalidArgumentException when in_selectCond.IsNull() returns true
SEInvalidOperationException when this object already has a select condition
AutoPtr<AEBooleanExpr> TakeSelectCond (  ) 

Takes the ownership of the selection condition away from this object.

If the caller only wants to access the select condition, call GetSelectCond() instead.

Exceptions:
SEInvalidOperationException when m_selectCond.IsNull() returns true.
Returns:
The select condition. (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