All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.yandex.clickhouse.ClickHouseStatement Maven / Gradle / Ivy

There is a newer version: 0.6.5
Show newest version
package ru.yandex.clickhouse;

import ru.yandex.clickhouse.response.ClickHouseResponse;
import ru.yandex.clickhouse.response.ClickHouseResponseSummary;
import ru.yandex.clickhouse.settings.ClickHouseQueryParam;
import ru.yandex.clickhouse.util.ClickHouseRowBinaryInputStream;
import ru.yandex.clickhouse.util.ClickHouseStreamCallback;

import java.io.InputStream;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.Map;


public interface ClickHouseStatement extends Statement {

    ClickHouseResponse executeQueryClickhouseResponse(String sql) throws SQLException;

    ClickHouseResponse executeQueryClickhouseResponse(String sql, Map additionalDBParams) throws SQLException;

    ClickHouseResponse executeQueryClickhouseResponse(String sql,
                                                      Map additionalDBParams,
                                                      Map additionalRequestParams) throws SQLException;

    ClickHouseRowBinaryInputStream executeQueryClickhouseRowBinaryStream(String sql) throws SQLException;

    ClickHouseRowBinaryInputStream executeQueryClickhouseRowBinaryStream(String sql,
                                                                         Map additionalDBParams) throws SQLException;

    ClickHouseRowBinaryInputStream executeQueryClickhouseRowBinaryStream(String sql,
                                                                         Map additionalDBParams,
                                                                         Map additionalRequestParams) throws SQLException;

    ResultSet executeQuery(String sql, Map additionalDBParams) throws SQLException;

    ResultSet executeQuery(String sql, Map additionalDBParams, List externalData) throws SQLException;

    ResultSet executeQuery(String sql,
                           Map additionalDBParams,
                           List externalData,
                           Map additionalRequestParams) throws SQLException;

    @Deprecated
    void sendStream(InputStream content, String table, Map additionalDBParams) throws SQLException;

    @Deprecated
    void sendStream(InputStream content, String table) throws SQLException;

    @Deprecated
    void sendRowBinaryStream(String sql, Map additionalDBParams, ClickHouseStreamCallback callback) throws SQLException;

    @Deprecated
    void sendRowBinaryStream(String sql, ClickHouseStreamCallback callback) throws SQLException;

    @Deprecated
    void sendNativeStream(String sql, Map additionalDBParams, ClickHouseStreamCallback callback) throws SQLException;

    @Deprecated
    void sendNativeStream(String sql, ClickHouseStreamCallback callback) throws SQLException;

    @Deprecated
    void sendCSVStream(InputStream content, String table, Map additionalDBParams) throws SQLException;

    @Deprecated
    void sendCSVStream(InputStream content, String table) throws SQLException;

    @Deprecated
    void sendStreamSQL(InputStream content, String sql, Map additionalDBParams) throws SQLException;

    @Deprecated
    void sendStreamSQL(InputStream content, String sql) throws SQLException;

    /**
     * Returns extended write-API, which simplifies uploading larger files or
     * data streams.
     *
     * @return a new {@link Writer} builder object which can be used to
     *         construct a request to the server
     */
    Writer write();

    ClickHouseResponseSummary getResponseSummary();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy