FieldExpression
Overview
This class is used to represent data table fields in Dynamic Where expressions. For example, see how the database field ID is represented in the SQL query WHERE clause and in the equal Dynamic Where expression:
SELECT * FROM Employees WHERE (ID=42)
WhereExpression where = new BinaryExpression(
new FieldExpression("ID"),
new ConstantExpression(42),
BinaryOperator.Equal);
Location
- Reference: RemObjects.DataAbstract.dll
- Namespace: RemObjects.DataAbstract.Expressions
- Ancestry: WhereExpression | FieldExpression
constructor
Creates a new instance of the FieldExpression class. Note that you have to set at least the FieldName property to be able to use this instance in Dynamic Where expressions.
constructor
FieldExpression()
Sub New()
constructor (String)
Creates a new instance of the FieldExpression class and sets its FieldName property.
constructor(fieldName: String)
FieldExpression(String fieldName)
Sub New(fieldName As String)
Parameters:
- fieldName:
constructor (String, String)
constructor(tableName: String; fieldName: String)
FieldExpression(String tableName, String fieldName)
Sub New(tableName As String, fieldName As String)
Parameters:
- tableName:
- fieldName:
ApplyFieldMapping
method ApplyFieldMapping(columnMappings: SchemaColumnMappingCollection)
void ApplyFieldMapping(SchemaColumnMappingCollection columnMappings)
Sub ApplyFieldMapping(columnMappings As SchemaColumnMappingCollection)
Parameters:
- columnMappings:
ApplySourceTableNumber
method ApplySourceTableNumber(number: Int32): WhereExpression
WhereExpression ApplySourceTableNumber(Int32 number)
Function ApplySourceTableNumber(number As Int32) As WhereExpression
Parameters:
- number:
ApplyTableMapping
method ApplyTableMapping(schemaTable: String; databaseTable: String)
void ApplyTableMapping(String schemaTable, String databaseTable)
Sub ApplyTableMapping(schemaTable As String, databaseTable As String)
Parameters:
- schemaTable:
- databaseTable:
ApplyTableNameOrAlias
method ApplyTableNameOrAlias(name: String)
void ApplyTableNameOrAlias(String name)
Sub ApplyTableNameOrAlias(name As String)
Parameters:
- name:
Combine (WhereExpression, WhereExpression): WhereExpression (declared in WhereExpression)
Creates new BinaryExpression from given aLeft and aRight operands, using operator And.
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:
Combine (WhereExpression, WhereExpression, BinaryOperator): WhereExpression (declared in WhereExpression)
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:
ExtractAllConstantExpression (declared in WhereExpression)
Establishes a list of all ConstantExpression contained in the WhereExpression.
method ExtractAllConstantExpression(expressions: List<ConstantExpression>)
void ExtractAllConstantExpression(List<ConstantExpression> expressions)
Sub ExtractAllConstantExpression(expressions As List<ConstantExpression>)
Parameters:
- expressions:
ExtractAllFieldNames
method ExtractAllFieldNames(fieldNames: List<String>)
void ExtractAllFieldNames(List<String> fieldNames)
Sub ExtractAllFieldNames(fieldNames As List<String>)
Parameters:
- fieldNames:
ExtractAllParams (declared in WhereExpression)
Fills SchemaParameterCollection with ParameterExpressions and ConstantExpressions (as ParameterExpressions) contained in the WhereExpression.
method ExtractAllParams(parameters: SchemaParameterCollection)
void ExtractAllParams(SchemaParameterCollection parameters)
Sub ExtractAllParams(parameters As SchemaParameterCollection)
Parameters:
- parameters:
FieldName
Name of the database field represented by this instance.
property FieldName: String read write;
String FieldName { get; set; }
Property FieldName() As String
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
The kind of WhereExpression. For this class, it equals WhereKind.Field.
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
Deserializes the field expression from the provided XmlNode. The node value (its InnerText) is assigned to the FieldName property. If the node contains the attribute tablename, its value is assigned to the TableName property.
method ReadFromXml(node: XmlNode)
void ReadFromXml(XmlNode node)
Sub ReadFromXml(node As XmlNode)
Parameters:
- node:
TableName
property TableName: String read write;
String TableName { get; set; }
Property TableName() As String
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)
Creates an SQL representation of this FieldExpression instance and appends it to the provided StringBuilder.
For example, this method call
(new FieldExpression("ClassName")).ToSQLString(someStringBuilder)
will result in appending the string "ClassName" to someStringBuilder.
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
Validate (WhereExpression): Boolean (declared in WhereExpression)
Validates that WhereExpression doesn't contain any errors, using WhereValidator. The main purpose of this validation - to scan all objects of WhereExpession tree and make sure that it contains correct field names.
class method Validate(expression: WhereExpression): Boolean
static Boolean Validate(WhereExpression expression)
Shared Function Validate(expression As WhereExpression) As Boolean
Parameters:
- expression:
WriteToXml
Serializes this FieldExpression instance into an XmlElement and appends it as a child to the provided XmlNode.
While the serialized FieldName property is saved as text node, the TableName property (if assigned) is saved as attribute tablename of this XmlNode.
method WriteToXml(node: XmlNode)
void WriteToXml(XmlNode node)
Sub WriteToXml(node As XmlNode)
Parameters:
- node:
FieldName
Name of the database field represented by this instance.
property FieldName: String read write;
String FieldName { get; set; }
Property FieldName() As String
Kind
The kind of WhereExpression. For this class, it equals WhereKind.Field.
TableName
property TableName: String read write;
String TableName { get; set; }
Property TableName() As String
Combine (WhereExpression, WhereExpression): WhereExpression (declared in WhereExpression)
Creates new BinaryExpression from given aLeft and aRight operands, using operator And.
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:
Combine (WhereExpression, WhereExpression, BinaryOperator): WhereExpression (declared in WhereExpression)
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:
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:
Validate (WhereExpression): Boolean (declared in WhereExpression)
Validates that WhereExpression doesn't contain any errors, using WhereValidator. The main purpose of this validation - to scan all objects of WhereExpession tree and make sure that it contains correct field names.
class method Validate(expression: WhereExpression): Boolean
static Boolean Validate(WhereExpression expression)
Shared Function Validate(expression As WhereExpression) As Boolean
Parameters:
- expression:
constructor
Creates a new instance of the FieldExpression class. Note that you have to set at least the FieldName property to be able to use this instance in Dynamic Where expressions.
constructor
FieldExpression()
Sub New()
constructor (String)
Creates a new instance of the FieldExpression class and sets its FieldName property.
constructor(fieldName: String)
FieldExpression(String fieldName)
Sub New(fieldName As String)
Parameters:
- fieldName:
constructor (String, String)
constructor(tableName: String; fieldName: String)
FieldExpression(String tableName, String fieldName)
Sub New(tableName As String, fieldName As String)
Parameters:
- tableName:
- fieldName:
ApplyFieldMapping
method ApplyFieldMapping(columnMappings: SchemaColumnMappingCollection)
void ApplyFieldMapping(SchemaColumnMappingCollection columnMappings)
Sub ApplyFieldMapping(columnMappings As SchemaColumnMappingCollection)
Parameters:
- columnMappings:
ApplySourceTableNumber
method ApplySourceTableNumber(number: Int32): WhereExpression
WhereExpression ApplySourceTableNumber(Int32 number)
Function ApplySourceTableNumber(number As Int32) As WhereExpression
Parameters:
- number:
ApplyTableMapping
method ApplyTableMapping(schemaTable: String; databaseTable: String)
void ApplyTableMapping(String schemaTable, String databaseTable)
Sub ApplyTableMapping(schemaTable As String, databaseTable As String)
Parameters:
- schemaTable:
- databaseTable:
ApplyTableNameOrAlias
method ApplyTableNameOrAlias(name: String)
void ApplyTableNameOrAlias(String name)
Sub ApplyTableNameOrAlias(name As String)
Parameters:
- name:
ExtractAllConstantExpression (declared in WhereExpression)
Establishes a list of all ConstantExpression contained in the WhereExpression.
method ExtractAllConstantExpression(expressions: List<ConstantExpression>)
void ExtractAllConstantExpression(List<ConstantExpression> expressions)
Sub ExtractAllConstantExpression(expressions As List<ConstantExpression>)
Parameters:
- expressions:
ExtractAllFieldNames
method ExtractAllFieldNames(fieldNames: List<String>)
void ExtractAllFieldNames(List<String> fieldNames)
Sub ExtractAllFieldNames(fieldNames As List<String>)
Parameters:
- fieldNames:
ExtractAllParams (declared in WhereExpression)
Fills SchemaParameterCollection with ParameterExpressions and ConstantExpressions (as ParameterExpressions) contained in the WhereExpression.
method ExtractAllParams(parameters: SchemaParameterCollection)
void ExtractAllParams(SchemaParameterCollection parameters)
Sub ExtractAllParams(parameters As SchemaParameterCollection)
Parameters:
- parameters:
ReadFromXml
Deserializes the field expression from the provided XmlNode. The node value (its InnerText) is assigned to the FieldName property. If the node contains the attribute tablename, its value is assigned to the TableName property.
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)
Creates an SQL representation of this FieldExpression instance and appends it to the provided StringBuilder.
For example, this method call
(new FieldExpression("ClassName")).ToSQLString(someStringBuilder)
will result in appending the string "ClassName" to someStringBuilder.
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
Serializes this FieldExpression instance into an XmlElement and appends it as a child to the provided XmlNode.
While the serialized FieldName property is saved as text node, the TableName property (if assigned) is saved as attribute tablename of this XmlNode.
method WriteToXml(node: XmlNode)
void WriteToXml(XmlNode node)
Sub WriteToXml(node As XmlNode)
Parameters:
- node: