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)
| 242 | self.session_factory.configure(**kwargs) |
| 243 | |
| 244 | def remove(self) -> None: |
| 245 | """Dispose of the current :class:`.Session`, if present. |
| 246 | |
| 247 | This will first call :meth:`.Session.close` method |
| 248 | on the current :class:`.Session`, which releases any existing |
| 249 | transactional/connection resources still being held; transactions |
| 250 | specifically are rolled back. The :class:`.Session` is then |
| 251 | discarded. Upon next usage within the same scope, |
| 252 | the :class:`.scoped_session` will produce a new |
| 253 | :class:`.Session` object. |
| 254 | |
| 255 | """ |
| 256 | |
| 257 | if self.registry.has(): |
| 258 | self.registry().close() |
| 259 | self.registry.clear() |
| 260 | |
| 261 | def query_property( |
| 262 | self, query_cls: Optional[Type[Query[_T]]] = None |