【发布时间】:2016-03-08 09:19:49
【问题描述】:
我在控制台上执行此查询,但是我不能简单地复制并粘贴它以在 mongo shell 中执行它。
有没有什么方法可以将mongoid DSL转换成真正的mongo查询语句。
谢谢
database=test collection=flights selector={"$query"=>{"from"=>{:$in=>["TPE"]}, "to"=>{:$in=>["HND", "NRT", "NRT|TYO"]}, "flight_date"=>{"$gte"=>2016-03-15 00:00:00 UTC, "$lt"=>2016-03-16 00:00:00 UTC}, "flight_no"=>{:$exists=>true, :$ne=>nil}, "updated_at"=>{"$gte"=>2016-03-02 09:16:13 UTC}}, "$orderby"=>{"departure_at"=>1}}
【问题讨论】:
标签: mongoid