AEBinaryValueExpr Class Reference

An abstract base class for all binary operations. More...

Inherits Simba::SQLEngine::AEBinaryExprT< AEValueExpr,AEValueExpr,AEValueExpr,SharedPtr< AEValueExpr >,SharedPtr< AEValueExpr > >.

Inherited by AEAdd, AEDivide, AEMultiply, and AESubtract.

List of all members.

Public Member Functions

virtual AEBinaryValueExprClone () const =0
 Creates a clone of this node object.
virtual const AEBinaryValueExprGetAsBinaryValueExpr () const
 Retrieve this node as an AEBinaryValueExpr node.
virtual AEBinaryValueExprGetAsBinaryValueExpr ()
 Retrieve this node as an AEBinaryValueExpr node.
virtual bool IsBinaryValueExpr () const
 Determines if this is an AEBinaryValueExpr node.
bool UseConversion ()
 Determine if conversion nodes should be added for the child nodes.
virtual ~AEBinaryValueExpr ()
 Destructor.

Protected Member Functions

 AEBinaryValueExpr (const AEBinaryValueExpr &in_other)
 Copy constructor.
 AEBinaryValueExpr (ICoercionHandler *in_coercionHandler, SharedPtr< AEValueExpr > in_leftOperand, SharedPtr< AEValueExpr > in_rightOperand)
 Constructor.
bool DoUpdateMetadata (AELookupTableCode in_operation)
 Updates the SqlTypeMetadata* describing the column, if needed.
void InitializeMetadata (AELookupTableCode in_operation)
 Initializes the metadata.
void UpdateLiteralMetadata (AELookupTableCode in_operation)
 Update any literal child, if possible, so it matches its sibling metadata.

Protected Attributes

ICoercionHandlerm_coercionHandler
 The ICoercionHandler to use for custom coercions. (NOT OWN).
bool m_useConversion

Detailed Description

An abstract base class for all binary operations.

A binary operation takes two value expressions as operands.


Constructor & Destructor Documentation

virtual ~AEBinaryValueExpr (  )  [virtual]

Destructor.

AEBinaryValueExpr ( ICoercionHandler in_coercionHandler,
SharedPtr< AEValueExpr in_leftOperand,
SharedPtr< AEValueExpr in_rightOperand 
) [protected]

Constructor.

Parameters:
in_coercionHandler The ICoercionHandler to use for custom coercions. (NOT OWN)
in_leftOperand The left operand.
in_rightOperand The right operand.
Exceptions:
SEInvalidArgumentException when either of the operands does not own an object.
AEBinaryValueExpr ( const AEBinaryValueExpr in_other  )  [protected]

Copy constructor.

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

Parameters:
in_other The other node to create copy from.

Member Function Documentation

virtual AEBinaryValueExpr* Clone (  )  const [pure virtual]

Creates a clone of this node object.

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

Implemented in AEAdd, AEDivide, AEMultiply, and AESubtract.

bool DoUpdateMetadata ( AELookupTableCode  in_operation  )  [protected]

Updates the SqlTypeMetadata* describing the column, if needed.

Parameters:
in_operation AELookupTableCode to specify which operation the should update be based on.
Returns:
true if the metadata was updated; false otherwise.
virtual const AEBinaryValueExpr* GetAsBinaryValueExpr (  )  const [virtual]

Retrieve this node as an AEBinaryValueExpr node.

Overrides the method defined in AEValueExpr. Sub-classes should not override it again.

Exceptions:
SEInvalidOperationException if this is not an AEBinaryValueExpr node.
Returns:
This node as an AEBinaryValueExpr node. (NOT OWN)
virtual AEBinaryValueExpr* GetAsBinaryValueExpr (  )  [virtual]

Retrieve this node as an AEBinaryValueExpr node.

Overrides the method defined in AEValueExpr. Sub-classes should not override it again.

Exceptions:
SEInvalidOperationException if this is not an AEBinaryValueExpr node.
Returns:
This node as an AEBinaryValueExpr node. (NOT OWN)
void InitializeMetadata ( AELookupTableCode  in_operation  )  [protected]

Initializes the metadata.

NOTE: this method is intended to be called by AEAdd, AESubtract, AEMultiply and AEDivide only

Parameters:
in_operation AELookupTableCode to specify which operation the should initialization be based on.
Exceptions:
SEInvalidArgumentException when the in_operation is not BINARYADD_*, BINARYMINUS_*, MULTIPLICATION_*, or DIVISION_*
SEInvalidOperationException if the metadata cannot be retrieved from the operands
SESqlErrorException if the types cannot be coerced
virtual bool IsBinaryValueExpr (  )  const [virtual]

Determines if this is an AEBinaryValueExpr node.

Overrides the method defined in AEValueExpr. Sub-classes should not override it again.

Returns:
True always since this is an AEBinaryValueExpr node.
void UpdateLiteralMetadata ( AELookupTableCode  in_operation  )  [protected]

Update any literal child, if possible, so it matches its sibling metadata.

Parameters:
in_operation AELookupTableCode to specify which operation the should initialization be based on.

For instance, an approximate numeric may be upgraded to an exact numeric.

bool UseConversion (  )  [inline]

Determine if conversion nodes should be added for the child nodes.

Returns:
true if conversion nodes should be used for the children, false otherwise.

Member Data Documentation

The ICoercionHandler to use for custom coercions. (NOT OWN).

bool m_useConversion [protected]

A flag indicating if conversion nodes should be added for the children of this node.

This is currently only used for addition and subtraction involving SQL_TYPE_TIMESTAMP or SQL_TYPE_DATE as the left operand, and an integer type as the right operand, or when subtracting SQL_TYPE_DATE or SQL_TYPE_TIMESTAMP from themselves.


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