Class UpdateBuilder
java.lang.Object
io.github.projectunified.craftdatabase.client.sql.helper.UpdateBuilder
A builder for
UPDATE queries-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the querystatic UpdateBuilderCreate a new builderAdd an assignment, e.g.Add a condition, joined to the previous ones withAND
-
Method Details
-
create
Create a new builder- Parameters:
table- the table- Returns:
- the builder
-
set
Add an assignment, e.g.set("name = ?", "new name")orset("count = count + 1")- Parameters:
assignment- the assignment, the?placeholders must match the valuesvalues- the values for the placeholders, omitted to provide them later in a batch- Returns:
- this builder for chaining
-
where
Add a condition, joined to the previous ones withAND- Parameters:
condition- the condition, the?placeholders must match the valuesvalues- the values for the placeholders, omitted to provide them later in a batch- Returns:
- this builder for chaining
-
build
Build the query- Returns:
- the query
-