AstVisitor, DeleteAsStep, DeleteFinalStep, DeleteReturningStep, DeleteUsingStep, DeleteWhereFirstStep, DeleteWhereManySteps, Querypublic class DeleteImpl extends AbstractQuery implements DeleteAsStep, DeleteUsingStep, DeleteWhereFirstStep, DeleteWhereManySteps, DeleteReturningStep, DeleteFinalStep
| Constructor | Description |
|---|---|
DeleteImpl(Expression table) |
|
DeleteImpl(Expression table,
boolean only) |
| Modifier and Type | Method | Description |
|---|---|---|
DeleteImpl |
and(Conditions conditions) |
For full information see the
Conditions.and(Conditions) method. |
<T> DeleteImpl |
and(T left,
T operator,
T right) |
For full information see the
Conditions.and(Object, Object, Object) method. |
DeleteImpl |
andExists(Query query) |
For full information see the
Conditions.andExists(Query) method. |
DeleteImpl |
andNot(Conditions conditions) |
For full information see the
Conditions.andNot(Conditions) method. |
<T> DeleteImpl |
andNot(T left,
T operator,
T right) |
For full information see the
Conditions.andNot(Object, Object, Object) method. |
DeleteImpl |
andNotExists(Query query) |
For full information see the
Conditions.andNotExists(Query) method. |
DeleteImpl |
as(java.lang.String alias) |
A substitute name for the target table.
|
void |
assemble(AbstractSyntaxTree tree) |
Visits SQL query making a tree from its clauses.
|
DeleteImpl |
or(Conditions conditions) |
For full information see the
Conditions.or(Conditions) method. |
<T> DeleteImpl |
or(T left,
T operator,
T right) |
For full information see the
Conditions.or(Object, Object, Object) method. |
DeleteImpl |
orExists(Query query) |
For full information see the
Conditions.orExists(Query) method. |
DeleteImpl |
orNot(Conditions conditions) |
For full information see the
Conditions.orNot(Conditions) method. |
<T> DeleteImpl |
orNot(T left,
T operator,
T right) |
For full information see the
Conditions.orNot(Object, Object, Object) method. |
DeleteImpl |
orNotExists(Query query) |
For full information see the
Conditions.orNot(Conditions) method. |
DeleteImpl |
returning(Expression... output) |
Set list of expressions that to be computed after each row is deleted.
|
<T> DeleteImpl |
returning(T... output) |
Set list of expressions that to be computed after each row is deleted.
|
DeleteImpl |
using(java.lang.String... tables) |
Set the list of table that will be appeared in WHERE clause.
|
DeleteImpl |
using(Expression... tables) |
Set the list of table that will be appeared in WHERE clause.
|
DeleteImpl |
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> DeleteImpl |
where(T left,
T operator,
T right) |
Example:
// SELECT * FROM book WHERE year > 2010
select("*")
.from("book")
.where("year", ">", "2010")
.sql()
|
DeleteImpl |
whereCurrentOf(java.lang.String cursorName) |
Set a cursor name created by DECLARE statement.
|
DeleteImpl |
whereExists(Query query) |
Example:
// SELECT * FROM book WHERE EXISTS (SELECT * FROM author)
select("*")
.from("book")
.whereExists(select("*").from("authors"))
.sql()
|
buildPreparedStatement, sql, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuildPreparedStatement, sqlpublic DeleteImpl(Expression table)
public DeleteImpl(Expression table, boolean only)
public void assemble(AbstractSyntaxTree tree)
AstVisitorassemble in interface AstVisitortree - - abstract syntax treepublic final DeleteImpl as(java.lang.String alias)
DeleteAsStepas in interface DeleteAsStepalias - aliaspublic final DeleteImpl using(Expression... tables)
DeleteUsingStepusing in interface DeleteUsingSteptables - list of tables or table expressionspublic final DeleteImpl using(java.lang.String... tables)
DeleteUsingStepusing in interface DeleteUsingSteptables - list of tables or table expressionsDeleteUsingStep.using(Expression...)public final <T> DeleteImpl where(T left, T operator, T right)
DeleteWhereFirstStep
// SELECT * FROM book WHERE year > 2010
select("*")
.from("book")
.where("year", ">", "2010")
.sql()
where in interface DeleteWhereFirstStepT - String, Expression, Operator or Query objectleft - left operandoperator - operatorright - right operandpublic final DeleteImpl where(Conditions conditions)
DeleteWhereFirstStepconditions 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()
where in interface DeleteWhereFirstStepconditions - conditionQueryman.condition(Object, Object, Object)public final DeleteImpl whereExists(Query query)
DeleteWhereFirstStep
// SELECT * FROM book WHERE EXISTS (SELECT * FROM author)
select("*")
.from("book")
.whereExists(select("*").from("authors"))
.sql()
whereExists in interface DeleteWhereFirstStepquery - subquerypublic final DeleteImpl whereCurrentOf(java.lang.String cursorName)
DeleteWhereFirstStepwhereCurrentOf in interface DeleteWhereFirstStepcursorName - cursor name.Queryman.declare(String)public final <T> DeleteImpl and(T left, T operator, T right)
DeleteWhereManyStepsConditions.and(Object, Object, Object) method.and in interface DeleteWhereManyStepsT - String, Expression, Operator or Query objectleft - left operandoperator - operatorright - right operandpublic final DeleteImpl and(Conditions conditions)
DeleteWhereManyStepsConditions.and(Conditions) method.and in interface DeleteWhereManyStepsconditions - conditionspublic final DeleteImpl andExists(Query query)
DeleteWhereManyStepsConditions.andExists(Query) method.andExists in interface DeleteWhereManyStepsquery - subquerypublic final <T> DeleteImpl andNot(T left, T operator, T right)
DeleteWhereManyStepsConditions.andNot(Object, Object, Object) method.andNot in interface DeleteWhereManyStepsT - String, Expression, Operator or Query objectleft - left operandoperator - operatorright - right operandpublic final DeleteImpl andNot(Conditions conditions)
DeleteWhereManyStepsConditions.andNot(Conditions) method.andNot in interface DeleteWhereManyStepsconditions - conditionspublic final DeleteImpl andNotExists(Query query)
DeleteWhereManyStepsConditions.andNotExists(Query) method.andNotExists in interface DeleteWhereManyStepsquery - subquerypublic final <T> DeleteImpl or(T left, T operator, T right)
DeleteWhereManyStepsConditions.or(Object, Object, Object) method.or in interface DeleteWhereManyStepsT - String, Expression, Operator or Query objectleft - left operandoperator - operatorright - right operandpublic final DeleteImpl or(Conditions conditions)
DeleteWhereManyStepsConditions.or(Conditions) method.or in interface DeleteWhereManyStepsconditions - conditionspublic final DeleteImpl orExists(Query query)
DeleteWhereManyStepsConditions.orExists(Query) method.orExists in interface DeleteWhereManyStepsquery - subquerypublic final <T> DeleteImpl orNot(T left, T operator, T right)
DeleteWhereManyStepsConditions.orNot(Object, Object, Object) method.orNot in interface DeleteWhereManyStepsT - String, Expression, Operator or Query objectleft - left operandoperator - operatorright - right operandpublic final DeleteImpl orNot(Conditions conditions)
DeleteWhereManyStepsConditions.orNot(Conditions) method.orNot in interface DeleteWhereManyStepsconditions - conditionspublic final DeleteImpl orNotExists(Query query)
DeleteWhereManyStepsConditions.orNot(Conditions) method.orNotExists in interface DeleteWhereManyStepsquery - subquery@SafeVarargs public final <T> DeleteImpl returning(T... output)
DeleteReturningStepreturning in interface DeleteReturningStepoutput - list of output expressionsDeleteReturningStep.returning(Expression...)public final DeleteImpl returning(Expression... output)
DeleteReturningStepreturning in interface DeleteReturningStepoutput - list of output expressions