Skip to content

[FORMATTING] Confusion between LIMIT keyword and column name #302

Open
@skubot

Description

@skubot

We have a table with a 'limit' column, when inserting into the table sql-formatter indents characters after the column name.

Input data
Which SQL and options did you provide as input?
options = { language: 'postgresql' };

Expected Output

INSERT INTO
  search (
    apples,
    limit,
    pears,
    oranges
  )
values
  (
    '__apples',
    '__limit',
    '__pears',
    '__oranges'
  );

Actual Output

INSERT INTO
  search (
    apples,
    limit
      , pears,
    oranges
  )
values
  (
    '__apples',
    '__limit',
    '__pears',
    '__oranges'
  );

Usage

  • How are you calling / using the library?
    calling inside a Jest snapshot-serializer
  • What SQL language(s) does this apply to?
    postgresql
  • Which SQL Formatter version are you using?
    I'm using v8.0.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions