tech.ydb.query.QueryStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-sdk-query Show documentation
Show all versions of ydb-sdk-query Show documentation
YDB QueryService client implementation
package tech.ydb.query;
import java.util.concurrent.CompletableFuture;
import io.grpc.ExperimentalApi;
import tech.ydb.core.Issue;
import tech.ydb.core.Result;
import tech.ydb.query.result.QueryInfo;
import tech.ydb.query.result.QueryResultPart;
/**
*
* @author Aleksandr Gorshenin
*/
@ExperimentalApi("QueryService is experimental and API may change without notice")
public interface QueryStream {
interface PartsHandler {
default void onIssues(Issue[] issues) { }
void onNextPart(QueryResultPart part);
}
CompletableFuture> execute(PartsHandler handler);
void cancel();
default CompletableFuture> execute() {
return execute(null);
};
}