method

prohibit_shard_swapping

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: ConnectionHandling
prohibit_shard_swapping(enabled = true) public

Prohibit swapping shards while inside of the passed block.

In some cases you may want to be able to swap shards but not allow a nested call to connected_to or connected_to_many to swap again. This is useful in cases you’re using sharding to provide per-request database isolation.

Show source
Register or log in to add new notes.