for cleanup purposes I am currently trying to build an AQL query that lists all builds where all respective artifacts have not been downloaded. This is what I have right now:
builds.find(
{
"created" : {"$before" : "2mo"},
"name": {"$match":"* master"},
"module.artifact.item.stat.downloads": {"$eq":null}
}
).limit(1000)
The problem with this is that I get all builds that include a single artifact with no downloads but others might be downloaded. So I would need to do another query per build to determine the download count of all artifacts.
Is there a way to tell AQL that all artifacts of a build have to match the query?