001package io.ebean.config.dbplatform;
002
003import io.ebean.Query;
004
005/**
006 * The request object for the query that can have sql limiting applied to it
007 * (such as a LIMIT OFFSET clause).
008 */
009public interface SqlLimitRequest {
010
011  /**
012   * Return true if the query uses distinct.
013   */
014  boolean isDistinct();
015
016  /**
017   * Return the first row value.
018   */
019  int getFirstRow();
020
021  /**
022   * Return the max rows for this query.
023   */
024  int getMaxRows();
025
026  /**
027   * Return the sql query.
028   */
029  String getDbSql();
030
031  /**
032   * Return the orderBy clause of the sql query.
033   */
034  String getDbOrderBy();
035
036  /**
037   * return the query
038   */
039  Query<?> getOrmQuery();
040
041  /**
042   * return the database platform
043   */
044  DatabasePlatform getDbPlatform();
045}