TDASQL92WhereBuilder

Overview

The TDASQL92WhereBuilder is the descendant of the TDASQLWhereBuilder class and represents a rich set of methods to convert WHERE expressions of different types (binary expression, unary expression, constant expression, etc.) to SQL string.

The TDASQL92WhereBuilder class is used to generate auto SQL statements for all database driver types.

You do not need to use this class directly.

Location


 

constructor Create    (declared in TDAWhereBuilder)

Creates a new instance.

constructor Create

constructor Create (IDACustomConnection)  overload    (declared in TDASQLWhereBuilder)

Creates a new instance with a specified database connection.

constructor Create(AConnection: IDACustomConnection)

Parameters:

  • AConnection: specified database connection.

constructor Create (TDASimpleQueryBuilder)  overload    (declared in TDABaseSQLWhereBuilder)

Creates a new instance with a specified query builder object.

constructor Create(AQueryBuilder: TDASimpleQueryBuilder)

Parameters:

  • AQueryBuilder: query builder

AsJson    (declared in TDAWhereBuilder)

property AsJson: UnicodeString read write

AsString    (declared in TDAWhereBuilder)

property AsString: UnicodeString read write

AsXml    (declared in TDAWhereBuilder)

property AsXml: UnicodeString read write

Clear    (declared in TDAWhereBuilder)

Clears all properties.

procedure Clear

ColumnMapping    (declared in TDAWhereBuilder)

Column mapping.

property ColumnMapping: TDAColumnMappingCollection read write

Connection    (declared in TDASQLWhereBuilder)

Represents the database connection that relates to the current TDASQLWhereBuilder object. This property is read-only.

property Connection: IDACustomConnection read

CreateWhereClause    (declared in TDABaseSQLWhereBuilder)

Generates Where clause based on Expression

function CreateWhereClause: string

Expression    (declared in TDAWhereBuilder)

Represents Where expressions.

property Expression: TDAWhereExpression read write

ExpressionToJson    (declared in TDAWhereBuilder)

class function ExpressionToJson(const aExpression: TDAWhereExpression): UnicodeString

Parameters:

  • aExpression:

ExpressionToString    (declared in TDAWhereBuilder)

class function ExpressionToString(const aExpression: TDAWhereExpression): UnicodeString

Parameters:

  • aExpression:

ExpressionToXml    (declared in TDAWhereBuilder)

class function ExpressionToXml(const aExpression: TDAWhereExpression): UnicodeString

Parameters:

  • aExpression:

ExpressionToXmlNode    (declared in TDAWhereBuilder)

Converts TDAWhereExpression to XML node

class function ExpressionToXmlNode(const aExpression: TDAWhereExpression): IXMLNode

Parameters:

  • aExpression: expression

Format    (declared in TDAWhereBuilder)

property Format: TDynamicWhereFormat read write

GenerateFieldName  protected virtual    (declared in TDABaseSQLWhereBuilder)

Generates field name according to column mapping and quotation.

function GenerateFieldName(aTablename: string; aFieldName: string): string

Parameters:

  • aTablename: table name
  • aFieldName: field name

IsEmpty    (declared in TDAWhereBuilder)

Returns True is Expression is empty.

function IsEmpty: Boolean

JsonToExpression    (declared in TDAWhereBuilder)

class function JsonToExpression(const aJson: UnicodeString): TDAWhereExpression

Parameters:

  • aJson:

NewBetweenExpression (TDAWhereExpression, TDAWhereExpression, TDAWhereExpression): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new BETWEEN condition to the WHERE clause:

aExpression BETWEEN aLower AND aUpper
class function NewBetweenExpression(aExpression: TDAWhereExpression; aLower: TDAWhereExpression; aUpper: TDAWhereExpression): TDAWhereExpression

Parameters:

  • aExpression: expression
  • aLower: The minimal value
  • aUpper: The maximum value

NewBetweenExpression (string, string, TDAWhereExpression, TDAWhereExpression): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new BETWEEN condition to the WHERE clause:

aExprTableName.aExprFieldName BETWEEN aLower AND aUpper
class function NewBetweenExpression(const aExprTableName: string; const aExprFieldName: string; aLower: TDAWhereExpression; aUpper: TDAWhereExpression): TDAWhereExpression

Parameters:

  • aExprTableName: table name
  • aExprFieldName: field name
  • aLower: The minimal value
  • aUpper: The maximum value

NewBetweenExpression (string, string, Variant, Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new BETWEEN condition to the WHERE clause:

aExprTableName.aExprFieldName BETWEEN aLower AND aUpper
class function NewBetweenExpression(const aExprTableName: string; const aExprFieldName: string; aLowerValue: Variant; aUpperValue: Variant; aValuesDataType: TDADataType): TDAWhereExpression

Parameters:

  • aExprTableName: table name
  • aExprFieldName: field name
  • aLowerValue: The minimal value
  • aUpperValue: The maximum value
  • aValuesDataType: data type of aLowerValue and aUpperValue

NewBinaryExpression (TDAWhereExpression, TDABinaryOperator, Variant): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(aLeft: TDAWhereExpression; anOp: TDABinaryOperator; const aValue: Variant): TDAWhereExpression

Parameters:

  • aLeft:
  • anOp:
  • aValue:

NewBinaryExpression (TDAWhereExpression, TDABinaryOperator, Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(aLeft: TDAWhereExpression; anOp: TDABinaryOperator; const aValue: Variant; aType: TDADataType): TDAWhereExpression

Parameters:

  • aLeft:
  • anOp:
  • aValue:
  • aType:

NewBinaryExpression (TDAWhereExpression, TDAWhereExpression, TDABinaryOperator): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(aLeft: TDAWhereExpression; aRight: TDAWhereExpression; anOp: TDABinaryOperator): TDAWhereExpression

Parameters:

  • aLeft:
  • aRight:
  • anOp:

NewBinaryExpression (string, string, TDABinaryOperator, Variant): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(const aTableName: string; const aFieldName: string; anOp: TDABinaryOperator; const aValue: Variant): TDAWhereExpression

Parameters:

  • aTableName:
  • aFieldName:
  • anOp:
  • aValue:

NewBinaryExpression (string, string, TDABinaryOperator, Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(const aTableName: string; const aFieldName: string; anOp: TDABinaryOperator; const aValue: Variant; aType: TDADataType): TDAWhereExpression

Parameters:

  • aTableName:
  • aFieldName:
  • anOp:
  • aValue:
  • aType:

NewBinaryExpression (string, string, string, TDADataType, TDABinaryOperator): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(const aTableName: string; const aFieldName: string; const aParameterName: string; aParameterType: TDADataType; anOp: TDABinaryOperator): TDAWhereExpression

Parameters:

  • aTableName:
  • aFieldName:
  • aParameterName:
  • aParameterType:
  • anOp:

NewBinaryExpressionList    (declared in TDAWhereBuilder)

Adds a new condition to the WHERE clause

class function NewBinaryExpressionList(const aExpressions: array of TDAWhereExpression; anOp: TDABinaryOperator): TDAWhereExpression

Parameters:

  • aExpressions: list of expressions
  • anOp: operator

NewConstant (Variant): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new constant condition to the WHERE clause.

class function NewConstant(const aValue: Variant): TDAWhereExpression

Parameters:

  • aValue: value

NewConstant (Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new constant condition to the WHERE clause.

class function NewConstant(const aValue: Variant; aType: TDADataType): TDAWhereExpression

Parameters:

  • aValue: value
  • aType: value type

NewDateTimePart    (declared in TDAWhereBuilder)

class function NewDateTimePart(anExpression: TDAWhereExpression; aPart: TDADateTimePart): TDAWhereExpression

Parameters:

  • anExpression:
  • aPart:

NewField    (declared in TDAWhereBuilder)

Adds a new field condition to the WHERE clause.

class function NewField(const aTableName: string; const aFieldName: string): TDAWhereExpression

Parameters:

  • aTableName: table name
  • aFieldName: field name

NewFunctionCall    (declared in TDAWhereBuilder)

class function NewFunctionCall(anExpression: TDAWhereExpression; aFunctionKind: TDAFunctionKind): TDAWhereExpression

Parameters:

  • anExpression:
  • aFunctionKind:

NewIsNotNull  overload    (declared in TDAWhereBuilder)

class function NewIsNotNull: TDAWhereExpression

NewIsNotNull (string, string): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new NOT NULL condition to the WHERE clause:

aTableName.aFieldName IS NOT NULL
class function NewIsNotNull(const aTableName: string; const aFieldName: string): TDAWhereExpression

Parameters:

  • aTableName: table name
  • aFieldName: field name

NewList    (declared in TDAWhereBuilder)

Adds a new list condition to the WHERE clause.

class function NewList(const aValues: array of TDAWhereExpression): TDAWhereExpression

Parameters:

  • aValues: list of expressions

NewMacro (string): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new macro condition to the WHERE clause.

class function NewMacro(const aName: string): TDAWhereExpression

Parameters:

  • aName: macro name

NewMacro (string, array of TDAWhereExpression): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new macro condition to the WHERE clause.

class function NewMacro(const aName: string; const aValues: array of TDAWhereExpression): TDAWhereExpression

Parameters:

  • aName: macro name
  • aValues: array of expressions.

NewNow    (declared in TDAWhereBuilder)

class function NewNow: TDAWhereExpression

NewNull    (declared in TDAWhereBuilder)

class function NewNull: TDAWhereExpression

NewParameter    (declared in TDAWhereBuilder)

Adds a new parameter condition to the WHERE clause.

class function NewParameter(const aParameterName: string; aParameterType: TDADataType): TDAWhereExpression

Parameters:

  • aParameterName: parameter name
  • aParameterType: parameter type

NewToday    (declared in TDAWhereBuilder)

class function NewToday: TDAWhereExpression

NewUnaryExpression    (declared in TDAWhereBuilder)

Adds a new unary condition to the WHERE clause.

class function NewUnaryExpression(anExpression: TDAWhereExpression; anOp: TDAUnaryOperator): TDAWhereExpression

Parameters:

  • anExpression: expression
  • anOp: operator

Params    (declared in TDAWhereBuilder)

Provides access to the list of parameters defined for the command.

property Params: TDAParamCollection read write

ProcessBetweenExpression  protected override

Converts the specified between expression to SQL format and returns the SQL string.

function ProcessBetweenExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessBinaryExpression  protected override

Converts the specified binary expression to SQL format and returns the SQL string.

function ProcessBinaryExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessConstantExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified constant expression to SQL format and returns the SQL string.

function ProcessConstantExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessDatePartExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessDatePartExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessDateTimeNowExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessDateTimeNowExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessDateTimeTodayExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessDateTimeTodayExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessExpression  protected    (declared in TDABaseSQLWhereBuilder)

Converts the specified expression to SQL format and returns the SQL string. The expression can have the following types: BinaryExpression, UnaryExpression, ConstantExpression, ListExpression, ParameterExpression, FieldExpression, NullExpression, MacroExpression or BetweenExpression.

function ProcessExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessFieldExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified field expression to SQL format and returns the SQL string.

function ProcessFieldExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessFunctionCallExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessFunctionCallExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessListExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified list expression to SQL format and returns the SQL string.

function ProcessListExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessMacroExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified macro expression to SQL format and returns the SQL string.

function ProcessMacroExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessNullExpression  protected override

Converts the specified null expression to SQL format and returns the SQL string.

function ProcessNullExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessParameterExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified parameter expression to SQL format and returns the SQL string.

function ProcessParameterExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessUnaryExpression  protected override

Converts the specified unary expression to SQL format and returns the SQL string.

function ProcessUnaryExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

QueryBuilder    (declared in TDABaseSQLWhereBuilder)

Represents the query builder object (TDASimpleQueryBuilder object) that is related to the current TDABaseSQLWhereBuilder object. This property is read-only.

property QueryBuilder: TDASimpleQueryBuilder read

QuoteFieldName  protected override    (declared in TDASQLWhereBuilder)

Quotes field name

function QuoteFieldName(aTablename: string; aFieldName: string): string

Parameters:

  • aTablename: table name.
  • aFieldName: field name.

ReadFromJson  protected virtual    (declared in TDAWhereBuilder)

class function ReadFromJson(aItem: TROJSONObject): TDAWhereExpression

Parameters:

  • aItem:

ReadFromXml  protected virtual    (declared in TDAWhereBuilder)

Reads Where expression from XML node

class function ReadFromXml(xr: IXmlNode): TDAWhereExpression

Parameters:

  • xr: node

StringToExpression    (declared in TDAWhereBuilder)

class function StringToExpression(const Value: UnicodeString): TDAWhereExpression

Parameters:

  • Value:

WriteToJson  protected virtual    (declared in TDAWhereBuilder)

class procedure WriteToJson(aItem: TROJSONObject; const aExpression: TDAWhereExpression)

Parameters:

  • aItem:
  • aExpression:

WriteToXml  protected virtual    (declared in TDAWhereBuilder)

Writes Where expression to XML node

class procedure WriteToXml(sw: IXmlNode; const aExpression: TDAWhereExpression)

Parameters:

  • sw: node
  • aExpression: expression

Xml    (declared in TDAWhereBuilder)

Represent Where expressions as XML node.

property Xml: UnicodeString read write

XMLToExpression    (declared in TDAWhereBuilder)

Reads Where expression from XML

class function XMLToExpression(const aXML: UnicodeString): TDAWhereExpression

Parameters:

  • aXML: given XML

 

AsJson    (declared in TDAWhereBuilder)

property AsJson: UnicodeString read write

AsString    (declared in TDAWhereBuilder)

property AsString: UnicodeString read write

AsXml    (declared in TDAWhereBuilder)

property AsXml: UnicodeString read write

ColumnMapping    (declared in TDAWhereBuilder)

Column mapping.

property ColumnMapping: TDAColumnMappingCollection read write

Connection    (declared in TDASQLWhereBuilder)

Represents the database connection that relates to the current TDASQLWhereBuilder object. This property is read-only.

property Connection: IDACustomConnection read

Expression    (declared in TDAWhereBuilder)

Represents Where expressions.

property Expression: TDAWhereExpression read write

Format    (declared in TDAWhereBuilder)

property Format: TDynamicWhereFormat read write

Params    (declared in TDAWhereBuilder)

Provides access to the list of parameters defined for the command.

property Params: TDAParamCollection read write

QueryBuilder    (declared in TDABaseSQLWhereBuilder)

Represents the query builder object (TDASimpleQueryBuilder object) that is related to the current TDABaseSQLWhereBuilder object. This property is read-only.

property QueryBuilder: TDASimpleQueryBuilder read

Xml    (declared in TDAWhereBuilder)

Represent Where expressions as XML node.

property Xml: UnicodeString read write

 

ExpressionToJson    (declared in TDAWhereBuilder)

class function ExpressionToJson(const aExpression: TDAWhereExpression): UnicodeString

Parameters:

  • aExpression:

ExpressionToString    (declared in TDAWhereBuilder)

class function ExpressionToString(const aExpression: TDAWhereExpression): UnicodeString

Parameters:

  • aExpression:

ExpressionToXml    (declared in TDAWhereBuilder)

class function ExpressionToXml(const aExpression: TDAWhereExpression): UnicodeString

Parameters:

  • aExpression:

ExpressionToXmlNode    (declared in TDAWhereBuilder)

Converts TDAWhereExpression to XML node

class function ExpressionToXmlNode(const aExpression: TDAWhereExpression): IXMLNode

Parameters:

  • aExpression: expression

JsonToExpression    (declared in TDAWhereBuilder)

class function JsonToExpression(const aJson: UnicodeString): TDAWhereExpression

Parameters:

  • aJson:

NewBetweenExpression (TDAWhereExpression, TDAWhereExpression, TDAWhereExpression): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new BETWEEN condition to the WHERE clause:

aExpression BETWEEN aLower AND aUpper
class function NewBetweenExpression(aExpression: TDAWhereExpression; aLower: TDAWhereExpression; aUpper: TDAWhereExpression): TDAWhereExpression

Parameters:

  • aExpression: expression
  • aLower: The minimal value
  • aUpper: The maximum value

NewBetweenExpression (string, string, TDAWhereExpression, TDAWhereExpression): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new BETWEEN condition to the WHERE clause:

aExprTableName.aExprFieldName BETWEEN aLower AND aUpper
class function NewBetweenExpression(const aExprTableName: string; const aExprFieldName: string; aLower: TDAWhereExpression; aUpper: TDAWhereExpression): TDAWhereExpression

Parameters:

  • aExprTableName: table name
  • aExprFieldName: field name
  • aLower: The minimal value
  • aUpper: The maximum value

NewBetweenExpression (string, string, Variant, Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new BETWEEN condition to the WHERE clause:

aExprTableName.aExprFieldName BETWEEN aLower AND aUpper
class function NewBetweenExpression(const aExprTableName: string; const aExprFieldName: string; aLowerValue: Variant; aUpperValue: Variant; aValuesDataType: TDADataType): TDAWhereExpression

Parameters:

  • aExprTableName: table name
  • aExprFieldName: field name
  • aLowerValue: The minimal value
  • aUpperValue: The maximum value
  • aValuesDataType: data type of aLowerValue and aUpperValue

NewBinaryExpression (TDAWhereExpression, TDABinaryOperator, Variant): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(aLeft: TDAWhereExpression; anOp: TDABinaryOperator; const aValue: Variant): TDAWhereExpression

Parameters:

  • aLeft:
  • anOp:
  • aValue:

NewBinaryExpression (TDAWhereExpression, TDABinaryOperator, Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(aLeft: TDAWhereExpression; anOp: TDABinaryOperator; const aValue: Variant; aType: TDADataType): TDAWhereExpression

Parameters:

  • aLeft:
  • anOp:
  • aValue:
  • aType:

NewBinaryExpression (TDAWhereExpression, TDAWhereExpression, TDABinaryOperator): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(aLeft: TDAWhereExpression; aRight: TDAWhereExpression; anOp: TDABinaryOperator): TDAWhereExpression

Parameters:

  • aLeft:
  • aRight:
  • anOp:

NewBinaryExpression (string, string, TDABinaryOperator, Variant): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(const aTableName: string; const aFieldName: string; anOp: TDABinaryOperator; const aValue: Variant): TDAWhereExpression

Parameters:

  • aTableName:
  • aFieldName:
  • anOp:
  • aValue:

NewBinaryExpression (string, string, TDABinaryOperator, Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(const aTableName: string; const aFieldName: string; anOp: TDABinaryOperator; const aValue: Variant; aType: TDADataType): TDAWhereExpression

Parameters:

  • aTableName:
  • aFieldName:
  • anOp:
  • aValue:
  • aType:

NewBinaryExpression (string, string, string, TDADataType, TDABinaryOperator): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

class function NewBinaryExpression(const aTableName: string; const aFieldName: string; const aParameterName: string; aParameterType: TDADataType; anOp: TDABinaryOperator): TDAWhereExpression

Parameters:

  • aTableName:
  • aFieldName:
  • aParameterName:
  • aParameterType:
  • anOp:

NewBinaryExpressionList    (declared in TDAWhereBuilder)

Adds a new condition to the WHERE clause

class function NewBinaryExpressionList(const aExpressions: array of TDAWhereExpression; anOp: TDABinaryOperator): TDAWhereExpression

Parameters:

  • aExpressions: list of expressions
  • anOp: operator

NewConstant (Variant): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new constant condition to the WHERE clause.

class function NewConstant(const aValue: Variant): TDAWhereExpression

Parameters:

  • aValue: value

NewConstant (Variant, TDADataType): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new constant condition to the WHERE clause.

class function NewConstant(const aValue: Variant; aType: TDADataType): TDAWhereExpression

Parameters:

  • aValue: value
  • aType: value type

NewDateTimePart    (declared in TDAWhereBuilder)

class function NewDateTimePart(anExpression: TDAWhereExpression; aPart: TDADateTimePart): TDAWhereExpression

Parameters:

  • anExpression:
  • aPart:

NewField    (declared in TDAWhereBuilder)

Adds a new field condition to the WHERE clause.

class function NewField(const aTableName: string; const aFieldName: string): TDAWhereExpression

Parameters:

  • aTableName: table name
  • aFieldName: field name

NewFunctionCall    (declared in TDAWhereBuilder)

class function NewFunctionCall(anExpression: TDAWhereExpression; aFunctionKind: TDAFunctionKind): TDAWhereExpression

Parameters:

  • anExpression:
  • aFunctionKind:

NewIsNotNull  overload    (declared in TDAWhereBuilder)

class function NewIsNotNull: TDAWhereExpression

NewIsNotNull (string, string): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new NOT NULL condition to the WHERE clause:

aTableName.aFieldName IS NOT NULL
class function NewIsNotNull(const aTableName: string; const aFieldName: string): TDAWhereExpression

Parameters:

  • aTableName: table name
  • aFieldName: field name

NewList    (declared in TDAWhereBuilder)

Adds a new list condition to the WHERE clause.

class function NewList(const aValues: array of TDAWhereExpression): TDAWhereExpression

Parameters:

  • aValues: list of expressions

NewMacro (string): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new macro condition to the WHERE clause.

class function NewMacro(const aName: string): TDAWhereExpression

Parameters:

  • aName: macro name

NewMacro (string, array of TDAWhereExpression): TDAWhereExpression  overload    (declared in TDAWhereBuilder)

Adds a new macro condition to the WHERE clause.

class function NewMacro(const aName: string; const aValues: array of TDAWhereExpression): TDAWhereExpression

Parameters:

  • aName: macro name
  • aValues: array of expressions.

NewNow    (declared in TDAWhereBuilder)

class function NewNow: TDAWhereExpression

NewNull    (declared in TDAWhereBuilder)

class function NewNull: TDAWhereExpression

NewParameter    (declared in TDAWhereBuilder)

Adds a new parameter condition to the WHERE clause.

class function NewParameter(const aParameterName: string; aParameterType: TDADataType): TDAWhereExpression

Parameters:

  • aParameterName: parameter name
  • aParameterType: parameter type

NewToday    (declared in TDAWhereBuilder)

class function NewToday: TDAWhereExpression

NewUnaryExpression    (declared in TDAWhereBuilder)

Adds a new unary condition to the WHERE clause.

class function NewUnaryExpression(anExpression: TDAWhereExpression; anOp: TDAUnaryOperator): TDAWhereExpression

Parameters:

  • anExpression: expression
  • anOp: operator

ReadFromJson  protected virtual    (declared in TDAWhereBuilder)

class function ReadFromJson(aItem: TROJSONObject): TDAWhereExpression

Parameters:

  • aItem:

ReadFromXml  protected virtual    (declared in TDAWhereBuilder)

Reads Where expression from XML node

class function ReadFromXml(xr: IXmlNode): TDAWhereExpression

Parameters:

  • xr: node

StringToExpression    (declared in TDAWhereBuilder)

class function StringToExpression(const Value: UnicodeString): TDAWhereExpression

Parameters:

  • Value:

WriteToJson  protected virtual    (declared in TDAWhereBuilder)

class procedure WriteToJson(aItem: TROJSONObject; const aExpression: TDAWhereExpression)

Parameters:

  • aItem:
  • aExpression:

WriteToXml  protected virtual    (declared in TDAWhereBuilder)

Writes Where expression to XML node

class procedure WriteToXml(sw: IXmlNode; const aExpression: TDAWhereExpression)

Parameters:

  • sw: node
  • aExpression: expression

XMLToExpression    (declared in TDAWhereBuilder)

Reads Where expression from XML

class function XMLToExpression(const aXML: UnicodeString): TDAWhereExpression

Parameters:

  • aXML: given XML

 

constructor Create    (declared in TDAWhereBuilder)

Creates a new instance.

constructor Create

constructor Create (IDACustomConnection)  overload    (declared in TDASQLWhereBuilder)

Creates a new instance with a specified database connection.

constructor Create(AConnection: IDACustomConnection)

Parameters:

  • AConnection: specified database connection.

constructor Create (TDASimpleQueryBuilder)  overload    (declared in TDABaseSQLWhereBuilder)

Creates a new instance with a specified query builder object.

constructor Create(AQueryBuilder: TDASimpleQueryBuilder)

Parameters:

  • AQueryBuilder: query builder

Clear    (declared in TDAWhereBuilder)

Clears all properties.

procedure Clear

CreateWhereClause    (declared in TDABaseSQLWhereBuilder)

Generates Where clause based on Expression

function CreateWhereClause: string

GenerateFieldName  protected virtual    (declared in TDABaseSQLWhereBuilder)

Generates field name according to column mapping and quotation.

function GenerateFieldName(aTablename: string; aFieldName: string): string

Parameters:

  • aTablename: table name
  • aFieldName: field name

IsEmpty    (declared in TDAWhereBuilder)

Returns True is Expression is empty.

function IsEmpty: Boolean

ProcessBetweenExpression  protected override

Converts the specified between expression to SQL format and returns the SQL string.

function ProcessBetweenExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessBinaryExpression  protected override

Converts the specified binary expression to SQL format and returns the SQL string.

function ProcessBinaryExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessConstantExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified constant expression to SQL format and returns the SQL string.

function ProcessConstantExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessDatePartExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessDatePartExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessDateTimeNowExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessDateTimeNowExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessDateTimeTodayExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessDateTimeTodayExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessExpression  protected    (declared in TDABaseSQLWhereBuilder)

Converts the specified expression to SQL format and returns the SQL string. The expression can have the following types: BinaryExpression, UnaryExpression, ConstantExpression, ListExpression, ParameterExpression, FieldExpression, NullExpression, MacroExpression or BetweenExpression.

function ProcessExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessFieldExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified field expression to SQL format and returns the SQL string.

function ProcessFieldExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessFunctionCallExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

function ProcessFunctionCallExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression:

ProcessListExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified list expression to SQL format and returns the SQL string.

function ProcessListExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessMacroExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified macro expression to SQL format and returns the SQL string.

function ProcessMacroExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessNullExpression  protected override

Converts the specified null expression to SQL format and returns the SQL string.

function ProcessNullExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessParameterExpression  protected virtual    (declared in TDABaseSQLWhereBuilder)

Converts the specified parameter expression to SQL format and returns the SQL string.

function ProcessParameterExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

ProcessUnaryExpression  protected override

Converts the specified unary expression to SQL format and returns the SQL string.

function ProcessUnaryExpression(AExpression: TDAWhereExpression): string

Parameters:

  • AExpression: expression

QuoteFieldName  protected override    (declared in TDASQLWhereBuilder)

Quotes field name

function QuoteFieldName(aTablename: string; aFieldName: string): string

Parameters:

  • aTablename: table name.
  • aFieldName: field name.