Len Jaffe wrote:
> In order to have an "AND mydate IS NULL" criterion as part of a query,
> I ende dup having to chain a search_literal() on the end of a search() 
> becuase
> every way I expressed it in the search() criteria hash, I ended up with 
> errors when
> the string literal 'NULL' was bound to the column mydate.

That's because you didn't read the SQL::Abstract docs.

{ mydate => undef }

automatically gets translated to IS NULL.

{ mydate => { '!=', undef } }

automatically gets translated to IS NOT NULL.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to