Module | Sequel::Plugins::Sharding
In: | lib/sequel/plugins/sharding.rb

The sharding plugin makes it easy to use Sequel‘s sharding features with models. It lets you create model objects on specific shards, and any models retrieved from specific shards are automatically saved back to those shards. It also works with associations, so that model objects retrieved from specific shards will only return associated objects from that shard, and using the add/remove/remove_all association methods will only affect that shard.

Usage:

      # Add the sharding support to all model subclasses (called before loading subclasses)
      Sequel::Model.plugin :sharding

      # Add the sharding support to the Album class
      Album.plugin :sharding

### Classes and Modules

Module Sequel::Plugins::Sharding::ClassMethods
Module Sequel::Plugins::Sharding::DatasetMethods
Module Sequel::Plugins::Sharding::InstanceMethods

[Validate]