ListExpression

Overview

The ListExpression class represents the collection of WhereExpression objects.

The ListExpression class is used to build specified expressions with multiple WhereExpression objects. For example, in the DataAbstract Dynamic Where sample, the ListExpression class is used to build specified binary expressions:

private WhereExpression PrepareWhereExpression(Int32 aIndex)
{
...
lResult = new BinaryExpression(

              new BinaryExpression(
                  new BinaryExpression(
                      new FieldExpression("WorkerPosition"),
                      new ConstantExpression("Sales Representative", DataType.String),
                      BinaryOperator.Equal),
                  new BinaryExpression(
                      new FieldExpression("WorkerID"),
                      new ConstantExpression(120),
                      BinaryOperator.Equal),
                      BinaryOperator.Or),

                  new BinaryExpression(
                      new FieldExpression("WorkerCity"),
                      new ListExpression(
                      new WhereExpression[]{ new ConstantExpression("Walla Walla WA",DataType.String),
                                             new ConstantExpression("New York CA", DataType.String),
                                             new ConstantExpression("Portland OR", DataType.String) }),
                      BinaryOperator.In),

                  BinaryOperator.And);
...                  
}

Location

 

constructor

Creates a new instance of the ListExpression class.

 

constructor

 

ListExpression()

 

Sub New

constructor (array of WhereExpression)

 

constructor(params items: array of WhereExpression)

 

ListExpression(params WhereExpression[] items)

 

Sub New (ParamArray items As array of WhereExpression)

Parameters:

  • items:

Add

 

method Add(item: WhereExpression)

 

void Add(WhereExpression item)

 

Sub Add(item As WhereExpression)

Parameters:

  • item:

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:

 

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:

Count

Represents the count of items in the current ListExpression collection. This property is read-only.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

Property ReadOnly Count As Int32

ExtractAllConstantExpression

 

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

 

method ExtractAllParams(parameters: SchemaParameterCollection)

 

void ExtractAllParams(SchemaParameterCollection parameters)

 

Sub ExtractAllParams(parameters As SchemaParameterCollection)

Parameters:

  • parameters:

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:

Insert

 

method Insert(index: Int32; item: WhereExpression)

 

void Insert(Int32 index, WhereExpression item)

 

Sub Insert(index As Int32, item As WhereExpression)

Parameters:

  • index:
  • item:

Item

Represents the item in the current ListExpression collection with the specified index.

 

property Item[index: Int32]: WhereExpression read write;

 

WhereExpression Item[Int32 index] { get; set; }

 

Property Item(index As Int32) As WhereExpression

Kind

Virtual property that represents the kind of the current ListExpression collection. This property has the value List.

 

property Kind: WhereKind read;

 

WhereKind Kind { get; }

 

Property ReadOnly Kind As WhereKind

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

Vistual method that reads the current collection from the specified XML node.

 

method ReadFromXml(node: XmlNode)

 

void ReadFromXml(XmlNode node)

 

Sub ReadFromXml(node As XmlNode)

Parameters:

  • node:

Remove

 

method Remove(item: WhereExpression)

 

void Remove(WhereExpression item)

 

Sub Remove(item As WhereExpression)

Parameters:

  • item:

RemoveAt

Removes the WhereExpression item with the specified index from the current collection. If the specified index is out of range, a run-time exception is raised.

 

method RemoveAt(index: Int32)

 

void RemoveAt(Int32 index)

 

Sub RemoveAt(index As Int32)

Parameters:

  • index: Specified index in the current collection.

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)

Virtual method that converts the current collection to an SQL string and stores it in the dest. The resulting SQL string will have the following format: [WhereExpression1.ToSQLString,...,WhereExpressionN.ToSQLString].

 

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)

 

class method Validate(expression: WhereExpression): Boolean

 

static Boolean Validate(WhereExpression expression)

 

Shared Function Validate(expression As WhereExpression) As Boolean

Parameters:

  • expression:

WriteToXml

Virtual method that writes the current collection to the specified XML node. The result node name is list.

 

method WriteToXml(node: XmlNode)

 

void WriteToXml(XmlNode node)

 

Sub WriteToXml(node As XmlNode)

Parameters:

  • node:

 

Count

Represents the count of items in the current ListExpression collection. This property is read-only.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

Property ReadOnly Count As Int32

Item

Represents the item in the current ListExpression collection with the specified index.

 

property Item[index: Int32]: WhereExpression read write;

 

WhereExpression Item[Int32 index] { get; set; }

 

Property Item(index As Int32) As WhereExpression

Kind

Virtual property that represents the kind of the current ListExpression collection. This property has the value List.

 

property Kind: WhereKind read;

 

WhereKind Kind { get; }

 

Property ReadOnly Kind As WhereKind

 

 

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:

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)

 

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 ListExpression class.

 

constructor

 

ListExpression()

 

Sub New

constructor (array of WhereExpression)

 

constructor(params items: array of WhereExpression)

 

ListExpression(params WhereExpression[] items)

 

Sub New (ParamArray items As array of WhereExpression)

Parameters:

  • items:

Add

 

method Add(item: WhereExpression)

 

void Add(WhereExpression item)

 

Sub Add(item As WhereExpression)

Parameters:

  • item:

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

 

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

 

method ExtractAllParams(parameters: SchemaParameterCollection)

 

void ExtractAllParams(SchemaParameterCollection parameters)

 

Sub ExtractAllParams(parameters As SchemaParameterCollection)

Parameters:

  • parameters:

Insert

 

method Insert(index: Int32; item: WhereExpression)

 

void Insert(Int32 index, WhereExpression item)

 

Sub Insert(index As Int32, item As WhereExpression)

Parameters:

  • index:
  • item:

ReadFromXml

Vistual method that reads the current collection from the specified XML node.

 

method ReadFromXml(node: XmlNode)

 

void ReadFromXml(XmlNode node)

 

Sub ReadFromXml(node As XmlNode)

Parameters:

  • node:

Remove

 

method Remove(item: WhereExpression)

 

void Remove(WhereExpression item)

 

Sub Remove(item As WhereExpression)

Parameters:

  • item:

RemoveAt

Removes the WhereExpression item with the specified index from the current collection. If the specified index is out of range, a run-time exception is raised.

 

method RemoveAt(index: Int32)

 

void RemoveAt(Int32 index)

 

Sub RemoveAt(index As Int32)

Parameters:

  • index: Specified index in the current collection.

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)

Virtual method that converts the current collection to an SQL string and stores it in the dest. The resulting SQL string will have the following format: [WhereExpression1.ToSQLString,...,WhereExpressionN.ToSQLString].

 

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

Virtual method that writes the current collection to the specified XML node. The result node name is list.

 

method WriteToXml(node: XmlNode)

 

void WriteToXml(XmlNode node)

 

Sub WriteToXml(node As XmlNode)

Parameters:

  • node:

See Also