Re: Class::DBI::Set
[prev]
[thread]
[next]
[Date index for 2004/06/28]
hi Yuval--
funny, i was just going to post a question along these lines. i'm
wondering how i can setup CDBI so that i can do something like this:
my $Everything = Tracks->search_like(name => '%something') &
Artists->search_like(name => '%else')
so that $Everything will give me all the tracks that have a name like
'%something' that were made by artists with a name like '%else'. how
are people doing this? it's not so useful for me to just search on one
table. Especially b/c i'd like to be able to this:
my $tracks = find_tracks(track_name => '%something', artist_name =>
'$else');
steve
On Jun 25, 2004, at 11:08 AM, Yuval Kogman wrote:
> Howdy...
>
> I'll be needing this for my project.
>
> my $smiths = Class::DBI::Set->new;
> $smiths->contraints( surname => "Smith" );
>
> my $johns = Class::DBI::Set->new;
> $johns->constraints( name => "John" );
>
> my $john_smiths = $john & $smith;
> $john_smiths->retrieve_all;
>
> Just your plain old, simple sets with CDBI. It should be a nice
> project.
> But now the catch.
>
> I want to store a set in a database. As for the schema - i'm not
> worried. I'll cross that bridge when I get there. But how silly is it
> to
> start wrapping CDBI class methods so that that when it's a class method
> it SUPER::method's, and when it's an object method it does the set
> specific operations? Is it better to generate a class per set? Would a
> interface with other method names be better or worse? (less conflicts
> is
> also less consistent). Is there any way to get this right at all? Has
> anybody tried this before?
>
> See also http://www.thelackthereof.org/wiki.pl/SetDB
>
> --
> () Yuval Kogman <nothingmuch@xxxxxxxx.xxx> 0xEBD27418 perl hacker &
> /\ kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!!!!!!!!!
>
|
|
Re: Class::DBI::Set
steve shapero 08:19 on 28 Jun 2004
|