public final class Select extends ConditionalQuery<Select>
SELECT query.conditions| Constructor and Description |
|---|
Select() |
| Modifier and Type | Method and Description |
|---|---|
Select |
all()
Adds
* to the selected expression list. |
Select |
col(@NonNull String name)
Adds a column to the selected expression list.
|
Select |
desc()
Adds
DESC clause to the ORDER BY clause. |
Select |
expr(@NonNull String expr,
Object... params)
Adds an SQL expression to the selected expression list.
|
Select |
forUpdate()
Adds
FOR UPDATE clause to the end of the query. |
Select |
from(@NonNull String tableName)
Sets the name of the table to select from.
|
Select |
from(@NonNull String database,
@NonNull String tableName)
Sets names of the database and the table to select from.
|
List<Object> |
getParams() |
String |
getSQL() |
Select |
limit(long limit)
Adds
LIMIT limit clause to the query. |
Select |
offset(long offset)
Adds
OFFSET offset clause to the query. |
Select |
orderBy(@NonNull String column)
Adds
ORDER BY column clause to the query. |
Select |
orderByExpr(@NonNull String expr,
Object... params)
Adds
ORDER BY expression clause to the query. |
appendConditions, where, whereExpr, whereNull, whereNullableprepareStatement, prepareStatement, query, queryAndMap, queryAndMapAll, update, update, updateWithKeys, updateWithKeysAndMap, updateWithKeysAndMapAllpublic Select all()
* to the selected expression list. No other columns can be added.public Select col(@NonNull @NonNull String name)
name - Column name.public Select expr(@NonNull @NonNull String expr, @NonNull Object... params)
expr - SQL expression.params - Expression parameters (for filling in ? placeholders).public Select from(@NonNull @NonNull String tableName)
tableName - Name of the table.public Select from(@NonNull @NonNull String database, @NonNull @NonNull String tableName)
database - Name of the database.tableName - Name of the table.public Select orderBy(@NonNull @NonNull String column)
ORDER BY column clause to the query.column - Column name.public Select orderByExpr(@NonNull @NonNull String expr, @NonNull Object... params)
ORDER BY expression clause to the query.expr - SQL expression.params - Expression parameters (for filling in ? placeholders).public Select desc()
DESC clause to the ORDER BY clause.public Select limit(long limit)
LIMIT limit clause to the query.limit - Limit, must be positive.public Select offset(long offset)
OFFSET offset clause to the query.offset - Offset, must be non-negative.public Select forUpdate()
FOR UPDATE clause to the end of the query.public String getSQL()
getSQL in class AbstractQuerypublic List<Object> getParams()
getParams in class AbstractQuery? in the SQL query).Copyright © 2021. All rights reserved.