[CDBI] simplest way to do WHERE stuff

Eamon Daly edaly at nextwavemedia.com
Tue Nov 29 23:26:58 GMT 2005


Quick question: I'm doing a lot of stuff like this with
Class::DBI::AbstractSearch:

@i = My::Foo->search_where
  ({ '-or' => [ 'foo' => 'x', 'bar' => 'x' ] });

...which throws an error using Sweet (can't find column
'-or'). Is there a Sweet-ism for doing OR searches that I'm
missing?

____________________________________________________________
Eamon Daly



----- Original Message ----- 
From: "Matt S Trout" <dbix-class at trout.me.uk>
To: "Peter Speltz" <peterspeltz at gmail.com>
Cc: <classdbi at svr02.digitalcraftsmen.net>
Sent: Tuesday, November 29, 2005 11:08 AM
Subject: Re: [CDBI] simplest way to do WHERE stuff


> On Mon, Nov 28, 2005 at 09:09:19PM -0600, Peter Speltz wrote:
>> The simplest is Class::DBI::AbstractSearch. From synopsis:
>>
>> my @music = CD::Music->search_where(
>>       artist => [ 'Ozzy', 'Kelly' ],
>>       status => { '!=', 'outdated' },
>>   );
>
> Which will work identically under Sweet, except you can simply do ->search
> and it all works ...
>
> So far as I'm concerned Sweet 0.01 (which I had nothing to do with :)
> obsoleted the various extant Abstract plugins.





More information about the ClassDBI mailing list