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

Method get_statusmsg

asyncpg/prepared_stmt.py:48–59  ·  view source on GitHub ↗

Return the status of the executed command. Example:: stmt = await connection.prepare('CREATE TABLE mytab (a int)') await stmt.fetch() assert stmt.get_statusmsg() == "CREATE TABLE"

(self)

Source from the content-addressed store, hash-verified

46
47 @connresource.guarded
48 def get_statusmsg(self) -> str:
49 """Return the status of the executed command.
50
51 Example::
52
53 stmt = await connection.prepare('CREATE TABLE mytab (a int)')
54 await stmt.fetch()
55 assert stmt.get_statusmsg() == "CREATE TABLE"
56 """
57 if self._last_status is None:
58 return self._last_status
59 return self._last_status.decode()
60
61 @connresource.guarded
62 def get_parameters(self):

Callers 2

test_prepare_04Method · 0.80
statusMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_prepare_04Method · 0.64
statusMethod · 0.64