Module: Cuprum::Collections::Commands::AbstractFindMany
- Includes:
- ParameterValidation
- Included in:
- Basic::Commands::FindMany
- Defined in:
- lib/cuprum/collections/commands/abstract_find_many.rb
Overview
Abstract implementation of the FindMany command.
Instance Method Summary collapse
-
#call(primary_keys:, allow_partial: false, envelope: false) ⇒ Cuprum::Result<Array<Hash{String, Object}>>
Queries the collection for the items with the given primary keys.
Instance Method Details
#call(primary_keys:, allow_partial: false, envelope: false) ⇒ Cuprum::Result<Array<Hash{String, Object}>>
Queries the collection for the items with the given primary keys.
The command will find and return the entities with the given primary keys. If any of the items are not found, the command will fail and return a NotFound error. If the :allow_partial option is set, the command will return a partial result unless none of the requested items are found.
When the :envelope option is true, the command wraps the items in a Hash, using the name of the collection as the key.
33 |
# File 'lib/cuprum/collections/commands/abstract_find_many.rb', line 33 validate :allow_partial, :boolean, optional: true |