hailong/enhanced-masterslaveconnection

Add common enhancements to the Doctrine default MasterSlaveConnection implementation.

1.1 2019-11-26 21:37 UTC

This package is auto-updated.

Last update: 2024-04-27 08:27:26 UTC


README

Add common enhancements to the Doctrine default MasterSlaveConnection implementation.

Enhancements

  • Force all the SELECT queries go to slave databases.

  • Use a better random function random_int to balance the load among slave databases.

Adoption in Symfony Application

Install the package and assign this enhanced version of MasterSlaveConnection to the wrapper_class property of doctrine configuration.