如果有日期,如何根据文档获取 Vapor?

How to fetch in Vapor based on Document if you have a date?

let d3 = try collection.find("dateModified" >= lastUpdateCheck, sortedBy: nil, projecting: p)

您将如何创建此 Query "dateModified" >= lastUpdateCheck,但基于 Document 构造函数?

let q: Query = [
    "dateModified" [
        "$gte": lastUpdateCheck
    ]
]

有关 MongoKitten 查询的更多信息:https://medium.com/@joannis.orlandos/the-mongokitten-query-object-8de2964d1b23

有关 MongoDB 个查询的更多信息:https://docs.mongodb.com/manual/reference/operator/query/

以及关于在 MongoKitten 中使用 MongoDB 教程的补充文章:https://medium.com/@joannis.orlandos/interpreting-official-mongodb-tutorials-and-applying-them-in-mongokitten-e34f62ba9969