IScriptProvider

Overview

The Interface IScriptProvider interface provides access to functionality required to execute the Business Rules Scripting scripts. This interface exposes a set of properties and event handlers that are used by the Data Abstract for .NET to call appropriate event handlers defined in the Business Rules Scripting scripts.

The Interface IScriptProvider interface is implemented by the EcmaScriptProvider class.

Location

Implemented in

Implements

 

AfterCommit

This method is called after a transaction (set of insert/update/delete operations) has been committed.

 

method AfterCommit

 

void AfterCommit()

 

Sub AfterCommit

AfterExecuteCommand

This method is called after an sql command is executed.

 

method AfterExecuteCommand(sql: String; commandName: String; parameters: array of DataParameter; rowsAffected: Int32)

 

void AfterExecuteCommand(String sql, String commandName, DataParameter[] parameters, Int32 rowsAffected)

 

Sub AfterExecuteCommand(sql As String, commandName As String, parameters As array of DataParameter, rowsAffected As Int32)

Parameters:

  • sql: Executed command SQL statement
  • commandName: Executed command name
  • parameters: Set of command parameters
  • rowsAffected: Number of rows affected by the command execution

AfterGetData

This method is called after data is retireved from database.

 

method AfterGetData(tables: array of String; requestInfo: array of TableRequestInfo)

 

void AfterGetData(String[] tables, TableRequestInfo[] requestInfo)

 

Sub AfterGetData(tables As array of String, requestInfo As array of TableRequestInfo)

Parameters:

  • tables: Table names
  • requestInfo: Corresponding TableRequestInfo instances. These instances contain additional request parameters

AfterLogin

This method is called after the user has logged in.

Relativity Server only.

 

method AfterLogin

 

void AfterLogin()

 

Sub AfterLogin

AfterProcessDelta

This method is called on database updates, after processing of each Delta instance

 

method AfterProcessDelta(delta: Delta)

 

void AfterProcessDelta(Delta delta)

 

Sub AfterProcessDelta(delta As Delta)

Parameters:

  • delta: Processed Delta instance

AfterProcessDeltaChange

This method is called on database updates, after processing of each DeltaChange instance.

 

method AfterProcessDeltaChange(delta: Delta; change: DeltaChange; refreshed: Boolean)

 

void AfterProcessDeltaChange(Delta delta, DeltaChange change, Boolean refreshed)

 

Sub AfterProcessDeltaChange(delta As Delta, change As DeltaChange, refreshed As Boolean)

Parameters:

  • delta: Processed Delta instance
  • change: Processed DeltaChange instance
  • refreshed: Flag indicating wheter the data was re-read from the database server after update. This operation is required to obtain values of server-calculated fields

AfterRollback

This method if called after a transactions is rolled back (canceled).

 

method AfterRollback

 

void AfterRollback()

 

Sub AfterRollback

BeforeCommit

This method is called before a transaction is committed.

 

method BeforeCommit

 

void BeforeCommit()

 

Sub BeforeCommit

BeforeDelete

This method is called when a data row is going to be deleted.

 

method BeforeDelete(row: IRowHelper)

 

void BeforeDelete(IRowHelper row)

 

Sub BeforeDelete(row As IRowHelper)

Parameters:

  • row: Data row being deleted

BeforeExecuteCommand

This method is called before an sql command is executed.

 

method BeforeExecuteCommand(sql: String; commandName: String; parameters: array of DataParameter)

 

void BeforeExecuteCommand(String sql, String commandName, DataParameter[] parameters)

 

Sub BeforeExecuteCommand(sql As String, commandName As String, parameters As array of DataParameter)

Parameters:

  • sql: Command SQL statement
  • commandName: Command name
  • parameters: Set of command parameters

BeforeGetData

This method is called before data is retireved from database.

 

method BeforeGetData(tables: array of String; requestInfo: array of TableRequestInfo)

 

void BeforeGetData(String[] tables, TableRequestInfo[] requestInfo)

 

Sub BeforeGetData(tables As array of String, requestInfo As array of TableRequestInfo)

Parameters:

  • tables: Table names
  • requestInfo: Corresponding TableRequestInfo instances. These instances contain additional request parameters

BeforeLogout

This method is called before the user has logged out.

Relativity Server only.

 

method BeforeLogout

 

void BeforeLogout()

 

Sub BeforeLogout

BeforePost

This method is called when a data row is going to be updated.

 

method BeforePost(row: IRowHelper)

 

void BeforePost(IRowHelper row)

 

Sub BeforePost(row As IRowHelper)

Parameters:

  • row: Data row being updated

BeforeProcessDelta

This method is called on database updates, before processing of each Delta instance.

 

method BeforeProcessDelta(delta: Delta)

 

void BeforeProcessDelta(Delta delta)

 

Sub BeforeProcessDelta(delta As Delta)

Parameters:

  • delta: Delta instance to process

BeforeProcessDeltaChange

This method is called on database updates, before processing of each DeltaChange instance.

 

method BeforeProcessDeltaChange(delta: Delta; change: DeltaChange; refreshed: Boolean; var canRemove: Boolean)

 

void BeforeProcessDeltaChange(Delta delta, DeltaChange change, Boolean refreshed, ref Boolean canRemove)

 

Sub BeforeProcessDeltaChange(delta As Delta, change As DeltaChange, refreshed As Boolean, ByRef canRemove As Boolean)

Parameters:

  • delta: Delta instance to process
  • change: DeltaChange instance to process
  • refreshed: Reserved
  • canRemove: Flag indicating wheter the current deltachange can be removed from its parent Delta after is is successfully processed

BeforeRollback

This method is called before a transaction is rolled back (canceled).

 

method BeforeRollback

 

void BeforeRollback()

 

Sub BeforeRollback

Clear

Clears all internal caches of the script provide and resets its state.

 

method Clear

 

void Clear()

 

Sub Clear

ClearScriptCache

Clears the script cache.

For performance reasons Script Provider caches precompiled scripts for Schema entities. Is the server Schema is changed then this cache should be cleared to avoind possible inconsistencies.

 

method ClearScriptCache

 

void ClearScriptCache()

 

Sub ClearScriptCache

Context

Gets or sets the current script provider context.

 

property Context: IScriptContext read write;

 

IScriptContext Context { get; set; }

 

Property Context As IScriptContext

CreateTransaction

This method is called when a new transaction is created to fetch or update records.

 

method CreateTransaction

 

void CreateTransaction()

 

Sub CreateTransaction

Debug

Gets or seta a flag indicating whether script is executed in Debug mode.

 

property Debug: Boolean read write;

 

Boolean Debug { get; set; }

 

Property Debug As Boolean

DoLogin

Reserved.

 

method DoLogin(parameters: IDictionary): Boolean

 

Boolean DoLogin(IDictionary parameters)

 

Function DoLogin(parameters As IDictionary) As Boolean

Parameters:

  • parameters: Reserved

DoLogout

Reserved.

 

method DoLogout

 

void DoLogout()

 

Sub DoLogout

HasAfterCommit

Returns true if the AfterCommit script function is defined.

 

property HasAfterCommit: Boolean read;

 

Boolean HasAfterCommit { get; }

 

Property ReadOnly HasAfterCommit As Boolean

HasAfterExecuteCommand

Returns true if the AfterExecuteCommand script function is defined.

 

property HasAfterExecuteCommand: Boolean read;

 

Boolean HasAfterExecuteCommand { get; }

 

Property ReadOnly HasAfterExecuteCommand As Boolean

HasAfterGetData

Returns true if the AfterGetData script function is defined.

 

property HasAfterGetData: Boolean read;

 

Boolean HasAfterGetData { get; }

 

Property ReadOnly HasAfterGetData As Boolean

HasAfterLogin

Returns true if the AfterLogin script function is defined.

 

property HasAfterLogin: Boolean read;

 

Boolean HasAfterLogin { get; }

 

Property ReadOnly HasAfterLogin As Boolean

HasAfterProcessDelta

Returns true if the AfterProcessDelta script function is defined.

 

property HasAfterProcessDelta: Boolean read;

 

Boolean HasAfterProcessDelta { get; }

 

Property ReadOnly HasAfterProcessDelta As Boolean

HasAfterProcessDeltaChange

Returns true if the AfterProcessDeltaChange script function is defined.

 

property HasAfterProcessDeltaChange: Boolean read;

 

Boolean HasAfterProcessDeltaChange { get; }

 

Property ReadOnly HasAfterProcessDeltaChange As Boolean

HasAfterRollback

Returns true if the AfterRollback script function is defined.

 

property HasAfterRollback: Boolean read;

 

Boolean HasAfterRollback { get; }

 

Property ReadOnly HasAfterRollback As Boolean

HasBeforeCommit

Returns true if the BeforeCommit script function is defined.

 

property HasBeforeCommit: Boolean read;

 

Boolean HasBeforeCommit { get; }

 

Property ReadOnly HasBeforeCommit As Boolean

HasBeforeDelete

Returns true if the BeforeDelete script function is defined for the Schema table tableName.

 

property HasBeforeDelete[tableName: String]: Boolean read;

 

Boolean HasBeforeDelete[String tableName] { get; }

 

Property ReadOnly HasBeforeDelete(tableName As String) As Boolean

HasBeforeExecuteCommand

Returns true if the BeforeExecuteCommand script function is defined.

 

property HasBeforeExecuteCommand: Boolean read;

 

Boolean HasBeforeExecuteCommand { get; }

 

Property ReadOnly HasBeforeExecuteCommand As Boolean

HasBeforeGetData

Returns true if the BeforeGetData script function is defined.

 

property HasBeforeGetData: Boolean read;

 

Boolean HasBeforeGetData { get; }

 

Property ReadOnly HasBeforeGetData As Boolean

HasBeforeLogout

Returns true if the BeforeLogout script function is defined.

 

property HasBeforeLogout: Boolean read;

 

Boolean HasBeforeLogout { get; }

 

Property ReadOnly HasBeforeLogout As Boolean

HasBeforePost

Returns true if the BeforePost script function is defined for the Schema table tableName.

 

property HasBeforePost[tableName: String]: Boolean read;

 

Boolean HasBeforePost[String tableName] { get; }

 

Property ReadOnly HasBeforePost(tableName As String) As Boolean

HasBeforeProcessDelta

Returns true if the BeforeProcessDelta script function is defined.

 

property HasBeforeProcessDelta: Boolean read;

 

Boolean HasBeforeProcessDelta { get; }

 

Property ReadOnly HasBeforeProcessDelta As Boolean

HasBeforeProcessDeltaChange

Returns true if the BeforeProcessDeltaChange script function is defined.

 

property HasBeforeProcessDeltaChange: Boolean read;

 

Boolean HasBeforeProcessDeltaChange { get; }

 

Property ReadOnly HasBeforeProcessDeltaChange As Boolean

HasBeforeRollback

Returns true if the BeforeRollback script function is defined.

 

property HasBeforeRollback: Boolean read;

 

Boolean HasBeforeRollback { get; }

 

Property ReadOnly HasBeforeRollback As Boolean

HasCreateTransaction

Returns true if the CreateTransaction script function is defined.

 

property HasCreateTransaction: Boolean read;

 

Boolean HasCreateTransaction { get; }

 

Property ReadOnly HasCreateTransaction As Boolean

HasDoLogin

Reserved

 

property HasDoLogin: Boolean read;

 

Boolean HasDoLogin { get; }

 

Property ReadOnly HasDoLogin As Boolean

HasDoLogout

Reserved

 

property HasDoLogout: Boolean read;

 

Boolean HasDoLogout { get; }

 

Property ReadOnly HasDoLogout As Boolean

HasOnNewRow

Returns true if the OnNewRow script function is defined for the Schema table tableName.

 

property HasOnNewRow[tableName: String]: Boolean read;

 

Boolean HasOnNewRow[String tableName] { get; }

 

Property ReadOnly HasOnNewRow(tableName As String) As Boolean

HasProcessError

Returns true if the ProcessError script function is defined.

 

property HasProcessError: Boolean read;

 

Boolean HasProcessError { get; }

 

Property ReadOnly HasProcessError As Boolean

HasUnknownSqlMacroIdentifier

Returns true if the onUnknownSqlMacroIdentifier script function is defined.

 

property HasUnknownSqlMacroIdentifier: Boolean read;

 

Boolean HasUnknownSqlMacroIdentifier { get; }

 

Property ReadOnly HasUnknownSqlMacroIdentifier As Boolean

HasValidateCommandAccess

Returns true if the ValidateCommandAccess script function is defined.

 

property HasValidateCommandAccess: Boolean read;

 

Boolean HasValidateCommandAccess { get; }

 

Property ReadOnly HasValidateCommandAccess As Boolean

HasValidateDataTableAccess

Returns true if the ValidateDataTableAccess script function is defined.

 

property HasValidateDataTableAccess: Boolean read;

 

Boolean HasValidateDataTableAccess { get; }

 

Property ReadOnly HasValidateDataTableAccess As Boolean

HasValidateDirectSQLAccess

Returns true if the ValidateDirectSQLAccess script function is defined.

 

property HasValidateDirectSQLAccess: Boolean read;

 

Boolean HasValidateDirectSQLAccess { get; }

 

Property ReadOnly HasValidateDirectSQLAccess As Boolean

LoadScript

Loads and precompiles provided script source.

 

method LoadScript(script: String)

 

void LoadScript(String script)

 

Sub LoadScript(script As String)

Parameters:

  • script: Script source code

OnNewRow

Called when creating new rows. Can be used to pre-initialize new records data.

 

method OnNewRow(row: IRowHelper)

 

void OnNewRow(IRowHelper row)

 

Sub OnNewRow(row As IRowHelper)

Parameters:

  • row: New data row

ProcessError

This method is called when an error occurs during applying data changes to the database.

This method should return either the current value of the canContinue argument or false to break the Delta processing and roll back the transaction.

 

method ProcessError(delta: Delta; change: DeltaChange; var canContinue: Boolean; var error: Exception)

 

void ProcessError(Delta delta, DeltaChange change, ref Boolean canContinue, ref Exception error)

 

Sub ProcessError(delta As Delta, change As DeltaChange, ByRef canContinue As Boolean, ByRef error As Exception)

Parameters:

  • delta: Delta instance containing failed data change
  • change: DeltaChange instance that cannot be applied to the database
  • canContinue: Flag indicating wthether Data Abstract should process other Class instances instead of rolling back the transaction immediately
  • error: Exception raised by the data change attempt

ScriptName

Gets or sets current script name.

Script name is used by the Script Debugger to identify the script source.

 

property ScriptName: String read write;

 

String ScriptName { get; set; }

 

Property ScriptName As String

SupportsLanguage

Returns true if provided language is supported by the current Script Provider.

 

method SupportsLanguage(languageName: String): Boolean

 

Boolean SupportsLanguage(String languageName)

 

Function SupportsLanguage(languageName As String) As Boolean

Parameters:

  • languageName: Script language name

UnknownSqlMacroIdentifier

This method is called when an unknown macro is found in the SQL statement processed by Data Abstract.

 

method UnknownSqlMacroIdentifier(identifier: String; var value: String)

 

void UnknownSqlMacroIdentifier(String identifier, ref String value)

 

Sub UnknownSqlMacroIdentifier(identifier As String, ByRef value As String)

Parameters:

  • identifier: Macro identifier
  • value: Macro value

ValidateCommandAccess

This method is called before a SQL command is executed.

Returns true if command execution is allowed.

 

method ValidateCommandAccess(commandName: String; parameterNames: array of String; parameterValues: array of Object; var isAllowed: Boolean)

 

void ValidateCommandAccess(String commandName, String[] parameterNames, Object[] parameterValues, ref Boolean isAllowed)

 

Sub ValidateCommandAccess(commandName As String, parameterNames As array of String, parameterValues As array of Object, ByRef isAllowed As Boolean)

Parameters:

  • commandName: Command name
  • parameterNames: Command parameter names
  • parameterValues: Command parameter values
  • isAllowed: Flag indicating whether command execution is allowed

ValidateDataTableAccess

This method is called when data request is validated.

Returns true if access to the data table is allowed.

 

method ValidateDataTableAccess(tableName: String; parameterNames: array of String; parameterValues: array of Object; var isAllowed: Boolean)

 

void ValidateDataTableAccess(String tableName, String[] parameterNames, Object[] parameterValues, ref Boolean isAllowed)

 

Sub ValidateDataTableAccess(tableName As String, parameterNames As array of String, parameterValues As array of Object, ByRef isAllowed As Boolean)

Parameters:

  • tableName: Table name
  • parameterNames: Command parameter names
  • parameterValues: Command parameter values
  • isAllowed: Flag indicating whether data access is allowed

ValidateDirectSQLAccess

This method is called when a raw SQL statement sent by client application is executed.

 

method ValidateDirectSQLAccess(sql: String; parameterNames: array of String; parameterValues: array of Object; var isAllowed: Boolean)

 

void ValidateDirectSQLAccess(String sql, String[] parameterNames, Object[] parameterValues, ref Boolean isAllowed)

 

Sub ValidateDirectSQLAccess(sql As String, parameterNames As array of String, parameterValues As array of Object, ByRef isAllowed As Boolean)

Parameters:

  • sql: SQL statement
  • parameterNames: Command parameter names
  • parameterValues: Command parameter values
  • isAllowed: Flag indicating whether SQL statement execution is allowed

 

Context

Gets or sets the current script provider context.

 

property Context: IScriptContext read write;

 

IScriptContext Context { get; set; }

 

Property Context As IScriptContext

Debug

Gets or seta a flag indicating whether script is executed in Debug mode.

 

property Debug: Boolean read write;

 

Boolean Debug { get; set; }

 

Property Debug As Boolean

HasAfterCommit

Returns true if the AfterCommit script function is defined.

 

property HasAfterCommit: Boolean read;

 

Boolean HasAfterCommit { get; }

 

Property ReadOnly HasAfterCommit As Boolean

HasAfterExecuteCommand

Returns true if the AfterExecuteCommand script function is defined.

 

property HasAfterExecuteCommand: Boolean read;

 

Boolean HasAfterExecuteCommand { get; }

 

Property ReadOnly HasAfterExecuteCommand As Boolean

HasAfterGetData

Returns true if the AfterGetData script function is defined.

 

property HasAfterGetData: Boolean read;

 

Boolean HasAfterGetData { get; }

 

Property ReadOnly HasAfterGetData As Boolean

HasAfterLogin

Returns true if the AfterLogin script function is defined.

 

property HasAfterLogin: Boolean read;

 

Boolean HasAfterLogin { get; }

 

Property ReadOnly HasAfterLogin As Boolean

HasAfterProcessDelta

Returns true if the AfterProcessDelta script function is defined.

 

property HasAfterProcessDelta: Boolean read;

 

Boolean HasAfterProcessDelta { get; }

 

Property ReadOnly HasAfterProcessDelta As Boolean

HasAfterProcessDeltaChange

Returns true if the AfterProcessDeltaChange script function is defined.

 

property HasAfterProcessDeltaChange: Boolean read;

 

Boolean HasAfterProcessDeltaChange { get; }

 

Property ReadOnly HasAfterProcessDeltaChange As Boolean

HasAfterRollback

Returns true if the AfterRollback script function is defined.

 

property HasAfterRollback: Boolean read;

 

Boolean HasAfterRollback { get; }

 

Property ReadOnly HasAfterRollback As Boolean

HasBeforeCommit

Returns true if the BeforeCommit script function is defined.

 

property HasBeforeCommit: Boolean read;

 

Boolean HasBeforeCommit { get; }

 

Property ReadOnly HasBeforeCommit As Boolean

HasBeforeDelete

Returns true if the BeforeDelete script function is defined for the Schema table tableName.

 

property HasBeforeDelete[tableName: String]: Boolean read;

 

Boolean HasBeforeDelete[String tableName] { get; }

 

Property ReadOnly HasBeforeDelete(tableName As String) As Boolean

HasBeforeExecuteCommand

Returns true if the BeforeExecuteCommand script function is defined.

 

property HasBeforeExecuteCommand: Boolean read;

 

Boolean HasBeforeExecuteCommand { get; }

 

Property ReadOnly HasBeforeExecuteCommand As Boolean

HasBeforeGetData

Returns true if the BeforeGetData script function is defined.

 

property HasBeforeGetData: Boolean read;

 

Boolean HasBeforeGetData { get; }

 

Property ReadOnly HasBeforeGetData As Boolean

HasBeforeLogout

Returns true if the BeforeLogout script function is defined.

 

property HasBeforeLogout: Boolean read;

 

Boolean HasBeforeLogout { get; }

 

Property ReadOnly HasBeforeLogout As Boolean

HasBeforePost

Returns true if the BeforePost script function is defined for the Schema table tableName.

 

property HasBeforePost[tableName: String]: Boolean read;

 

Boolean HasBeforePost[String tableName] { get; }

 

Property ReadOnly HasBeforePost(tableName As String) As Boolean

HasBeforeProcessDelta

Returns true if the BeforeProcessDelta script function is defined.

 

property HasBeforeProcessDelta: Boolean read;

 

Boolean HasBeforeProcessDelta { get; }

 

Property ReadOnly HasBeforeProcessDelta As Boolean

HasBeforeProcessDeltaChange

Returns true if the BeforeProcessDeltaChange script function is defined.

 

property HasBeforeProcessDeltaChange: Boolean read;

 

Boolean HasBeforeProcessDeltaChange { get; }

 

Property ReadOnly HasBeforeProcessDeltaChange As Boolean

HasBeforeRollback

Returns true if the BeforeRollback script function is defined.

 

property HasBeforeRollback: Boolean read;

 

Boolean HasBeforeRollback { get; }

 

Property ReadOnly HasBeforeRollback As Boolean

HasCreateTransaction

Returns true if the CreateTransaction script function is defined.

 

property HasCreateTransaction: Boolean read;

 

Boolean HasCreateTransaction { get; }

 

Property ReadOnly HasCreateTransaction As Boolean

HasDoLogin

Reserved

 

property HasDoLogin: Boolean read;

 

Boolean HasDoLogin { get; }

 

Property ReadOnly HasDoLogin As Boolean

HasDoLogout

Reserved

 

property HasDoLogout: Boolean read;

 

Boolean HasDoLogout { get; }

 

Property ReadOnly HasDoLogout As Boolean

HasOnNewRow

Returns true if the OnNewRow script function is defined for the Schema table tableName.

 

property HasOnNewRow[tableName: String]: Boolean read;

 

Boolean HasOnNewRow[String tableName] { get; }

 

Property ReadOnly HasOnNewRow(tableName As String) As Boolean

HasProcessError

Returns true if the ProcessError script function is defined.

 

property HasProcessError: Boolean read;

 

Boolean HasProcessError { get; }

 

Property ReadOnly HasProcessError As Boolean

HasUnknownSqlMacroIdentifier

Returns true if the onUnknownSqlMacroIdentifier script function is defined.

 

property HasUnknownSqlMacroIdentifier: Boolean read;

 

Boolean HasUnknownSqlMacroIdentifier { get; }

 

Property ReadOnly HasUnknownSqlMacroIdentifier As Boolean

HasValidateCommandAccess

Returns true if the ValidateCommandAccess script function is defined.

 

property HasValidateCommandAccess: Boolean read;

 

Boolean HasValidateCommandAccess { get; }

 

Property ReadOnly HasValidateCommandAccess As Boolean

HasValidateDataTableAccess

Returns true if the ValidateDataTableAccess script function is defined.

 

property HasValidateDataTableAccess: Boolean read;

 

Boolean HasValidateDataTableAccess { get; }

 

Property ReadOnly HasValidateDataTableAccess As Boolean

HasValidateDirectSQLAccess

Returns true if the ValidateDirectSQLAccess script function is defined.

 

property HasValidateDirectSQLAccess: Boolean read;

 

Boolean HasValidateDirectSQLAccess { get; }

 

Property ReadOnly HasValidateDirectSQLAccess As Boolean

ScriptName

Gets or sets current script name.

Script name is used by the Script Debugger to identify the script source.

 

property ScriptName: String read write;

 

String ScriptName { get; set; }

 

Property ScriptName As String

 

AfterCommit

This method is called after a transaction (set of insert/update/delete operations) has been committed.

 

method AfterCommit

 

void AfterCommit()

 

Sub AfterCommit

AfterExecuteCommand

This method is called after an sql command is executed.

 

method AfterExecuteCommand(sql: String; commandName: String; parameters: array of DataParameter; rowsAffected: Int32)

 

void AfterExecuteCommand(String sql, String commandName, DataParameter[] parameters, Int32 rowsAffected)

 

Sub AfterExecuteCommand(sql As String, commandName As String, parameters As array of DataParameter, rowsAffected As Int32)

Parameters:

  • sql: Executed command SQL statement
  • commandName: Executed command name
  • parameters: Set of command parameters
  • rowsAffected: Number of rows affected by the command execution

AfterGetData

This method is called after data is retireved from database.

 

method AfterGetData(tables: array of String; requestInfo: array of TableRequestInfo)

 

void AfterGetData(String[] tables, TableRequestInfo[] requestInfo)

 

Sub AfterGetData(tables As array of String, requestInfo As array of TableRequestInfo)

Parameters:

  • tables: Table names
  • requestInfo: Corresponding TableRequestInfo instances. These instances contain additional request parameters

AfterLogin

This method is called after the user has logged in.

Relativity Server only.

 

method AfterLogin

 

void AfterLogin()

 

Sub AfterLogin

AfterProcessDelta

This method is called on database updates, after processing of each Delta instance

 

method AfterProcessDelta(delta: Delta)

 

void AfterProcessDelta(Delta delta)

 

Sub AfterProcessDelta(delta As Delta)

Parameters:

  • delta: Processed Delta instance

AfterProcessDeltaChange

This method is called on database updates, after processing of each DeltaChange instance.

 

method AfterProcessDeltaChange(delta: Delta; change: DeltaChange; refreshed: Boolean)

 

void AfterProcessDeltaChange(Delta delta, DeltaChange change, Boolean refreshed)

 

Sub AfterProcessDeltaChange(delta As Delta, change As DeltaChange, refreshed As Boolean)

Parameters:

  • delta: Processed Delta instance
  • change: Processed DeltaChange instance
  • refreshed: Flag indicating wheter the data was re-read from the database server after update. This operation is required to obtain values of server-calculated fields

AfterRollback

This method if called after a transactions is rolled back (canceled).

 

method AfterRollback

 

void AfterRollback()

 

Sub AfterRollback

BeforeCommit

This method is called before a transaction is committed.

 

method BeforeCommit

 

void BeforeCommit()

 

Sub BeforeCommit

BeforeDelete

This method is called when a data row is going to be deleted.

 

method BeforeDelete(row: IRowHelper)

 

void BeforeDelete(IRowHelper row)

 

Sub BeforeDelete(row As IRowHelper)

Parameters:

  • row: Data row being deleted

BeforeExecuteCommand

This method is called before an sql command is executed.

 

method BeforeExecuteCommand(sql: String; commandName: String; parameters: array of DataParameter)

 

void BeforeExecuteCommand(String sql, String commandName, DataParameter[] parameters)

 

Sub BeforeExecuteCommand(sql As String, commandName As String, parameters As array of DataParameter)

Parameters:

  • sql: Command SQL statement
  • commandName: Command name
  • parameters: Set of command parameters

BeforeGetData

This method is called before data is retireved from database.

 

method BeforeGetData(tables: array of String; requestInfo: array of TableRequestInfo)

 

void BeforeGetData(String[] tables, TableRequestInfo[] requestInfo)

 

Sub BeforeGetData(tables As array of String, requestInfo As array of TableRequestInfo)

Parameters:

  • tables: Table names
  • requestInfo: Corresponding TableRequestInfo instances. These instances contain additional request parameters

BeforeLogout

This method is called before the user has logged out.

Relativity Server only.

 

method BeforeLogout

 

void BeforeLogout()

 

Sub BeforeLogout

BeforePost

This method is called when a data row is going to be updated.

 

method BeforePost(row: IRowHelper)

 

void BeforePost(IRowHelper row)

 

Sub BeforePost(row As IRowHelper)

Parameters:

  • row: Data row being updated

BeforeProcessDelta

This method is called on database updates, before processing of each Delta instance.

 

method BeforeProcessDelta(delta: Delta)

 

void BeforeProcessDelta(Delta delta)

 

Sub BeforeProcessDelta(delta As Delta)

Parameters:

  • delta: Delta instance to process

BeforeProcessDeltaChange

This method is called on database updates, before processing of each DeltaChange instance.

 

method BeforeProcessDeltaChange(delta: Delta; change: DeltaChange; refreshed: Boolean; var canRemove: Boolean)

 

void BeforeProcessDeltaChange(Delta delta, DeltaChange change, Boolean refreshed, ref Boolean canRemove)

 

Sub BeforeProcessDeltaChange(delta As Delta, change As DeltaChange, refreshed As Boolean, ByRef canRemove As Boolean)

Parameters:

  • delta: Delta instance to process
  • change: DeltaChange instance to process
  • refreshed: Reserved
  • canRemove: Flag indicating wheter the current deltachange can be removed from its parent Delta after is is successfully processed

BeforeRollback

This method is called before a transaction is rolled back (canceled).

 

method BeforeRollback

 

void BeforeRollback()

 

Sub BeforeRollback

Clear

Clears all internal caches of the script provide and resets its state.

 

method Clear

 

void Clear()

 

Sub Clear

ClearScriptCache

Clears the script cache.

For performance reasons Script Provider caches precompiled scripts for Schema entities. Is the server Schema is changed then this cache should be cleared to avoind possible inconsistencies.

 

method ClearScriptCache

 

void ClearScriptCache()

 

Sub ClearScriptCache

CreateTransaction

This method is called when a new transaction is created to fetch or update records.

 

method CreateTransaction

 

void CreateTransaction()

 

Sub CreateTransaction

DoLogin

Reserved.

 

method DoLogin(parameters: IDictionary): Boolean

 

Boolean DoLogin(IDictionary parameters)

 

Function DoLogin(parameters As IDictionary) As Boolean

Parameters:

  • parameters: Reserved

DoLogout

Reserved.

 

method DoLogout

 

void DoLogout()

 

Sub DoLogout

LoadScript

Loads and precompiles provided script source.

 

method LoadScript(script: String)

 

void LoadScript(String script)

 

Sub LoadScript(script As String)

Parameters:

  • script: Script source code

OnNewRow

Called when creating new rows. Can be used to pre-initialize new records data.

 

method OnNewRow(row: IRowHelper)

 

void OnNewRow(IRowHelper row)

 

Sub OnNewRow(row As IRowHelper)

Parameters:

  • row: New data row

ProcessError

This method is called when an error occurs during applying data changes to the database.

This method should return either the current value of the canContinue argument or false to break the Delta processing and roll back the transaction.

 

method ProcessError(delta: Delta; change: DeltaChange; var canContinue: Boolean; var error: Exception)

 

void ProcessError(Delta delta, DeltaChange change, ref Boolean canContinue, ref Exception error)

 

Sub ProcessError(delta As Delta, change As DeltaChange, ByRef canContinue As Boolean, ByRef error As Exception)

Parameters:

  • delta: Delta instance containing failed data change
  • change: DeltaChange instance that cannot be applied to the database
  • canContinue: Flag indicating wthether Data Abstract should process other Class instances instead of rolling back the transaction immediately
  • error: Exception raised by the data change attempt

SupportsLanguage

Returns true if provided language is supported by the current Script Provider.

 

method SupportsLanguage(languageName: String): Boolean

 

Boolean SupportsLanguage(String languageName)

 

Function SupportsLanguage(languageName As String) As Boolean

Parameters:

  • languageName: Script language name

UnknownSqlMacroIdentifier

This method is called when an unknown macro is found in the SQL statement processed by Data Abstract.

 

method UnknownSqlMacroIdentifier(identifier: String; var value: String)

 

void UnknownSqlMacroIdentifier(String identifier, ref String value)

 

Sub UnknownSqlMacroIdentifier(identifier As String, ByRef value As String)

Parameters:

  • identifier: Macro identifier
  • value: Macro value

ValidateCommandAccess

This method is called before a SQL command is executed.

Returns true if command execution is allowed.

 

method ValidateCommandAccess(commandName: String; parameterNames: array of String; parameterValues: array of Object; var isAllowed: Boolean)

 

void ValidateCommandAccess(String commandName, String[] parameterNames, Object[] parameterValues, ref Boolean isAllowed)

 

Sub ValidateCommandAccess(commandName As String, parameterNames As array of String, parameterValues As array of Object, ByRef isAllowed As Boolean)

Parameters:

  • commandName: Command name
  • parameterNames: Command parameter names
  • parameterValues: Command parameter values
  • isAllowed: Flag indicating whether command execution is allowed

ValidateDataTableAccess

This method is called when data request is validated.

Returns true if access to the data table is allowed.

 

method ValidateDataTableAccess(tableName: String; parameterNames: array of String; parameterValues: array of Object; var isAllowed: Boolean)

 

void ValidateDataTableAccess(String tableName, String[] parameterNames, Object[] parameterValues, ref Boolean isAllowed)

 

Sub ValidateDataTableAccess(tableName As String, parameterNames As array of String, parameterValues As array of Object, ByRef isAllowed As Boolean)

Parameters:

  • tableName: Table name
  • parameterNames: Command parameter names
  • parameterValues: Command parameter values
  • isAllowed: Flag indicating whether data access is allowed

ValidateDirectSQLAccess

This method is called when a raw SQL statement sent by client application is executed.

 

method ValidateDirectSQLAccess(sql: String; parameterNames: array of String; parameterValues: array of Object; var isAllowed: Boolean)

 

void ValidateDirectSQLAccess(String sql, String[] parameterNames, Object[] parameterValues, ref Boolean isAllowed)

 

Sub ValidateDirectSQLAccess(sql As String, parameterNames As array of String, parameterValues As array of Object, ByRef isAllowed As Boolean)

Parameters:

  • sql: SQL statement
  • parameterNames: Command parameter names
  • parameterValues: Command parameter values
  • isAllowed: Flag indicating whether SQL statement execution is allowed

See Also