[Dbix-class] Master/Slave Replication (again)
Matt S Trout
dbix-class at trout.me.uk
Fri Jan 11 18:18:57 GMT 2008
On Thu, Jan 10, 2008 at 02:19:49PM +0000, Aaron Trevena wrote:
> Hi J,
>
> The current system has been updated to accept an argument when getting
> a connection as to whether it should be using master or slave.
>
> This works well as it's transparent in the application as to which is
> being used as there are many cases where data having been just been
> writen will immediately be read again - such as creating, then
> confirming new records, etc.
>
> I can see how to do this in class::dbi - I'd pass the the 'use master'
> flag down to the point where it get's the connection. I can't see how
> I would do this with DBIx::Class - any suggestions as to how that
> could/should work or equivilent alternatives would be much
> appreciated.
Same principle should work.
DBIC tends to pass along any attribute it doesn't recognise at a given stage,
so unknown resultset attributes should make it all the way to storage and
you can grab 'em there and act appropriately.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the DBIx-Class
mailing list