Permalink
Browse files

'not' find operator

  • Loading branch information...
1 parent b099a70 commit 07ed0701eaa91fcc99810817907355e972ce5beb @SergejJurecko committed Apr 9, 2010
Showing with 3 additions and 1 deletion.
  1. +1 −1 mongoapi.erl
  2. +2 −0 mongodb.erl
View
@@ -139,7 +139,7 @@ batchInsert(LRecs) ->
% Documents with i between 2 and 5: Mong:find(#mydoc{i = {in, {gt, 2}, {lt, 5}}}, undefined, 0,0).
% in example: Mong:find(#mydoc{tags = {in, [2,3,4]}}, undefined, 0,0).
% exists example: Mong:find(#mydoc{tags = {exists, false}}, undefined, 0,0).
-% Advanced query options: gt,lt,gte,lte, ne, in, nin, all, size, exists
+% Advanced query options: gt,lt,gte,lte, ne, in, nin, all, size, exists,'not'
% Possible regex options: "ilmsux" -> IN THIS SEQUENCE! (not all are necessary of course)
% i case-insensitive matching
% m multiline: "^" and "$" match the beginning / end of each line as well as the whole string
View
@@ -1135,6 +1135,8 @@ encode_element({Name, {all, Val}}) ->
encode_element({Name, [{<<"$all">>, {array, Val}}]});
encode_element({Name, {size, Val}}) ->
encode_element({Name, [{<<"$size">>, Val}]});
+encode_element({Name, {'not', Val}}) ->
+ encode_element({Name, [{<<"$not">>, Val}]});
encode_element({Name, {exists, Val}}) ->
encode_element({Name, [{<<"$exists">>, Val}]});
encode_element({Name, {binary, SubType, Data}}) ->

0 comments on commit 07ed070

Please sign in to comment.