org.springframework.data.relational.core.sql

## Interface SelectBuilder.SelectFromAndOrderBy

All Superinterfaces:
  SelectBuilder.BuildSelect, SelectBuilder.SelectFrom, SelectBuilder.SelectLimitOffset, SelectBuilder.SelectLock, SelectBuilder.SelectOrdered

All Known Subinterfaces:
  SelectBuilder.SelectFromAndJoin

Enclosing interface:
  SelectBuilder

    public static interface SelectBuilder.SelectFromAndOrderBy
    extends SelectBuilder.SelectFrom, SelectBuilder.SelectOrdered, SelectBuilder.SelectLimitOffset, SelectBuilder.SelectLock, SelectBuilder.BuildSelect

Builder exposing `FROM`, `JOIN`, `WHERE`, `LIMIT/OFFSET` and `LOCK` methods.

### Method Summary

All Methods Instance Methods Abstract Methods
`SelectBuilder.SelectFromAndOrderBy` `from(Collection<? extends Table> tables)` Declare one or more `Table`s to `SELECT … FROM`.
`SelectBuilder.SelectFromAndOrderBy` `from(String table)` Declare a `Table` to `SELECT … FROM`.
`SelectBuilder.SelectFromAndOrderBy` `from(Table... tables)` Declare one or more `Table`s to `SELECT … FROM`.
`SelectBuilder.SelectFromAndOrderBy` `from(Table table)` Declare a `Table` to `SELECT … FROM`.
`SelectBuilder.SelectFromAndOrderBy` `limit(long limit)` Apply a limit of rows to read.
`SelectBuilder.SelectFromAndOrderBy` `limitOffset(long limit, long offset)` Apply `limit` and `offset` parameters to the select statement.
`SelectBuilder.SelectFromAndOrderBy` `offset(long offset)` Apply an offset where to start reading rows.
`SelectBuilder.SelectFromAndOrderBy` `orderBy(Collection<? extends OrderByField> orderByFields)` Add one or more `order by fields`.
`SelectBuilder.SelectFromAndOrderBy` `orderBy(Column... columns)` Add one or more `columns` to order by.
`SelectBuilder.SelectFromAndOrderBy` `orderBy(OrderByField... orderByFields)` Add one or more `order by fields`.

### Methods inherited from interface org.springframework.data.relational.core.sql.SelectBuilder.SelectLock

`lock`

### Methods inherited from interface org.springframework.data.relational.core.sql.SelectBuilder.BuildSelect

`build`

### Method Detail

#### limitOffset

    SelectBuilder.SelectFromAndOrderBy limitOffset(long limit,
                                                   long offset)

Description copied from interface: `SelectBuilder.SelectLimitOffset`
Apply `limit` and `offset` parameters to the select statement. To read the first 20 rows from start use `limitOffset(20, 0)`. to read the next 20 use `limitOffset(20, 20)`.

Specified by:
  `limitOffset` in interface `SelectBuilder.SelectLimitOffset`
Parameters:
  `limit` - rows to read.
  `offset` - row offset, zero-based.
Returns:
  `this` builder.

#### limit

    SelectBuilder.SelectFromAndOrderBy limit(long limit)

Description copied from interface: `SelectBuilder.SelectLimitOffset`
Apply a limit of rows to read.

Specified by:
  `limit` in interface `SelectBuilder.SelectLimitOffset`
Parameters:
  `limit` - rows to read.
Returns:
  `this` builder.

#### offset

    SelectBuilder.SelectFromAndOrderBy offset(long offset)

Description copied from interface: `SelectBuilder.SelectLimitOffset`
Apply an offset where to start reading rows.

Specified by:
  `offset` in interface `SelectBuilder.SelectLimitOffset`
Parameters:
  `offset` - start offset.
Returns:
  `this` builder.

#### from

    SelectBuilder.SelectFromAndOrderBy from(String table)

Description copied from interface: `SelectBuilder.SelectFrom`
Declare a `Table` to `SELECT … FROM`. Multiple calls to this or other `from` methods keep adding items to the select list and do not replace previously contained items.

Specified by:
  `from` in interface `SelectBuilder.SelectFrom`
Parameters:
  `table` - the table name to `SELECT … FROM` must not be null or empty.
Returns:
  `this` builder.
See Also:
  `From`, `SQL.table(String)`

#### from

    SelectBuilder.SelectFromAndOrderBy from(Table table)

Description copied from interface: `SelectBuilder.SelectFrom`
Declare a `Table` to `SELECT … FROM`. Multiple calls to this or other `from` methods keep adding items to the select list and do not replace previously contained items.

Specified by:
  `from` in interface `SelectBuilder.SelectFrom`
Parameters:
  `table` - the table to `SELECT … FROM` must not be null.
Returns:
  `this` builder.
See Also:
  `From`, `SQL.table(String)`

#### from

    SelectBuilder.SelectFromAndOrderBy from(Table... tables)

Description copied from interface: `SelectBuilder.SelectFrom`
Declare one or more `Table`s to `SELECT … FROM`. Multiple calls to this or other `from` methods keep adding items to the select list and do not replace previously contained items.

Specified by:
  `from` in interface `SelectBuilder.SelectFrom`
Parameters:
  `tables` - the tables to `SELECT … FROM` must not be null.
Returns:
  `this` builder.
See Also:
  `From`, `SQL.table(String)`

#### from

    SelectBuilder.SelectFromAndOrderBy from(Collection<? extends Table> tables)

Description copied from interface: `SelectBuilder.SelectFrom`
Declare one or more `Table`s to `SELECT … FROM`. Multiple calls to this or other `from` methods keep adding items to the select list and do not replace previously contained items.

Specified by:
  `from` in interface `SelectBuilder.SelectFrom`
Parameters:
  `tables` - the tables to `SELECT … FROM` must not be null.
Returns:
  `this` builder.
See Also:
  `From`, `SQL.table(String)`

#### orderBy

    SelectBuilder.SelectFromAndOrderBy orderBy(Column... columns)

Description copied from interface: `SelectBuilder.SelectOrdered`
Add one or more `columns` to order by.

Specified by:
  `orderBy` in interface `SelectBuilder.SelectOrdered`
Parameters:
  `columns` - the columns to order by.
Returns:
  `this` builder.

#### orderBy

    SelectBuilder.SelectFromAndOrderBy orderBy(OrderByField... orderByFields)

Description copied from interface: `SelectBuilder.SelectOrdered`
Add one or more `order by fields`.

Specified by:
  `orderBy` in interface `SelectBuilder.SelectOrdered`
Parameters:
  `orderByFields` - the fields to order by.
Returns:
  `this` builder.

#### orderBy

    SelectBuilder.SelectFromAndOrderBy orderBy(Collection<? extends OrderByField> orderByFields)

Description copied from interface: `SelectBuilder.SelectOrdered`
Add one or more `order by fields`.

Specified by:
  `orderBy` in interface `SelectBuilder.SelectOrdered`
Parameters:
  `orderByFields` - the fields to order by.
Returns:
  `this` builder.