emongoMongoDB 的 Erlang 開發(fā)包
emongo 是另外一個(gè) MongoDB 的 Erlang 開發(fā)包,已經(jīng)多年沒(méi)更新。
示例代碼:
%% 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}]}]).評(píng)論
圖片
表情
