From: Matt S Trout Date: Sat, 28 Sep 2019 03:00:16 +0000 (+0000) Subject: add docs on is dwim for undef values X-Git-Tag: v2.000000~3^2~105 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad8a182d45f558721ec3d911df98ec97ca4b774b;p=dbsrgits%2FSQL-Abstract.git add docs on is dwim for undef values --- diff --git a/lib/SQL/Abstract/Reference.pm b/lib/SQL/Abstract/Reference.pm index 6075f4c..1f9dd33 100644 --- a/lib/SQL/Abstract/Reference.pm +++ b/lib/SQL/Abstract/Reference.pm @@ -279,6 +279,19 @@ an expander has been registered for that node type: id OP ? [ 'value' ] +If the value is undef, attempts to convert equality and like ops to IS NULL, +and inequality and not like to IS NOT NULL: + + # expr + { id => { '!=' => undef } } + + # aqt + { -op => [ 'is_not_null', { -ident => [ 'id' ] } ] } + + # query + id IS NOT NULL + [] + =head3 identifier hashpair w/simple value Equivalent to a hashtriple with an op of '='.