MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _repr_param_tuple

Method _repr_param_tuple

lib/sqlalchemy/sql/util.py:781–803  ·  view source on GitHub ↗
(self, params: Sequence[Any])

Source from the content-addressed store, hash-verified

779 return text
780
781 def _repr_param_tuple(self, params: Sequence[Any]) -> str:
782 trunc = self.trunc
783
784 (
785 items_first_batch,
786 items_second_batch,
787 trunclen,
788 ) = self._get_batches(params)
789
790 if items_second_batch:
791 text = "(%s" % (
792 ", ".join(trunc(value) for value in items_first_batch)
793 )
794 text += f" ... {trunclen} parameters truncated ... "
795 text += "%s)" % (
796 ", ".join(trunc(value) for value in items_second_batch),
797 )
798 else:
799 text = "(%s%s)" % (
800 ", ".join(trunc(value) for value in items_first_batch),
801 "," if len(items_first_batch) == 1 else "",
802 )
803 return text
804
805 def _repr_param_list(self, params: _AnySingleExecuteParams) -> str:
806 trunc = self.trunc

Callers 1

_repr_paramsMethod · 0.95

Calls 2

_get_batchesMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected