Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Nov 25, 2025

Q A
Is bugfix?
New feature?
Breaks BC? ✔️

Related to yiisoft/db#1108

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.48%. Comparing base (ce14515) to head (2ca850c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #405      +/-   ##
============================================
+ Coverage     98.45%   98.48%   +0.03%     
- Complexity      326      328       +2     
============================================
  Files            22       23       +1     
  Lines          1035     1058      +23     
============================================
+ Hits           1019     1042      +23     
  Misses           16       16              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a ColumnDefinitionParser implementation for the SQLite database driver, which is part of refactoring to support parsing column definition strings into structured information. The parser extends AbstractColumnDefinitionParser from the yiisoft/db package and implements SQLite-specific type parameter parsing logic.

Key changes:

  • Introduces ColumnDefinitionParser class that handles parsing of column type parameters for SQLite-specific types
  • Integrates the parser into ColumnFactory via the columnDefinitionParser() method
  • Adds corresponding test coverage via ColumnDefinitionParserTest

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/Column/ColumnDefinitionParser.php New parser class implementing SQLite-specific column definition parsing logic with support for size/precision parameters on various data types
src/Column/ColumnFactory.php Adds columnDefinitionParser() method that returns the new ColumnDefinitionParser instance
tests/ColumnDefinitionParserTest.php Test class extending common test suite to verify parser functionality
CHANGELOG.md Documents the addition of the new ColumnDefinitionParser class

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

vjik and others added 2 commits November 26, 2025 00:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vjik vjik requested review from a team and samdark November 25, 2025 21:36
@vjik vjik added the status:code review The pull request needs review. label Nov 25, 2025
Comment on lines +13 to +32
return match ($type) {
'bit',
'char',
'datetime',
'datetimetz',
'decimal',
'double',
'float',
'int',
'numeric',
'real',
'smallint',
'string',
'time',
'timestamp',
'timetz',
'tinyint',
'varchar' => $this->parseSizeInfo($params),
default => [],
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's right to limit the number of possible types for parsing. What about integer, bigint, varbit, character, etc. Sqlite supports various type names.

@vjik vjik added status:under development Someone is working on a pull request. and removed status:code review The pull request needs review. labels Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:under development Someone is working on a pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants