Class QueryInfo

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.clickhouse.client.grpc.impl.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:
  • Field Details

    • QUERY_FIELD_NUMBER

      public static final int QUERY_FIELD_NUMBER
      See Also:
    • QUERY_ID_FIELD_NUMBER

      public static final int QUERY_ID_FIELD_NUMBER
      See Also:
    • SETTINGS_FIELD_NUMBER

      public static final int SETTINGS_FIELD_NUMBER
      See Also:
    • DATABASE_FIELD_NUMBER

      public static final int DATABASE_FIELD_NUMBER
      See Also:
    • INPUT_DATA_FIELD_NUMBER

      public static final int INPUT_DATA_FIELD_NUMBER
      See Also:
    • INPUT_DATA_DELIMITER_FIELD_NUMBER

      public static final int INPUT_DATA_DELIMITER_FIELD_NUMBER
      See Also:
    • OUTPUT_FORMAT_FIELD_NUMBER

      public static final int OUTPUT_FORMAT_FIELD_NUMBER
      See Also:
    • SEND_OUTPUT_COLUMNS_FIELD_NUMBER

      public static final int SEND_OUTPUT_COLUMNS_FIELD_NUMBER
      See Also:
    • EXTERNAL_TABLES_FIELD_NUMBER

      public static final int EXTERNAL_TABLES_FIELD_NUMBER
      See Also:
    • USER_NAME_FIELD_NUMBER

      public static final int USER_NAME_FIELD_NUMBER
      See Also:
    • PASSWORD_FIELD_NUMBER

      public static final int PASSWORD_FIELD_NUMBER
      See Also:
    • QUOTA_FIELD_NUMBER

      public static final int QUOTA_FIELD_NUMBER
      See Also:
    • SESSION_ID_FIELD_NUMBER

      public static final int SESSION_ID_FIELD_NUMBER
      See Also:
    • SESSION_CHECK_FIELD_NUMBER

      public static final int SESSION_CHECK_FIELD_NUMBER
      See Also:
    • SESSION_TIMEOUT_FIELD_NUMBER

      public static final int SESSION_TIMEOUT_FIELD_NUMBER
      See Also:
    • CANCEL_FIELD_NUMBER

      public static final int CANCEL_FIELD_NUMBER
      See Also:
    • NEXT_QUERY_INFO_FIELD_NUMBER

      public static final int NEXT_QUERY_INFO_FIELD_NUMBER
      See Also:
    • INPUT_COMPRESSION_TYPE_FIELD_NUMBER

      public static final int INPUT_COMPRESSION_TYPE_FIELD_NUMBER
      See Also:
    • OUTPUT_COMPRESSION_TYPE_FIELD_NUMBER

      public static final int OUTPUT_COMPRESSION_TYPE_FIELD_NUMBER
      See Also:
    • OUTPUT_COMPRESSION_LEVEL_FIELD_NUMBER

      public static final int OUTPUT_COMPRESSION_LEVEL_FIELD_NUMBER
      See Also:
    • TRANSPORT_COMPRESSION_TYPE_FIELD_NUMBER

      public static final int TRANSPORT_COMPRESSION_TYPE_FIELD_NUMBER
      See Also:
    • TRANSPORT_COMPRESSION_LEVEL_FIELD_NUMBER

      public static final int TRANSPORT_COMPRESSION_LEVEL_FIELD_NUMBER
      See Also:
    • OBSOLETE_RESULT_COMPRESSION_FIELD_NUMBER

      public static final int OBSOLETE_RESULT_COMPRESSION_FIELD_NUMBER
      See Also:
    • OBSOLETE_COMPRESSION_TYPE_FIELD_NUMBER

      public static final int OBSOLETE_COMPRESSION_TYPE_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance 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
    • getQuery

      public String getQuery()
      string query = 1;
      Specified by:
      getQuery in interface QueryInfoOrBuilder
      Returns:
      The query.
    • getQueryBytes

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

      public String getQueryId()
      string query_id = 2;
      Specified by:
      getQueryId in interface QueryInfoOrBuilder
      Returns:
      The queryId.
    • getQueryIdBytes

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

      public int getSettingsCount()
      Description copied from interface: QueryInfoOrBuilder
      map<string, string> settings = 3;
      Specified by:
      getSettingsCount in interface QueryInfoOrBuilder
    • containsSettings

      public boolean containsSettings(String key)
      map<string, string> settings = 3;
      Specified by:
      containsSettings in interface QueryInfoOrBuilder
    • getSettings

      @Deprecated public Map<String,String> getSettings()
      Deprecated.
      Use getSettingsMap() instead.
      Specified by:
      getSettings in interface QueryInfoOrBuilder
    • getSettingsMap

      public Map<String,String> getSettingsMap()
      map<string, string> settings = 3;
      Specified by:
      getSettingsMap in interface QueryInfoOrBuilder
    • getSettingsOrDefault

      public String getSettingsOrDefault(String key, String defaultValue)
      map<string, string> settings = 3;
      Specified by:
      getSettingsOrDefault in interface QueryInfoOrBuilder
    • getSettingsOrThrow

      public String getSettingsOrThrow(String key)
      map<string, string> settings = 3;
      Specified by:
      getSettingsOrThrow in interface QueryInfoOrBuilder
    • getDatabase

      public String getDatabase()
       Default database.
       
      string database = 4;
      Specified by:
      getDatabase in interface QueryInfoOrBuilder
      Returns:
      The database.
    • 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.
    • getExternalTablesList

      public List<ExternalTable> getExternalTablesList()
      repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      Specified by:
      getExternalTablesList in interface QueryInfoOrBuilder
    • getExternalTablesOrBuilderList

      public List<? extends ExternalTableOrBuilder> getExternalTablesOrBuilderList()
      repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      Specified by:
      getExternalTablesOrBuilderList in interface QueryInfoOrBuilder
    • getExternalTablesCount

      public int getExternalTablesCount()
      repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      Specified by:
      getExternalTablesCount in interface QueryInfoOrBuilder
    • getExternalTables

      public ExternalTable getExternalTables(int index)
      repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      Specified by:
      getExternalTables in interface QueryInfoOrBuilder
    • getExternalTablesOrBuilder

      public ExternalTableOrBuilder getExternalTablesOrBuilder(int index)
      repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      Specified by:
      getExternalTablesOrBuilder in interface QueryInfoOrBuilder
    • getUserName

      public String getUserName()
      string user_name = 9;
      Specified by:
      getUserName in interface QueryInfoOrBuilder
      Returns:
      The userName.
    • getUserNameBytes

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

      public String getPassword()
      string password = 10;
      Specified by:
      getPassword in interface QueryInfoOrBuilder
      Returns:
      The password.
    • getPasswordBytes

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

      public String getQuota()
      string quota = 11;
      Specified by:
      getQuota in interface QueryInfoOrBuilder
      Returns:
      The quota.
    • 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.
    • getObsoleteResultCompression

      public ObsoleteTransportCompression getObsoleteResultCompression()
      / Obsolete fields, should not be used in new code.
       
      .clickhouse.grpc.ObsoleteTransportCompression obsolete_result_compression = 17;
      Specified by:
      getObsoleteResultCompression in interface QueryInfoOrBuilder
      Returns:
      The obsoleteResultCompression.
    • getObsoleteResultCompressionOrBuilder

      public ObsoleteTransportCompressionOrBuilder getObsoleteResultCompressionOrBuilder()
      / Obsolete fields, should not be used in new code.
       
      .clickhouse.grpc.ObsoleteTransportCompression obsolete_result_compression = 17;
      Specified by:
      getObsoleteResultCompressionOrBuilder in interface QueryInfoOrBuilder
    • getObsoleteCompressionType

      public String getObsoleteCompressionType()
      string obsolete_compression_type = 18;
      Specified by:
      getObsoleteCompressionType in interface QueryInfoOrBuilder
      Returns:
      The obsoleteCompressionType.
    • 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(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static QueryInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static QueryInfo parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static QueryInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static QueryInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • 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
    • newBuilder

      public static QueryInfo.Builder newBuilder()
    • newBuilder

      public static QueryInfo.Builder newBuilder(QueryInfo prototype)
    • 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