MCPcopy
hub / github.com/psycopg/psycopg / set_autocommit

Method set_autocommit

psycopg/psycopg/connection.py:499–502  ·  view source on GitHub ↗

Method version of the `~Connection.autocommit` setter.

(self, value: bool)

Source from the content-addressed store, hash-verified

497 self.set_autocommit(value)
498
499 def set_autocommit(self, value: bool) -> None:
500 """Method version of the `~Connection.autocommit` setter."""
501 with self.lock:
502 self.wait(self._set_autocommit_gen(value))
503
504 def _set_isolation_level(self, value: IsolationLevel | None) -> None:
505 self.set_isolation_level(value)

Callers 15

_set_autocommitMethod · 0.95
check_connectionMethod · 0.45
test_autocommitFunction · 0.45
test_autocommit_intransFunction · 0.45
test_autocommit_inerrorFunction · 0.45
test_autocommit_unknownFunction · 0.45
test_notify_handlersFunction · 0.45
receiverFunction · 0.45
test_no_notify_timeoutFunction · 0.45

Calls 2

waitMethod · 0.95
_set_autocommit_genMethod · 0.80

Tested by 15

test_autocommitFunction · 0.36
test_autocommit_intransFunction · 0.36
test_autocommit_inerrorFunction · 0.36
test_autocommit_unknownFunction · 0.36
test_notify_handlersFunction · 0.36
receiverFunction · 0.36
test_no_notify_timeoutFunction · 0.36
test_notify_timeoutFunction · 0.36
test_notify_timeout_0Function · 0.36