From: Matt S Trout Date: Mon, 30 Sep 2019 17:43:50 +0000 (+0000) Subject: document func expander X-Git-Tag: v2.000000~3^2~85 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=392d843161e32763b00f56d14a669fb98d5710f8;p=dbsrgits%2FSQL-Abstract.git document func expander --- diff --git a/lib/SQL/Abstract/Reference.pm b/lib/SQL/Abstract/Reference.pm index 4752cbe..b030f39 100644 --- a/lib/SQL/Abstract/Reference.pm +++ b/lib/SQL/Abstract/Reference.pm @@ -695,4 +695,21 @@ not, expands the argument values: foo = ? [ 3 ] +=head2 func + +Expands the argument values: + + # expr + { -func => [ 'coalesce', { -ident => 'thing' }, 'fallback' ] } + + # aqt + { -func => [ + 'coalesce', { -ident => [ 'thing' ] }, + { -bind => [ undef, 'fallback' ] }, + ] } + + # query + COALESCE(thing, ?) + [ 'fallback' ] + =cut