Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Top level $query operator does not always work #349

Open
fgarcia opened this issue Feb 9, 2015 · 0 comments
Open

Top level $query operator does not always work #349

fgarcia opened this issue Feb 9, 2015 · 0 comments

Comments

@fgarcia
Copy link

fgarcia commented Feb 9, 2015

Although the $query operator is not always needed, in some cases I do want to write a native query like this:

query = mongo.find("$query" => {:aggregate_id=>"1ZC"}, "$orderby" => { version: 1 })

The query *seems to be OK because this works:

query.to_a

However this fails

  @selector={:count=>"events", :query=>{"$query"=>{:aggregate_id=>"1ZC"}, "$orderby"=>{:version=>1}}}
  @fields=nil>
failed with error 2: "exception: unknown top level operator: $query"

The current implementation seems to ignore that the presence of $query is because the user wants a full blown native query without the find(...).modifier(..) syntax

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant