Package com.github.eikecochu.sqlbuilder
Class Update
- java.lang.Object
-
- com.github.eikecochu.sqlbuilder.QueryPartImpl<Update>
-
- com.github.eikecochu.sqlbuilder.Update
-
- All Implemented Interfaces:
BeforeWhere<Update>,QueryBuilder<Update>,QueryPart,QueryPartLinked<Update>,QueryPartSQL<Update>
public class Update extends QueryPartImpl<Update> implements QueryBuilder<Update>, BeforeWhere<Update>
The UPDATE expression. Start with this expression to prepare an UPDATE query to update elements in the database.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUpdate(BeforeUpdate<?> parent, java.lang.String table)Update(Table table)Create a new UPDATE statementUpdate(java.lang.String table)Create a new UPDATE statement
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateorAbort()Set this UPDATE statement to be UPDATE OR ABORTUpdateorFail()Set this UPDATE statement to be UPDATE OR FAILUpdateorIgnore()Set this UPDATE statement to be UPDATE OR IGNOREUpdateorReplace()Set this UPDATE statement to be UPDATE OR REPLACEUpdateorRollback()Set this UPDATE statement to be UPDATE OR ROLLBACKUpdateset(ValueHolder values)Set multiple values to be updatedUpdateValueset(java.lang.String column)Set a value to be updatedUpdateset(java.lang.String column, java.lang.Object value)Set a value to be updatedjava.lang.Stringstring(QueryOptions options)Transforms this statement into an SQL string-
Methods inherited from class com.github.eikecochu.sqlbuilder.QueryPartImpl
parent, sql
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeWhere
where, where, where, where, whereSQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.QueryBuilder
query, query
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.QueryPartLinked
ext, parent, parent
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.QueryPartSQL
sql
-
-
-
-
Constructor Detail
-
Update
public Update(java.lang.String table)
Create a new UPDATE statement- Parameters:
table- The name of the table to update
-
Update
public Update(Table table)
Create a new UPDATE statement- Parameters:
table- The Table representation of the table to update
-
Update
protected Update(BeforeUpdate<?> parent, java.lang.String table)
-
-
Method Detail
-
orRollback
public Update orRollback()
Set this UPDATE statement to be UPDATE OR ROLLBACK- Returns:
- This UPDATE statement
-
orAbort
public Update orAbort()
Set this UPDATE statement to be UPDATE OR ABORT- Returns:
- This UPDATE statement
-
orFail
public Update orFail()
Set this UPDATE statement to be UPDATE OR FAIL- Returns:
- This UPDATE statement
-
orReplace
public Update orReplace()
Set this UPDATE statement to be UPDATE OR REPLACE- Returns:
- This UPDATE statement
-
orIgnore
public Update orIgnore()
Set this UPDATE statement to be UPDATE OR IGNORE- Returns:
- This UPDATE statement
-
set
public UpdateValue set(java.lang.String column)
Set a value to be updated- Parameters:
column- The column name to use for updating the value- Returns:
- The UpdateValue instance to set the value for updating
-
set
public Update set(java.lang.String column, java.lang.Object value)
Set a value to be updated- Parameters:
column- The column name to use for updating the valuevalue- The value to be updated- Returns:
- This UPDATE statement
-
set
public Update set(ValueHolder values)
Set multiple values to be updated- Parameters:
values- The ValueHolder instance that holds the update values- Returns:
- This UPDATE statement
-
string
public java.lang.String string(QueryOptions options)
Description copied from interface:QueryPartTransforms this statement into an SQL string
-
-