code: protected final int getMaxOrLimit(RowSelection selection) {
  		final int firstRow = convertToFirstRowValue(LimitHelper.getFirstRow(selection));
  		final int lastRow = selection.getMaxRows();
  		return useMaxForLimit() ? lastRow + firstRow : lastRow;
  	}
docs: Some dialect-specific LIMIT clauses require the maximum last row number (aka, first_row_number + total_row_count),
  while others require the maximum returned row count (the total maximum number of rows to return).
  
  @param selection the selection criteria for rows.
  @return The appropriate value to bind into the limit clause.