{
type => 'Identifier',
- element1 => Scalar,
- element2 => Scalar,
- element3 => Scalar,
+ elements => [ Scalar ],
}
-If element3 exists, then element2 must exist. element1 must always exist. If a
-given element exists, then it must be defined and of non-zero length.
+All values in elements must be defined.
Visitors are expected to, by default, quote all identifiers according to the SQL
dialect's quoting scheme.
=over 4
-=item * SELECT
+=item * select
=over 4
=item * tables
-=item * columns
-
-=item * values
+=item * set
=back
type => 'Operator',
op => '< LEFT|RIGHT|FULL [ OUTER ] > | INNER | CROSS',
on => Expression,
+ args => [ Expression ],
}
A USING clause is syntactic sugar for an ON clause and, as such, is not provided
This corresponds to the SET clause in an INSERT or UPDATE statement.
-A set clause unit is an array of one or more SetComponent units.
-
-The hash for SetComponent unit is composed as follows:
+The hash for an set clause will be composed as follows:
{
- type => 'SetComponent',
- col => Identifier,
- value => Expression,
+ type => 'Set',
+ args => [
+ [ Identifier ],
+ [ Expresion ],
+ ],
}
-=head3 columns
-
-This corresponds to the optional list of columns in an INSERT statement.
-
-A columns clause unit is an array of one or more Identifier units.
-
-=head3 values
-
-This corresponds to the VALUES clause in an INSERT statement.
-
-A values clause unit is an array of one or more Expression units.
-
-If there is a columns clause, the number of entries in the values clause must be
-equal to the number of entries in the columns clause.
+The args is an array that is organized as follows: The first element is an array of
+Identifiers for the columns being set. The following arrays are Expressions describing
+the values. The various arrays should be the same length. The array of Identifiers can
+be omitted.
=head3 orderby
=item * INSERT INTO <table> SET ...
+=item * UPDATE foo me SET bar = 1 FROM fnord f WHERE me.col1 = f.frobinator
+
+=item * INSERT moves to using the SET terminology with Visitor dwimming
+
=back
+Convert INSERT and UPDATE into ->populate form.
+
=head1 AUTHORS
robkinyon: Rob Kinyon C<< <rkinyon@cpan.org> >>