MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _repr_param_dict

Method _repr_param_dict

lib/sqlalchemy/sql/util.py:750–779  ·  view source on GitHub ↗
(self, params: _CoreSingleExecuteParams)

Source from the content-addressed store, hash-verified

748 return self._repr_param_list(params)
749
750 def _repr_param_dict(self, params: _CoreSingleExecuteParams) -> str:
751 trunc = self.trunc
752 (
753 items_first_batch,
754 items_second_batch,
755 trunclen,
756 ) = self._get_batches(params.items())
757
758 if items_second_batch:
759 text = "{%s" % (
760 ", ".join(
761 f"{key!r}: {trunc(value)}"
762 for key, value in items_first_batch
763 )
764 )
765 text += f" ... {trunclen} parameters truncated ... "
766 text += "%s}" % (
767 ", ".join(
768 f"{key!r}: {trunc(value)}"
769 for key, value in items_second_batch
770 )
771 )
772 else:
773 text = "{%s}" % (
774 ", ".join(
775 f"{key!r}: {trunc(value)}"
776 for key, value in items_first_batch
777 )
778 )
779 return text
780
781 def _repr_param_tuple(self, params: Sequence[Any]) -> str:
782 trunc = self.trunc

Callers 1

_repr_paramsMethod · 0.95

Calls 3

_get_batchesMethod · 0.95
itemsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected