sql-formatter-org / sql-formatter-org/sql-formatter
Feature request: Support for delimiter
Open
Nobody has claimed this yet.
feature
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 456
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 3
Description
Hi, thank you for creating such a great library.
It would be great if there is an option that we can specify the delimiter so that the formatter can ignore formatting it.
With current formatter, with the following sql text
DELIMITER //
CREATE FUNCTION FortyTwo() RETURNS TINYINT DETERMINISTIC
BEGIN
DECLARE x TINYINT;
SET x = 42;
RETURN x;
END
//
DELIMITER ;
It returns this
DELIMITER / /
CREATE
FUNCTION FortyTwo() RETURNS TINYINT DETERMINISTIC
BEGIN
DECLARE x TINYINT;
SET x = 42;
RETURN x;
END / / DELIMITER;
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 from the formatter entry point and review how the current formatting behavior handles DELIMITER directives and the routine example shown in the issue. Define the expected preserved delimiter syntax and verify the example input produces the intended output; the payload names no specific file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql, typescript
- Domain
- databases, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100