Ejemplo n.º 1
0
 def response_handler(resp):
     if not resp.is_success:
         raise AQLQueryExplainError(resp, request)
     if 'plan' in resp.body:
         return resp.body['plan']
     else:
         return resp.body['plans']
Ejemplo n.º 2
0
        def handler(res):
            if res.status_code not in HTTP_OK:
                raise AQLQueryExplainError(res)

            if 'plan' in res.body:
                return res.body['plan']
            else:
                return res.body['plans']
Ejemplo n.º 3
0
 def response_handler(resp: Response) -> Union[Json, Jsons]:
     if not resp.is_success:
         raise AQLQueryExplainError(resp, request)
     if "plan" in resp.body:
         plan: Json = resp.body["plan"]
         return plan
     else:
         plans: Jsons = resp.body["plans"]
         return plans