reizio/reiz.io

database: Wrap EdgeQLConnection objects

isidentical opened this issue · 0 comments

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 with
    • get_connection(backend: str) -> BaseConnection, connection: BaseConnection = get_connection(config.ir.backend)
    • reiz.database.base a BaseConnection class, which would host 2 main methods (maybe more) get_blocking_connection(), get_async_connection. It might host a pool inside maybe
    • reiz.database.edgeql that implements these methods