MCPcopy
hub / github.com/psycopg/psycopg / as_string

Method as_string

psycopg/psycopg/sql.py:212–213  ·  view source on GitHub ↗
(self, context: AdaptContext | None = None)

Source from the content-addressed store, hash-verified

210 raise TypeError(f"SQL values must be strings, got {obj!r} instead")
211
212 def as_string(self, context: AdaptContext | None = None) -> str:
213 return self._obj
214
215 def as_bytes(self, context: AdaptContext | None = None) -> bytes:
216 conn = context.connection if context else None

Callers 15

_exec_commandFunction · 0.45
test_posMethod · 0.45
test_pos_specMethod · 0.45
test_dictMethod · 0.45
test_compose_literalMethod · 0.45
test_compose_emptyMethod · 0.45
test_percent_escapeMethod · 0.45
test_braces_escapeMethod · 0.45
test_auto_literalMethod · 0.45
test_as_stringMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_posMethod · 0.36
test_pos_specMethod · 0.36
test_dictMethod · 0.36
test_compose_literalMethod · 0.36
test_compose_emptyMethod · 0.36
test_percent_escapeMethod · 0.36
test_braces_escapeMethod · 0.36
test_auto_literalMethod · 0.36
test_as_stringMethod · 0.36
test_as_stringMethod · 0.36