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-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f4493cb09db57441423bebf0a4df40b0a3ebfd4;p=scpubgit%2FQ-Branch.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 '='.