Package com.blackrook.sql
Class SQLAbstractDAO.QueryStringBuilder
java.lang.Object
com.blackrook.sql.SQLAbstractDAO.QueryStringBuilder
- Enclosing class:
- SQLAbstractDAO
Query string builder.
-
Method Summary
Modifier and TypeMethodDescriptionlimit
(int value) Adds "limit" criteria.offset
(int value) Adds "offset" criteria.orderBy
(Function<String, String> columnEscapeFunction, SQLAbstractDAO.Ordering... ordering) Adds "order by" criteria.toString()
where
(Function<String, String> columnEscapeFunction, SQLAbstractDAO.Criterion... criteria) Adds "where" criteria.
-
Method Details
-
where
public SQLAbstractDAO.QueryStringBuilder where(Function<String, String> columnEscapeFunction, SQLAbstractDAO.Criterion... criteria) Adds "where" criteria.- Parameters:
columnEscapeFunction
- the function to use for escaping column names (parameter is incoming column name).criteria
- the criteria.- Returns:
- this builder.
-
orderBy
public SQLAbstractDAO.QueryStringBuilder orderBy(Function<String, String> columnEscapeFunction, SQLAbstractDAO.Ordering... ordering) Adds "order by" criteria.- Parameters:
columnEscapeFunction
- the function to use for escaping column names (parameter is incoming column name).ordering
- the ordering criteria.- Returns:
- this builder.
-
limit
Adds "limit" criteria.- Parameters:
value
- the limit value.- Returns:
- this builder.
-
offset
Adds "offset" criteria.- Parameters:
value
- the limit value.- Returns:
- this builder.
-
toString
-