我正在尝试使用" $和" Haskell mongoDB中的运算符不起作用:
myFilter = do
cursor <- MongoDB.find (MongoDB.select ["$and" =: [["field1" =: "test1"], ["field2" =: "test2"], ["field3" =: "test3"]]], "db")
rest cursor
提前致谢。
答案 0 :(得分:3)
你之前有一个不必要的逗号&#34; db&#34;这导致了类型错误。
试试这个:
myFilter = do
cursor <- MongoDB.find (MongoDB.select ["$and" =: [["field1" =: "test1"], ["field2" =: "test2"], ["field3" =: "test3"]]] "db")
rest cursor
注意: