Exemple #1
0
 async def represents_by_meo(self, meo: MasterEOResId) -> List[MasterEOResId]:
     sql = "select * from Represents where masterEO=%s;"
     rs = await self.do_sql(sql, [str(meo)])
     return [MasterEOResId.parse(x["masterEO"]) for x in rs]
Exemple #2
0
 async def __do_master_eo_resources(self, sql, params=()):
     rs = await self.do_sql(sql, params)
     return {MasterEOResourceResId.parse(x["meoResource"]): MasterEOResId.parse(x["masterEO"]) for x in rs}
Exemple #3
0
 async def do_timeline_contents_sql(self, sql, params=()) -> List[Tuple[TimelineResId, MasterEOResId]]:
     rs = await self.do_sql(sql, params)
     return [(TimelineResId.of_id(x["timeline"]), MasterEOResId.parse(x["masterEO"])) for x in rs]
Exemple #4
0
 async def represents(self) -> List[MasterEOResId]:
     sql = "select * from Represents;"
     rs = await self.do_sql(sql)
     return [MasterEOResId.parse(x["masterEO"]) for x in rs]
Exemple #5
0
 def create_result(x):
     return PublicationEventResId.parse(x["publicationEvent"]), MasterEOResId.parse(x["masterEO"])
Exemple #6
0
 def create_result(x):
     return TimelineResId.of_id(x["timeline"]), MasterEOResId.parse(x["masterEO"])
Exemple #7
0
 async def publications_result(self, sql, params=()):
     rs = await self.do_sql(sql, params)
     return {PublicationEventResId.parse(x["publicationEvent"]): MasterEOResId.parse(
         x["masterEO"]) for x in rs}
Exemple #8
0
 async def __do_media_object_to_master_eo(self, sql, params=()):
     rs = await self.do_sql(sql, params)
     return {MediaObjectResId.parse(x["mediaObject"]): MasterEOResId.parse(x["masterEO"]) for x in rs}
Exemple #9
0
 def create_result(x):
     return MediaObjectResId.parse(x["mediaObject"]), MasterEOResId.parse(x["masterEO"])
Exemple #10
0
 async def find_mastereo_to_versiongroups_by_vg(self, vgid: VersionGroupResId) -> \
         Dict[MasterEOResId, VersionGroupResId]:
     sql = "select * from MasterEOVersionGroups where versionGroupId = %s;"
     rs = await self.do_sql(sql, [vgid.id()])
     return {MasterEOResId.parse(x["meoResId"]): VersionGroupResId.of_id(x["versionGroupId"]) for x in rs}
Exemple #11
0
 def create_result(x):
     return MasterEOResId.parse(x["meoResId"]), VersionGroupResId.of_id(x["versionGroupId"])