Package com.gengoai.sql.statement
Class Update
- java.lang.Object
-
- com.gengoai.sql.statement.Update
-
- All Implemented Interfaces:
SQLElement
,UpdateStatement
,Serializable
public class Update extends Object implements UpdateStatement
SQL Update statement
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Update
set(@NonNull SQLElement column, @NonNull SQLElement value)
Adds a set parameter to the update defined as a column and value.Update
set(@NonNull String column, @NonNull SQLElement value)
Adds a set parameter to the update defined as a column and value.Update
setIndexedParameter(@NonNull SQLElement column)
Adds a set parameter for the given column and using an indexed parameter value for use inPreparedStatement
Update
setNamedParameter(@NonNull SQLElement column)
Adds a set parameter for the given column and using a named parameter value for use inNamedPreparedStatement
static Update
table(@NonNull Table table)
Creates a new Update statement which will update the given tablestatic Update
table(@NonNull SQLElement table)
Creates a new Update statement which will update the given tableUpdate
type(@NonNull UpdateType type)
Sets the type of update to perform.Update
where(SQLElement whereClause)
Sets the criteria (i.e.Update
where(String whereClause)
Sets the criteria (i.e.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.sql.SQLElement
getClassName
-
-
-
-
Method Detail
-
table
public static Update table(@NonNull @NonNull Table table)
Creates a new Update statement which will update the given table- Parameters:
table
- the table- Returns:
- the Update statement
-
table
public static Update table(@NonNull @NonNull SQLElement table)
Creates a new Update statement which will update the given table- Parameters:
table
- the table- Returns:
- the Update statement
-
set
public Update set(@NonNull @NonNull SQLElement column, @NonNull @NonNull SQLElement value)
Adds a set parameter to the update defined as a column and value.- Parameters:
column
- the column to updatevalue
- the value to update the column to- Returns:
- this Update statement
-
set
public Update set(@NonNull @NonNull String column, @NonNull @NonNull SQLElement value)
Adds a set parameter to the update defined as a column and value.- Parameters:
column
- the column to updatevalue
- the value to update the column to- Returns:
- this Update statement
-
setIndexedParameter
public Update setIndexedParameter(@NonNull @NonNull SQLElement column)
Adds a set parameter for the given column and using an indexed parameter value for use inPreparedStatement
- Parameters:
column
- the column to update- Returns:
- this Update statement
-
setNamedParameter
public Update setNamedParameter(@NonNull @NonNull SQLElement column)
Adds a set parameter for the given column and using a named parameter value for use inNamedPreparedStatement
- Parameters:
column
- the column to update- Returns:
- this Update statement
-
type
public Update type(@NonNull @NonNull UpdateType type)
Sets the type of update to perform.- Parameters:
type
- the type of update to perform- Returns:
- this Update statement
-
where
public Update where(SQLElement whereClause)
Sets the criteria (i.e. WHERE) for the update.- Parameters:
whereClause
- the where clause- Returns:
- this Update statement
-
-