On Fri Oct 18 06:02:33 2013, TIMB wrote:
Show quoted text> It turned out very simple of course:
>
> perl -MSQL::Abstract -we 'warn SQL::Abstract->new->where({ -not_bool
> => { x => "", y => ""} })'
> WHERE ( (NOT ( f = ? AND y = ? )) ) at -e line 1.
>
> So the point of this ticket is that the "Unary operators: bool"
> section of the docs only gives examples of applying -bool and
> -not_bool to simple boolean fields.
>
> I suggest changing the second example to include a more complex
> expression. Something like:
>
> my %where = (
> -and => [
> -bool => 'one',
> -bool => 'two',
> -not_bool => 'three',
> -not_bool => { priority => [ { '=', 2 }, { '>', 5 } ] },
> ],
> );
Good idea, patched as per:
http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/SQL-Abstract.git;a=commitdiff;h=23401b8
Thanks!