module Mongoid::Contextual::Command

Attributes

collection[R]

@attribute [r] collection The collection to query against. @attribute [r] criteria The criteria for the context.

criteria[R]

@attribute [r] collection The collection to query against. @attribute [r] criteria The criteria for the context.

Public Instance Methods

client() click to toggle source

Get the database client.

@example Get the client.

command.client

@return [ Mongo::Client ] The Mongo client.

@since 3.0.0

# File lib/mongoid/contextual/command.rb, line 32
def client
  collection.database.client
end
command() click to toggle source

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

# File lib/mongoid/contextual/command.rb, line 20
def command
  @command ||= {}
end