需求
已知app表有两个字段:id和name,build_history表有四个字段:id、app_id、image_path和create_time。
app构建后会生成镜像,镜像地址存在于build_history表中的image_path字段。
现在想要查找出每个app的最新的五个镜像,该怎样实现?
Harbor is an open source container image registry that secures images with role-based access control, scans images for vulnerabilities, and signs images as trusted. As a CNCF Incubating project, Harbor delivers compliance, performance, and interoperability to help you consistently and securely manage images across cloud native compute platforms like Kubernetes and Docker.
更多内容参考Harbor官网。
JSON (JavaScript Object Notation) allows for easy interchange of data, often between a program and a database.
JSONPath is a query language for JSON, similar to XPath for XML.
如上,json是一种常用的数据格式,jsonpath是json的查询语言,类似于XPath和SQL。
jsonpath在线测试:JSONPath Online Evaluator