lib/connection/result/column.js
function extractFromRow(row, context, asString)
{
  var map    = row._arrayProcessedColumns;
  var values = row.values;

  // get the value
  var columnIndex = this.getIndex();
  var ret = values[columnIndex];

  // if we want the value as a string, and the column is of type variant, and we
  // haven't already processed the value before, we don't need to process the
  // value, so only process if none of the aforementioned conditions are true
  if (!(asString && this.isVariant() && !map[columnIndex]))
  {
    // if the column value has not been processed yet, process it, put it back
    // in the values array, and remember that the value has been processed
    if (!map[columnIndex])
    {
      if (ret !== null)
      {
        ret = values[columnIndex] =
            context.convert(values[columnIndex], this, context);
      }
      map[columnIndex] = true;
    }

    // use the appropriate extraction function depending on whether
    // we want the value or a string representation of the value
    var extractFn = !asString ? context.toValue : context.toString;
    ret = extractFn(ret);
  }

  return ret;
}
function extractFromRow(row, context, asString)
{
  var map    = row._arrayProcessedColumns;
  var values = row.values;

  // get the value
  var columnIndex = this.getIndex();
  var ret = values[columnIndex];

  // if we want the value as a string, and the column is of type variant, and we
  // haven't already processed the value before, we don't need to process the
  // value, so only process if none of the aforementioned conditions are true
  if (!(asString && this.isVariant() && !map[columnIndex]))
  {
    // if the column value has not been processed yet, process it, put it back
    // in the values array, and remember that the value has been processed
    if (!map[columnIndex])
    {
      if (ret !== null)
      {
        ret = values[columnIndex] =
            context.convert(values[columnIndex], this, context);
      }
      map[columnIndex] = true;
    }

    // use the appropriate extraction function depending on whether
    // we want the value or a string representation of the value
    var extractFn = !asString ? context.toValue : context.toString;
    ret = extractFn(ret);
  }

  return ret;
}
function extractFromRow ( row , context , asString ) { var map = row . _arrayProcessedColumns ; var values = row . values ; // get the value var columnIndex = this . getIndex ( ) ; var ret = values [ columnIndex ] ; // if we want the value as a string, and the column is of type variant, and we // haven't already processed the value before, we don't need to process the // value, so only process if none of the aforementioned conditions are true if ( ! ( asString && this . isVariant ( ) && ! map [ columnIndex ] ) ) { // if the column value has not been processed yet, process it, put it back // in the values array, and remember that the value has been processed if ( ! map [ columnIndex ] ) { if ( ret !== null ) { ret = values [ columnIndex ] = context . convert ( values [ columnIndex ] , this , context ) ; } map [ columnIndex ] = true ; } // use the appropriate extraction function depending on whether // we want the value or a string representation of the value var extractFn = ! asString ? context . toValue : context . toString ; ret = extractFn ( ret ) ; } return ret ; }
Extracts the value of a column from a given row.

@param {Object} row
@param {Object} context
@param {Boolean} asString

@returns {*}
Extracts the value of a column from a given row .