AETable Class Reference

A class representing a relational table. More...

Inherits AETerminalExprT< AENamedRelationalExpr >.

List of all members.

Public Member Functions

virtual void AcceptVisitor (AENodeVisitor &in_visitor)
 Calls the correct method on the visitor.
 AETable (const AETable &in_other)
 Copy constructor.
 AETable (SharedPtr< Simba::SQLEngine::DSIExtResultSet > in_table, AENamedRelationalExpr *in_namedRelationalExpr, SESortInfo in_passdownSortInfo=SESortInfo())
 Constructor.
 AETable (SharedPtr< Simba::SQLEngine::DSIExtResultSet > in_table)
 Constructor.
virtual AETableClone () const
 Creates a clone of this node object.
virtual const AETableGetAsTable () const
 Retrieves the object as an AETable object.
virtual AETableGetAsTable ()
 Retrieves the object as an AETable object.
virtual void GetCatalogName (simba_wstring &out_catalogName)
 Retrieves the table catalog.
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.
const SESortInfoGetPassdownSortInfo () const
 Return the information of the passdown sort.
virtual void GetSchemaName (simba_wstring &out_schemaName)
 Retrieves the table schema.
SharedPtr
< Simba::SQLEngine::DSIExtResultSet
GetTable () const
virtual void GetTableName (simba_wstring &out_tableName)
 Retrieves the table name.
const std::set< simba_uint16 > & GetUpdatedColumnIndexes () const
 Retrieves the indexes of updated columns when the AETable is being used in a UPDATE statement.
bool IsDelete ()
 Indicates whether this AETable is being used in a DELETE statement. If this and IsUpdate() both return true, the statement is a query.
virtual bool IsEqual (const AENode *in_another) const
 Tells whether the two nodes are equal.
bool IsUpdate ()
 Indicates whether this AETable is being used in a UPDATE statement. If this and IsDelete() both return true, the statement is a query.
virtual void SetDataNeeded (simba_uint16 in_column, bool in_isNeeded)
 Indicates whether RetrieveData(...) might be called on the given column. This applies to any subsequent Move(...) calls.
void SetIsDelete ()
 Sets the flag indicating that this AETable is being used in a DELETE statement.
void SetIsUpdate ()
 Sets the flag indicating that this AETable is being used in an UPDATE statement.
void SetTable (SharedPtr< Simba::SQLEngine::DSIExtResultSet > in_table)
 Resets the underlying DSII table.
void SetUpdatedColumnIndexes (const std::set< simba_uint16 > &in_updatedColumns)
 Sets the indexes of updated columns when the AETable is being used in a UPDATE statement.
virtual ~AETable ()
 Destructor.

Detailed Description

A class representing a relational table.

In relational algebra theory, a relational operator operates on one or more relations. That is, the operands and the result of a relational operation are both relations. For our purpose, a relation is a table.

Class AETable is designed to model a direct table reference. It is worth mentioning that a table with an alias will be translated to a rename operation on the table in AE tree.

Will always have no children (GetChildCount() returns 0).


Constructor & Destructor Documentation

Constructor.

Parameters:
in_table The table from the DSII that this table represents.
Exceptions:
SEInvalidArgumentException when in_table is NULL.
AETable ( SharedPtr< Simba::SQLEngine::DSIExtResultSet in_table,
AENamedRelationalExpr in_namedRelationalExpr,
SESortInfo  in_passdownSortInfo = SESortInfo() 
)

Constructor.

Parameters:
in_table The table from the DSII that this table represents.
in_namedRelationalExpr The named relational expression to get correlation specification from. Cannot be NULL. (NOT OWN)
in_passdownSortInfo The information about passdown sort that occurred to the table. By default the sort info is empty if no pass down sort occurs.
Exceptions:
SEInvalidArgumentException when in_table is NULL or in_namedRelationalExpr is NULL.
AETable ( const AETable in_other  ) 

Copy constructor.

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

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

Creates a clone of this node object.

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

Implements AENamedRelationalExpr.

virtual const AETable* GetAsTable (  )  const [virtual]

Retrieves the object as an AETable object.

Overrides the method defined in AERelationalExpr.

Returns:
this object always. (NOT OWN)

Reimplemented from AERelationalExpr.

virtual AETable* GetAsTable (  )  [virtual]

Retrieves the object as an AETable object.

Overrides the method defined in AERelationalExpr.

Returns:
this object always. (NOT OWN)

Reimplemented from AERelationalExpr.

virtual void GetCatalogName ( simba_wstring out_catalogName  )  [virtual]

Retrieves the table catalog.

Parameters:
out_catalogName The output table catalog.

Implements AENamedRelationalExpr.

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.

const SESortInfo& GetPassdownSortInfo (  )  const

Return the information of the passdown sort.

Returns:
The information of the passdown sort.
virtual void GetSchemaName ( simba_wstring out_schemaName  )  [virtual]

Retrieves the table schema.

Parameters:
out_schemaName The output table schema.

Implements AENamedRelationalExpr.

Returns a shared pointer to the underlying DSII table.

Returns:
a shared pointer to the underlying DSI table.
virtual void GetTableName ( simba_wstring out_tableName  )  [virtual]

Retrieves the table name.

Parameters:
out_tableName The output table name for the value expression.

Implements AENamedRelationalExpr.

const std::set<simba_uint16>& GetUpdatedColumnIndexes (  )  const

Retrieves the indexes of updated columns when the AETable is being used in a UPDATE statement.

Returns:
a set of zero-based updated column indexes.
bool IsDelete (  ) 

Indicates whether this AETable is being used in a DELETE statement. If this and IsUpdate() both return true, the statement is a query.

Returns:
true if this AETable is being used in an DELETE statement; false otherwise.
virtual bool IsEqual ( const AENode in_another  )  const [virtual]

Tells whether the two nodes are equal.

Two AETable's are equal if IsEqualComprehensive() returns true.

Parameters:
in_another Another node to compare to. (NOT OWN)
Returns:
true if two nodes are equal, false otherwise.

Reimplemented from AENode.

bool IsUpdate (  ) 

Indicates whether this AETable is being used in a UPDATE statement. If this and IsDelete() both return true, the statement is a query.

Returns:
true if this AETable is being used in an UPDATE statement; false otherwise.
virtual void SetDataNeeded ( simba_uint16  in_column,
bool  in_isNeeded 
) [virtual]

Indicates whether RetrieveData(...) might be called on the given column. This applies to any subsequent Move(...) calls.

Parameters:
in_column A zero-based column index.
in_isNeeded Indicates whether data may be retrieved from the given column by the ODBC layer or not.
Exceptions:
SEInvalidArgumentException if in_column is invalid.

Implements AERelationalExpr.

void SetIsDelete (  ) 

Sets the flag indicating that this AETable is being used in a DELETE statement.

void SetIsUpdate (  ) 

Sets the flag indicating that this AETable is being used in an UPDATE statement.

void SetTable ( SharedPtr< Simba::SQLEngine::DSIExtResultSet in_table  ) 

Resets the underlying DSII table.

Parameters:
in_table The DSII table that this object should represent.
Exceptions:
SEInvalidArgumentException when in_table is NULL.
SEInvalidArgumentException if the columns in in_table is different from the columns in m_table if m_table is not already set.
void SetUpdatedColumnIndexes ( const std::set< simba_uint16 > &  in_updatedColumns  ) 

Sets the indexes of updated columns when the AETable is being used in a UPDATE statement.

NOTE: SetIsUpdate() must be called before this method can be called.

Parameters:
in_updatedColumns A set of zero-based updated column indexes.
Exceptions:
SEInvalidArgumentException if this AETable is not being set as updated.

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