Changes the state to reflect the mutation which yielded the given result. In order to use the result, the `enable_mutation_tokens` option must have been specified in the connection string, _and_ the result must have been successful. :param rvs: One
(self, *rvs, # type: List[MutationResult]
**kwargs # type: Dict[str, Any]
)
| 52 | return False |
| 53 | |
| 54 | def add_results(self, *rvs, # type: List[MutationResult] |
| 55 | **kwargs # type: Dict[str, Any] |
| 56 | ) -> bool: |
| 57 | """ |
| 58 | Changes the state to reflect the mutation which yielded the given |
| 59 | result. |
| 60 | |
| 61 | In order to use the result, the `enable_mutation_tokens` option must |
| 62 | have been specified in the connection string, _and_ the result |
| 63 | must have been successful. |
| 64 | |
| 65 | :param rvs: One or more :class:`~.OperationResult` which have been |
| 66 | returned from mutations |
| 67 | :param quiet: Suppress errors if one of the results does not |
| 68 | contain a convertible state. |
| 69 | :return: `True` if the result was valid and added, `False` if not |
| 70 | added (and `quiet` was specified |
| 71 | :raise: :exc:`~.MissingTokenException` if `result` does not contain |
| 72 | a valid token |
| 73 | """ |
| 74 | if not rvs: |
| 75 | raise MissingTokenException(message='No results passed') |
| 76 | for rv in rvs: |
| 77 | mut_token = rv.mutation_token() |
| 78 | if not isinstance(mut_token, MutationToken): |
| 79 | if kwargs.get('quiet', False) is True: |
| 80 | return False |
| 81 | raise MissingTokenException( |
| 82 | message='Result does not contain token') |
| 83 | if not self._add_scanvec(mut_token): |
| 84 | return False |
| 85 | return True |
| 86 | |
| 87 | def add_all(self, bucket, quiet=False): |
| 88 | """ |
no test coverage detected