bomb.status = ?
[ 'unexploded' ]
-Not:
+
+Prefix unop:
+
+ # expr
+ { -op => [ '-', { -ident => 'foo' } ] }
+
+ # query
+ - foo
+ []
+
+Not as special case parenthesised unop:
# expr
{ -op => [ 'not', { -ident => 'explosive' } ] }
VALUES (1, 2), (3, 4)
[]
+=head2 keyword
+
+ # expr
+ { -keyword => 'insert_into' }
+
+ # query
+ INSERT INTO
+ []
+
=head2 statement types
AQT node types are also provided for C<select>, C<insert>, C<update> and
id OP ?
[ 'value' ]
+If the value is undef, attempts to convert equality and like ops to IS NULL,
+and inequality and not like to IS NOT NULL:
+
+ # expr
+ { id => { '!=' => undef } }
+
+ # aqt
+ { -op => [ 'is_not_null', { -ident => [ 'id' ] } ] }
+
+ # query
+ id IS NOT NULL
+ []
+
=head3 identifier hashpair w/simple value
Equivalent to a hashtriple with an op of '='.
=head2 arrayref expr
+An arrayref becomes a C<-or> over its contents. Arrayrefs, hashrefs and
+literals are all expanded and added to the clauses of the C<-or>. If the
+arrayref contains a scalar it's treated as the key of a hashpair and the
+next element as the value.
+
+ # expr
+ [ { x => 1 }, [ { y => 2 }, { z => 3 } ], 'key', 'value', \"lit()" ]
+
+ # aqt
+ { -op => [
+ 'or',
+ { -op => [ '=', { -ident => [ 'x' ] }, { -bind => [ 'x', 1 ] } ] },
+ { -op => [
+ 'or', {
+ -op => [ '=', { -ident => [ 'y' ] }, { -bind => [ 'y', 2 ] } ]
+ }, {
+ -op => [ '=', { -ident => [ 'z' ] }, { -bind => [ 'z', 3 ] } ]
+ },
+ ] }, { -op =>
+ [
+ '=', { -ident => [ 'key' ] },
+ { -bind => [ 'key', 'value' ] },
+ ]
+ },
+ { -literal => [ 'lit()' ] },
+ ] }
+
+ # query
+ ( x = ? OR ( y = ? OR z = ? ) OR key = ? OR lit() )
+ [ 1, 2, 3, 'value' ]
+
+=head1 Default Expanders
+
+=head2 bool
+
+Turns the old -bool syntax into the value expression, i.e.
+
+ # expr
+ { -bool => { -ident => 'foo' } }
+
+ # aqt
+ { -ident => [ 'foo' ] }
+
+ # query
+ foo
+ []
+
+behaves the same way as the now-directly-supported
+
+ # expr
+ { -ident => 'foo' }
+
+ # aqt
+ { -ident => [ 'foo' ] }
+
+ # query
+ foo
+ []
+
+=head2 row
+
+Expands the elements of the value arrayref:
+
+ # expr
+ { -row => [ 1, { -ident => 'foo' }, 2, 3 ] }
+
+ # aqt
+ { -row => [
+ { -bind => [ undef, 1 ] }, { -ident => [ 'foo' ] },
+ { -bind => [ undef, 2 ] }, { -bind => [ undef, 3 ] },
+ ] }
+
+ # query
+ (?, 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