From: Matt S Trout Date: Mon, 30 Sep 2019 17:43:50 +0000 (+0000) Subject: document func expander X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FQ-Branch.git;a=commitdiff_plain;h=3c700ca3444b64dccee80083cb0970d63eb7d338 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