TableRequestInfoV5

Overview

As well as TableRequestInfo, TableRequestInfoV5 class allows to specify additional custom parameters for getting data from certain schema table.

TableRequestInfoV5 extends TableRequestInfo class with new features Dynamic Where and Dynamic Select supported starting from DA v5.

Below you can find a C# sample that shows how to create and use TableRequestInfoV5.

// prepare dynamic where
XmlNode dynWhere = null;
dynWhere =
new BinaryExpression(
  new FieldExpression("ProductGroup"),
  new ConstantExpression(aGroupId,
    RemObjects.DataAbstract.Schema.DataType.Integer),
  BinaryOperator.Equal).ToXmlNode();

// create and setup request info
TableRequestInfoV5 requestInfo = new TableRequestInfoV5();
requestInfo.DynamicSelectFieldNames =
new String[] {
  "ProductId",
  "ProductCode",
  "ProductName",
  "ProductWarranty",
  "IsObsolete",
  "ProductGroup"};

requestInfo.MaxRecords = -1;
requestInfo.WhereClause = dynWhere;

// execute request
remoteDataAdapter.Fill(
pDCTradeDataset,
new String[] { "Products" },
new TableRequestInfo[] { requestInfo });

Location


 

constructor

 

constructor

 

TableRequestInfoV5()

 

Sub New()

add_PropertyChanged    (declared in ComplexType)

 

method add_PropertyChanged(value: PropertyChangedEventHandler)

 

void add_PropertyChanged(PropertyChangedEventHandler value)

 

Sub add_PropertyChanged(value As PropertyChangedEventHandler)

Parameters:

  • value:

DynamicSelectFieldNames

Property that holds an array of field names for Dynamic Select feature.

 

property DynamicSelectFieldNames: array of String read write;

 

String[] DynamicSelectFieldNames { get; set; }

 

Property DynamicSelectFieldNames() As String()

GetAttributeCount    (declared in ComplexType)

 

method GetAttributeCount: Int32

 

Int32 GetAttributeCount()

 

Function GetAttributeCount() As Int32

GetAttributeName    (declared in ComplexType)

 

method GetAttributeName(index: Int32): String

 

String GetAttributeName(Int32 index)

 

Function GetAttributeName(index As Int32) As String

Parameters:

  • index:

GetAttributeValue    (declared in ComplexType)

 

method GetAttributeValue(index: Int32): String

 

String GetAttributeValue(Int32 index)

 

Function GetAttributeValue(index As Int32) As String

Parameters:

  • index:

IncludeSchema    (declared in TableRequestInfo)

Boolean property that specifies if table schema info s needed inside the result stream (true) or not (false, default). Usually, the client side already knows the schema, so passing the schema with the table data will cause some overhead, but if you need to update table schema info on the client side, you need to set that property to true.

For example, you can create a new DataTable and try to fill it with data from a specified table. Since the structure for the new DataTable is not defined yet, you can establish to put the schema info with the table data, thus giving the data table a proper structure before it will be filled.

 

property IncludeSchema: Boolean read write;

 

Boolean IncludeSchema { get; set; }

 

Property IncludeSchema() As Boolean

MaxRecords    (declared in TableRequestInfo)

This property allows to limit the count of rows of the request. Put it as -1 to receive all available records. 0 value will update the table schema without receiving any data.

Limiting the amount of transferred rows can reduce traffic between the DataAbstract server (middle tier) and the DataAbstract client (front-end tier). It will not affect traffic between the database and the DataAbstract server. For reducing traffic between the database and the DataAbstract server, you have to use other approaches, like Dynamic Where.

 

property MaxRecords: Int32 read write;

 

Int32 MaxRecords { get; set; }

 

Property MaxRecords() As Int32

Parameters    (declared in TableRequestInfo)

Represents the array of the DataParameters for getting data from parametrized schema tables.

 

property Parameters: array of DataParameter read write;

 

DataParameter[] Parameters { get; set; }

 

Property Parameters() As DataParameter()

PropertyChanged    (declared in ComplexType)

 

event PropertyChanged: PropertyChangedEventHandler;

 

delegate PropertyChangedEventHandler PropertyChanged()

 

Event PropertyChanged As PropertyChangedEventHandler

ReadComplex

 

method ReadComplex(aSerializer: Serializer)

 

void ReadComplex(Serializer aSerializer)

 

Sub ReadComplex(aSerializer As Serializer)

Parameters:

  • aSerializer:

remove_PropertyChanged    (declared in ComplexType)

 

method remove_PropertyChanged(value: PropertyChangedEventHandler)

 

void remove_PropertyChanged(PropertyChangedEventHandler value)

 

Sub remove_PropertyChanged(value As PropertyChangedEventHandler)

Parameters:

  • value:

Sorting

Property represents the information about sorting result data.

 

property Sorting: ColumnSorting read write;

 

ColumnSorting Sorting { get; set; }

 

Property Sorting() As ColumnSorting

TriggerPropertyChanged  protected    (declared in ComplexType)

 

method TriggerPropertyChanged(propertyName: String)

 

void TriggerPropertyChanged(String propertyName)

 

Sub TriggerPropertyChanged(propertyName As String)

Parameters:

  • propertyName:

UserFilter    (declared in TableRequestInfo)

Uses for specifying custom conditions for returning rows. For example, "CustomerType < 100". Note that all records will be read from the database, but only those that fit the custom condition will be passed to the client.

Note: Applying custom filters is not supported by DataAbstract for .NET, you need to use the more advanced feature Dynamic Where there.

 

property UserFilter: String read write;

 

String UserFilter { get; set; }

 

Property UserFilter() As String

WhereClause

Property that holds Dynamic Where expression in XML format.

 

property WhereClause: XmlNode read write;

 

XmlNode WhereClause { get; set; }

 

Property WhereClause() As XmlNode

WriteComplex

 

method WriteComplex(aSerializer: Serializer)

 

void WriteComplex(Serializer aSerializer)

 

Sub WriteComplex(aSerializer As Serializer)

Parameters:

  • aSerializer:

 

DynamicSelectFieldNames

Property that holds an array of field names for Dynamic Select feature.

 

property DynamicSelectFieldNames: array of String read write;

 

String[] DynamicSelectFieldNames { get; set; }

 

Property DynamicSelectFieldNames() As String()

IncludeSchema    (declared in TableRequestInfo)

Boolean property that specifies if table schema info s needed inside the result stream (true) or not (false, default). Usually, the client side already knows the schema, so passing the schema with the table data will cause some overhead, but if you need to update table schema info on the client side, you need to set that property to true.

For example, you can create a new DataTable and try to fill it with data from a specified table. Since the structure for the new DataTable is not defined yet, you can establish to put the schema info with the table data, thus giving the data table a proper structure before it will be filled.

 

property IncludeSchema: Boolean read write;

 

Boolean IncludeSchema { get; set; }

 

Property IncludeSchema() As Boolean

MaxRecords    (declared in TableRequestInfo)

This property allows to limit the count of rows of the request. Put it as -1 to receive all available records. 0 value will update the table schema without receiving any data.

Limiting the amount of transferred rows can reduce traffic between the DataAbstract server (middle tier) and the DataAbstract client (front-end tier). It will not affect traffic between the database and the DataAbstract server. For reducing traffic between the database and the DataAbstract server, you have to use other approaches, like Dynamic Where.

 

property MaxRecords: Int32 read write;

 

Int32 MaxRecords { get; set; }

 

Property MaxRecords() As Int32

Parameters    (declared in TableRequestInfo)

Represents the array of the DataParameters for getting data from parametrized schema tables.

 

property Parameters: array of DataParameter read write;

 

DataParameter[] Parameters { get; set; }

 

Property Parameters() As DataParameter()

Sorting

Property represents the information about sorting result data.

 

property Sorting: ColumnSorting read write;

 

ColumnSorting Sorting { get; set; }

 

Property Sorting() As ColumnSorting

UserFilter    (declared in TableRequestInfo)

Uses for specifying custom conditions for returning rows. For example, "CustomerType < 100". Note that all records will be read from the database, but only those that fit the custom condition will be passed to the client.

Note: Applying custom filters is not supported by DataAbstract for .NET, you need to use the more advanced feature Dynamic Where there.

 

property UserFilter: String read write;

 

String UserFilter { get; set; }

 

Property UserFilter() As String

WhereClause

Property that holds Dynamic Where expression in XML format.

 

property WhereClause: XmlNode read write;

 

XmlNode WhereClause { get; set; }

 

Property WhereClause() As XmlNode

 

constructor

 

constructor

 

TableRequestInfoV5()

 

Sub New()

add_PropertyChanged    (declared in ComplexType)

 

method add_PropertyChanged(value: PropertyChangedEventHandler)

 

void add_PropertyChanged(PropertyChangedEventHandler value)

 

Sub add_PropertyChanged(value As PropertyChangedEventHandler)

Parameters:

  • value:

GetAttributeCount    (declared in ComplexType)

 

method GetAttributeCount: Int32

 

Int32 GetAttributeCount()

 

Function GetAttributeCount() As Int32

GetAttributeName    (declared in ComplexType)

 

method GetAttributeName(index: Int32): String

 

String GetAttributeName(Int32 index)

 

Function GetAttributeName(index As Int32) As String

Parameters:

  • index:

GetAttributeValue    (declared in ComplexType)

 

method GetAttributeValue(index: Int32): String

 

String GetAttributeValue(Int32 index)

 

Function GetAttributeValue(index As Int32) As String

Parameters:

  • index:

ReadComplex

 

method ReadComplex(aSerializer: Serializer)

 

void ReadComplex(Serializer aSerializer)

 

Sub ReadComplex(aSerializer As Serializer)

Parameters:

  • aSerializer:

remove_PropertyChanged    (declared in ComplexType)

 

method remove_PropertyChanged(value: PropertyChangedEventHandler)

 

void remove_PropertyChanged(PropertyChangedEventHandler value)

 

Sub remove_PropertyChanged(value As PropertyChangedEventHandler)

Parameters:

  • value:

TriggerPropertyChanged  protected    (declared in ComplexType)

 

method TriggerPropertyChanged(propertyName: String)

 

void TriggerPropertyChanged(String propertyName)

 

Sub TriggerPropertyChanged(propertyName As String)

Parameters:

  • propertyName:

WriteComplex

 

method WriteComplex(aSerializer: Serializer)

 

void WriteComplex(Serializer aSerializer)

 

Sub WriteComplex(aSerializer As Serializer)

Parameters:

  • aSerializer:

 

PropertyChanged    (declared in ComplexType)

 

event PropertyChanged: PropertyChangedEventHandler;

 

delegate PropertyChangedEventHandler PropertyChanged()

 

Event PropertyChanged As PropertyChangedEventHandler

  • TableRequestInfoV5 Class: