MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / unique_params

Method unique_params

lib/sqlalchemy/sql/elements.py:577–592  ·  view source on GitHub ↗

Return a copy with :func:`_expression.bindparam` elements replaced. Same functionality as :meth:`_expression.ClauseElement.params`, except adds `unique=True` to affected bind parameters so that multiple statements can be used.

(
        self,
        __optionaldict: Optional[Dict[str, Any]] = None,
        /,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

575 return key.bindparams
576
577 def unique_params(
578 self,
579 __optionaldict: Optional[Dict[str, Any]] = None,
580 /,
581 **kwargs: Any,
582 ) -> Self:
583 """Return a copy with :func:`_expression.bindparam` elements
584 replaced.
585
586 Same functionality as :meth:`_expression.ClauseElement.params`,
587 except adds `unique=True`
588 to affected bind parameters so that multiple statements can be
589 used.
590
591 """
592 return self._replace_params(True, __optionaldict, kwargs)
593
594 def params(
595 self,

Callers

nothing calls this directly

Calls 1

_replace_paramsMethod · 0.95

Tested by

no test coverage detected