Return a copy with :func:`_expression.bindparam` elements replaced. Returns a copy of this ClauseElement with :func:`_expression.bindparam` elements replaced with values taken from the given dictionary:: >>> clause = column("x") + bindparam("foo")
(
self,
__optionaldict: Optional[Mapping[str, Any]] = None,
/,
**kwargs: Any,
)
| 592 | return self._replace_params(True, __optionaldict, kwargs) |
| 593 | |
| 594 | def params( |
| 595 | self, |
| 596 | __optionaldict: Optional[Mapping[str, Any]] = None, |
| 597 | /, |
| 598 | **kwargs: Any, |
| 599 | ) -> Self: |
| 600 | """Return a copy with :func:`_expression.bindparam` elements |
| 601 | replaced. |
| 602 | |
| 603 | Returns a copy of this ClauseElement with |
| 604 | :func:`_expression.bindparam` |
| 605 | elements replaced with values taken from the given dictionary:: |
| 606 | |
| 607 | >>> clause = column("x") + bindparam("foo") |
| 608 | >>> print(clause.compile().params) |
| 609 | {'foo':None} |
| 610 | >>> print(clause.params({"foo": 7}).compile().params) |
| 611 | {'foo':7} |
| 612 | |
| 613 | """ |
| 614 | return self._replace_params(False, __optionaldict, kwargs) |
| 615 | |
| 616 | @deprecated( |
| 617 | "2.1", |
nothing calls this directly
no test coverage detected