TDAConstantExpression
Overview
The TDAConstantExpression is a descendant of the TDAWhereExpression and represents a constant in an expression.
Location
- Unit: uDAWhere.pas
- Ancestry: TDAWhereExpression | TDAConstantExpression
constructor Create (Variant) overload
Creates a new expression with a supplied aValue.
constructor Create(const aValue: Variant)
Parameters:
- aValue: Value of the constant.
constructor Create (Variant, TDADataType) overload
Creates a new expression with a supplied aValue and aType.
constructor Create(const aValue: Variant; aType: TDADataType)
Parameters:
- aValue: Value of the constant.
- aType: Data type of the constant.
aType
Data type of the constant represented in the TDAConstantExpression.
property aType: TDADataType read write
DeserializeObject
Gets the object of the given TDAConstantExpression from the serialized string.
class function DeserializeObject(const s: UnicodeString; dt: TDADataType): Variant
Parameters:
- s: string
- dt: datatype
DoValidate protected (declared in TDAWhereExpression)
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 override
function GetWhereKind: TDAWhereKind
Kind (declared in TDAWhereExpression)
property Kind: TDAWhereKind read
ParseException protected (declared in TDAWhereExpression)
Raises EDAWhereParseXmlException.
procedure ParseException(aName: string)
Parameters:
- aName: property name.
ParseExpression (IXmlNode, string): TDAWhereExpression protected overload (declared in TDAWhereExpression)
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 (declared in TDAWhereExpression)
Creates new Where expression from XML node.
class function ParseExpression(xr: IXmlNode): TDAWhereExpression
Parameters:
- xr: given XML node.
ReadFromXml override
Reads where expression from the XML.
procedure ReadFromXml(xr: IXmlNode)
Parameters:
- xr: source node
RemoveEmptyNodes (declared in TDAWhereExpression)
class procedure RemoveEmptyNodes(aNode: IXMLNode)
Parameters:
- aNode:
SerializeObject
Writes the object of the given type to the string.
class function SerializeObject(const v: Variant; dt: TDADataType): UnicodeString
Parameters:
- v: value
- dt: datatype
Validate virtual (declared in TDAWhereExpression)
Validates properties of expression.
procedure Validate
Value
Value of the constant represented in the TDAConstantExpression.
property Value: Variant read write
WriteToXml override
Writes where expression to the XML.
procedure WriteToXml(sw: IXmlNode)
Parameters:
- sw: destination node
aType
Data type of the constant represented in the TDAConstantExpression.
property aType: TDADataType read write
Kind (declared in TDAWhereExpression)
property Kind: TDAWhereKind read
Value
Value of the constant represented in the TDAConstantExpression.
property Value: Variant read write
DeserializeObject
Gets the object of the given TDAConstantExpression from the serialized string.
class function DeserializeObject(const s: UnicodeString; dt: TDADataType): Variant
Parameters:
- s: string
- dt: datatype
ParseExpression (IXmlNode): TDAWhereExpression overload (declared in TDAWhereExpression)
Creates new Where expression from XML node.
class function ParseExpression(xr: IXmlNode): TDAWhereExpression
Parameters:
- xr: given XML node.
RemoveEmptyNodes (declared in TDAWhereExpression)
class procedure RemoveEmptyNodes(aNode: IXMLNode)
Parameters:
- aNode:
SerializeObject
Writes the object of the given type to the string.
class function SerializeObject(const v: Variant; dt: TDADataType): UnicodeString
Parameters:
- v: value
- dt: datatype
constructor Create (Variant) overload
Creates a new expression with a supplied aValue.
constructor Create(const aValue: Variant)
Parameters:
- aValue: Value of the constant.
constructor Create (Variant, TDADataType) overload
Creates a new expression with a supplied aValue and aType.
constructor Create(const aValue: Variant; aType: TDADataType)
Parameters:
- aValue: Value of the constant.
- aType: Data type of the constant.
DoValidate protected (declared in TDAWhereExpression)
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 override
function GetWhereKind: TDAWhereKind
ParseException protected (declared in TDAWhereExpression)
Raises EDAWhereParseXmlException.
procedure ParseException(aName: string)
Parameters:
- aName: property name.
ParseExpression (IXmlNode, string): TDAWhereExpression protected overload (declared in TDAWhereExpression)
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 override
Reads where expression from the XML.
procedure ReadFromXml(xr: IXmlNode)
Parameters:
- xr: source node
Validate virtual (declared in TDAWhereExpression)
Validates properties of expression.
procedure Validate
WriteToXml override
Writes where expression to the XML.
procedure WriteToXml(sw: IXmlNode)
Parameters:
- sw: destination node