Package com.github.vlachenal.sql
Class UpdateBuilder
- java.lang.Object
-
- com.github.vlachenal.sql.UpdateBuilder
-
public class UpdateBuilder extends java.lang.Object- Since:
- 0.5
-
-
Constructor Summary
Constructors Constructor Description UpdateBuilder(java.lang.String table)UpdateBuilderconstructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLQuerybuild()Build SQL queryUpdateBuilderfield(java.lang.String column, java.lang.Object value)Add field to update.
Value will be added as prepared statement value (with '?'UpdateBuilderwhere(ClausesBuilder clauses)Add 'WHERE' and clauses
-
-
-
Constructor Detail
-
UpdateBuilder
public UpdateBuilder(java.lang.String table)
UpdateBuilderconstructor- Parameters:
table- the table to update
-
-
Method Detail
-
field
public UpdateBuilder field(java.lang.String column, java.lang.Object value)
Add field to update.
Value will be added as prepared statement value (with '?' wildcard).- Parameters:
column- the columnvalue- the value- Returns:
this
-
where
public UpdateBuilder where(ClausesBuilder clauses)
Add 'WHERE' and clauses- Parameters:
clauses- the clauses to add- Returns:
- the
UpdateBuilder
-
build
public SQLQuery build()
Build SQL query- Returns:
- the query and its prepared statement values
-
-