MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / set_isolation_level

Method set_isolation_level

lib/sqlalchemy/engine/interfaces.py:2461–2493  ·  view source on GitHub ↗

Given a DBAPI connection, set its isolation level. Note that this is a dialect-level method which is used as part of the implementation of the :class:`_engine.Connection` and :class:`_engine.Engine` isolation level facilities; these APIs should be preferred for

(
        self, dbapi_connection: DBAPIConnection, level: IsolationLevel
    )

Source from the content-addressed store, hash-verified

2459 raise NotImplementedError()
2460
2461 def set_isolation_level(
2462 self, dbapi_connection: DBAPIConnection, level: IsolationLevel
2463 ) -> None:
2464 """Given a DBAPI connection, set its isolation level.
2465
2466 Note that this is a dialect-level method which is used as part
2467 of the implementation of the :class:`_engine.Connection` and
2468 :class:`_engine.Engine`
2469 isolation level facilities; these APIs should be preferred for
2470 most typical use cases.
2471
2472 If the dialect also implements the
2473 :meth:`.Dialect.get_isolation_level_values` method, then the given
2474 level is guaranteed to be one of the string names within that sequence,
2475 and the method will not need to anticipate a lookup failure.
2476
2477 .. seealso::
2478
2479 :meth:`_engine.Connection.get_isolation_level`
2480 - view current level
2481
2482 :attr:`_engine.Connection.default_isolation_level`
2483 - view default level
2484
2485 :paramref:`.Connection.execution_options.isolation_level` -
2486 set per :class:`_engine.Connection` isolation level
2487
2488 :paramref:`_sa.create_engine.isolation_level` -
2489 set per :class:`_engine.Engine` isolation level
2490
2491 """
2492
2493 raise NotImplementedError()
2494
2495 def get_isolation_level(
2496 self, dbapi_connection: DBAPIConnection

Callers 3

test_reset_levelMethod · 0.45

Calls

no outgoing calls

Tested by 2

test_reset_levelMethod · 0.36