Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FORMATTING] Missing space/new line with DELIMITER #229

Closed
inferrinizzard opened this issue Jun 8, 2022 · 1 comment
Closed

[FORMATTING] Missing space/new line with DELIMITER #229

inferrinizzard opened this issue Jun 8, 2022 · 1 comment
Labels

Comments

@inferrinizzard
Copy link
Collaborator

<Transferred from inferrinizzard#72, inferrinizzard#73>

Describe the bug
When using a DELIMITER there is an erroneous output. Try to format the following code:

DELIMITER $$

CREATE PROCEDURE sp_name()
BEGIN
  -- statements
END $$

DELIMITER ;

Expected Output

DELIMITER $$
CREATE PROCEDURE sp_name()
BEGIN
    -- statements
END $$
DELIMITER ;

Actual Output
There is no new line after BEGIN, but most importantly there is no space or even better a new line after END $$ and a space after DELIMITER.

DELIMITER $$
CREATE PROCEDURE sp_name()
BEGIN -- statements
END $$DELIMITER;

Usage

  • How are you calling / using the script? (Please provide a code snippet, if applicable)
    prettier-sql -l mariadb -o with_delimiter.sql with_delimiter_formatted.sql
  • What SQL language(s) does this apply to?
    MariaDB, MySQL
  • What Node version?
    16
@inferrinizzard inferrinizzard changed the title [FORMATTING] Issue Title Here [FORMATTING] Missing space/new line with DELIMITER Jun 8, 2022
@nene
Copy link
Collaborator

nene commented Jun 8, 2022

Delimiter is currently not supported. Closing this as duplicate of #184

@nene nene closed this as not planned Won't fix, can't repro, duplicate, stale Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants