Skip to content

Incorrect Indentation for Subqueries in Conditions #427

@xterao

Description

@xterao

Describe the bug
When using a subquery inside a conditional expression, the indentation between the operator and the subquery is incorrect.

The subquery after the operator = is not indented consistently with formatting rules, causing uneven alignment in the SQL structure.

Example

DELETE FROM user_session s
 WHERE s.count = ( SELECT COUNT(*)
           FROM user u
          WHERE u.id = /* id */1
            AND u.session_id = u.id
            AND u.time_stamp < /* current */'2099-12-31 00:00:00' )

Expected behavior
The subquery should follow proper indentation rules so that SELECT, FROM, and WHERE statements inside it are aligned consistently under the opening parenthesis.

Desktop :

  • IDEA Version : 2024.3.6
  • Doma Tools Version : 2.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions