mojolicious / mojolicious/sql-abstract-pg
Please allow this syntax: \[$string, @bind_args] in the table parameter of select
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
This script doesn't show any bound values in the result. But inserting values like this script, inside the ON of the JOIN is a common scenario, so i think this is needed.
use SQL::Abstract::Pg;
use Data::Dumper;
my $abstract = SQL::Abstract::Pg->new;
my $user_id = 10;
my ($sql, @bind) = $abstract->select(
\[ 't1 JOIN t2 ON (t1.id = t2.p_id AND t2.user = ?)', $user_id ],
undef,
);
print Dumper({
sql => $sql,
bind => \@bind,
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing SQL::Abstract::Pg's select handling for the table parameter, using the issue's Perl example as the reproduction case. Run the script and inspect its SQL and bind output; done means the JOIN syntax is accepted and the placeholder's value appears in the returned bind list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100