MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / get_query

Method get_query

asyncpg/prepared_stmt.py:37–45  ·  view source on GitHub ↗

Return the text of the query for this prepared statement. Example:: stmt = await connection.prepare('SELECT $1::int') assert stmt.get_query() == "SELECT $1::int"

(self)

Source from the content-addressed store, hash-verified

35
36 @connresource.guarded
37 def get_query(self) -> str:
38 """Return the text of the query for this prepared statement.
39
40 Example::
41
42 stmt = await connection.prepare('SELECT $1::int')
43 assert stmt.get_query() == "SELECT $1::int"
44 """
45 return self._query
46
47 @connresource.guarded
48 def get_statusmsg(self) -> str:

Callers 1

test_prepare_01Method · 0.80

Calls

no outgoing calls

Tested by 1

test_prepare_01Method · 0.64