Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented Jul 1, 2025

This PR performs a structural refactoring of the formatter code in preparation for merging into the main development branch. The purpose is to improve maintainability and prepare for future syntax support.

Changes Included:

Modularization of block classes

The formatter’s internal block classes have been split to support more granular syntax rules (e.g., upcoming features for new SQL constructs).

Introduction of SqlBlockFormattingContext

Constructor parameters for block classes are now consolidated into a single context class (SqlBlockFormattingContext) for better readability and manageability.

Child block properties based on query structure

Properties representing child blocks have been added to each block class to better reflect the structural relationship within SQL queries.
(Note: actual usage of these properties will be implemented in a separate PR.)

Package reorganization

Relevant classes have been moved to new packages to improve modular separation.

Notes:

This PR includes some unused classes and methods that will be utilized in future formatter functionality.

No functional changes to formatting output are introduced at this stage.

This is a preparatory step for cleaner, extensible formatter development.

@github-actions github-actions bot added the chore label Jul 1, 2025
@xterao xterao self-assigned this Jul 1, 2025
@xterao xterao merged commit 5a5d382 into feature/sql-format-official-version Jul 1, 2025
5 checks passed
@xterao xterao deleted the chore/sql-format-refactor-block-class branch July 1, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants