Set a named parameter in the query. The named field must exist in the query itself. :param kv: Key-Value pairs representing values within the query. These values should be stripped of their leading `$` identifier.
(self, **kv)
| 352 | self._set_named_args(**kwargs) |
| 353 | |
| 354 | def _set_named_args(self, **kv): |
| 355 | """ |
| 356 | Set a named parameter in the query. The named field must |
| 357 | exist in the query itself. |
| 358 | |
| 359 | :param kv: Key-Value pairs representing values within the |
| 360 | query. These values should be stripped of their leading |
| 361 | `$` identifier. |
| 362 | |
| 363 | """ |
| 364 | arg_dict = self._params.setdefault("named_parameters", {}) |
| 365 | # C++ core wants all args JSONified bytes |
| 366 | named_params = {f'${k}': json.dumps(v).encode('utf-8') for k, v in kv.items()} |
| 367 | arg_dict.update(named_params) |
| 368 | return self |
| 369 | |
| 370 | def _add_pos_args(self, *args): |
| 371 | """ |
no test coverage detected