AELikePredicate Class Reference

This class models the <like predicate> in the SQL-92: More...

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

List of all members.

Public Member Functions

virtual void AcceptVisitor (AENodeVisitor &in_visitor)
 Calls the correct method on the visitor.
 AELikePredicate (const AELikePredicate &in_other)
 Copy constructor.
 AELikePredicate (Simba::SQLEngine::DSIExtDataEngineContext *in_context, SharedPtr< AEValueExpr > in_firstExpression, SharedPtr< AEValueExpr > in_secondExpression, SharedPtr< AEValueExpr > in_escapeCharacter=SharedPtr< AEValueExpr >(NULL))
 Constructor.
virtual AELikePredicateClone () const
 Creates a clone of this node object.
virtual const AELikePredicateGetAsLikePredicate () const
 Retrieves the object as an AELikePredicate object.
virtual AELikePredicateGetAsLikePredicate ()
 Retrieves the object as an AELikePredicate object.
virtual const AENodeGetChild (simba_size_t in_index) const
 Gets a pointer reference to the specified child node.
virtual AENodeGetChild (simba_size_t in_index)
 Gets a pointer reference to the specified child node.
virtual simba_size_t GetChildCount () const
 Gets the number of child nodes that this node has.
AEValueExprGetEscapeCharacter () const
 Gets a pointer reference to the value object representing <escape character> in <like predicate>.
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.
bool HasEscapeCharacter () const
 Returns whether or not this AELikePredicate has an EscapeCharacter expression.
virtual bool IsPredicate () const
 Determines if this is a predicate node.
void SetEscapeCharacter (SharedPtr< AEValueExpr > in_valueExpr)
 Sets the escape character to the given value expression.
SharedPtr< AEValueExprTakeEscapeCharacter ()
 Takes the ownership of the value object representing <escape character> in <like predicate> away from this node.
virtual ~AELikePredicate ()
 Destructor.

Detailed Description

This class models the <like predicate> in the SQL-92:

<like predicate> ::= <match value> [ NOT ] LIKE <pattern> [ ESCAPE <escape character> ]

Will have two or three children (GetChildCount() returns 2 or 3). There will be three children if an escape character is supplied to the like expression:


Constructor & Destructor Documentation

AELikePredicate ( Simba::SQLEngine::DSIExtDataEngineContext in_context,
SharedPtr< AEValueExpr in_firstExpression,
SharedPtr< AEValueExpr in_secondExpression,
SharedPtr< AEValueExpr in_escapeCharacter = SharedPtrAEValueExpr >(NULL) 
)

Constructor.

An AELikePredicate represents the following parse tree construct: Expression [NOTLIKE | LIKE] Expression EscapeCharacter_Opt

Parameters:
in_context The context for the current query. (NOT OWN)
in_firstExpression The first Expression.
in_secondExpression The second Expression.
in_escapeCharacter The escape character.
AELikePredicate ( const AELikePredicate in_other  ) 

Copy constructor.

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

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

Creates a clone of this node object.

Returns:
A clone of this node object. (OWN)
virtual const AELikePredicate* GetAsLikePredicate (  )  const [virtual]

Retrieves the object as an AELikePredicate object.

Overrides the method defined in AEBooleanExpr.

Returns:
this object as an AELikePredicate object. (NOT OWN)
virtual AELikePredicate* GetAsLikePredicate (  )  [virtual]

Retrieves the object as an AELikePredicate object.

Overrides the method defined in AEBooleanExpr.

Returns:
this object as an AELikePredicate object. (NOT OWN)
virtual const AENode* GetChild ( simba_size_t  in_index  )  const [virtual]

Gets 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.
SEInvalidOperationException when this is a leaf node.
Returns:
A pointer reference to the requested child node. (NOT OWN)

Reimplemented from AEBinaryExprT< BaseNodeT, LOperandT, ROperandT, LOperandPtrT, ROperandPtrT >.

virtual AENode* GetChild ( simba_size_t  in_index  )  [virtual]

Gets 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.
SEInvalidOperationException when this is a leaf node.
Returns:
A pointer reference to the requested child node. (NOT OWN)

Reimplemented from AEBinaryExprT< BaseNodeT, LOperandT, ROperandT, LOperandPtrT, ROperandPtrT >.

virtual simba_size_t GetChildCount (  )  const [virtual]

Gets the number of child nodes that this node has.

Returns:
The number of child nodes.

Reimplemented from AEBinaryExprT< BaseNodeT, LOperandT, ROperandT, LOperandPtrT, ROperandPtrT >.

AEValueExpr* GetEscapeCharacter (  )  const

Gets a pointer reference to the value object representing <escape character> in <like predicate>.

The caller of the method does not own the returned object. If it wishes to take control of the ownership of the value object representing <escape character> in <like predicate>, call TakeEscapeCharacter() instead.

Returns:
a pointer reference to the value object representing <escape Character> in <like predicate> (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.
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.
bool HasEscapeCharacter (  )  const

Returns whether or not this AELikePredicate has an EscapeCharacter expression.

Returns:
True if this AELikePredicate has an EscapeCharacter expression; false otherwise.
virtual bool IsPredicate (  )  const [virtual]

Determines if this is a predicate node.

This default implementation always returns false. All predicate node must override it.

Returns:
True if this is a predicate node, false otherwise.
void SetEscapeCharacter ( SharedPtr< AEValueExpr in_valueExpr  ) 

Sets the escape character to the given value expression.

Parameters:
in_valueExpr The value expression to set the escape character to.
SharedPtr<AEValueExpr> TakeEscapeCharacter (  ) 

Takes the ownership of the value object representing <escape character> in <like predicate> away from this node.

Exceptions:
SEInvalidOperationException if this object does not currently own the value expression representing <escape character>.
Returns:
a pointer reference to the value object representing <escape Character> in <like predicate> (OWN)

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