AEProject Class Reference

This class models an extended project relational operation: PI(R), where 'a' is the project list, R is the relation to operate upon. 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.
 AEProject (const AEProject &in_other)
 Copy constructor.
 AEProject (AutoPtr< AERelationalExpr > in_operand, AutoPtr< AEValueList > in_projList)
 Constructor.
virtual AEProjectClone () const
 Creates a clone of this node object.
virtual const AEProjectGetAsProject () const
 Get the object as an AEProject object.
virtual AEProjectGetAsProject ()
 Get the object as an AEProject 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)
 Gets 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. See the definition of AENodeType for values defined.
AEValueListGetProjectionList ()
 Get the projection list for the node.
void SetProjectionList (AutoPtr< AEValueList > in_projList)
 Grants the ownership of the projection list expression to this object.
AutoPtr< AEValueListTakeProjectionList ()
 Takes the ownership of the project list away from the selection node.
virtual ~AEProject ()
 Destructor.

Detailed Description

This class models an extended project relational operation: PI(R), where 'a' is the project list, R is the relation to operate upon.

In the standard relational algebra, 'a' can only be a list of attributes (columns) of R. Here we allow 'a' being a list of value expressions defined on the attributes of R. Also, repeated value expressions are allowed. That is, one can have more than one identical value expressions.

In SQL-92, AEProject class models a simple SELECT-FROM query that involves only one table and a subset of all the columns of the table. For example, the following query can be translated to an AEProject operation directly.

SELECT A.C1 A.C2 FROM A

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


Constructor & Destructor Documentation

AEProject ( AutoPtr< AERelationalExpr in_operand,
AutoPtr< AEValueList in_projList 
)

Constructor.

Parameters:
in_operand The operand for this relational expression.
in_projList The list of value expressions to project to.
AEProject ( const AEProject in_other  ) 

Copy constructor.

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

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

Creates a clone of this node object.

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

Implements AEUnaryRelationalExpr.

virtual const AEProject* GetAsProject (  )  const [virtual]

Get the object as an AEProject object.

Overrides the method defined in AERelationalExpr.

Returns:
this object always. (NOT OWN)

Reimplemented from AERelationalExpr.

virtual AEProject* GetAsProject (  )  [virtual]

Get the object as an AEProject 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]

Gets the column metadata for the given column.

Parameters:
in_columnNum The zero-base column index.
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 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 AENodeType for values defined.

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

Implements AENode.

AEValueList* GetProjectionList (  ) 

Get the projection list for the node.

Returns:
The projection list for the node. (NOT OWN)
void SetProjectionList ( AutoPtr< AEValueList in_projList  ) 

Grants the ownership of the projection list expression to this object.

Parameters:
in_projList The projection list. (OWN)
Exceptions:
SEInvalidArgumentException when in_projList does not own an project list object
SEInvalidOperationException when this object already has a project list
AutoPtr<AEValueList> TakeProjectionList (  ) 

Takes the ownership of the project list away from the selection node.

If it wishes to only access the projection list, call GetProjectionList() instead.

Exceptions:
SEInvalidOperationException when this object does not have a project list
Returns:
The projection list. (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