io.yawp.driver.postgresql.sql.PlaceHolder Maven / Gradle / Ivy
package io.yawp.driver.postgresql.sql;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
public class PlaceHolder {
private List indexes = new ArrayList();
private Object value;
public PlaceHolder(Object value) {
this.value = value;
}
public void addIndex(int index) {
indexes.add(index);
}
public void setValue(PreparedStatement ps) {
try {
for (int index : indexes) {
ps.setObject(index, value);
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy