Class UpdateStatement
- java.lang.Object
-
- com.mrivanplays.sqlhelper.statement.UpdateStatement
-
public final class UpdateStatement extends Object
Represents an sql "UPDATE" statement
-
-
Constructor Summary
Constructors Constructor Description UpdateStatement(SQLConnectionFactory connectionFactory, Executor async)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatementCompletionStage<Void>
executeUpdate()
Executes the update.UpdateStatement
tableName(String tableName)
Mark the table name which we're going to update it's values.UpdateStatement
values(String[] keys, Object[] values)
Mark the values we're going to updateUpdateStatement
where(String[] keys, Object[] values)
Mark the update condition the statement should follow.
-
-
-
Constructor Detail
-
UpdateStatement
public UpdateStatement(SQLConnectionFactory connectionFactory, Executor async)
-
-
Method Detail
-
tableName
public UpdateStatement tableName(String tableName)
Mark the table name which we're going to update it's values.- Parameters:
tableName
- name of the table- Returns:
- this instance for chaining
-
values
public UpdateStatement values(String[] keys, Object[] values)
Mark the values we're going to update- Parameters:
keys
- keysvalues
- values- Returns:
- this instance for chaining
-
where
public UpdateStatement where(String[] keys, Object[] values)
Mark the update condition the statement should follow.- Parameters:
keys
- keysvalues
- values- Returns:
- this instance for chaining
-
executeUpdate
public StatementCompletionStage<Void> executeUpdate()
Executes the update.- Returns:
- statement completion stage
-
-