AstVisitor, DeleteFinalStep, DeleteReturningStep, QueryDeleteAsStep, DeleteUsingStepDeleteImplpublic interface DeleteWhereFirstStep extends DeleteReturningStep
| Modifier and Type | Method | Description |
|---|---|---|
DeleteWhereManySteps |
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> DeleteWhereManySteps |
where(T left,
T operator,
T right) |
Example:
// SELECT * FROM book WHERE year > 2010
select("*")
.from("book")
.where("year", ">", "2010")
.sql()
|
DeleteReturningStep |
whereCurrentOf(java.lang.String cursorName) |
Set a cursor name created by DECLARE statement.
|
DeleteWhereManySteps |
whereExists(Query query) |
Example:
// SELECT * FROM book WHERE EXISTS (SELECT * FROM author)
select("*")
.from("book")
.whereExists(select("*").from("authors"))
.sql()
|
assemblereturning, returningbuildPreparedStatement, sql<T> DeleteWhereManySteps 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 operandDeleteWhereManySteps 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)DeleteWhereManySteps whereExists(Query query)
// SELECT * FROM book WHERE EXISTS (SELECT * FROM author)
select("*")
.from("book")
.whereExists(select("*").from("authors"))
.sql()
query - subqueryDeleteReturningStep whereCurrentOf(java.lang.String cursorName)
cursorName - cursor name.Queryman.declare(String)