IServerScriptContext

Overview

The IServerScriptContext interface provides access to Data Abstract server-secific information like defined connection strings etc. This information is used by the Business Rules Scripting engine to provide such built-in Script objects as connections or lda.

The default implementation of the IServerScriptContext interface is the ScriptContext class. More advanced Data Abstract applications such as Relativity Server might provide their own implementations of the IServerScriptContext interface.

Location

Implemented in

Implements

 

ApplyChanges

Applies Deltas stored in the provided list.

 

method ApplyChanges(delta: Delta)

 

void ApplyChanges(Delta delta)

 

Sub ApplyChanges(delta As Delta)

Parameters:

  • delta: List of changes to apply

ConnectionCount

Gets the count of connections defined in the ConnectionManager.

 

property ConnectionCount: Int32 read;

 

Int32 ConnectionCount { get; }

 

Property ReadOnly ConnectionCount As Int32

CreateCommandAdapter

 

method CreateCommandAdapter: BaseCommand

 

BaseCommand CreateCommandAdapter()

 

Function CreateCommandAdapter As BaseCommand

CreateDataAdapter

 

method CreateDataAdapter: DataAdapter

 

DataAdapter CreateDataAdapter()

 

Function CreateDataAdapter As DataAdapter

CurrentConnection

Gets or sets a the index of the conection that should be used as active.

Note that by default setting this property doesn't result in connection being immediately reacquired by the DataAbstractService. Instead the DataAbstractService property is set, not the DataAbstractService property.

 

property CurrentConnection: Int32 read write;

 

Int32 CurrentConnection { get; set; }

 

Property CurrentConnection As Int32

CurrentConnectionName

Gets or sets the current connection name.

Note that by default setting this property doesn't result in connection being immediately reacquired by the DataAbstractService.

 

property CurrentConnectionName: String read write;

 

String CurrentConnectionName { get; set; }

 

Property CurrentConnectionName As String

CurrentConnectionString

Gets the connection string of the currently active connection.

 

property CurrentConnectionString: String read;

 

String CurrentConnectionString { get; }

 

Property ReadOnly CurrentConnectionString As String

CurrentConnectionType

Gets the connection type of the currently active connection.

 

property CurrentConnectionType: String read;

 

String CurrentConnectionType { get; }

 

Property ReadOnly CurrentConnectionType As String

Fetch (String, array of DataParameter): IDataReader

Returns IDataReader based on provided SQL statement and parameters.

Note: This method is not implemented in the default IServerScriptContext interface implementation (the ScriptContext class).

 

method Fetch(sql: String; parameters: array of DataParameter): IDataReader

 

IDataReader Fetch(String sql, DataParameter[] parameters)

 

Function Fetch(sql As String, parameters As array of DataParameter) As IDataReader

Parameters:

  • sql: SQL statement
  • parameters: SQL statement parameters

Fetch (String, array of String, String, array of DataParameter): IDataReader

Returns IDataReader containing data from data table specified by the tableName parameter, field list, data parameters and DynamicWhere statement.

Note: This method is not implemented in the default IServerScriptContext interface implementation (the ScriptContext class).

 

method Fetch(tableName: String; fields: array of String; whereXml: String; parameters: array of DataParameter): IDataReader

 

IDataReader Fetch(String tableName, String[] fields, String whereXml, DataParameter[] parameters)

 

Function Fetch(tableName As String, fields As array of String, whereXml As String, parameters As array of DataParameter) As IDataReader

Parameters:

  • tableName: Data table name
  • fields: Field names to retrieve
  • whereXml: Xml representing Dynamic Where expression
  • parameters: Data request parameters

GetConnectionName

Returns name of the connection beins stored under index index in the ConnectionManager.

 

method GetConnectionName(index: Int32): String

 

String GetConnectionName(Int32 index)

 

Function GetConnectionName(index As Int32) As String

Parameters:

  • index: Connection definition index

GetConnectionString

Returns connection string of the connection beins stored under index index in the ConnectionManager.

 

method GetConnectionString(index: Int32): String

 

String GetConnectionString(Int32 index)

 

Function GetConnectionString(index As Int32) As String

Parameters:

  • index: Connection definition index

GetConnectionType

Returns connection type of the connection beins stored under index index in the ConnectionManager.

 

method GetConnectionType(index: Int32): String

 

String GetConnectionType(Int32 index)

 

Function GetConnectionType(index As Int32) As String

Parameters:

  • index: Connection definition index

 

ConnectionCount

Gets the count of connections defined in the ConnectionManager.

 

property ConnectionCount: Int32 read;

 

Int32 ConnectionCount { get; }

 

Property ReadOnly ConnectionCount As Int32

CurrentConnection

Gets or sets a the index of the conection that should be used as active.

Note that by default setting this property doesn't result in connection being immediately reacquired by the DataAbstractService. Instead the DataAbstractService property is set, not the DataAbstractService property.

 

property CurrentConnection: Int32 read write;

 

Int32 CurrentConnection { get; set; }

 

Property CurrentConnection As Int32

CurrentConnectionName

Gets or sets the current connection name.

Note that by default setting this property doesn't result in connection being immediately reacquired by the DataAbstractService.

 

property CurrentConnectionName: String read write;

 

String CurrentConnectionName { get; set; }

 

Property CurrentConnectionName As String

CurrentConnectionString

Gets the connection string of the currently active connection.

 

property CurrentConnectionString: String read;

 

String CurrentConnectionString { get; }

 

Property ReadOnly CurrentConnectionString As String

CurrentConnectionType

Gets the connection type of the currently active connection.

 

property CurrentConnectionType: String read;

 

String CurrentConnectionType { get; }

 

Property ReadOnly CurrentConnectionType As String

 

ApplyChanges

Applies Deltas stored in the provided list.

 

method ApplyChanges(delta: Delta)

 

void ApplyChanges(Delta delta)

 

Sub ApplyChanges(delta As Delta)

Parameters:

  • delta: List of changes to apply

CreateCommandAdapter

 

method CreateCommandAdapter: BaseCommand

 

BaseCommand CreateCommandAdapter()

 

Function CreateCommandAdapter As BaseCommand

CreateDataAdapter

 

method CreateDataAdapter: DataAdapter

 

DataAdapter CreateDataAdapter()

 

Function CreateDataAdapter As DataAdapter

Fetch (String, array of DataParameter): IDataReader

Returns IDataReader based on provided SQL statement and parameters.

Note: This method is not implemented in the default IServerScriptContext interface implementation (the ScriptContext class).

 

method Fetch(sql: String; parameters: array of DataParameter): IDataReader

 

IDataReader Fetch(String sql, DataParameter[] parameters)

 

Function Fetch(sql As String, parameters As array of DataParameter) As IDataReader

Parameters:

  • sql: SQL statement
  • parameters: SQL statement parameters

Fetch (String, array of String, String, array of DataParameter): IDataReader

Returns IDataReader containing data from data table specified by the tableName parameter, field list, data parameters and DynamicWhere statement.

Note: This method is not implemented in the default IServerScriptContext interface implementation (the ScriptContext class).

 

method Fetch(tableName: String; fields: array of String; whereXml: String; parameters: array of DataParameter): IDataReader

 

IDataReader Fetch(String tableName, String[] fields, String whereXml, DataParameter[] parameters)

 

Function Fetch(tableName As String, fields As array of String, whereXml As String, parameters As array of DataParameter) As IDataReader

Parameters:

  • tableName: Data table name
  • fields: Field names to retrieve
  • whereXml: Xml representing Dynamic Where expression
  • parameters: Data request parameters

GetConnectionName

Returns name of the connection beins stored under index index in the ConnectionManager.

 

method GetConnectionName(index: Int32): String

 

String GetConnectionName(Int32 index)

 

Function GetConnectionName(index As Int32) As String

Parameters:

  • index: Connection definition index

GetConnectionString

Returns connection string of the connection beins stored under index index in the ConnectionManager.

 

method GetConnectionString(index: Int32): String

 

String GetConnectionString(Int32 index)

 

Function GetConnectionString(index As Int32) As String

Parameters:

  • index: Connection definition index

GetConnectionType

Returns connection type of the connection beins stored under index index in the ConnectionManager.

 

method GetConnectionType(index: Int32): String

 

String GetConnectionType(Int32 index)

 

Function GetConnectionType(index As Int32) As String

Parameters:

  • index: Connection definition index

See Also