lib/connection/statement.js
function createOnStatementRequestSuccRow(statement, context)
{
  return function(body)
  {
    // if we don't already have a result
    if (!context.result)
    {
      // build a result from the response
      context.result = new Result(
      {
        response         : body,
        statement        : statement,
        services         : context.services,
        connectionConfig : context.connectionConfig
      });

      // save the statement id
      context.statementId = context.result.getStatementId();
    }
    else
    {
      // refresh the existing result
      context.result.refresh(body);
    }

    // only update the parameters if the statement isn't a post-exec statement
    if (context.type !== statementTypes.ROW_POST_EXEC)
    {
      Parameters.update(context.result.getParametersArray());
    }
  };
}
function createOnStatementRequestSuccRow(statement, context)
{
  return function(body)
  {
    // if we don't already have a result
    if (!context.result)
    {
      // build a result from the response
      context.result = new Result(
      {
        response         : body,
        statement        : statement,
        services         : context.services,
        connectionConfig : context.connectionConfig
      });

      // save the statement id
      context.statementId = context.result.getStatementId();
    }
    else
    {
      // refresh the existing result
      context.result.refresh(body);
    }

    // only update the parameters if the statement isn't a post-exec statement
    if (context.type !== statementTypes.ROW_POST_EXEC)
    {
      Parameters.update(context.result.getParametersArray());
    }
  };
}
function createOnStatementRequestSuccRow ( statement , context ) { return function ( body ) { // if we don't already have a result if ( ! context . result ) { // build a result from the response context . result = new Result ( { response : body , statement : statement , services : context . services , connectionConfig : context . connectionConfig } ) ; // save the statement id context . statementId = context . result . getStatementId ( ) ; } else { // refresh the existing result context . result . refresh ( body ) ; } // only update the parameters if the statement isn't a post-exec statement if ( context . type !== statementTypes . ROW_POST_EXEC ) { Parameters . update ( context . result . getParametersArray ( ) ) ; } } ; }
Creates a function that can be used by row statements to process the response
when the request is successful.

@param statement
@param context
@returns {Function}
Creates a function that can be used by row statements to process the response when the request is successful .