V
- the type of the API Valuepublic interface QueryBuilderInterface<V>
QueryBuilderInterface
allows for queries to be constructed in parts.Modifier and Type | Method and Description |
---|---|
String |
buildQuery()
Builds the query from the clauses.
|
QueryBuilderInterface<V> |
from(String table)
Sets the statement FROM clause in the form of "table".
|
Map<String,V> |
getBindVariableMap()
Gets an unmodifiable key-value map.
|
Integer |
getOffset()
Gets the current offset.
|
QueryBuilderInterface<V> |
increaseOffsetBy(Integer amount)
Increases the offset by the
amount . |
QueryBuilderInterface<V> |
limit(Integer count)
Sets the statement LIMIT clause in the form of
"LIMIT <count>"
e.g. |
QueryBuilderInterface<V> |
offset(Integer count)
Sets the statement OFFSET clause in the form of
"OFFSET <count>"
e.g. |
QueryBuilderInterface<V> |
orderBy(String orderBy)
Sets the statement ORDER BY clause in the form of
"ORDER BY <property> [ASC | DESC]"
e.g. |
QueryBuilderInterface<V> |
removeLimitAndOffset()
Removes the limit and offset from the query.
|
QueryBuilderInterface<V> |
select(String columns)
Sets the statement SELECT clause in the form of "a,b" or "*".
|
QueryBuilderInterface<V> |
where(String conditions)
Sets the statement WHERE clause in the form of
"WHERE <condition> {[AND | OR] <condition> ...}"
e.g. |
QueryBuilderInterface<V> |
withBindVariableValue(String key,
V value)
Puts a key-value into the bind variables.
|
QueryBuilderInterface<V> select(String columns)
PublisherQueryLanguageService
. The "SELECT " keyword will be
ignored.columns
- the statement select clause without "SELECT"QueryBuilderInterface<V> from(String table)
PublisherQueryLanguageService
. The "FROM " keyword will be
ignored.table
- the statement from clause without "FROM"QueryBuilderInterface<V> where(String conditions)
"WHERE <condition> {[AND | OR] <condition> ...}"
conditions
- the statement query without "WHERE"QueryBuilderInterface<V> limit(Integer count)
"LIMIT <count>"
count
- the statement limitQueryBuilderInterface<V> offset(Integer count)
"OFFSET <count>"
count
- the statement offsetQueryBuilderInterface<V> increaseOffsetBy(Integer amount)
amount
.amount
- the amount to increase the offsetInteger getOffset()
QueryBuilderInterface<V> removeLimitAndOffset()
QueryBuilderInterface<V> orderBy(String orderBy)
"ORDER BY <property> [ASC | DESC]"
orderBy
- the statement order by without "ORDER BY"QueryBuilderInterface<V> withBindVariableValue(String key, V value)
String buildQuery()
Copyright © 2018. All Rights Reserved.