MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / configure

Method configure

lib/sqlalchemy/orm/scoping.py:237–252  ·  view source on GitHub ↗

reconfigure the :class:`.sessionmaker` used by this :class:`.scoped_session`. See :meth:`.sessionmaker.configure`.

(self, **kwargs: Any)

Source from the content-addressed store, hash-verified

235 return sess
236
237 def configure(self, **kwargs: Any) -> None:
238 """reconfigure the :class:`.sessionmaker` used by this
239 :class:`.scoped_session`.
240
241 See :meth:`.sessionmaker.configure`.
242
243 """
244
245 if self.registry.has():
246 warn(
247 "At least one scoped session is already present. "
248 " configure() can not affect sessions that have "
249 "already been created."
250 )
251
252 self.session_factory.configure(**kwargs)
253
254 def remove(self) -> None:
255 """Dispose of the current :class:`.Session`, if present.

Callers

nothing calls this directly

Calls 2

warnFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected