org.fluentjdbc.DatabaseUpdateBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-jdbc Show documentation
Show all versions of fluent-jdbc Show documentation
A Java library used to execute JDBC statements and build SQL
package org.fluentjdbc;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
/**
* Generate UPDATE
statements by collecting field names and parameters. Example:
*
*
* int count = table
* .where("id", id)
* .update()
* .setField("name", "Something")
* .setField("code", 102)
* .execute(connection);
*
*/
@ParametersAreNonnullByDefault
public class DatabaseUpdateBuilder implements DatabaseUpdatable {
private final DatabaseTable table;
private final List updateFields = new ArrayList<>();
private final List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy