Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Name: This case-sensitive identifier is used to reference the connection throughout your FIXEdge configuration.

  • StorageType: This case-insensitive option specifies the type of database connection you are using. Currently, only ODBC is supported.

  • ConnectionString: This string contains the information needed to connect to your database. The format will vary depending on your specific DBMS.

  • MinPoolSize: This defines the minimum number of connections that will be available in the pool at FIXEdge system startup. Default: 1

  • MaxPoolSize: This sets the maximum number of connections that FIXEdge can create in the pool. Default: 16

FIXEdge JS Binding: executeSQL()

executeSQL is a convenient tool within FIXEdge with a JS binding feature that allows users to transfer execution control and parameters from Javascript to C++ runtime. It works as a bridge between the two environments, ensuring seamless and efficient operation.

Here's how you can use executeSQL:

The executeSQL function should be called as follows:

Code Block
languagejs
var connection = "Odbc1";
var query = "DECLARE @tempInt int = ?; select @tempInt";
var params = [123];
var result = executeSQL(connection, query, params);

The function call consists of the following parameters:

  • connection: This is a required string parameter where you specify the connection name that matches the 'DatabaseConnection.Name' in BL_Config.xml.

  • query: This is a required string parameter where you write the SQL statement that you want to be executed on the server-side.

  • params: This is a required array of integers, doubles, or strings that represent the query parameters to be sent to the server.

  • result: This is a required JS Object that you have to initialize as follows:

Code Block
languagejs
var result = {
    "affectedRowCount": -1, // Mandatory integer, denotes the number of affected rows if the query modifies any data
    "data": [[123]]         // Mandatory array, includes rows of selected data or an empty array if no data was selected.
};

The affectedRowCount field contains the number of rows affected if the query modifies any data. The data field consists of the rows of selected data (each row is an array of the selected columns). If no data is selected, it returns an empty array.

Usage

To use DDBAPI, your BL_Config.xml file should define a JavaScript execution action in one of its rules, like so:

...