From: Matt S Trout Date: Mon, 30 Sep 2019 17:40:39 +0000 (+0000) Subject: document op expander X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f2b472371e4669fb2fc3685a7426b5c4b0f522d2;p=scpubgit%2FQ-Branch.git document op expander --- diff --git a/lib/SQL/Abstract/Reference.pm b/lib/SQL/Abstract/Reference.pm index 67567cc..4752cbe 100644 --- a/lib/SQL/Abstract/Reference.pm +++ b/lib/SQL/Abstract/Reference.pm @@ -670,4 +670,29 @@ Expands the elements of the value arrayref: (?, foo, ?, ?) [ 1, 2, 3 ] +=head2 op + +If an expander is registered for the op name, delegates to the expander; if +not, expands the argument values: + + # expr + { -op => [ 'ident', 'foo.bar' ] } + + # aqt + { -ident => [ 'foo', 'bar' ] } + + # query + foo.bar + [] + + # expr + { -op => [ '=', { -ident => 'foo' }, 3 ] } + + # aqt + { -op => [ '=', { -ident => [ 'foo' ] }, { -bind => [ undef, 3 ] } ] } + + # query + foo = ? + [ 3 ] + =cut