MCPcopy
hub / github.com/psycopg/psycopg / add_notice_handler

Method add_notice_handler

psycopg/psycopg/_connection_base.py:322–329  ·  view source on GitHub ↗

Register a callable to be invoked when a notice message is received. :param callback: the callback to call upon message received. :type callback: Callable[[~psycopg.errors.Diagnostic], None]

(self, callback: NoticeHandler)

Source from the content-addressed store, hash-verified

320 yield from generators.cancel(cancel_conn, timeout=timeout)
321
322 def add_notice_handler(self, callback: NoticeHandler) -> None:
323 """
324 Register a callable to be invoked when a notice message is received.
325
326 :param callback: the callback to call upon message received.
327 :type callback: Callable[[~psycopg.errors.Diagnostic], None]
328 """
329 self._notice_handlers.append(callback)
330
331 def remove_notice_handler(self, callback: NoticeHandler) -> None:
332 """

Callers 15

test_notice_handlersFunction · 0.80
test_notice_handlersFunction · 0.80
test_quote_roundtripFunction · 0.80
test_transactionFunction · 0.80
test_message_0x33Function · 0.80
test_message_0x33Function · 0.80
test_commit_concurrencyFunction · 0.80
test_message_0x33Function · 0.80
test_transactionFunction · 0.80
test_message_0x33Function · 0.80

Calls

no outgoing calls

Tested by 15

test_notice_handlersFunction · 0.64
test_notice_handlersFunction · 0.64
test_quote_roundtripFunction · 0.64
test_transactionFunction · 0.64
test_message_0x33Function · 0.64
test_message_0x33Function · 0.64
test_commit_concurrencyFunction · 0.64
test_message_0x33Function · 0.64
test_transactionFunction · 0.64
test_message_0x33Function · 0.64