othercorey

Results 200 comments of othercorey

> I think we would want a way to get the read/write connection for a table and use it. Something like > > ``` > $users->getConnectionFor('read')->transactional(function () { > //...

> Cycle ORM has a `Database` class (which is equivalent to our `Connection`) with multiple drivers. `Database::getDriver()` allows specifying the type (role) read or write. Our `Driver` owns the PDO...

Generating other connections with a name that are accessible via ConnectionManager feels a little strange. However, most users shouldn't notice that and don't think we need to document that behavior....

I'm still not sure what's supposed to happen when you call `transactional()` on `default` connection if it has read and write roles.

> Cycle defaults to [write](https://github.com/cycle/database/blob/b96ecc8fe74cefd92756f7ed579d9bf2c804bbe2/src/Database.php#L254-L257). That makes sense. What should happen if a user gets `default-read` and tries to start a transaction on it? It should throw a PDO exception...

Should the read and write roles share a schema cache or maintain separate copies?

Current proposal: https://github.com/markstory/cakephp/wiki/Minimal-Database-Replication-API

Closing in favor of https://github.com/cakephp/cakephp/issues/16579

@markstory https://github.com/cakephp/cakephp/runs/7241530731?check_suite_focus=true#step:18:175