sql-formatter-org / sql-formatter-org/sql-formatter

Feature Request: Detect / Format parameters included in SQL statement

Open
#768 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
2.9k
Forks
456
Avg merge
3d 4h
Merged PRs (30d)
3

Description

Describe the Feature
Detect / Format parameters included in SQL statement

Such as
SELECT * FROM test = ?
parameters: ['foo']

Why do you want this feature?
Some tools / logging output queries with the parameters listed at the end of the statement, this enhancement would allow formatting this type of SQL anywhere without direct access to the API, like in VSCode for example.

I'm happy to help with the code on this if its likely to be merged as a pull request.

Contributor guide

Open the contributing guide

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

No file, test, or entry point is named. Start by clarifying the accepted parameter-list syntax, supported SQL dialects, and expected formatted output, then inspect the formatter's existing parsing and formatting entry points. Done means parameterized statements can be recognized and formatted consistently without direct API access.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql, typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.