Skip to content

Comments

Reorganize SQLitePlatform comment methods#7172

Merged
morozov merged 1 commit intodoctrine:4.4.xfrom
morozov:sqlite-reorg-comment-methods
Oct 7, 2025
Merged

Reorganize SQLitePlatform comment methods#7172
morozov merged 1 commit intodoctrine:4.4.xfrom
morozov:sqlite-reorg-comment-methods

Conversation

@morozov
Copy link
Member

@morozov morozov commented Oct 6, 2025

The affected SQLite platform methods are a bit convoluted:

  1. The private method getInlineTableCommentSQL() delegates to getInlineColumnCommentSQL() just because their implementations are identical. However, tables and columns are different database objects.
  2. getInlineTableCommentSQL() is a one-liner invoked from a single place, so there is no point in declaring it as a separate method to begin with.

Instead, now the implementation method is private and is name getInlineCommentSQL() (agnostic of the object type). It is is invoked from the table- and column-related methods.

@morozov morozov added this to the 4.4.0 milestone Oct 6, 2025
@morozov morozov changed the title Reorganize SQLitePlatform inline comment methods Reorganize SQLitePlatform comment methods Oct 6, 2025
The affected SQLite platform methods are a bit convoluted:
1. The private method `getInlineTableCommentSQL()` delegates to
   `getInlineColumnCommentSQL()` just because their implementations are
   identical. However, tables and columns are different database
   objects.
2. `getInlineTableCommentSQL()` is a one-liner invoked from a single
   place, so there is no point in declaring it as a separate method to
   begin with.

Instead, now the implementation method is private and is name
`getInlineCommentSQL()` (agnostic of the object type). It is is invoked
from the table- and column-related methods.
@morozov morozov force-pushed the sqlite-reorg-comment-methods branch from 4be14b0 to 7a96f6c Compare October 6, 2025 20:55
@morozov morozov requested a review from greg0ire October 7, 2025 07:26
@morozov morozov merged commit e7ef5c1 into doctrine:4.4.x Oct 7, 2025
96 checks passed
@morozov morozov deleted the sqlite-reorg-comment-methods branch October 7, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants