AEStatement Class Reference

An abstract class that all concrete statement classes inherit. More...

Inherits Simba::SQLEngine::AENode.

Inherited by AEBinaryExprT< AEStatement, AEValueList, AERowCountStatement >, AEUnaryExprT< AEStatement, AEProcedure >, AEUnaryExprT< AEStatement, AEQueryOperation >, and AERowCountStatement.

List of all members.

Public Member Functions

void CacheBooleanExpr (AutoPtr< AEBooleanExpr > in_booleanExpr)
 Extend the lifetime of the given boolean expression to match that of this statement.
void CacheValueExpr (SharedPtr< AEValueExpr > in_valueExpr)
 Extend the lifetime of the given value expression to match that of this statement.
virtual const AEAlterTableGetAsAlterTable () const
 Get the statement as an AEAlterTable object.
virtual AEAlterTableGetAsAlterTable ()
 Get the statement as an AEAlterTable object.
virtual const AECreateIndexGetAsCreateIndex () const
 Get the statement as an AECreateIndex object.
virtual AECreateIndexGetAsCreateIndex ()
 Get the statement as an AECreateIndex object.
virtual const AECreateTableGetAsCreateTable () const
 Get the statement as an AECreateTable object.
virtual AECreateTableGetAsCreateTable ()
 Get the statement as an AECreateTable object.
virtual const
AECreateTableAsSelect
GetAsCreateTableAsSelect () const
 Get the statement as an AECreateTableAsSelect object.
virtual AECreateTableAsSelectGetAsCreateTableAsSelect ()
 Get the statement as an AECreateTableAsSelect object.
virtual const AECreateViewGetAsCreateView () const
 Get the statement as an AECreateView object.
virtual AECreateViewGetAsCreateView ()
 Get the statement as an AECreateView object.
virtual const AEDropIndexGetAsDropIndex () const
 Get the statement as an AEDropIndex object.
virtual AEDropIndexGetAsDropIndex ()
 Get the statement as an AEDropIndex object.
virtual const AEDropTableGetAsDropTable () const
 Get the statement as an AEDropTable object.
virtual AEDropTableGetAsDropTable ()
 Get the statement as an AEDropTable object.
virtual const AEDropViewGetAsDropView () const
 Get the statement as an AEDropView object.
virtual AEDropViewGetAsDropView ()
 Get the statement as an AEDropView object.
virtual const AEGrantGetAsGrant () const
 Get the statement as an AEGrant object.
virtual AEGrantGetAsGrant ()
 Get the statement as an AEGrant object.
virtual const AEInsertGetAsInsert () const
 Get the statement as an AEInsert object.
virtual AEInsertGetAsInsert ()
 Get the statement as an AEInsert object.
virtual const AEInsertDefaultsGetAsInsertDefaults () const
 Get the statement as an AEInsertDefaults object.
virtual AEInsertDefaultsGetAsInsertDefaults ()
 Get the statement as an AEInsertDefaults object.
virtual const AEMergeGetAsMerge () const
 Get the statement as an AEMerge object.
virtual AEMergeGetAsMerge ()
 Get the statement as an AEMerge object.
virtual const AEModifiedRowsGetAsModifiedRows () const
 Get the statement as an AEModifiedRows object.
virtual AEModifiedRowsGetAsModifiedRows ()
 Get the statement as an AEModifiedRows object.
virtual const AEProcedureGetAsProcedure () const
 Get the statement as an AEProcedure object.
virtual AEProcedureGetAsProcedure ()
 Get the statement as an AEProcedure object.
virtual const AEQueryGetAsQuery () const
 Get the statement as an AEQuery object.
virtual AEQueryGetAsQuery ()
 Get the statement as an AEQuery object.
virtual const AERevokeGetAsRevoke () const
 Get the statement as an AERevoke object.
virtual AERevokeGetAsRevoke ()
 Get the statement as an AERevoke object.
virtual const AERowCountStatementGetAsRowCountStatement () const
 Get the statement as an AERowCountStatement object.
virtual AERowCountStatementGetAsRowCountStatement ()
 Get the statement as an AERowCountStatement object.
virtual const AESearchedDeleteGetAsSearchedDelete () const
 Get the statement as an AESearchedDelete object.
virtual AESearchedDeleteGetAsSearchedDelete ()
 Get the statement as an AESearchedDelete object.
virtual const AESearchedUpdateGetAsSearchedUpdate () const
 Get the statement as an AESearchedUpdate object.
virtual AESearchedUpdateGetAsSearchedUpdate ()
 Get the statement as an AESearchedUpdate object.
virtual const AESetCatalogGetAsSetCatalog () const
 Get the statement as an AESetCatalog object.
virtual AESetCatalogGetAsSetCatalog ()
 Get the statement as an AESetCatalog object.
virtual const AESetSchemaGetAsSetSchema () const
 Get the statement as an AESetSchema object.
virtual AESetSchemaGetAsSetSchema ()
 Get the statement as an AESetSchema object.
virtual const AEStatementGetAsStatement () const
 Retrieves the object as an AEStatement object.
virtual AEStatementGetAsStatement ()
 Get the object as an AEStatement object.
virtual const
Simba::DSI::ExecutedSQLInfo
GetExecutedSQLInfo () const =0
 Return information about this statement.
SharedPtr< ETParameterDataGetOrCreateParameterData (AEParameter *in_parameter)
 Get the shared parameter data object for a given parameter, creating it if it does not already exist.
const std::map< simba_uint16,
SharedPtr< ETParameterData > > & 
GetParameterDatas () const
 Get the ETParameterData objects for the materialized parameters.
const std::vector
< AENamedRelationalExpr * > & 
GetReferencedNamedRelations ()
 Get a list of named relations referenced in the query.
const std::vector< AETable * > & GetReferencedTables ()
 Get a list of tables referenced in the query. Also call SetDataNeeded() for needed columns of the referenced tables.
virtual bool IsStatement () const
 Tells whether this is an AEStatement node.
void Reset ()
 Reset this statement so that it is ready to be materialized (again).
virtual ~AEStatement ()
 Destructor.

Protected Member Functions

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

Protected Attributes

AutoVector< AEBooleanExprm_booleanExprCache
std::map< simba_uint16,
SharedPtr< ETParameterData > > 
m_materializedParameterData
std::vector
< AENamedRelationalExpr * > 
m_referencedNamedRelations
std::vector< AETable * > m_referencedTables
std::vector< SharedPtr
< AEValueExpr > > 
m_valueExprCache

Detailed Description

An abstract class that all concrete statement classes inherit.

Every concrete statement class represents a type of SQL statement. For example, the AEQuery class is designed to represent a query expression (<query expression> construct in the SQL-92 Spec). At the top of the statement node hierarchy is the abstract AEStatement base class. All concrete Statement classes derive from this class. An AEStatement node can only be the root node of an AE tree. The root node of an AE tree is always an AEStatement node.

The list of end nodes which subclass AEStatement is:


Constructor & Destructor Documentation

virtual ~AEStatement (  )  [virtual]

Destructor.

AEStatement (  )  [protected]

Default constructor.

AEStatement ( const AEStatement in_other  )  [protected]

Copy constructor.

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

Parameters:
in_other The other node to create copy from.

Member Function Documentation

void CacheBooleanExpr ( AutoPtr< AEBooleanExpr in_booleanExpr  ) 

Extend the lifetime of the given boolean expression to match that of this statement.

void CacheValueExpr ( SharedPtr< AEValueExpr in_valueExpr  ) 

Extend the lifetime of the given value expression to match that of this statement.

virtual const AEAlterTable* GetAsAlterTable (  )  const [virtual]

Get the statement as an AEAlterTable object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEAlterTable object. (NOT OWN)

Reimplemented in AEAlterTable.

virtual AEAlterTable* GetAsAlterTable (  )  [virtual]

Get the statement as an AEAlterTable object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEAlterTable object. (NOT OWN)

Reimplemented in AEAlterTable.

virtual const AECreateIndex* GetAsCreateIndex (  )  const [virtual]

Get the statement as an AECreateIndex object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateIndex object. (NOT OWN)

Reimplemented in AECreateIndex.

virtual AECreateIndex* GetAsCreateIndex (  )  [virtual]

Get the statement as an AECreateIndex object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateIndex object. (NOT OWN)

Reimplemented in AECreateIndex.

virtual const AECreateTable* GetAsCreateTable (  )  const [virtual]

Get the statement as an AECreateTable object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateTable object. (NOT OWN)

Reimplemented in AECreateTable.

virtual AECreateTable* GetAsCreateTable (  )  [virtual]

Get the statement as an AECreateTable object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateTable object. (NOT OWN)

Reimplemented in AECreateTable.

virtual const AECreateTableAsSelect* GetAsCreateTableAsSelect (  )  const [virtual]

Get the statement as an AECreateTableAsSelect object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateTableAsSelect object. (NOT OWN)

Reimplemented in AECreateTableAsSelect.

virtual AECreateTableAsSelect* GetAsCreateTableAsSelect (  )  [virtual]

Get the statement as an AECreateTableAsSelect object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateTableAsSelect object. (NOT OWN)

Reimplemented in AECreateTableAsSelect.

virtual const AECreateView* GetAsCreateView (  )  const [virtual]

Get the statement as an AECreateView object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateView object. (NOT OWN)

Reimplemented in AECreateView.

virtual AECreateView* GetAsCreateView (  )  [virtual]

Get the statement as an AECreateView object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AECreateView object. (NOT OWN)

Reimplemented in AECreateView.

virtual const AEDropIndex* GetAsDropIndex (  )  const [virtual]

Get the statement as an AEDropIndex object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEDropIndex object. (NOT OWN)

Reimplemented in AEDropIndex.

virtual AEDropIndex* GetAsDropIndex (  )  [virtual]

Get the statement as an AEDropIndex object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEDropIndex object. (NOT OWN)

Reimplemented in AEDropIndex.

virtual const AEDropTable* GetAsDropTable (  )  const [virtual]

Get the statement as an AEDropTable object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEDropTable object. (NOT OWN)

Reimplemented in AEDropTable.

virtual AEDropTable* GetAsDropTable (  )  [virtual]

Get the statement as an AEDropTable object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEDropTable object. (NOT OWN)

Reimplemented in AEDropTable.

virtual const AEDropView* GetAsDropView (  )  const [virtual]

Get the statement as an AEDropView object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEDropView object. (NOT OWN)

Reimplemented in AEDropView.

virtual AEDropView* GetAsDropView (  )  [virtual]

Get the statement as an AEDropView object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEDropView object. (NOT OWN)

Reimplemented in AEDropView.

virtual const AEGrant* GetAsGrant (  )  const [virtual]

Get the statement as an AEGrant object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEGrant object. (NOT OWN)

Reimplemented in AEGrant.

virtual AEGrant* GetAsGrant (  )  [virtual]

Get the statement as an AEGrant object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEGrant object. (NOT OWN)

Reimplemented in AEGrant.

virtual const AEInsert* GetAsInsert (  )  const [virtual]

Get the statement as an AEInsert object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEInsert object. (NOT OWN)

Reimplemented in AEInsert.

virtual AEInsert* GetAsInsert (  )  [virtual]

Get the statement as an AEInsert object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEInsert object. (NOT OWN)

Reimplemented in AEInsert.

virtual const AEInsertDefaults* GetAsInsertDefaults (  )  const [virtual]

Get the statement as an AEInsertDefaults object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEInsertDefaults object. (NOT OWN)

Reimplemented in AEInsertDefaults.

virtual AEInsertDefaults* GetAsInsertDefaults (  )  [virtual]

Get the statement as an AEInsertDefaults object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEInsertDefaults object. (NOT OWN)

Reimplemented in AEInsertDefaults.

virtual const AEMerge* GetAsMerge (  )  const [virtual]

Get the statement as an AEMerge object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEMerge object. (NOT OWN)

Reimplemented in AEMerge.

virtual AEMerge* GetAsMerge (  )  [virtual]

Get the statement as an AEMerge object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEMerge object. (NOT OWN)

Reimplemented in AEMerge.

virtual const AEModifiedRows* GetAsModifiedRows (  )  const [virtual]

Get the statement as an AEModifiedRows object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEModifiedRows object. (NOT OWN)

Reimplemented in AEModifiedRows.

virtual AEModifiedRows* GetAsModifiedRows (  )  [virtual]

Get the statement as an AEModifiedRows object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEModifiedRows object. (NOT OWN)

Reimplemented in AEModifiedRows.

virtual const AEProcedure* GetAsProcedure (  )  const [virtual]

Get the statement as an AEProcedure object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEProcedure object. (NOT OWN)
virtual AEProcedure* GetAsProcedure (  )  [virtual]

Get the statement as an AEProcedure object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEProcedure object. (NOT OWN)
virtual const AEQuery* GetAsQuery (  )  const [virtual]

Get the statement as an AEQuery object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEQuery object. (NOT OWN)

Reimplemented in AEQuery.

virtual AEQuery* GetAsQuery (  )  [virtual]

Get the statement as an AEQuery object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AEQuery object. (NOT OWN)

Reimplemented in AEQuery.

virtual const AERevoke* GetAsRevoke (  )  const [virtual]

Get the statement as an AERevoke object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AERevoke object. (NOT OWN)

Reimplemented in AERevoke.

virtual AERevoke* GetAsRevoke (  )  [virtual]

Get the statement as an AERevoke object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AERevoke object. (NOT OWN)

Reimplemented in AERevoke.

virtual const AERowCountStatement* GetAsRowCountStatement (  )  const [virtual]

Get the statement as an AERowCountStatement object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AERowCountStatement object. (NOT OWN)

Reimplemented in AERowCountStatement.

virtual AERowCountStatement* GetAsRowCountStatement (  )  [virtual]

Get the statement as an AERowCountStatement object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AERowCountStatement object. (NOT OWN)

Reimplemented in AERowCountStatement.

virtual const AESearchedDelete* GetAsSearchedDelete (  )  const [virtual]

Get the statement as an AESearchedDelete object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESearchedDelete object. (NOT OWN)

Reimplemented in AESearchedDelete.

virtual AESearchedDelete* GetAsSearchedDelete (  )  [virtual]

Get the statement as an AESearchedDelete object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESearchedDelete object. (NOT OWN)

Reimplemented in AESearchedDelete.

virtual const AESearchedUpdate* GetAsSearchedUpdate (  )  const [virtual]

Get the statement as an AESearchedUpdate object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESearchedUpdate object. (NOT OWN)

Reimplemented in AESearchedUpdate.

virtual AESearchedUpdate* GetAsSearchedUpdate (  )  [virtual]

Get the statement as an AESearchedUpdate object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESearchedUpdate object. (NOT OWN)

Reimplemented in AESearchedUpdate.

virtual const AESetCatalog* GetAsSetCatalog (  )  const [virtual]

Get the statement as an AESetCatalog object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESetCatalog object. (NOT OWN)

Reimplemented in AESetCatalog.

virtual AESetCatalog* GetAsSetCatalog (  )  [virtual]

Get the statement as an AESetCatalog object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESetCatalog object. (NOT OWN)

Reimplemented in AESetCatalog.

virtual const AESetSchema* GetAsSetSchema (  )  const [virtual]

Get the statement as an AESetSchema object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESetSchema object. (NOT OWN)

Reimplemented in AESetSchema.

virtual AESetSchema* GetAsSetSchema (  )  [virtual]

Get the statement as an AESetSchema object.

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

Exceptions:
SEInvalidOperationException if this object is not of expected type.
Returns:
this object as an AESetSchema object. (NOT OWN)

Reimplemented in AESetSchema.

virtual const AEStatement* GetAsStatement (  )  const [virtual]

Retrieves the object as an AEStatement object.

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

Returns:
this object as an AEStatement object. (NOT OWN)

Reimplemented from AENode.

virtual AEStatement* GetAsStatement (  )  [virtual]

Get the object as an AEStatement object.

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

Returns:
this object always. (NOT OWN)

Reimplemented from AENode.

virtual const Simba::DSI::ExecutedSQLInfo& GetExecutedSQLInfo (  )  const [pure virtual]

Return information about this statement.

Returns:
The executed SQL information linked to this statement.

Implemented in AECreateIndex, AECreateTable, AECreateTableAsSelect, AEDropIndex, AEDropTable, AEInsert, AEInsertDefaults, AEMerge, AEModifiedRows, AEProcedureCall, AEQuery, AESearchedDelete, and AESearchedUpdate.

SharedPtr<ETParameterData> GetOrCreateParameterData ( AEParameter in_parameter  ) 

Get the shared parameter data object for a given parameter, creating it if it does not already exist.

Parameters:
in_parameter The parameter for which to retrieve the associated ETParameterData object. Cannot be NULL. (NOT OWN)
Returns:
A map from parameter index to materialized parameter nodes.
const std::map<simba_uint16, SharedPtr<ETParameterData> >& GetParameterDatas (  )  const

Get the ETParameterData objects for the materialized parameters.

const std::vector<AENamedRelationalExpr*>& GetReferencedNamedRelations (  ) 

Get a list of named relations referenced in the query.

Returns:
The list of referenced named relations. (NOT OWN)
const std::vector<AETable*>& GetReferencedTables (  ) 

Get a list of tables referenced in the query. Also call SetDataNeeded() for needed columns of the referenced tables.

Returns:
The list of referenced tables. (NOT OWN)
virtual bool IsStatement (  )  const [virtual]

Tells whether this is an AEStatement node.

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

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

Reimplemented from AENode.

void Reset (  ) 

Reset this statement so that it is ready to be materialized (again).


Member Data Documentation

std::map<simba_uint16, SharedPtr<ETParameterData> > m_materializedParameterData [protected]
std::vector<AETable*> m_referencedTables [protected]
std::vector<SharedPtr<AEValueExpr> > m_valueExprCache [protected]

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