Sha256: efb3c5e1714b5038b8ceaa60a92521bf9b200225104cb8f60271e5f8f26dde14
Contents?: true
Size: 979 Bytes
Versions: 33
Compression:
Stored size: 979 Bytes
Contents
class SmMovie include Mongoid::Document field :year, type: Integer index year: 1 shard_key :year end class SmTrailer include Mongoid::Document index year: 1 shard_key 'year' end class SmActor include Mongoid::Document # This is not a usable shard configuration for the server. # We just have it for unit tests. shard_key age: 1, 'gender' => :hashed, 'hello' => :hashed end class SmAssistant include Mongoid::Document field :gender, type: String index gender: 1 shard_key 'gender' => :hashed end class SmProducer include Mongoid::Document index age: 1, gender: 1 shard_key({age: 1, gender: 'hashed'}, unique: true, numInitialChunks: 2) end class SmDirector include Mongoid::Document belongs_to :agency index age: 1 shard_key :agency end class SmDriver include Mongoid::Document belongs_to :agency index age: 1, agency: 1 shard_key age: 1, agency: :hashed end class SmNotSharded include Mongoid::Document end
Version data entries
33 entries across 33 versions & 2 rubygems