my ($self, $from) = @_;
if (ref($from) eq 'ARRAY') {
die "Empty FROM list" unless my @f = @$from;
- my $dq = $self->_ident_to_dq(shift @f);
+ my $dq = $self->_table_to_dq(shift @f);
while (my $x = shift @f) {
$dq = {
type => DQ_JOIN,
- join => [ $dq, $self->_ident_to_dq($x) ]
+ join => [ $dq, $self->_table_to_dq($x) ]
};
}
$dq;
},
{
func => 'select',
+ args => [[\'test1', 'test2'], '*', { 'test1.a' => { 'In', ['boom', 'bang'] } }],
+ stmt => 'SELECT * FROM test1, test2 WHERE ( test1.a IN ( ?, ? ) )',
+ stmt_q => 'SELECT * FROM test1, `test2` WHERE ( `test1`.`a` IN ( ?, ? ) )',
+ bind => ['boom', 'bang']
+ },
+ {
+ func => 'select',
args => ['test', '*', { a => { 'between', ['boom', 'bang'] } }],
stmt => 'SELECT * FROM test WHERE ( a BETWEEN ? AND ? )',
stmt_q => 'SELECT * FROM `test` WHERE ( `a` BETWEEN ? AND ? )',