database: Wrap EdgeQLConnection objects
isidentical opened this issue · 0 comments
isidentical commented
Since we separated EdgeDB-bound logic from the compiler/serializer, maybe we can do the same thing to the database connections.
- Introducing
reiz.database
package withget_connection(backend: str) -> BaseConnection
,connection: BaseConnection = get_connection(config.ir.backend)
reiz.database.base
aBaseConnection
class, which would host 2 main methods (maybe more)get_blocking_connection()
,get_async_connection
. It might host a pool inside maybereiz.database.edgeql
that implements these methods