mcfunley / mcfunley/pugsql

Use SQL comment line for parameter hint to retain .sql usability

Open
#43 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
777
Forks
31
PR merge metrics
No merged PRs in 30d

Description

Enhancement Request: Currently, to make existing .sql files usable by pugSQL, one needs to "corrupt" them by injecting :myVar references into the SQL queries, thus invalidating them as usable .sql files.

I feel like this is a missed opportunity, as it would have been nicer / more elegant, if one simply could have just annotated them via the comment line (--) providing hints as to the variable to use (ie: parse for in the subsequent line(s)) to maintain the usability of the original .sql file.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating pugSQL's SQL parsing and parameter-extraction code, then determine how SQL comment hints should apply to subsequent queries and verify that existing .sql files remain usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.