original_docstring: Execute a partitionable DML statement.
  
          :type dml: str
          :param dml: DML statement
  
          :type params: dict, {str -> column value}
          :param params: values for parameter replacement.  Keys must match
                         the names used in ``dml``.
  
          :type param_types: dict[str -> Union[dict, .types.Type]]
          :param param_types:
              (Optional) maps explicit types for one or more param values;
              required if parameters are passed.
  
          :type query_options:
              :class:`~google.cloud.spanner_v1.types.ExecuteSqlRequest.QueryOptions`
              or :class:`dict`
          :param query_options:
                  (Optional) Query optimizer configuration to use for the given query.
                  If a dict is provided, it must be of the same form as the protobuf
                  message :class:`~google.cloud.spanner_v1.types.QueryOptions`
  
          :type request_options:
              :class:`google.cloud.spanner_v1.types.RequestOptions`
          :param request_options:
              (Optional) Common options for this request.
              If a dict is provided, it must be of the same form as the protobuf
              message :class:`~google.cloud.spanner_v1.types.RequestOptions`.
              Please note, the `transactionTag` setting will be ignored as it is
              not supported for partitioned DML.
  
          :rtype: int
          :returns: Count of rows affected by the DML statement.
          
docstring: Execute a partitionable DML statement.
docstring_tokens: Execute a partitionable DML statement .
code: def execute_partitioned_dml(
          self,
          dml,
          params=None,
          param_types=None,
          query_options=None,
          request_options=None,
      ):
          """Execute a partitionable DML statement.
  
          :type dml: str
          :param dml: DML statement
  
          :type params: dict, {str -> column value}
          :param params: values for parameter replacement.  Keys must match
                         the names used in ``dml``.
  
          :type param_types: dict[str -> Union[dict, .types.Type]]
          :param param_types:
              (Optional) maps explicit types for one or more param values;
              required if parameters are passed.
  
          :type query_options:
              :class:`~google.cloud.spanner_v1.types.ExecuteSqlRequest.QueryOptions`
              or :class:`dict`
          :param query_options:
                  (Optional) Query optimizer configuration to use for the given query.
                  If a dict is provided, it must be of the same form as the protobuf
                  message :class:`~google.cloud.spanner_v1.types.QueryOptions`
  
          :type request_options:
              :class:`google.cloud.spanner_v1.types.RequestOptions`
          :param request_options:
              (Optional) Common options for this request.
              If a dict is provided, it must be of the same form as the protobuf
              message :class:`~google.cloud.spanner_v1.types.RequestOptions`.
              Please note, the `transactionTag` setting will be ignored as it is
              not supported for partitioned DML.
  
          :rtype: int
          :returns: Count of rows affected by the DML statement.
          """
          query_options = _merge_query_options(
              self._instance._client._query_options, query_options
          )
          if request_options is None:
              request_options = RequestOptions()
          elif type(request_options) == dict:
              request_options = RequestOptions(request_options)
          request_options.transaction_tag = None
  
          if params is not None:
              from google.cloud.spanner_v1.transaction import Transaction
  
              if param_types is None:
                  raise ValueError("Specify 'param_types' when passing 'params'.")
              params_pb = Transaction._make_params_pb(params, param_types)
          else:
              params_pb = {}
  
          api = self.spanner_api
  
          txn_options = TransactionOptions(
              partitioned_dml=TransactionOptions.PartitionedDml()
          )
  
          metadata = _metadata_with_prefix(self.name)
  
          def execute_pdml():
              with SessionCheckout(self._pool) as session:
  
                  txn = api.begin_transaction(
                      session=session.name, options=txn_options, metadata=metadata
                  )
  
                  txn_selector = TransactionSelector(id=txn.id)
  
                  request = ExecuteSqlRequest(
                      session=session.name,
                      sql=dml,
                      transaction=txn_selector,
                      params=params_pb,
                      param_types=param_types,
                      query_options=query_options,
                      request_options=request_options,
                  )
                  method = functools.partial(
                      api.execute_streaming_sql, metadata=metadata,
                  )
  
                  iterator = _restart_on_unavailable(method, request)
  
                  result_set = StreamedResultSet(iterator)
                  list(result_set)  # consume all partials
  
                  return result_set.stats.row_count_lower_bound
  
          return _retry_on_aborted(execute_pdml, DEFAULT_RETRY_BACKOFF)()
code_tokens: def execute_partitioned_dml ( self , dml , params = None , param_types = None , query_options = None , request_options = None , ) : query_options = _merge_query_options ( self . _instance . _client . _query_options , query_options ) if request_options is None : request_options = RequestOptions ( ) elif type ( request_options ) == dict : request_options = RequestOptions ( request_options ) request_options . transaction_tag = None if params is not None : from google . cloud . spanner_v1 . transaction import Transaction if param_types is None : raise ValueError ( "Specify 'param_types' when passing 'params'." ) params_pb = Transaction . _make_params_pb ( params , param_types ) else : params_pb = { } api = self . spanner_api txn_options = TransactionOptions ( partitioned_dml = TransactionOptions . PartitionedDml ( ) ) metadata = _metadata_with_prefix ( self . name ) def execute_pdml ( ) : with SessionCheckout ( self . _pool ) as session : txn = api . begin_transaction ( session = session . name , options = txn_options , metadata = metadata ) txn_selector = TransactionSelector ( id = txn . id ) request = ExecuteSqlRequest ( session = session . name , sql = dml , transaction = txn_selector , params = params_pb , param_types = param_types , query_options = query_options , request_options = request_options , ) method = functools . partial ( api . execute_streaming_sql , metadata = metadata , ) iterator = _restart_on_unavailable ( method , request ) result_set = StreamedResultSet ( iterator ) list ( result_set ) return result_set . stats . row_count_lower_bound return _retry_on_aborted ( execute_pdml , DEFAULT_RETRY_BACKOFF ) ( )
short_docstring: Execute a partitionable DML statement.
short_docstring_tokens: Execute a partitionable DML statement .
comment: """Execute a partitionable DML statement.
  
          :type dml: str
          :param dml: DML statement
  
          :type params: dict, {str -> column value}
          :param params: values for parameter replacement.  Keys must match
                         the names used in ``dml``.
  
          :type param_types: dict[str -> Union[dict, .types.Type]]
          :param param_types:
              (Optional) maps explicit types for one or more param values;
              required if parameters are passed.
  
          :type query_options:
              :class:`~google.cloud.spanner_v1.types.ExecuteSqlRequest.QueryOptions`
              or :class:`dict`
          :param query_options:
                  (Optional) Query optimizer configuration to use for the given query.
                  If a dict is provided, it must be of the same form as the protobuf
                  message :class:`~google.cloud.spanner_v1.types.QueryOptions`
  
          :type request_options:
              :class:`google.cloud.spanner_v1.types.RequestOptions`
          :param request_options:
              (Optional) Common options for this request.
              If a dict is provided, it must be of the same form as the protobuf
              message :class:`~google.cloud.spanner_v1.types.RequestOptions`.
              Please note, the `transactionTag` setting will be ignored as it is
              not supported for partitioned DML.
  
          :rtype: int
          :returns: Count of rows affected by the DML statement.
          """$SEP$# consume all partials