[Dbix-class] RFC: DBIx::Class::TypedView (or Is this CPAN worthy?)

Matt S Trout dbix-class at trout.me.uk
Thu Jan 11 22:45:44 GMT 2007


On 11 Jan 2007, at 00:11, Nilson Santos Figueiredo Junior wrote:

> On 1/10/07, Mark Hedges <hedges at ucsd.edu> wrote:
>> Am I wrong that this idea is there are multiple identical tables
>> for the same class of object, and the search methods build
>> unions across the tables and send updates to the correct tables?
>
> Well, in practice, the code I currently have relies on having a view
> that has already been defined as the union across the tables, but the
> updates are then sent to the correct tables. It also has some other
> limitations which I don't remember right now - but it works.
>
> I kind of prefer this approach since having a view can make things
> cleaner since it's another layer of abstraction and is possibly more
> efficient since the database could perform moro thorough optimizations
> but I guess it'd do no harm if it could do both things (i.e. use a
> view or generate the unions).

This is effectively emulating a very simple updatable view at the  
perl level. A switch to say whether it's already deployed to the DB  
so the SELECT can be generated appropriately would seem sane.

-- 
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for  
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for  
details.
+ Help us build a better perl ORM: http://dbix- 
class.shadowcatsystems.co.uk/ +





More information about the Dbix-class mailing list