package io.vertx.sqlclient.impl.command;
import io.vertx.sqlclient.Row;
import io.vertx.sqlclient.impl.PreparedStatement;
import io.vertx.sqlclient.impl.QueryResultHandler;
import java.util.stream.Collector;
public abstract class ExtendedQueryCommandBase<R> extends QueryCommandBase<R> {
protected final PreparedStatement ps;
protected final int fetch;
protected final String cursorId;
protected final boolean suspended;
private final boolean singleton;
ExtendedQueryCommandBase(PreparedStatement ps,
int fetch,
String cursorId,
boolean suspended,
boolean singleton,
Collector<Row, ?, R> collector,
QueryResultHandler<R> resultHandler) {
super(collector, resultHandler);
this.ps = ps;
this.fetch = fetch;
this.cursorId = cursorId;
this.suspended = suspended;
this.singleton = singleton;
}
public PreparedStatement preparedStatement() {
return ps;
}
public int fetch() {
return fetch;
}
public String cursorId() {
return cursorId;
}
public boolean isSuspended() {
return suspended;
}
public boolean isSingleton() {
return singleton;
}
@Override
public String sql() {
return ps.sql();
}
}