TDAWhereExpression

Overview

The base abstract class for classes that represent WHERE expression tree nodes:

  • TDABetweenExpression represents expression that checks belonging to a range of values;
  • TDABinaryExpression combines two other expressions with a binary operator (such as equality or binary logical operators);
  • TDAConstantExpression - the constant values that appear in an expression are represented through objects of this class;
  • TDAFieldExpression represents the part of expression containing table field names;
  • TDAListExpression is a complex expression, represented by a list of expressions;
  • TDAMacroExpression represents a call to a macro function, which will be processed by Macro Processor.
  • TDANullExpression represents NULL values used in the expression;
  • TDAParameterExpression - the parameters (variables) of an expression are represented through objects of this class;
  • TDAUnaryExpression represents expressions, based in the application of a unary operator (like the change of sign or logical negation) to another, inner expression;

This class is used to dynamically build WHERE statements from code (Dynamic Where feature of Data Abstract).

Location

  • Unit: uDACore.pas


 

DoValidate  protected

Raised exception if aRaiseException is set

procedure DoValidate(aRaiseException: Boolean; aName: string)

Parameters:

  • aRaiseException: specifies should the exception be raised or not.
  • aName: Name of property

GetWhereKind  protected virtual abstract

function GetWhereKind: TDAWhereKind

Kind

property Kind: TDAWhereKind read

ParseException  protected

Raises EDAWhereParseXmlException.

procedure ParseException(aName: string)

Parameters:

  • aName: property name.

ParseExpression (IXmlNode, string): TDAWhereExpression  protected overload

Calls ParseException if xr is nil, otherwise calls overload ParseException.

function ParseExpression(xr: IXmlNode; aName: string): TDAWhereExpression

Parameters:

  • xr: source node.
  • aName: Name of property

ParseExpression (IXmlNode): TDAWhereExpression  overload

Creates new Where expression from XML node.

class function ParseExpression(xr: IXmlNode): TDAWhereExpression

Parameters:

  • xr: given XML node.

ReadFromXml  virtual abstract

Reads where expression from the XML.

procedure ReadFromXml(xr: IXmlNode)

Parameters:

  • xr: source node

RemoveEmptyNodes

class procedure RemoveEmptyNodes(aNode: IXMLNode)

Parameters:

  • aNode:

Validate  virtual

Validates properties of expression.

procedure Validate

WriteToXml  virtual abstract

Writes where expression to the XML.

procedure WriteToXml(sw: IXmlNode)

Parameters:

  • sw: destination node

 

Kind

property Kind: TDAWhereKind read

 

ParseExpression (IXmlNode): TDAWhereExpression  overload

Creates new Where expression from XML node.

class function ParseExpression(xr: IXmlNode): TDAWhereExpression

Parameters:

  • xr: given XML node.

RemoveEmptyNodes

class procedure RemoveEmptyNodes(aNode: IXMLNode)

Parameters:

  • aNode:

 

DoValidate  protected

Raised exception if aRaiseException is set

procedure DoValidate(aRaiseException: Boolean; aName: string)

Parameters:

  • aRaiseException: specifies should the exception be raised or not.
  • aName: Name of property

GetWhereKind  protected virtual abstract

function GetWhereKind: TDAWhereKind

ParseException  protected

Raises EDAWhereParseXmlException.

procedure ParseException(aName: string)

Parameters:

  • aName: property name.

ParseExpression (IXmlNode, string): TDAWhereExpression  protected overload

Calls ParseException if xr is nil, otherwise calls overload ParseException.

function ParseExpression(xr: IXmlNode; aName: string): TDAWhereExpression

Parameters:

  • xr: source node.
  • aName: Name of property

ReadFromXml  virtual abstract

Reads where expression from the XML.

procedure ReadFromXml(xr: IXmlNode)

Parameters:

  • xr: source node

Validate  virtual

Validates properties of expression.

procedure Validate

WriteToXml  virtual abstract

Writes where expression to the XML.

procedure WriteToXml(sw: IXmlNode)

Parameters:

  • sw: destination node