Class ExecuteSqlRequest.QueryOptions.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.QueryOptions.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<ExecuteSqlRequest.QueryOptions.Builder>
      • getDefaultInstanceForType

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

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

        public ExecuteSqlRequest.QueryOptions buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public String getOptimizerVersion()
         An option to control the selection of optimizer version.
        
         This parameter allows individual queries to pick different query
         optimizer versions.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the
         latest supported query optimizer version. If not specified, Cloud Spanner
         uses the optimizer version set at the database level options. Any other
         positive integer (from the list of supported optimizer versions)
         overrides the default optimizer version for query execution.
        
         The list of supported optimizer versions can be queried from
         SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
        
         Executing a SQL statement with an invalid optimizer version fails with
         an `INVALID_ARGUMENT` error.
        
         See
         https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
         for more information on managing the query optimizer.
        
         The `optimizer_version` statement hint has precedence over this setting.
         
        string optimizer_version = 1;
        Specified by:
        getOptimizerVersion in interface ExecuteSqlRequest.QueryOptionsOrBuilder
        Returns:
        The optimizerVersion.
      • getOptimizerVersionBytes

        public com.google.protobuf.ByteString getOptimizerVersionBytes()
         An option to control the selection of optimizer version.
        
         This parameter allows individual queries to pick different query
         optimizer versions.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the
         latest supported query optimizer version. If not specified, Cloud Spanner
         uses the optimizer version set at the database level options. Any other
         positive integer (from the list of supported optimizer versions)
         overrides the default optimizer version for query execution.
        
         The list of supported optimizer versions can be queried from
         SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
        
         Executing a SQL statement with an invalid optimizer version fails with
         an `INVALID_ARGUMENT` error.
        
         See
         https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
         for more information on managing the query optimizer.
        
         The `optimizer_version` statement hint has precedence over this setting.
         
        string optimizer_version = 1;
        Specified by:
        getOptimizerVersionBytes in interface ExecuteSqlRequest.QueryOptionsOrBuilder
        Returns:
        The bytes for optimizerVersion.
      • setOptimizerVersion

        public ExecuteSqlRequest.QueryOptions.Builder setOptimizerVersion​(String value)
         An option to control the selection of optimizer version.
        
         This parameter allows individual queries to pick different query
         optimizer versions.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the
         latest supported query optimizer version. If not specified, Cloud Spanner
         uses the optimizer version set at the database level options. Any other
         positive integer (from the list of supported optimizer versions)
         overrides the default optimizer version for query execution.
        
         The list of supported optimizer versions can be queried from
         SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
        
         Executing a SQL statement with an invalid optimizer version fails with
         an `INVALID_ARGUMENT` error.
        
         See
         https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
         for more information on managing the query optimizer.
        
         The `optimizer_version` statement hint has precedence over this setting.
         
        string optimizer_version = 1;
        Parameters:
        value - The optimizerVersion to set.
        Returns:
        This builder for chaining.
      • clearOptimizerVersion

        public ExecuteSqlRequest.QueryOptions.Builder clearOptimizerVersion()
         An option to control the selection of optimizer version.
        
         This parameter allows individual queries to pick different query
         optimizer versions.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the
         latest supported query optimizer version. If not specified, Cloud Spanner
         uses the optimizer version set at the database level options. Any other
         positive integer (from the list of supported optimizer versions)
         overrides the default optimizer version for query execution.
        
         The list of supported optimizer versions can be queried from
         SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
        
         Executing a SQL statement with an invalid optimizer version fails with
         an `INVALID_ARGUMENT` error.
        
         See
         https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
         for more information on managing the query optimizer.
        
         The `optimizer_version` statement hint has precedence over this setting.
         
        string optimizer_version = 1;
        Returns:
        This builder for chaining.
      • setOptimizerVersionBytes

        public ExecuteSqlRequest.QueryOptions.Builder setOptimizerVersionBytes​(com.google.protobuf.ByteString value)
         An option to control the selection of optimizer version.
        
         This parameter allows individual queries to pick different query
         optimizer versions.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the
         latest supported query optimizer version. If not specified, Cloud Spanner
         uses the optimizer version set at the database level options. Any other
         positive integer (from the list of supported optimizer versions)
         overrides the default optimizer version for query execution.
        
         The list of supported optimizer versions can be queried from
         SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
        
         Executing a SQL statement with an invalid optimizer version fails with
         an `INVALID_ARGUMENT` error.
        
         See
         https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
         for more information on managing the query optimizer.
        
         The `optimizer_version` statement hint has precedence over this setting.
         
        string optimizer_version = 1;
        Parameters:
        value - The bytes for optimizerVersion to set.
        Returns:
        This builder for chaining.
      • getOptimizerStatisticsPackage

        public String getOptimizerStatisticsPackage()
         An option to control the selection of optimizer statistics package.
        
         This parameter allows individual queries to use a different query
         optimizer statistics package.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the latest
         generated statistics package. If not specified, Cloud Spanner uses
         the statistics package set at the database level options, or the latest
         package if the database option is not set.
        
         The statistics package requested by the query has to be exempt from
         garbage collection. This can be achieved with the following DDL
         statement:
        
         ```
         ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
         ```
        
         The list of available statistics packages can be queried from
         `INFORMATION_SCHEMA.SPANNER_STATISTICS`.
        
         Executing a SQL statement with an invalid optimizer statistics package
         or with a statistics package that allows garbage collection fails with
         an `INVALID_ARGUMENT` error.
         
        string optimizer_statistics_package = 2;
        Specified by:
        getOptimizerStatisticsPackage in interface ExecuteSqlRequest.QueryOptionsOrBuilder
        Returns:
        The optimizerStatisticsPackage.
      • getOptimizerStatisticsPackageBytes

        public com.google.protobuf.ByteString getOptimizerStatisticsPackageBytes()
         An option to control the selection of optimizer statistics package.
        
         This parameter allows individual queries to use a different query
         optimizer statistics package.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the latest
         generated statistics package. If not specified, Cloud Spanner uses
         the statistics package set at the database level options, or the latest
         package if the database option is not set.
        
         The statistics package requested by the query has to be exempt from
         garbage collection. This can be achieved with the following DDL
         statement:
        
         ```
         ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
         ```
        
         The list of available statistics packages can be queried from
         `INFORMATION_SCHEMA.SPANNER_STATISTICS`.
        
         Executing a SQL statement with an invalid optimizer statistics package
         or with a statistics package that allows garbage collection fails with
         an `INVALID_ARGUMENT` error.
         
        string optimizer_statistics_package = 2;
        Specified by:
        getOptimizerStatisticsPackageBytes in interface ExecuteSqlRequest.QueryOptionsOrBuilder
        Returns:
        The bytes for optimizerStatisticsPackage.
      • setOptimizerStatisticsPackage

        public ExecuteSqlRequest.QueryOptions.Builder setOptimizerStatisticsPackage​(String value)
         An option to control the selection of optimizer statistics package.
        
         This parameter allows individual queries to use a different query
         optimizer statistics package.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the latest
         generated statistics package. If not specified, Cloud Spanner uses
         the statistics package set at the database level options, or the latest
         package if the database option is not set.
        
         The statistics package requested by the query has to be exempt from
         garbage collection. This can be achieved with the following DDL
         statement:
        
         ```
         ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
         ```
        
         The list of available statistics packages can be queried from
         `INFORMATION_SCHEMA.SPANNER_STATISTICS`.
        
         Executing a SQL statement with an invalid optimizer statistics package
         or with a statistics package that allows garbage collection fails with
         an `INVALID_ARGUMENT` error.
         
        string optimizer_statistics_package = 2;
        Parameters:
        value - The optimizerStatisticsPackage to set.
        Returns:
        This builder for chaining.
      • clearOptimizerStatisticsPackage

        public ExecuteSqlRequest.QueryOptions.Builder clearOptimizerStatisticsPackage()
         An option to control the selection of optimizer statistics package.
        
         This parameter allows individual queries to use a different query
         optimizer statistics package.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the latest
         generated statistics package. If not specified, Cloud Spanner uses
         the statistics package set at the database level options, or the latest
         package if the database option is not set.
        
         The statistics package requested by the query has to be exempt from
         garbage collection. This can be achieved with the following DDL
         statement:
        
         ```
         ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
         ```
        
         The list of available statistics packages can be queried from
         `INFORMATION_SCHEMA.SPANNER_STATISTICS`.
        
         Executing a SQL statement with an invalid optimizer statistics package
         or with a statistics package that allows garbage collection fails with
         an `INVALID_ARGUMENT` error.
         
        string optimizer_statistics_package = 2;
        Returns:
        This builder for chaining.
      • setOptimizerStatisticsPackageBytes

        public ExecuteSqlRequest.QueryOptions.Builder setOptimizerStatisticsPackageBytes​(com.google.protobuf.ByteString value)
         An option to control the selection of optimizer statistics package.
        
         This parameter allows individual queries to use a different query
         optimizer statistics package.
        
         Specifying `latest` as a value instructs Cloud Spanner to use the latest
         generated statistics package. If not specified, Cloud Spanner uses
         the statistics package set at the database level options, or the latest
         package if the database option is not set.
        
         The statistics package requested by the query has to be exempt from
         garbage collection. This can be achieved with the following DDL
         statement:
        
         ```
         ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
         ```
        
         The list of available statistics packages can be queried from
         `INFORMATION_SCHEMA.SPANNER_STATISTICS`.
        
         Executing a SQL statement with an invalid optimizer statistics package
         or with a statistics package that allows garbage collection fails with
         an `INVALID_ARGUMENT` error.
         
        string optimizer_statistics_package = 2;
        Parameters:
        value - The bytes for optimizerStatisticsPackage to set.
        Returns:
        This builder for chaining.