deprecate JavaScript string for Collection#find
This commit is contained in:
parent
d68e42812e
commit
3209ca05fd
|
@ -300,8 +300,12 @@ module Mongo
|
|||
when nil
|
||||
{}
|
||||
when BSON::Code
|
||||
warn "Collection#find will no longer take a JavaScript string in future versions. " +
|
||||
"Please specify your $where query explicitly."
|
||||
{"$where" => selector}
|
||||
when String
|
||||
warn "Collection#find will no longer take a JavaScript string in future versions. " +
|
||||
"Please specify your $where query explicitly."
|
||||
{"$where" => BSON::Code.new(selector)}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue