- java.lang.Object
-
- org.nkjmlab.sorm4j.util.sql.SelectSql.Builder
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 Stringbuild()Creates a select SQL statement from the objects.SelectSql.Builderdistinct()Add distinct keyword to SQL.SelectSql.Builderfrom(String table)Creates from clause.SelectSql.BuildergroupBy(String... columns)Creates group by clause.SelectSql.Builderhaving(String expr)Creates having clause.SelectSql.Builderhaving(SelectSql.Condition condition)Creates having clause with the givenSelectSql.Condition.SelectSql.Builderlimit(int limit)Creates limit clause.SelectSql.Builderlimit(int limit, int offset)Creates limit clause with offset.SelectSql.BuilderorderBy(String... order)Creates order by clause.SelectSql.Builderselect(String... columns)Creates select clause.StringtoPrettyString()Creates prettified string.StringtoPrettyString(boolean prettyPrint)Creates prettified or plain string.StringtoString()SelectSql.Builderwhere(String expr)Creates where clause.SelectSql.Builderwhere(SelectSql.Condition condition)Creates where clause.
-
-
-
メソッドの詳細
-
build
public String build()
Creates a select SQL statement from the objects.- 戻り値:
-
distinct
public SelectSql.Builder distinct()
Add distinct keyword to SQL.
-
from
public SelectSql.Builder from(String table)
Creates from clause.from("player") returns "from player"- パラメータ:
table-- 戻り値:
-
groupBy
public SelectSql.Builder groupBy(String... columns)
Creates group by clause.- パラメータ:
columns-- 戻り値:
-
having
public SelectSql.Builder having(SelectSql.Condition condition)
Creates having clause with the givenSelectSql.Condition.- パラメータ:
condition-- 戻り値:
-
having
public SelectSql.Builder having(String expr)
Creates having clause.- パラメータ:
expr-- 戻り値:
-
limit
public SelectSql.Builder limit(int limit)
Creates limit clause.- パラメータ:
limit-- 戻り値:
-
limit
public SelectSql.Builder limit(int limit, int offset)
Creates limit clause with offset.- パラメータ:
limit-- 戻り値:
-
orderBy
public SelectSql.Builder orderBy(String... order)
Creates order by clause.- パラメータ:
order-- 戻り値:
- 関連項目:
- SQL Grammar
-
select
public SelectSql.Builder select(String... columns)
Creates select clause. The default value is "*".For example,
select("id","name","age") returns "select id, name, age"- パラメータ:
columns-- 戻り値:
-
toPrettyString
public String toPrettyString()
Creates prettified string.- 戻り値:
-
toPrettyString
public String toPrettyString(boolean prettyPrint)
Creates prettified or plain string.- パラメータ:
prettyPrint-- 戻り値:
-
where
public SelectSql.Builder where(SelectSql.Condition condition)
Creates where clause.- パラメータ:
condition-- 戻り値:
-
where
public SelectSql.Builder where(String expr)
Creates where clause.- パラメータ:
expr-- 戻り値:
-
-