Consolidator.prototype.consolidate = function()

in database-jones/Adapter/common/IndexBounds.js [813:841]


  Consolidator.prototype.consolidate = function(partialBounds, doLow, doHigh) {
    var boundsIterator, segment, idxBounds;

    boundsIterator = this.columnBounds.getIterator();
    segment = boundsIterator.next();
    while(segment) {
      idxBounds = partialBounds.copy();

      if(doLow) {
        idxBounds.low.push(segment.low);  // push new part onto IndexValue
        doLow = segment.low.inclusive && segment.low.isFinite;
      }
      if(doHigh) {
        idxBounds.high.push(segment.high); // push new part onto IndexValue
        doHigh = segment.high.inclusive && segment.high.isFinite;
      }

      if(this.nextColumnConsolidator && (doLow || doHigh)
          && (! this.nextColumnConsolidator.skip))
      {
        this.nextColumnConsolidator.consolidate(idxBounds, doLow, doHigh);
      }
      else {
        allBounds.insertSegment(idxBounds);
      }

      segment = boundsIterator.next();
    }
  };