Get the ConnectionHandler from the current context. This is a convenience function. Prefer accessing connections directly via context: `ctx.connections` :raises ConfigurationError: If no context is active
()
| 328 | |
| 329 | |
| 330 | def get_connections() -> ConnectionHandler: |
| 331 | """ |
| 332 | Get the ConnectionHandler from the current context. |
| 333 | |
| 334 | This is a convenience function. Prefer accessing connections directly |
| 335 | via context: `ctx.connections` |
| 336 | |
| 337 | :raises ConfigurationError: If no context is active |
| 338 | """ |
| 339 | from tortoise.context import require_context |
| 340 | |
| 341 | return require_context().connections |
no test coverage detected
searching dependent graphs…