X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FAbstract.pm;h=9e5bb5239e081905aec8663bce68e8a87e7c7d08;hb=3d86e3b17c0fc37a393b6b91936da222128ded56;hp=2041fa61cc2f85694d217f19f47f491f67bd5e77;hpb=a0d6d3230359880681d5d328d6b1775c0fbe5983;p=dbsrgits%2FSQL-Abstract.git diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 2041fa6..9e5bb52 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -556,7 +556,7 @@ sub _where_unary_op { } } - $self->debug("Generic unary OP: $op - recursing as function"); + $self->_debug("Generic unary OP: $op - recursing as function"); $self->_assert_pass_injection_guard($op); @@ -2075,13 +2075,13 @@ To get an OR instead, you can combine it with the arrayref idea: my %where => ( user => 'nwiger', - priority => [ {'=', 2}, {'!=', 1} ] + priority => [ { '=', 2 }, { '>', 5 } ] ); Which would generate: - $stmt = "WHERE user = ? AND priority = ? OR priority != ?"; - @bind = ('nwiger', '2', '1'); + $stmt = "WHERE ( priority = ? OR priority > ? ) AND user = ?"; + @bind = ('2', '5', 'nwiger'); If you want to include literal SQL (with or without bind values), just use a scalar reference or array reference as the value: @@ -2739,9 +2739,9 @@ apps in under 50 lines. =over -=item * gitweb: L +=item * gitweb: L -=item * git: L +=item * git: L =back