core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLSelect.java
@Override
  protected boolean handleResult(final OIdentifiable iRecord, final OCommandContext iContext) {
    lastRecord = iRecord;

    if ((orderedFields.isEmpty() || fullySortedByIndex || isRidOnlySort()) && skip > 0 && this.unwindFields == null
        && this.expandTarget == null) {
      lastRecord = null;
      skip--;
      return true;
    }

    if (!addResult(lastRecord, iContext)) {
      return false;
    }

    return continueSearching();
  }
@Override
  protected boolean handleResult(final OIdentifiable iRecord, final OCommandContext iContext) {
    lastRecord = iRecord;

    if ((orderedFields.isEmpty() || fullySortedByIndex || isRidOnlySort()) && skip > 0 && this.unwindFields == null
        && this.expandTarget == null) {
      lastRecord = null;
      skip--;
      return true;
    }

    if (!addResult(lastRecord, iContext)) {
      return false;
    }

    return continueSearching();
  }
@ Override protected boolean handleResult ( final OIdentifiable iRecord , final OCommandContext iContext ) { lastRecord = iRecord ; if ( ( orderedFields . isEmpty ( ) || fullySortedByIndex || isRidOnlySort ( ) ) && skip > 0 && this . unwindFields == null && this . expandTarget == null ) { lastRecord = null ; skip -- ; return true ; } if ( ! addResult ( lastRecord , iContext ) ) { return false ; } return continueSearching ( ) ; }
Handles the record in result.

@param iRecord Record to handle

@return false if limit has been reached, otherwise true
Handles the record in result .