Class: ProcedureResult

$.hdb. ProcedureResult

Represents the result of a stored procedure call.

new ProcedureResult()

The $.hdb.ProcedureResult object contains the output parameters and $.hdb.ResultSet objects returned by a procedure call. Output parameters can be accessed by their name. The $.hdb.ResultSet objects are stored in an array under the $resultSets property.
// Assuming procedure with signature 'DB_EXAMPLE' flavor VARCHAR, IN quantity INTEGER, IN payment DECIMAL, OUT change DECIMAL)
var fnSell = connection.loadProcedure('DB_EXAMPLE', '');

var result = fnSell('CHOCOLATE', 3, 30.0);

// result can be accessed as if it were a JSON object with a structure similar to {change: 1.50, $resultSets:[....]}
// value of output parameter 'change'
var change = result['change'];

// array of $.hdb.ResultSet returned by the stored procedure
var resultSets = result['$resultSets'];

// iterate over all output parameters. Note: $resultSets is not enumerable, so it won`t show up in a for-each loop.
var params;
for (var outputParam in result) {
    params += outputParam + ' ';


$resultSets :Array.<$.hdb.ResultSet>

An array containing all of the result sets returned by the stored procedure.