Class: Mongo::Collection::View::Builder::OpQuery
- Inherits:
-
Object
- Object
- Mongo::Collection::View::Builder::OpQuery
- Extended by:
- Forwardable
- Defined in:
- lib/mongo/collection/view/builder/op_query.rb
Overview
Builds a legacy OP_QUERY specification from options.
Instance Attribute Summary collapse
-
#modifiers ⇒ BSON::Document
readonly
Modifiers The server modifiers.
Instance Method Summary collapse
-
#initialize(view) ⇒ OpQuery
constructor
Create the new legacy query builder.
- #specification ⇒ Object
Constructor Details
#initialize(view) ⇒ OpQuery
Create the new legacy query builder.
39 40 41 42 |
# File 'lib/mongo/collection/view/builder/op_query.rb', line 39 def initialize(view) @view = view @modifiers = Modifiers.map_server_modifiers() end |
Instance Attribute Details
#modifiers ⇒ BSON::Document (readonly)
Returns modifiers The server modifiers.
29 30 31 |
# File 'lib/mongo/collection/view/builder/op_query.rb', line 29 def modifiers @modifiers end |
Instance Method Details
#specification ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/mongo/collection/view/builder/op_query.rb', line 44 def specification { :selector => requires_special_filter? ? special_filter : filter, :read => read, :options => , :db_name => database.name, :coll_name => collection.name } end |