IntelliJ SQL-Formatter to indent SET after UPDATE
08:01 03 Jun 2024

How can I modify the IntelliJ SQL-Formatter to insert an indent before the SET (after an UPDATE)?

Current code:

UPDATE role
SET is_available = 0
  , is_updated = 1
    WHERE name = 'Admin';

Desired code formatting with indent for SET:

UPDATE role
    SET is_available = 0
      , is_updated = 1
    WHERE name = 'Admin';

My current IntelliJ configuration (codeStyles/Project.xml) is:

    
      
        
    

On the other hand it was no problem to achieve indents for all other code snippets like:

INSERT INTO my_temporary_table (id, value_1, value_2, value_3, value_4)
    VALUES (26, 42 + 1, 42 + 2, 12345, 67890)

or

ALTER TABLE t1
    ADD first  char(1)    DEFAULT 'A' NOT NULL,
    ADD second varchar(2) DEFAULT 'B' NOT NULL,
    ADD third  varchar(160)           NULL;

Basically I want to achieve the SET in the UPDATE is intended like the other statements.

sql intellij-idea code-formatting