Class QueryInfo.Builder

  • All Implemented Interfaces:
    QueryInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    QueryInfo

    public static final class QueryInfo.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
    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
    • Method Detail

      • 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.Builder<QueryInfo.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • clear

        public QueryInfo.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • getDefaultInstanceForType

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

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

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

        public QueryInfo.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • setField

        public QueryInfo.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                          Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • clearField

        public QueryInfo.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • clearOneof

        public QueryInfo.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • setRepeatedField

        public QueryInfo.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  int index,
                                                  Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • addRepeatedField

        public QueryInfo.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • mergeFrom

        public QueryInfo.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<QueryInfo.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • mergeFrom

        public QueryInfo.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<QueryInfo.Builder>
        Throws:
        IOException
      • getQueryBytes

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

        public QueryInfo.Builder setQuery​(String value)
        string query = 1;
        Parameters:
        value - The query to set.
        Returns:
        This builder for chaining.
      • clearQuery

        public QueryInfo.Builder clearQuery()
        string query = 1;
        Returns:
        This builder for chaining.
      • setQueryBytes

        public QueryInfo.Builder setQueryBytes​(com.google.protobuf.ByteString value)
        string query = 1;
        Parameters:
        value - The bytes for query to set.
        Returns:
        This builder for chaining.
      • getQueryIdBytes

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

        public QueryInfo.Builder setQueryId​(String value)
        string query_id = 2;
        Parameters:
        value - The queryId to set.
        Returns:
        This builder for chaining.
      • clearQueryId

        public QueryInfo.Builder clearQueryId()
        string query_id = 2;
        Returns:
        This builder for chaining.
      • setQueryIdBytes

        public QueryInfo.Builder setQueryIdBytes​(com.google.protobuf.ByteString value)
        string query_id = 2;
        Parameters:
        value - The bytes for queryId to set.
        Returns:
        This builder for chaining.
      • getMutableSettings

        @Deprecated
        public Map<String,​String> getMutableSettings()
        Deprecated.
        Use alternate mutation accessors instead.
      • getDatabaseBytes

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

        public QueryInfo.Builder setDatabase​(String value)
         Default database.
         
        string database = 4;
        Parameters:
        value - The database to set.
        Returns:
        This builder for chaining.
      • clearDatabase

        public QueryInfo.Builder clearDatabase()
         Default database.
         
        string database = 4;
        Returns:
        This builder for chaining.
      • setDatabaseBytes

        public QueryInfo.Builder setDatabaseBytes​(com.google.protobuf.ByteString value)
         Default database.
         
        string database = 4;
        Parameters:
        value - The bytes for database to set.
        Returns:
        This builder for chaining.
      • 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.
      • setInputData

        public QueryInfo.Builder setInputData​(com.google.protobuf.ByteString value)
         Input data, used both as data for INSERT query and as data for the input() function.
         
        bytes input_data = 5;
        Parameters:
        value - The inputData to set.
        Returns:
        This builder for chaining.
      • clearInputData

        public QueryInfo.Builder clearInputData()
         Input data, used both as data for INSERT query and as data for the input() function.
         
        bytes input_data = 5;
        Returns:
        This builder for chaining.
      • 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.
      • setInputDataDelimiter

        public QueryInfo.Builder setInputDataDelimiter​(com.google.protobuf.ByteString value)
         Delimiter for input_data, inserted between input_data from adjacent QueryInfos.
         
        bytes input_data_delimiter = 6;
        Parameters:
        value - The inputDataDelimiter to set.
        Returns:
        This builder for chaining.
      • clearInputDataDelimiter

        public QueryInfo.Builder clearInputDataDelimiter()
         Delimiter for input_data, inserted between input_data from adjacent QueryInfos.
         
        bytes input_data_delimiter = 6;
        Returns:
        This builder for chaining.
      • 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.
      • setOutputFormat

        public QueryInfo.Builder setOutputFormat​(String value)
         Default output format. If not specified, 'TabSeparated' is used.
         
        string output_format = 7;
        Parameters:
        value - The outputFormat to set.
        Returns:
        This builder for chaining.
      • clearOutputFormat

        public QueryInfo.Builder clearOutputFormat()
         Default output format. If not specified, 'TabSeparated' is used.
         
        string output_format = 7;
        Returns:
        This builder for chaining.
      • setOutputFormatBytes

        public QueryInfo.Builder setOutputFormatBytes​(com.google.protobuf.ByteString value)
         Default output format. If not specified, 'TabSeparated' is used.
         
        string output_format = 7;
        Parameters:
        value - The bytes for outputFormat to set.
        Returns:
        This builder for chaining.
      • setExternalTables

        public QueryInfo.Builder setExternalTables​(int index,
                                                   ExternalTable value)
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • addExternalTables

        public QueryInfo.Builder addExternalTables​(ExternalTable value)
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • addExternalTables

        public QueryInfo.Builder addExternalTables​(int index,
                                                   ExternalTable value)
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • clearExternalTables

        public QueryInfo.Builder clearExternalTables()
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • removeExternalTables

        public QueryInfo.Builder removeExternalTables​(int index)
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • getExternalTablesBuilder

        public ExternalTable.Builder getExternalTablesBuilder​(int index)
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • addExternalTablesBuilder

        public ExternalTable.Builder addExternalTablesBuilder()
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • addExternalTablesBuilder

        public ExternalTable.Builder addExternalTablesBuilder​(int index)
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • getExternalTablesBuilderList

        public List<ExternalTable.Builder> getExternalTablesBuilderList()
        repeated .clickhouse.grpc.ExternalTable external_tables = 8;
      • getUserNameBytes

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

        public QueryInfo.Builder setUserName​(String value)
        string user_name = 9;
        Parameters:
        value - The userName to set.
        Returns:
        This builder for chaining.
      • clearUserName

        public QueryInfo.Builder clearUserName()
        string user_name = 9;
        Returns:
        This builder for chaining.
      • setUserNameBytes

        public QueryInfo.Builder setUserNameBytes​(com.google.protobuf.ByteString value)
        string user_name = 9;
        Parameters:
        value - The bytes for userName to set.
        Returns:
        This builder for chaining.
      • getPasswordBytes

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

        public QueryInfo.Builder setPassword​(String value)
        string password = 10;
        Parameters:
        value - The password to set.
        Returns:
        This builder for chaining.
      • clearPassword

        public QueryInfo.Builder clearPassword()
        string password = 10;
        Returns:
        This builder for chaining.
      • setPasswordBytes

        public QueryInfo.Builder setPasswordBytes​(com.google.protobuf.ByteString value)
        string password = 10;
        Parameters:
        value - The bytes for password to set.
        Returns:
        This builder for chaining.
      • getQuotaBytes

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

        public QueryInfo.Builder setQuota​(String value)
        string quota = 11;
        Parameters:
        value - The quota to set.
        Returns:
        This builder for chaining.
      • clearQuota

        public QueryInfo.Builder clearQuota()
        string quota = 11;
        Returns:
        This builder for chaining.
      • setQuotaBytes

        public QueryInfo.Builder setQuotaBytes​(com.google.protobuf.ByteString value)
        string quota = 11;
        Parameters:
        value - The bytes for quota to set.
        Returns:
        This builder for chaining.
      • 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.
      • setSessionId

        public QueryInfo.Builder setSessionId​(String value)
         Works exactly like sessions in the HTTP protocol.
         
        string session_id = 12;
        Parameters:
        value - The sessionId to set.
        Returns:
        This builder for chaining.
      • clearSessionId

        public QueryInfo.Builder clearSessionId()
         Works exactly like sessions in the HTTP protocol.
         
        string session_id = 12;
        Returns:
        This builder for chaining.
      • setSessionIdBytes

        public QueryInfo.Builder setSessionIdBytes​(com.google.protobuf.ByteString value)
         Works exactly like sessions in the HTTP protocol.
         
        string session_id = 12;
        Parameters:
        value - The bytes for sessionId to set.
        Returns:
        This builder for chaining.
      • getSessionCheck

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

        public QueryInfo.Builder setSessionCheck​(boolean value)
        bool session_check = 13;
        Parameters:
        value - The sessionCheck to set.
        Returns:
        This builder for chaining.
      • clearSessionCheck

        public QueryInfo.Builder clearSessionCheck()
        bool session_check = 13;
        Returns:
        This builder for chaining.
      • getSessionTimeout

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

        public QueryInfo.Builder setSessionTimeout​(int value)
        uint32 session_timeout = 14;
        Parameters:
        value - The sessionTimeout to set.
        Returns:
        This builder for chaining.
      • clearSessionTimeout

        public QueryInfo.Builder clearSessionTimeout()
        uint32 session_timeout = 14;
        Returns:
        This builder for chaining.
      • 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.
      • setCancel

        public QueryInfo.Builder setCancel​(boolean value)
         Set `cancel` to true to stop executing the query.
         
        bool cancel = 15;
        Parameters:
        value - The cancel to set.
        Returns:
        This builder for chaining.
      • clearCancel

        public QueryInfo.Builder clearCancel()
         Set `cancel` to true to stop executing the query.
         
        bool cancel = 15;
        Returns:
        This builder for chaining.
      • 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.
      • setNextQueryInfo

        public QueryInfo.Builder setNextQueryInfo​(boolean value)
         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;
        Parameters:
        value - The nextQueryInfo to set.
        Returns:
        This builder for chaining.
      • clearNextQueryInfo

        public QueryInfo.Builder clearNextQueryInfo()
         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;
        Returns:
        This builder for chaining.
      • hasResultCompression

        public boolean hasResultCompression()
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
        Specified by:
        hasResultCompression in interface QueryInfoOrBuilder
        Returns:
        Whether the resultCompression field is set.
      • getResultCompression

        public Compression getResultCompression()
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
        Specified by:
        getResultCompression in interface QueryInfoOrBuilder
        Returns:
        The resultCompression.
      • setResultCompression

        public QueryInfo.Builder setResultCompression​(Compression value)
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
      • setResultCompression

        public QueryInfo.Builder setResultCompression​(Compression.Builder builderForValue)
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
      • mergeResultCompression

        public QueryInfo.Builder mergeResultCompression​(Compression value)
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
      • clearResultCompression

        public QueryInfo.Builder clearResultCompression()
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
      • getResultCompressionBuilder

        public Compression.Builder getResultCompressionBuilder()
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
      • getResultCompressionOrBuilder

        public CompressionOrBuilder getResultCompressionOrBuilder()
        / Controls how a ClickHouse server will compress query execution results before sending back to the client.
         / If not set the compression settings from the configuration file will be used.
         
        .clickhouse.grpc.Compression result_compression = 17;
        Specified by:
        getResultCompressionOrBuilder in interface QueryInfoOrBuilder
      • setUnknownFields

        public final QueryInfo.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>
      • mergeUnknownFields

        public final QueryInfo.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<QueryInfo.Builder>