Ejemplo n.º 1
0
 async def introspect_db_config(self, conn):
     query = self.get_sys_query('dbconfig')
     result = await conn.parse_execute_json(
         query,
         b'__backend_dbconfig',
         dbver=0,
         use_prep_stmt=True,
         args=(),
     )
     return config.from_json(config.get_settings(), result)
Ejemplo n.º 2
0
    async def load_sys_config(self):
        syscon = await self._acquire_sys_pgcon()
        try:
            query = self.get_sys_query('sysconfig')
            sys_config_json = await syscon.parse_execute_json(
                query,
                b'__backend_sysconfig',
                dbver=0,
                use_prep_stmt=True,
                args=(),
            )
        finally:
            self._release_sys_pgcon()

        return config.from_json(config.get_settings(), sys_config_json)