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]
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}
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]
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]
def create_result(x): return PublicationEventResId.parse(x["publicationEvent"]), MasterEOResId.parse(x["masterEO"])
def create_result(x): return TimelineResId.of_id(x["timeline"]), MasterEOResId.parse(x["masterEO"])
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}
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}
def create_result(x): return MediaObjectResId.parse(x["mediaObject"]), MasterEOResId.parse(x["masterEO"])
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}
def create_result(x): return MasterEOResId.parse(x["meoResId"]), VersionGroupResId.of_id(x["versionGroupId"])