emongoMongoDB 的 Erlang 开发包

联合创作 · 2023-09-30 19:47

emongo 是另外一个 MongoDB 的 Erlang 开发包,已经多年没更新。

示例代码:

%% find documents where field1 is greater than 5 and less than 10
emongo:find(test, "collection", [{"field1", [{gt, 5}, {lt, 10}]}]).

%% find documents where field1 is greater than or equal to 5 and less than or equal to 10
emongo:find(test, "collection", [{"field1", [{gte, 5}, {lte, 10}]}]).

%% find documents where field1 is greater than 5 and less than 10
emongo:find(test, "collection", [{"field1", [{'>', 5}, {'<', 10}]}]).

%% find documents where field1 is greater than or equal to 5 and less than or equal to 10
emongo:find(test, "collection", [{"field1", [{'>=', 5}, {'=<', 10}]}]).
浏览 1
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报