module Mongoid::Contextual::Command
Attributes
@attribute [r] collection The collection to query against. @attribute [r] criteria The criteria for the context.
@attribute [r] collection The collection to query against. @attribute [r] criteria The criteria for the context.
Public Instance Methods
Source
# File lib/mongoid/contextual/command.rb, line 32 def client collection.database.client end
Get the database client.
@example Get the client.
command.client
@return [ Mongo::Client ] The Mongo
client.
@since 3.0.0
Source
# File lib/mongoid/contextual/command.rb, line 20 def command @command ||= {} end
The database command that is being built to send to the db.
@example Get the command.
command.command
@return [ Hash ] The db command.
@since 3.0.0