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

Edward J. Sabol sabol at alderaan.gsfc.nasa.gov
Fri Feb 16 06:23:55 GMT 2007


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



More information about the ClassDBI mailing list