Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sharding plugin integrate with server_block extension
This makes it so if you retrieve a model instance inside a with_server block, and later save it outside the with_server block, the model instance will remember where it was originally retrieved from and try to save it back from the same server. Instead of overriding Dataset#server to set the row_proc (which won't be called when using with_server), override row_proc itself, and have it check with the connection pool to get the current server, which works both when using the server_block extension and when not using it.
- Loading branch information