AstVisitor, Query, UpdateFinalStep, UpdateReturningStepUpdateFromStep, UpdateSetManyStepUpdateImplpublic interface UpdateWhereFirstStep extends UpdateReturningStep
| Modifier and Type | Method | Description |
|---|---|---|
UpdateWhereManySteps |
where(Conditions conditions) |
This function useful in a few case:
When the
conditions is a special case of condition,
like Queryman.conditionBetween(Object, Object, Object), or
Queryman.conditionSome(Object, Object, Query) etc. |
<T> UpdateWhereManySteps |
where(T left,
T operator,
T right) |
Example:
// SELECT * FROM book WHERE year > 2010
select("*")
.from("book")
.where("year", ">", "2010")
.sql()
|
UpdateReturningStep |
whereCurrentOf(java.lang.String cursorName) |
Set a cursor name created by DECLARE statement.
|
UpdateWhereManySteps |
whereExists(Query query) |
Example:
// SELECT * FROM book WHERE EXISTS (SELECT * FROM author)
select("*")
.from("book")
.whereExists(select("*").from("authors"))
.sql()
|
assemblebuildPreparedStatement, sqlreturning, returning<T> UpdateWhereManySteps where(T left, T operator, T right)
// SELECT * FROM book WHERE year > 2010
select("*")
.from("book")
.where("year", ">", "2010")
.sql()
T - String, Expression, Operator or Query objectleft - left operandoperator - operatorright - right operandUpdateWhereManySteps where(Conditions conditions)
conditions is a special case of condition,
like Queryman.conditionBetween(Object, Object, Object), or
Queryman.conditionSome(Object, Object, Query) etc.
See the first example.
conditions is a group of conditions are joined by AND, AND NOT,
OR and OR NOT operators. These conditions are being a grouped condition,
and will be surrounded by parentheses.
See the second example.
// SELECT * FROM book WHERE id BETWEEN 1 AND 10
select("*")
.from("book")
.where(conditionBetween("id", "1", "10"))
.sql()
The second example:
// SELECT * FROM book WHERE (id BETWEEN 1 AND 10 AND name = 'Advanced SQL')
select("*")
.from("book")
.where(
conditionBetween("id", "1", "10")
.and(asName("name"), operator("="), asString("Advanced SQL"))
)
.sql()
conditions - conditionQueryman.condition(Object, Object, Object)UpdateWhereManySteps whereExists(Query query)
// SELECT * FROM book WHERE EXISTS (SELECT * FROM author)
select("*")
.from("book")
.whereExists(select("*").from("authors"))
.sql()
query - subqueryUpdateReturningStep whereCurrentOf(java.lang.String cursorName)
cursorName - cursor name.Queryman.declare(String)