From: Matt S Trout Date: Mon, 30 Sep 2019 17:40:39 +0000 (+0000) Subject: document op expander X-Git-Tag: v2.000000~3^2~86 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=077e39e1caeeef7b68a5504a756103b7372c4481;p=dbsrgits%2FSQL-Abstract.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