-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
According to the documentation, "the argument to -columns can also be a string instead of an arrayref". Although it's not explicit, the example given implies that the string is then just raw SQL and isn't parsed. Regardless the example does use a comma, and any plain string with commas produces bad SQL. Here is an example script:
#!/usr/bin/env perl
use feature 'say';
use SQL::Abstract::More;
say SQL::Abstract::More
->new(quote_char => '"', name_sep => '.')
->select(
-columns => 'table.a, table.b',
-from => [ 'table' ]
);
The output is:
SELECT "table"."a, table"."b" FROM "table"
Note the "a, table" quoted identifier. The output should be:
SELECT table.a, table.b FROM "table"
Metadata
Metadata
Assignees
Labels
No labels