インタフェース SelectBuilder
-
- 既知の実装クラスのリスト:
SelectBuilderImpl,SelectQuery
public interface SelectBuilderAPI of cleate a select SQL statement.- 作成者:
- nkjm
-
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 static SelectBuilderImpl.Conditionand(Object... conds)Creates AND condition with concatenating arguments.static Stringas(String col, String alias)Creates AS alias.StringbuildSql()Creates a select SQL statement from the objects.static SelectBuilderImpl.Conditioncond(String cond)CreatesSelectBuilderImpl.Conditioninstance.static SelectBuilderImpl.Conditioncond(String left, String op, String right)static SelectBuildercreate()CreateSelectBuilderobject.SelectBuilderdistinct()Add distinct keyword to SQL.SelectBuilderfrom(String table)Create from clause.SelectBuildergroupBy(String... columns)Create group by clause.SelectBuilderhaving(String expr)Create having clause.SelectBuilderhaving(SelectBuilderImpl.Condition condition)Create having clause with the givenSelectBuilderImpl.Condition.SelectBuilderlimit(int limit)Create limit clause.SelectBuilderlimit(int limit, int offset)Create limit clause with offset.static SelectBuilderImpl.Conditionor(Object... conds)Creates OR condition with concatenating arguments.static SelectBuilderImpl.OrderByorder(String column, String ascOrDesc)CreateSelectBuilderImpl.OrderByobjects.SelectBuilderorderBy(String column, String ascOrDesc)SelectBuilderorderBy(SelectBuilderImpl.OrderBy... orderBys)static Stringq(String expr)Returns single quoted string.SelectBuilderselect(String... columns)Create select clause.StringtoPrettyString()Create prettified string.StringtoPrettyString(boolean prettyPrint)Create prettified or plain string.SelectBuilderwhere(String expr)Create where clause.SelectBuilderwhere(SelectBuilderImpl.Condition condition)Create where clause.
-
-
-
メソッドの詳細
-
select
SelectBuilder select(String... columns)
Create select clause.For example,
select("id","name","age") returns "select id, name, age"- パラメータ:
columns-- 戻り値:
-
distinct
SelectBuilder distinct()
Add distinct keyword to SQL.
-
from
SelectBuilder from(String table)
Create from clause.from("player") returns "from player"- パラメータ:
table-- 戻り値:
-
groupBy
SelectBuilder groupBy(String... columns)
Create group by clause.- パラメータ:
columns-- 戻り値:
-
having
SelectBuilder having(SelectBuilderImpl.Condition condition)
Create having clause with the givenSelectBuilderImpl.Condition.- パラメータ:
condition-- 戻り値:
-
having
SelectBuilder having(String expr)
Create having clause.- パラメータ:
expr-- 戻り値:
-
limit
SelectBuilder limit(int limit)
Create limit clause.- パラメータ:
limit-- 戻り値:
-
limit
SelectBuilder limit(int limit, int offset)
Create limit clause with offset.- パラメータ:
limit-- 戻り値:
-
orderBy
SelectBuilder orderBy(String column, String ascOrDesc)
-
orderBy
SelectBuilder orderBy(SelectBuilderImpl.OrderBy... orderBys)
-
buildSql
String buildSql()
Creates a select SQL statement from the objects.- 戻り値:
-
toPrettyString
String toPrettyString()
Create prettified string.- 戻り値:
-
toPrettyString
String toPrettyString(boolean prettyPrint)
Create prettified or plain string.- パラメータ:
prettyPrint-- 戻り値:
-
where
SelectBuilder where(SelectBuilderImpl.Condition condition)
Create where clause.- パラメータ:
condition-- 戻り値:
-
where
SelectBuilder where(String expr)
Create where clause.- パラメータ:
expr-- 戻り値:
-
create
static SelectBuilder create()
CreateSelectBuilderobject.- 戻り値:
-
and
static SelectBuilderImpl.Condition and(Object... conds)
Creates AND condition with concatenating arguments.
For example,
and("id=?", "name=?") returns "id=? and name=?"- パラメータ:
conds- condition in String or Condition- 戻り値:
-
as
static String as(String col, String alias)
Creates AS alias.
For example,
as("avg(score)", "avg_score") returns "avg(score) as avg_score"
-
cond
static SelectBuilderImpl.Condition cond(String cond)
Creates
SelectBuilderImpl.Conditioninstance.For example,
and(cond("id=?"), "name=?") returns "id=? and name=?"
-
cond
static SelectBuilderImpl.Condition cond(String left, String op, String right)
-
or
static SelectBuilderImpl.Condition or(Object... conds)
Creates OR condition with concatenating arguments.
For example,
or("id=?", "name=?") returns "id=? or name=?"
-
order
static SelectBuilderImpl.OrderBy order(String column, String ascOrDesc)
CreateSelectBuilderImpl.OrderByobjects.- パラメータ:
column-ascOrDesc-- 戻り値:
-
-