ConstantExpression

Overview

Represents constant values to be used in WhereExpressions.

For example, the following WHERE statement

SELECT * FROM Employees WHERE (Position = 'Sales Manager') 

using ConstantExpression would look like this:

WhereExpression lResult;
lResult = new BinaryExpression(
              new FieldExpression("Position"),
              new ConstantExpression("Sales Manager", DataType.String),
              BinaryOperator.Equal),
        

Location

 

constructor

Default constructor.

 

constructor

 

ConstantExpression()

 

Sub New

constructor (Object)

 

constructor(value: Object)

 

ConstantExpression(Object value)

 

Sub New (value As Object)

Parameters:

  • value:

constructor (Object, DataType)

 

constructor(value: Object; type: DataType)

 

ConstantExpression(Object value, DataType type)

 

Sub New (value As Object, type As DataType)

Parameters:

  • value:
  • type:

constructor (String, DataType, Int32)    (declared in ParameterExpression)

Creates a new instance of the ParameterExpression class with a specified name, type and size of the parameter.

 

constructor(name: String; type: DataType; size: Int32)

 

ConstantExpression(String name, DataType type, Int32 size)

 

Sub New (name As String, type As DataType, size As Int32)

Parameters:

  • name: Parameter name
  • type: Parameter data type
  • size: Parameter data size

ApplyFieldMapping    (declared in WhereExpression)

Adjusts the field names in the WhereExpression in accordance with table names of fields in the given schema column mapping.

 

method ApplyFieldMapping(columnMappings: SchemaColumnMappingCollection)

 

void ApplyFieldMapping(SchemaColumnMappingCollection columnMappings)

 

Sub ApplyFieldMapping(columnMappings As SchemaColumnMappingCollection)

Parameters:

  • columnMappings:

ApplySourceTableNumber    (declared in WhereExpression)

 

method ApplySourceTableNumber(number: Int32): WhereExpression

 

WhereExpression ApplySourceTableNumber(Int32 number)

 

Function ApplySourceTableNumber(number As Int32) As WhereExpression

Parameters:

  • number:

ApplyTableMapping    (declared in WhereExpression)

 

method ApplyTableMapping(schemaTable: String; databaseTable: String)

 

void ApplyTableMapping(String schemaTable, String databaseTable)

 

Sub ApplyTableMapping(schemaTable As String, databaseTable As String)

Parameters:

  • schemaTable:
  • databaseTable:

ApplyTableNameOrAlias    (declared in WhereExpression)

 

method ApplyTableNameOrAlias(name: String)

 

void ApplyTableNameOrAlias(String name)

 

Sub ApplyTableNameOrAlias(name As String)

Parameters:

  • name:

 

class method Combine(left: WhereExpression; right: WhereExpression): WhereExpression

 

static WhereExpression Combine(WhereExpression left, WhereExpression right)

 

Shared Function Combine(left As WhereExpression, right As WhereExpression) As WhereExpression

Parameters:

  • left:
  • right:

 

class method Combine(left: WhereExpression; right: WhereExpression; operator: BinaryOperator): WhereExpression

 

static WhereExpression Combine(WhereExpression left, WhereExpression right, BinaryOperator operator)

 

Shared Function Combine(left As WhereExpression, right As WhereExpression, operator As BinaryOperator) As WhereExpression

Parameters:

  • left:
  • right:
  • operator:

DeserializeObject

Gets the object of the given Class WhereExpression from the serialized string.

 

class method DeserializeObject(source: String; dataType: DataType): Object

 

static Object DeserializeObject(String source, DataType dataType)

 

Shared Function DeserializeObject(source As String, dataType As DataType) As Object

Parameters:

  • source:
  • dataType:

ExtractAllConstantExpression

 

method ExtractAllConstantExpression(expressions: List<ConstantExpression>)

 

void ExtractAllConstantExpression(List<ConstantExpression> expressions)

 

Sub ExtractAllConstantExpression(expressions As List<ConstantExpression>)

Parameters:

  • expressions:

ExtractAllFieldNames    (declared in WhereExpression)

Establishes a list of field names used in the WhereExpression.

 

method ExtractAllFieldNames(fieldNames: List<String>)

 

void ExtractAllFieldNames(List<String> fieldNames)

 

Sub ExtractAllFieldNames(fieldNames As List<String>)

Parameters:

  • fieldNames:

ExtractAllParams    (declared in ParameterExpression)

Adds to the SchemaParameterCollection this parameter if it's not present there.

 

method ExtractAllParams(parameters: SchemaParameterCollection)

 

void ExtractAllParams(SchemaParameterCollection parameters)

 

Sub ExtractAllParams(parameters As SchemaParameterCollection)

Parameters:

  • parameters: Parameters collection

FromString    (declared in WhereExpression)

Creates new WhereExpression from string, which should contain where node in the correct Dynamic Where XML Format.

 

class method FromString(xml: String): WhereExpression

 

static WhereExpression FromString(String xml)

 

Shared Function FromString(xml As String) As WhereExpression

Parameters:

  • xml:

FromStringToSql    (declared in WhereExpression)

 

class method FromStringToSql(xml: String): String

 

static String FromStringToSql(String xml)

 

Shared Function FromStringToSql(xml As String) As String

Parameters:

  • xml:

FromXmlNode    (declared in WhereExpression)

Creates new WhereExpression from xml node, which should be in the correct Dynamic Where XML Format.

 

class method FromXmlNode(node: XmlNode): WhereExpression

 

static WhereExpression FromXmlNode(XmlNode node)

 

Shared Function FromXmlNode(node As XmlNode) As WhereExpression

Parameters:

  • node:

Kind

This property is inherited from WhereExpression and gets the expression type. For ConstantExpression, The type is always a WhereKind Constant.

 

property Kind: WhereKind read;

 

WhereKind Kind { get; }

 

Property ReadOnly Kind As WhereKind

ParameterName    (declared in ParameterExpression)

Name of the parameter represented by this instance.

 

property ParameterName: String read write;

 

String ParameterName { get; set; }

 

Property ParameterName As String

ParseExpression    (declared in WhereExpression)

 

class method ParseExpression(node: XmlNode): WhereExpression

 

static WhereExpression ParseExpression(XmlNode node)

 

Shared Function ParseExpression(node As XmlNode) As WhereExpression

Parameters:

  • node:

ReadFromXml

Reads expressions from the XML.

 

method ReadFromXml(node: XmlNode)

 

void ReadFromXml(XmlNode node)

 

Sub ReadFromXml(node As XmlNode)

Parameters:

  • node:

SerializeObject

Writes the object of the given type to the string.

 

class method SerializeObject(value: Object; dataType: DataType): String

 

static String SerializeObject(Object value, DataType dataType)

 

Shared Function SerializeObject(value As Object, dataType As DataType) As String

Parameters:

  • value:
  • dataType:

Size    (declared in ParameterExpression)

The size of the parameter. This property is usually used with String, WideString, Memo, WideMemo, Blob types.

0 is the default value.

 

property Size: Int32 read write;

 

Int32 Size { get; set; }

 

Property Size As Int32

ToSQLString    (declared in WhereExpression)

A helper method that wraps the similar one with the string builder and returns a SQL string.

 

method ToSQLString: String

 

String ToSQLString()

 

Function ToSQLString As String

ToSQLString (StringBuilder)

 

method ToSQLString(destination: StringBuilder)

 

void ToSQLString(StringBuilder destination)

 

Sub ToSQLString(destination As StringBuilder)

Parameters:

  • destination:

ToString    (declared in WhereExpression)

Returns a SQL string representation of the current expression.

 

method ToString: String

 

String ToString()

 

Function ToString As String

ToXmlNode    (declared in WhereExpression)

Creates query node (in the Dynamic Where XML Format) from WhereExpression.

 

method ToXmlNode: XmlNode

 

XmlNode ToXmlNode()

 

Function ToXmlNode As XmlNode

ToXmlString    (declared in WhereExpression)

Creates query node (in the Dynamic Where XML Format) from WhereExpression and returns it in the string format.

 

method ToXmlString: String

 

String ToXmlString()

 

Function ToXmlString As String

Type    (declared in ParameterExpression)

Specifies the type of the parameter. Type can be any from the DataType enum.

 

property Type: DataType read write;

 

DataType Type { get; set; }

 

Property Type As DataType

Validate    (declared in WhereExpression)

 

method Validate: Boolean

 

Boolean Validate()

 

Function Validate As Boolean

Validate (WhereExpression): Boolean    (declared in WhereExpression)

 

class method Validate(expression: WhereExpression): Boolean

 

static Boolean Validate(WhereExpression expression)

 

Shared Function Validate(expression As WhereExpression) As Boolean

Parameters:

  • expression:

Value

Gets or sets the constant value itself.

 

property Value: Object read write;

 

Object Value { get; set; }

 

Property Value As Object

WriteToXml

Generates an XML node from the current expression object.

 

method WriteToXml(node: XmlNode)

 

void WriteToXml(XmlNode node)

 

Sub WriteToXml(node As XmlNode)

Parameters:

  • node:

 

Kind

This property is inherited from WhereExpression and gets the expression type. For ConstantExpression, The type is always a WhereKind Constant.

 

property Kind: WhereKind read;

 

WhereKind Kind { get; }

 

Property ReadOnly Kind As WhereKind

ParameterName    (declared in ParameterExpression)

Name of the parameter represented by this instance.

 

property ParameterName: String read write;

 

String ParameterName { get; set; }

 

Property ParameterName As String

Size    (declared in ParameterExpression)

The size of the parameter. This property is usually used with String, WideString, Memo, WideMemo, Blob types.

0 is the default value.

 

property Size: Int32 read write;

 

Int32 Size { get; set; }

 

Property Size As Int32

Type    (declared in ParameterExpression)

Specifies the type of the parameter. Type can be any from the DataType enum.

 

property Type: DataType read write;

 

DataType Type { get; set; }

 

Property Type As DataType

Value

Gets or sets the constant value itself.

 

property Value: Object read write;

 

Object Value { get; set; }

 

Property Value As Object

 

 

class method Combine(left: WhereExpression; right: WhereExpression): WhereExpression

 

static WhereExpression Combine(WhereExpression left, WhereExpression right)

 

Shared Function Combine(left As WhereExpression, right As WhereExpression) As WhereExpression

Parameters:

  • left:
  • right:

 

class method Combine(left: WhereExpression; right: WhereExpression; operator: BinaryOperator): WhereExpression

 

static WhereExpression Combine(WhereExpression left, WhereExpression right, BinaryOperator operator)

 

Shared Function Combine(left As WhereExpression, right As WhereExpression, operator As BinaryOperator) As WhereExpression

Parameters:

  • left:
  • right:
  • operator:

DeserializeObject

Gets the object of the given Class WhereExpression from the serialized string.

 

class method DeserializeObject(source: String; dataType: DataType): Object

 

static Object DeserializeObject(String source, DataType dataType)

 

Shared Function DeserializeObject(source As String, dataType As DataType) As Object

Parameters:

  • source:
  • dataType:

FromString    (declared in WhereExpression)

Creates new WhereExpression from string, which should contain where node in the correct Dynamic Where XML Format.

 

class method FromString(xml: String): WhereExpression

 

static WhereExpression FromString(String xml)

 

Shared Function FromString(xml As String) As WhereExpression

Parameters:

  • xml:

FromStringToSql    (declared in WhereExpression)

 

class method FromStringToSql(xml: String): String

 

static String FromStringToSql(String xml)

 

Shared Function FromStringToSql(xml As String) As String

Parameters:

  • xml:

FromXmlNode    (declared in WhereExpression)

Creates new WhereExpression from xml node, which should be in the correct Dynamic Where XML Format.

 

class method FromXmlNode(node: XmlNode): WhereExpression

 

static WhereExpression FromXmlNode(XmlNode node)

 

Shared Function FromXmlNode(node As XmlNode) As WhereExpression

Parameters:

  • node:

ParseExpression    (declared in WhereExpression)

 

class method ParseExpression(node: XmlNode): WhereExpression

 

static WhereExpression ParseExpression(XmlNode node)

 

Shared Function ParseExpression(node As XmlNode) As WhereExpression

Parameters:

  • node:

SerializeObject

Writes the object of the given type to the string.

 

class method SerializeObject(value: Object; dataType: DataType): String

 

static String SerializeObject(Object value, DataType dataType)

 

Shared Function SerializeObject(value As Object, dataType As DataType) As String

Parameters:

  • value:
  • dataType:

Validate (WhereExpression): Boolean    (declared in WhereExpression)

 

class method Validate(expression: WhereExpression): Boolean

 

static Boolean Validate(WhereExpression expression)

 

Shared Function Validate(expression As WhereExpression) As Boolean

Parameters:

  • expression:

 

constructor

Default constructor.

 

constructor

 

ConstantExpression()

 

Sub New

constructor (Object)

 

constructor(value: Object)

 

ConstantExpression(Object value)

 

Sub New (value As Object)

Parameters:

  • value:

constructor (Object, DataType)

 

constructor(value: Object; type: DataType)

 

ConstantExpression(Object value, DataType type)

 

Sub New (value As Object, type As DataType)

Parameters:

  • value:
  • type:

constructor (String, DataType, Int32)    (declared in ParameterExpression)

Creates a new instance of the ParameterExpression class with a specified name, type and size of the parameter.

 

constructor(name: String; type: DataType; size: Int32)

 

ConstantExpression(String name, DataType type, Int32 size)

 

Sub New (name As String, type As DataType, size As Int32)

Parameters:

  • name: Parameter name
  • type: Parameter data type
  • size: Parameter data size

ApplyFieldMapping    (declared in WhereExpression)

Adjusts the field names in the WhereExpression in accordance with table names of fields in the given schema column mapping.

 

method ApplyFieldMapping(columnMappings: SchemaColumnMappingCollection)

 

void ApplyFieldMapping(SchemaColumnMappingCollection columnMappings)

 

Sub ApplyFieldMapping(columnMappings As SchemaColumnMappingCollection)

Parameters:

  • columnMappings:

ApplySourceTableNumber    (declared in WhereExpression)

 

method ApplySourceTableNumber(number: Int32): WhereExpression

 

WhereExpression ApplySourceTableNumber(Int32 number)

 

Function ApplySourceTableNumber(number As Int32) As WhereExpression

Parameters:

  • number:

ApplyTableMapping    (declared in WhereExpression)

 

method ApplyTableMapping(schemaTable: String; databaseTable: String)

 

void ApplyTableMapping(String schemaTable, String databaseTable)

 

Sub ApplyTableMapping(schemaTable As String, databaseTable As String)

Parameters:

  • schemaTable:
  • databaseTable:

ApplyTableNameOrAlias    (declared in WhereExpression)

 

method ApplyTableNameOrAlias(name: String)

 

void ApplyTableNameOrAlias(String name)

 

Sub ApplyTableNameOrAlias(name As String)

Parameters:

  • name:

ExtractAllConstantExpression

 

method ExtractAllConstantExpression(expressions: List<ConstantExpression>)

 

void ExtractAllConstantExpression(List<ConstantExpression> expressions)

 

Sub ExtractAllConstantExpression(expressions As List<ConstantExpression>)

Parameters:

  • expressions:

ExtractAllFieldNames    (declared in WhereExpression)

Establishes a list of field names used in the WhereExpression.

 

method ExtractAllFieldNames(fieldNames: List<String>)

 

void ExtractAllFieldNames(List<String> fieldNames)

 

Sub ExtractAllFieldNames(fieldNames As List<String>)

Parameters:

  • fieldNames:

ExtractAllParams    (declared in ParameterExpression)

Adds to the SchemaParameterCollection this parameter if it's not present there.

 

method ExtractAllParams(parameters: SchemaParameterCollection)

 

void ExtractAllParams(SchemaParameterCollection parameters)

 

Sub ExtractAllParams(parameters As SchemaParameterCollection)

Parameters:

  • parameters: Parameters collection

ReadFromXml

Reads expressions from the XML.

 

method ReadFromXml(node: XmlNode)

 

void ReadFromXml(XmlNode node)

 

Sub ReadFromXml(node As XmlNode)

Parameters:

  • node:

ToSQLString    (declared in WhereExpression)

A helper method that wraps the similar one with the string builder and returns a SQL string.

 

method ToSQLString: String

 

String ToSQLString()

 

Function ToSQLString As String

ToSQLString (StringBuilder)

 

method ToSQLString(destination: StringBuilder)

 

void ToSQLString(StringBuilder destination)

 

Sub ToSQLString(destination As StringBuilder)

Parameters:

  • destination:

ToString    (declared in WhereExpression)

Returns a SQL string representation of the current expression.

 

method ToString: String

 

String ToString()

 

Function ToString As String

ToXmlNode    (declared in WhereExpression)

Creates query node (in the Dynamic Where XML Format) from WhereExpression.

 

method ToXmlNode: XmlNode

 

XmlNode ToXmlNode()

 

Function ToXmlNode As XmlNode

ToXmlString    (declared in WhereExpression)

Creates query node (in the Dynamic Where XML Format) from WhereExpression and returns it in the string format.

 

method ToXmlString: String

 

String ToXmlString()

 

Function ToXmlString As String

Validate    (declared in WhereExpression)

 

method Validate: Boolean

 

Boolean Validate()

 

Function Validate As Boolean

WriteToXml

Generates an XML node from the current expression object.

 

method WriteToXml(node: XmlNode)

 

void WriteToXml(XmlNode node)

 

Sub WriteToXml(node As XmlNode)

Parameters:

  • node: