Dispose of the current :class:`.Session`, if present. This will first call :meth:`.Session.close` method on the current :class:`.Session`, which releases any existing transactional/connection resources still being held; transactions specifically are rolled back. The
(self)
| 252 | self.session_factory.configure(**kwargs) |
| 253 | |
| 254 | def remove(self) -> None: |
| 255 | """Dispose of the current :class:`.Session`, if present. |
| 256 | |
| 257 | This will first call :meth:`.Session.close` method |
| 258 | on the current :class:`.Session`, which releases any existing |
| 259 | transactional/connection resources still being held; transactions |
| 260 | specifically are rolled back. The :class:`.Session` is then |
| 261 | discarded. Upon next usage within the same scope, |
| 262 | the :class:`.scoped_session` will produce a new |
| 263 | :class:`.Session` object. |
| 264 | |
| 265 | """ |
| 266 | |
| 267 | if self.registry.has(): |
| 268 | self.registry().close() |
| 269 | self.registry.clear() |
| 270 | |
| 271 | def query_property( |
| 272 | self, query_cls: Optional[Type[Query[_T]]] = None |