Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add #each_server to Database and Dataset, for running operations on a…
…ll shards Sequel has supported sharding for a long time (since 2.4.0), but it hasn't had built in support for updating all shards at once until now. Database#each_server and Dataset#each_server are designed to fill those needs. Database#each_server yields a new Database object for each server, and is intended for use when you want to run schema modification (DDL) queries, or other custom SQL against all shards. Dataset#each_server yields copies of the current dataset, each of which is tied to a separate server in the connection pool. It's intended for when you want to select/insert/update/delete from all shards. To implement this, ConnectionPool#servers and Database#servers methods were added.
- Loading branch information
1 parent
43e862c
commit adf6a89
Showing
8 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters