我无法将变量值传递到 items.find 查询中,该查询用于从神器中获取存储库详细信息
rep1 = "repo-name"
aql_query1 = '''
items.find(
{"name":{"$match":"manifest.json"}},
{"repo" :{"$match": "{rep1}" }}).include("repo","name","path","modified").sort({"$asc" : ["modified"]})
'''
rep1 变量由 repo-name 组成,应将其传递给 items.find 查询到 {"repo" :{"$match": "{rep1}" }
我正在尝试使用 python 脚本来实现这一点
rep1 = "repo-name"
aql_query1 = f'''
items.find(
{{"name": {{"$match": "manifest.json"}}}},
{{"repo": {{"$match": "{rep1}"}}}}
).include("repo", "name", "path", "modified").sort({{"$asc": ["modified"]}})
'''
print(aql_query1)