Module Mongoid::Sharding
In: lib/mongoid/sharding.rb

This module contains behaviour for adding shard key fields to updates.

Methods

Classes and Modules

Module Mongoid::Sharding::ClassMethods

Public Instance methods

Get the shard key fields.

@note Refactored from using delegate for class load performance.

@example Get the shard key fields.

  model.shard_key_fields

@return [ Array<String> ] The shard key field names.

Get the document selector with the defined shard keys.

@example Get the selector for the shard keys.

  person.shard_key_selector

@return [ Hash ] The shard key selector.

@since 2.0.0

[Validate]