damil / SQL-Abstract-More

extension to SQL-Abstract with named parameters and support for several additional SQL clauses
https://metacpan.org/pod/SQL::Abstract::More
6 stars 10 forks source link

Bad interaction between quoting and joins #10

Closed jrouzierinverse closed 7 years ago

jrouzierinverse commented 7 years ago

I found an issue when using quote_char and the join spec.

use SQL::Abstract::More;
my $sqla = SQL::Abstract::More->new(quote_char => '`');
my ($sql, @bind) = $sqla->select(-from => [-join => qw(t1 =>{a=a} t2)]);

SQL produced SELECT * FROM t1 LEFT OUTER JOIN t2 ON ( `t1.a` = `t2.a` ) SQL expected SELECT * FROM t1 LEFT OUTER JOIN t2 ON ( `t1`.`a` = `t2`.`a` )

Do you know of any work around for this issue?

sezal commented 7 years ago

it might be related with https://github.com/damil/SQL-Abstract-More/pull/6