Пример #1
0
 async def master_eo_timing_by_meo(self, meo: MasterEOResId) -> List[MasterEOResId]:
     sql = "select * from MasterEOTimingView where masterEoId=%s;"
     rs = await self.do_sql(sql, [meo.id()])
     return [MasterEOResId.of_id(x["masterEoId"]) for x in rs]
Пример #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}
Пример #3
0
 async def master_eo_timing(self) -> List[MasterEOResId]:
     sql = "select * from MasterEOTimingView;"
     rs = await self.do_sql(sql)
     return [MasterEOResId.of_id(x["masterEoId"]) for x in rs]
Пример #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]
Пример #5
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]
Пример #6
0
 async def vg_mmeo_from_rs_item(x) -> Tuple[VersionGroupResId, MasterEOResId]:
     return VersionGroupResId.of_id(x["versionGroupId"]), MasterEOResId.of_id(x["masterEOId"])
Пример #7
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]
Пример #8
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}
Пример #9
0
 def create_result(x):
     return PublicationEventResId.parse(x["publicationEvent"]), MasterEOResId.parse(x["masterEO"])
Пример #10
0
 def create_result(x):
     return MediaObjectResId.parse(x["mediaObject"]), MasterEOResId.parse(x["masterEO"])
Пример #11
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}
Пример #12
0
 async def versiongroup_metadatameos_by_meo(self, meo: MasterEOResId) -> Dict[VersionGroupResId, MasterEOResId]:
     return await self.vg_mmeo_result("select * from VersionGroupMetadataMeos where masterEOId=%s;", meo.id())
Пример #13
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}
Пример #14
0
 async def find_tmp_mastereo_to_versiongroups_by_meo(self, resid: MasterEOResId) -> \
         Dict[MasterEOResId, VersionGroupResId]:
     sql = "select * from TmpMasterEOVersionGroups where meoId = %s;"
     rs = await self.do_sql(sql, [resid.id()])
     return {MasterEOResId.of_id(x["meoId"]): VersionGroupResId.of_id(x["versionGroupId"]) for x in rs}
Пример #15
0
 async def media_object_name(self) -> List[MasterEOResId]:
     sql = "select * from MediaObjectName;"
     rs = await self.do_sql(sql)
     return [MasterEOResId.of_id(x["meoId"]) for x in rs]
Пример #16
0
 def create_result(x):
     return TimelineResId.of_id(x["timeline"]), MasterEOResId.parse(x["masterEO"])
Пример #17
0
 async def insert_tmp_meo_vg(self, meo: MasterEOResId, vg: VersionGroupResId):
     sql = "insert into TmpMasterEOVersionGroups(meoId,versionGroupId) values (%s,%s);"
     return await self.do_sql(sql, [meo.id(), vg.id()])
Пример #18
0
 def create_result(x):
     return MasterEOResId.parse(x["meoResId"]), VersionGroupResId.of_id(x["versionGroupId"])