Class QueryInfo

  • All Implemented Interfaces:
    QueryInfoOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class QueryInfo
    extends com.google.protobuf.GeneratedMessageV3
    implements QueryInfoOrBuilder
     Information about a query which a client sends to a ClickHouse server.
     The first QueryInfo can set any of the following fields. Extra QueryInfos only add extra data.
     In extra QueryInfos only `input_data`, `external_tables`, `next_query_info` and `cancel` fields can be set.
     
    Protobuf type clickhouse.grpc.QueryInfo
    See Also:
    Serialized Form
    • Field Detail

      • INPUT_DATA_FIELD_NUMBER

        public static final int INPUT_DATA_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INPUT_DATA_DELIMITER_FIELD_NUMBER

        public static final int INPUT_DATA_DELIMITER_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OUTPUT_FORMAT_FIELD_NUMBER

        public static final int OUTPUT_FORMAT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SEND_OUTPUT_COLUMNS_FIELD_NUMBER

        public static final int SEND_OUTPUT_COLUMNS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EXTERNAL_TABLES_FIELD_NUMBER

        public static final int EXTERNAL_TABLES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SESSION_ID_FIELD_NUMBER

        public static final int SESSION_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SESSION_CHECK_FIELD_NUMBER

        public static final int SESSION_CHECK_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SESSION_TIMEOUT_FIELD_NUMBER

        public static final int SESSION_TIMEOUT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NEXT_QUERY_INFO_FIELD_NUMBER

        public static final int NEXT_QUERY_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INPUT_COMPRESSION_TYPE_FIELD_NUMBER

        public static final int INPUT_COMPRESSION_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OUTPUT_COMPRESSION_TYPE_FIELD_NUMBER

        public static final int OUTPUT_COMPRESSION_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OUTPUT_COMPRESSION_LEVEL_FIELD_NUMBER

        public static final int OUTPUT_COMPRESSION_LEVEL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRANSPORT_COMPRESSION_TYPE_FIELD_NUMBER

        public static final int TRANSPORT_COMPRESSION_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRANSPORT_COMPRESSION_LEVEL_FIELD_NUMBER

        public static final int TRANSPORT_COMPRESSION_LEVEL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OBSOLETE_RESULT_COMPRESSION_FIELD_NUMBER

        public static final int OBSOLETE_RESULT_COMPRESSION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OBSOLETE_COMPRESSION_TYPE_FIELD_NUMBER

        public static final int OBSOLETE_COMPRESSION_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getQueryBytes

        public com.google.protobuf.ByteString getQueryBytes()
        string query = 1;
        Specified by:
        getQueryBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for query.
      • getQueryIdBytes

        public com.google.protobuf.ByteString getQueryIdBytes()
        string query_id = 2;
        Specified by:
        getQueryIdBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for queryId.
      • getDatabaseBytes

        public com.google.protobuf.ByteString getDatabaseBytes()
         Default database.
         
        string database = 4;
        Specified by:
        getDatabaseBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for database.
      • getInputData

        public com.google.protobuf.ByteString getInputData()
         Input data, used both as data for INSERT query and as data for the input() function.
         
        bytes input_data = 5;
        Specified by:
        getInputData in interface QueryInfoOrBuilder
        Returns:
        The inputData.
      • getInputDataDelimiter

        public com.google.protobuf.ByteString getInputDataDelimiter()
         Delimiter for input_data, inserted between input_data from adjacent QueryInfos.
         
        bytes input_data_delimiter = 6;
        Specified by:
        getInputDataDelimiter in interface QueryInfoOrBuilder
        Returns:
        The inputDataDelimiter.
      • getOutputFormat

        public String getOutputFormat()
         Default output format. If not specified, 'TabSeparated' is used.
         
        string output_format = 7;
        Specified by:
        getOutputFormat in interface QueryInfoOrBuilder
        Returns:
        The outputFormat.
      • getOutputFormatBytes

        public com.google.protobuf.ByteString getOutputFormatBytes()
         Default output format. If not specified, 'TabSeparated' is used.
         
        string output_format = 7;
        Specified by:
        getOutputFormatBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for outputFormat.
      • getSendOutputColumns

        public boolean getSendOutputColumns()
         Set it if you want the names and the types of output columns to be sent to the client.
         
        bool send_output_columns = 24;
        Specified by:
        getSendOutputColumns in interface QueryInfoOrBuilder
        Returns:
        The sendOutputColumns.
      • getUserNameBytes

        public com.google.protobuf.ByteString getUserNameBytes()
        string user_name = 9;
        Specified by:
        getUserNameBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for userName.
      • getPasswordBytes

        public com.google.protobuf.ByteString getPasswordBytes()
        string password = 10;
        Specified by:
        getPasswordBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for password.
      • getQuotaBytes

        public com.google.protobuf.ByteString getQuotaBytes()
        string quota = 11;
        Specified by:
        getQuotaBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for quota.
      • getSessionId

        public String getSessionId()
         Works exactly like sessions in the HTTP protocol.
         
        string session_id = 12;
        Specified by:
        getSessionId in interface QueryInfoOrBuilder
        Returns:
        The sessionId.
      • getSessionIdBytes

        public com.google.protobuf.ByteString getSessionIdBytes()
         Works exactly like sessions in the HTTP protocol.
         
        string session_id = 12;
        Specified by:
        getSessionIdBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for sessionId.
      • getSessionCheck

        public boolean getSessionCheck()
        bool session_check = 13;
        Specified by:
        getSessionCheck in interface QueryInfoOrBuilder
        Returns:
        The sessionCheck.
      • getSessionTimeout

        public int getSessionTimeout()
        uint32 session_timeout = 14;
        Specified by:
        getSessionTimeout in interface QueryInfoOrBuilder
        Returns:
        The sessionTimeout.
      • getCancel

        public boolean getCancel()
         Set `cancel` to true to stop executing the query.
         
        bool cancel = 15;
        Specified by:
        getCancel in interface QueryInfoOrBuilder
        Returns:
        The cancel.
      • getNextQueryInfo

        public boolean getNextQueryInfo()
         If true there will be at least one more QueryInfo in the input stream.
         `next_query_info` is allowed to be set only if a method with streaming input (i.e. ExecuteQueryWithStreamInput() or ExecuteQueryWithStreamIO()) is used.
         
        bool next_query_info = 16;
        Specified by:
        getNextQueryInfo in interface QueryInfoOrBuilder
        Returns:
        The nextQueryInfo.
      • getInputCompressionType

        public String getInputCompressionType()
         Compression type for `input_data`.
         Supported compression types: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
         The client is responsible to compress data before putting it into `input_data`.
         
        string input_compression_type = 20;
        Specified by:
        getInputCompressionType in interface QueryInfoOrBuilder
        Returns:
        The inputCompressionType.
      • getInputCompressionTypeBytes

        public com.google.protobuf.ByteString getInputCompressionTypeBytes()
         Compression type for `input_data`.
         Supported compression types: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
         The client is responsible to compress data before putting it into `input_data`.
         
        string input_compression_type = 20;
        Specified by:
        getInputCompressionTypeBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for inputCompressionType.
      • getOutputCompressionType

        public String getOutputCompressionType()
         Compression type for `output_data`, `totals` and `extremes`.
         Supported compression types: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
         The client receives compressed data and should decompress it by itself.
         Consider also setting `output_compression_level`.
         
        string output_compression_type = 21;
        Specified by:
        getOutputCompressionType in interface QueryInfoOrBuilder
        Returns:
        The outputCompressionType.
      • getOutputCompressionTypeBytes

        public com.google.protobuf.ByteString getOutputCompressionTypeBytes()
         Compression type for `output_data`, `totals` and `extremes`.
         Supported compression types: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
         The client receives compressed data and should decompress it by itself.
         Consider also setting `output_compression_level`.
         
        string output_compression_type = 21;
        Specified by:
        getOutputCompressionTypeBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for outputCompressionType.
      • getOutputCompressionLevel

        public int getOutputCompressionLevel()
         Compression level.
         WARNING: If it's not specified the compression level is set to zero by default which might be not the best choice for some compression types (see below).
         The compression level should be in the following range (the higher the number, the better the compression):
         none: compression level isn't used
         gzip: 0..9; 0 means no compression, 6 is recommended by default (compression level -1 also means 6)
         brotli: 0..11
         lzma: 0..9; 6 is recommended by default
         zstd: 1..22; 3 is recommended by default (compression level 0 also means 3)
         lz4: 0..16; values < 0 mean fast acceleration
         bz2: 1..9
         
        int32 output_compression_level = 19;
        Specified by:
        getOutputCompressionLevel in interface QueryInfoOrBuilder
        Returns:
        The outputCompressionLevel.
      • getTransportCompressionType

        public String getTransportCompressionType()
         Transport compression is an alternative way to make the server to compress its response.
         This kind of compression implies that instead of compressing just `output` the server will compress whole packed messages of the `Result` type,
         and then gRPC implementation on client side will decompress those messages so client code won't be bothered with decompression.
         Here is a big difference between the transport compression and the compression enabled by setting `output_compression_type` because
         in case of the transport compression the client code receives already decompressed data in `output`.
         If the transport compression is not set here it can still be enabled by the server configuration.
         Supported compression types: none, deflate, gzip, stream_gzip
         Supported compression levels: 0..3
         WARNING: Don't set `transport_compression` and `output_compression` at the same time because it will make the server to compress its output twice!
         
        string transport_compression_type = 22;
        Specified by:
        getTransportCompressionType in interface QueryInfoOrBuilder
        Returns:
        The transportCompressionType.
      • getTransportCompressionTypeBytes

        public com.google.protobuf.ByteString getTransportCompressionTypeBytes()
         Transport compression is an alternative way to make the server to compress its response.
         This kind of compression implies that instead of compressing just `output` the server will compress whole packed messages of the `Result` type,
         and then gRPC implementation on client side will decompress those messages so client code won't be bothered with decompression.
         Here is a big difference between the transport compression and the compression enabled by setting `output_compression_type` because
         in case of the transport compression the client code receives already decompressed data in `output`.
         If the transport compression is not set here it can still be enabled by the server configuration.
         Supported compression types: none, deflate, gzip, stream_gzip
         Supported compression levels: 0..3
         WARNING: Don't set `transport_compression` and `output_compression` at the same time because it will make the server to compress its output twice!
         
        string transport_compression_type = 22;
        Specified by:
        getTransportCompressionTypeBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for transportCompressionType.
      • getTransportCompressionLevel

        public int getTransportCompressionLevel()
        int32 transport_compression_level = 23;
        Specified by:
        getTransportCompressionLevel in interface QueryInfoOrBuilder
        Returns:
        The transportCompressionLevel.
      • hasObsoleteResultCompression

        public boolean hasObsoleteResultCompression()
        / Obsolete fields, should not be used in new code.
         
        .clickhouse.grpc.ObsoleteTransportCompression obsolete_result_compression = 17;
        Specified by:
        hasObsoleteResultCompression in interface QueryInfoOrBuilder
        Returns:
        Whether the obsoleteResultCompression field is set.
      • getObsoleteCompressionTypeBytes

        public com.google.protobuf.ByteString getObsoleteCompressionTypeBytes()
        string obsolete_compression_type = 18;
        Specified by:
        getObsoleteCompressionTypeBytes in interface QueryInfoOrBuilder
        Returns:
        The bytes for obsoleteCompressionType.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static QueryInfo parseFrom​(ByteBuffer data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QueryInfo parseFrom​(ByteBuffer data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QueryInfo parseFrom​(com.google.protobuf.ByteString data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QueryInfo parseFrom​(com.google.protobuf.ByteString data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QueryInfo parseFrom​(byte[] data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QueryInfo parseFrom​(byte[] data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QueryInfo parseFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws IOException
        Throws:
        IOException
      • newBuilderForType

        public QueryInfo.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public QueryInfo.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected QueryInfo.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static QueryInfo getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<QueryInfo> parser()
      • getParserForType

        public com.google.protobuf.Parser<QueryInfo> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public QueryInfo getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder