def get_analysed_versions(ecosystem, package):
"""Return all already analysed versions for the given package.
:param ecosystem: str, Ecosystem name
:param package: str, Package name
return: a list of package version identifiers of already analysed versions
"""
try:
return chain(*PostgresBase.session.query(Version.identifier).
join(Analysis).join(Package).join(Ecosystem).
filter(Ecosystem.name == ecosystem).
filter(Package.name == package).
filter(Analysis.finished_at.isnot(None)).
distinct().all())
except SQLAlchemyError:
PostgresBase.session.rollback()
raise
postgres.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录