From: Matt S Trout Date: Mon, 30 Sep 2019 19:27:46 +0000 (+0000) Subject: doc ident and value op expanders X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FQ-Branch.git;a=commitdiff_plain;h=662bd62324f98cd0bc4a70bbb01d17629f7ec44b doc ident and value op expanders --- diff --git a/lib/SQL/Abstract/Reference.pm b/lib/SQL/Abstract/Reference.pm index 343f60a..771d222 100644 --- a/lib/SQL/Abstract/Reference.pm +++ b/lib/SQL/Abstract/Reference.pm @@ -883,4 +883,33 @@ Expands is and is_not to null checks, RHS value must be undef: bar IS NOT NULL [] +=head2 ident op + +Expands a string ident to an arrayref by splitting on the configured +separator, almost always '.': + + # expr + { -ident => 'foo.bar' } + + # aqt + { -ident => [ 'foo', 'bar' ] } + + # query + foo.bar + [] + +=head2 value op + +Expands to a bind node with the currently applicable column name if known: + + # expr + { foo => { '=' => { -value => 3 } } } + + # aqt + { -op => [ '=', { -ident => [ 'foo' ] }, { -bind => [ 'foo', 3 ] } ] } + + # query + foo = ? + [ 3 ] + =cut