io.stargate.db.Statement Maven / Gradle / Ivy
package io.stargate.db;
import com.datastax.oss.driver.shaded.guava.common.base.Preconditions;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
public abstract class Statement {
private final List values;
private final @Nullable List boundNames;
protected Statement(List values, @Nullable List boundNames) {
Preconditions.checkArgument(
boundNames == null || values.size() == boundNames.size(),
"Expected the number of values %s to be equal to the number of bound names %s",
values.size(),
boundNames == null ? 0 : boundNames.size());
this.values = values;
this.boundNames = boundNames;
}
public List values() {
return values;
}
public Optional> boundNames() {
return Optional.ofNullable(boundNames);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy