microsoft / microsoft/vscode-pgsql
Add support for placeholders in queries (%s, %(foo)s, ? etc.)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 395
- Forks
- 33
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 3
Description
Most Postgres connectors support placeholders in queries to be bound during execute time, such as
-- PEP-249: format
select id from products p where p.event_id = %s;
-- PEP-249: pyformat
select id from products p where p.event_id = %(event_id)s
-- PEP-249: qmark
select id from products p where p.event_id = ?
-- PEP-249: named
select id from products p where p.event_id = :event_id
-- PEP-249: numeric
select id from products p where p.event_id = :1
It would be useful if queries containing placeholders could be executed using the PGSQL: Execute PostgreSQL Query command with a way to supply parameters for placeholders, such as
- Ask the user for values via interactive input,
- Open a pane with a table of discovered placeholders and editable cells for values, or
- Open an editor with discovered placeholders in eg. JSON or YAML syntax
Contributor guide
No contributing guide indexed for this repository
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 with the PGSQL: Execute PostgreSQL Query command and inspect how it currently receives and executes query text. Compare the listed placeholder syntaxes and determine which parameter-entry approach should be implemented; done means a supported placeholder query can receive bound values and execute successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, vscode
- Domain
- databases, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100