Re: Flesh groups on search (was Re: [CDBI] Re: Make CDBI go fast)

"Edward J. Sabol" <sabol-2oVx0MVsMgiP/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Michael Schwern suggested:
>>> my @objects = CDBI->search( col => 42, { flesh_out => \@groups } );
>>>
>>> Which, in one query, will select the columns in the essential group
>>> and any additional columns in the given @groups.

Ed Sabol wrote:
>> Honestly, this doesn't sound all that useful, but I don't see the harm, I
>> guess. Personally, I would just put these other columns in the Essential
>> group in the first place.

Michael Schwern replied:
> That's static. It requires you know beforehand how every object in your
> class is going to be used and that its going to be used the same way every
> time everywhere by everyone.

Yeah, but ~90% of the time, I think you do know exactly how your CDBI classes
are used, such as in a standard MVC design pattern where you have specific
Controller classes interacting with your CDBI (Model) classes.

I'm not saying it would never be useful; I'm just saying that the cases where
it would be useful are somewhat esoteric and I'm not sure it's worth the
effort. That's just my view point. If it scratches your itch though, go for
it.

Later,
Ed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.