本文整理汇总了Python中lp.services.database.interfaces.IStore.get方法的典型用法代码示例。如果您正苦于以下问题:Python IStore.get方法的具体用法?Python IStore.get怎么用?Python IStore.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lp.services.database.interfaces.IStore
的用法示例。
在下文中一共展示了IStore.get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_target
# 需要导入模块: from lp.services.database.interfaces import IStore [as 别名]
# 或者: from lp.services.database.interfaces.IStore import get [as 别名]
def load_target(pid, psid, did, dsid, spnid):
store = IStore(Product)
p, ps, d, ds, spn = map(
lambda (cls, id): store.get(cls, id) if id is not None else None,
zip((Product, ProductSeries, Distribution, DistroSeries,
SourcePackageName),
(pid, psid, did, dsid, spnid)))
return bug_target_from_key(p, ps, d, ds, spn)
示例2: _resolve
# 需要导入模块: from lp.services.database.interfaces import IStore [as 别名]
# 或者: from lp.services.database.interfaces.IStore import get [as 别名]
def _resolve(row):
store = IStore(SourcePackagePublishingHistory)
return tuple(
(value if cls is None else store.get(cls, value))
for value, cls in zip(row, lookups))