AEMerge Class Reference

The AEMerge class models the <merge statement> statement in section 14.9 of the SQL-2003 spec. More...

Inherits AEQuinaryExprT< AERowCountStatement, AETable, AERelationalExpr, AEBooleanExpr, AESetClauseList, AEValueList >.

List of all members.

Public Member Functions

virtual void AcceptVisitor (AENodeVisitor &in_visitor)
 Calls the correct method on the visitor.
 AEMerge (const AEMerge &in_other)
 Copy constructor.
 AEMerge (AutoPtr< AETable > in_targetTable, AutoPtr< AERelationalExpr > in_tableRef, AutoPtr< AEBooleanExpr > in_searchCondition, AutoPtr< AESetClauseList > in_updateList, AutoPtr< AEValueList > in_insertColumnList, AutoPtr< AEValueList > in_insertValueList)
 Constructor.
virtual AEMergeClone () const
 Creates a clone of this node object.
virtual const AEMergeGetAsMerge () const
 Get the statement as an AEMerge object.
virtual AEMergeGetAsMerge ()
 Get the statement as an AEMerge object.
virtual const AENodeGetChild (simba_size_t in_index) const
 Get a pointer reference to the specified child node.
virtual AENodeGetChild (simba_size_t in_index)
 Get a pointer reference to the specified child node.
virtual simba_size_t GetChildCount () const
 Get the number of child nodes that this node has.
virtual const
Simba::DSI::ExecutedSQLInfo
GetExecutedSQLInfo () const
 Return information about this statement.
const AEValueListGetInsertColumnList () const
 Get a reference to the insert column list corresponding to insert value list.
AEValueListGetInsertColumnList ()
 Get a reference to the insert column list corresponding to insert value list.
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.
bool HasWhenMatchedClause () const
 Whether the when matched clause is present.
bool HasWhenNotMatchedClause () const
 Whether the when not matched clause is present.
bool IsRecursive ()
 Determine if the merge table is present in the source tree.
void SetInsertColumnList (AutoPtr< AEValueList > in_insertColumnList)
 Grants the ownership of the insert column list to this object.
AutoPtr< AEValueListTakeInsertColumnList ()
 Takes the ownership of the insert column list away from this object.
virtual void Validate ()
 Validates the node.
virtual ~AEMerge ()
 Destructor.

Detailed Description

The AEMerge class models the <merge statement> statement in section 14.9 of the SQL-2003 spec.

The general format of a Merge operation is as follows:

MERGE INTO target_table USING ref_table ON search_condition merge_condition_specification


Constructor & Destructor Documentation

AEMerge ( AutoPtr< AETable in_targetTable,
AutoPtr< AERelationalExpr in_tableRef,
AutoPtr< AEBooleanExpr in_searchCondition,
AutoPtr< AESetClauseList in_updateList,
AutoPtr< AEValueList in_insertColumnList,
AutoPtr< AEValueList in_insertValueList 
)

Constructor.

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

Parameters:
in_targetTable The target table.
in_tableRef The reference table or sub-query.
in_searchCondition The search condition.
in_updateList The update set following when matched clause.
in_isertColumnList The columns to insert into following when not matched clause.
in_insertValueList The value list to insert, following when not matched clause.
Exceptions:
SEInvalidArgumentException when either in_targetTable, in_relationalExprOprand, in_searchCondition, in_setClause_list or in_insertValueList do not own an appropriate object.
AEMerge ( const AEMerge in_other  ) 

Copy constructor.

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

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

Creates a clone of this node object.

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

Implements AERowCountStatement.

virtual const AEMerge* GetAsMerge (  )  const [inline, virtual]

Get the statement as an AEMerge object.

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

Reimplemented from AEStatement.

virtual AEMerge* GetAsMerge (  )  [inline, virtual]

Get the statement as an AEMerge object.

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

Reimplemented from AEStatement.

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

Get a pointer reference to the specified child node.

Parameters:
in_index The zero-based index for the child.
Exceptions:
SEInvalidArgumentException when in_index is invalid.
Returns:
A pointer reference to the requested child node. (NOT OWN).

Reimplemented from AEQuinaryExprT< AERowCountStatement, AETable, AERelationalExpr, AEBooleanExpr, AESetClauseList, AEValueList >.

virtual AENode* GetChild ( simba_size_t  in_index  )  [virtual]

Get a pointer reference to the specified child node.

Parameters:
in_index The zero-based index for the child.
Exceptions:
SEInvalidArgumentException when in_index is invalid.
Returns:
A pointer reference to the requested child node. (NOT OWN).

Reimplemented from AEQuinaryExprT< AERowCountStatement, AETable, AERelationalExpr, AEBooleanExpr, AESetClauseList, AEValueList >.

virtual simba_size_t GetChildCount (  )  const [virtual]

Get the number of child nodes that this node has.

Returns:
The number of child nodes.

Reimplemented from AEQuinaryExprT< AERowCountStatement, AETable, AERelationalExpr, AEBooleanExpr, AESetClauseList, AEValueList >.

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

Return information about this statement.

Returns:
The executed SQL information linked to this statement.

Implements AEStatement.

const AEValueList* GetInsertColumnList (  )  const

Get a reference to the insert column list corresponding to insert value list.

Returns:
A const pointer reference to the insert column list. (NOT OWN)
AEValueList* GetInsertColumnList (  ) 

Get a reference to the insert column list corresponding to insert value list.

Returns:
A pointer reference to the insert column list. (NOT OWN)
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.

bool HasWhenMatchedClause (  )  const

Whether the when matched clause is present.

Returns:
True if when matched clause is present; false otherwise.
bool HasWhenNotMatchedClause (  )  const

Whether the when not matched clause is present.

Returns:
True if when not matched clause is present; false otherwise.
bool IsRecursive (  ) 

Determine if the merge table is present in the source tree.

Returns:
True if the merge table is present in the source tree; false otherwise.
void SetInsertColumnList ( AutoPtr< AEValueList in_insertColumnList  ) 

Grants the ownership of the insert column list to this object.

Parameters:
in_insertColumnList The insert columns. (OWN)
Exceptions:
SEInvalidArgumentException when in_insertColumnList.IsNull() returns true.
SEInvalidOperationException when this object already has an insert value list.
AutoPtr<AEValueList> TakeInsertColumnList (  ) 

Takes the ownership of the insert column list away from this object.

If the caller only wants to access the insert value list call GetInsertColumnList() instead.

Exceptions:
SEInvalidOperationException when m_insertColumnList.IsNull() returns true.
Returns:
the insert columns. (OWN)
virtual void Validate (  )  [virtual]

Validates the node.

This is a default base implementation does nothing and it cascades to any children.

Exceptions:
AEInvalidArgumentException if the node is not valid.
SESqlErrorException if no merge operation specified.

Reimplemented from AENode.


The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:16 2017 for SimbaEngine 10.1.3.1011 by simba