Exemplo n.º 1
0
 def create_result(x):
     return parse_res_id(x["referenceOwner"])
Exemplo n.º 2
0
 async def reference_owners_of_type(self, reftype) -> List[ResId]:
     sql = "select referenceOwner from Reference where reftype=%s;"
     rs = await self.do_sql(sql, reftype)
     return [parse_res_id(x["referenceOwner"]) for x in rs]
Exemplo n.º 3
0
 async def select_composes(self, essence: EssenceResId) -> Dict[EssenceResId, ResId]:
     sql = "select * from Composes where essence=%s;"
     rs = await self.do_sql(sql, [str(essence)])
     return {EssenceResId.parse(x["essence"]): parse_res_id(x["mediaResource"]) for x in rs}
Exemplo n.º 4
0
 async def references(self) -> Dict[ResId, dict]:
     sql = "select refType,reference,referenceOwner from Reference;"
     rs = await self.do_sql(sql)
     return {parse_res_id(x["referenceOwner"]): x for x in rs}
Exemplo n.º 5
0
 def create_result(x):
     return EssenceResId.parse(x["essence"]), parse_res_id(x["mediaResource"])