Re: Extending Class::DBI's search abilities
[prev]
[thread]
[next]
[Date index for 2004/07/26]
[email address altered to return to list]
colm-cdbi@xxxxxxxxx.xx.xx wrote:
>>I'm trying to make Class::DBI's searches a little more powerful (I want to
>>add regex-based searches with MySQL, and also to allow multiple
>>constraints on the same column - e.g. "Find me all foo where bar > 3 and
>>bar < 5").
>
> Have you tried Class::DBI::AbstractSearch?
Nope, I wasn't aware of its existence. I'll have a look - cheers.
>>Anyway, where does the sql_Retrieve method get defined? I've grep'd my
>>tree of installed Perl modules, and I can't see it anywhere.
>>I'm not quite sure what it does, and therefore whether I need to use it.
>
> Its auto-generated. It gets defined in Class::DBI like this :
>
> __PACKAGE__->set_sql(Retrieve => <<'');
> SELECT __ESSENTIAL__
> FROM __TABLE__
> WHERE %s
Thanks, if I decide to roll my own (probably won't now), then I'll take a
look.