Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColumnSchema classes for performance of typecasting #277

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Sep 1, 2023

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues yiisoft/db#737

@what-the-diff
Copy link

what-the-diff bot commented Sep 1, 2023

PR Summary

  • Introduced a New File & Class for MSSQL Binary Column Schema
    The new file BinaryColumnSchema.php has introduced a new class BinaryColumnSchema specifically designed for handling binary columns in MSSQL databases. This provides a more specific way to typecast database columns.

  • Major Update to ColumnSchema File
    The ColumnSchema.php file has seen several alterations in this PR including:

    • Introduction of deprecation warnings encouraging use of individual classes for different column types.
    • Deprecation of the ColumnSchemaInterface interface.
    • Addition of size, precision, and scale properties providing detailed information about the column schema.
    • Revisions to loadColumnSchema and normalizeDefaultValue methods improving their efficiency.
    • Introduction of more accurate column schema generation based on PHP types.
  • Changes in the Schema File
    This PR also brings substantial updates to the Schema.php file, primarily focusing on enhancing methods related to the column schema. This includes detailed property settings, improved default value normalization, creation of column schemas based on PHP types, and several methods for data type abstraction.

  • Additions to ColumnSchemaTest
    A couple of vital updates have been made to the ColumnSchemaTest.php file. These include replacement of the PHPUnit framework test case, tests for the new BinaryColumnSchema class, and checks for specific column types and predefined types.

  • New ColumnSchemaProvider File
    This PR introduces a new file called ColumnSchemaProvider.php which aims to override predefined types and dbTypecast columns with the BinaryColumnSchema class, providing a higher degree of specificity for handling MSSQL binary columns.

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Attention: Patch coverage is 85.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 96.56%. Comparing base (dc65f9e) to head (98dd564).

Current head 98dd564 differs from pull request most recent head 40d6c00

Please upload reports for the commit 40d6c00 to get more accurate results.

Files Patch % Lines
src/Schema.php 81.81% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #277      +/-   ##
============================================
- Coverage     98.10%   96.56%   -1.54%     
- Complexity      218      224       +6     
============================================
  Files            17       16       -1     
  Lines           632      640       +8     
============================================
- Hits            620      618       -2     
- Misses           12       22      +10     

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

@Tigrov Tigrov marked this pull request as ready for review September 1, 2023 15:37
@Tigrov Tigrov added the status:under development Someone is working on a pull request. label Jan 31, 2024
@Tigrov Tigrov added status:code review The pull request needs review. and removed status:under development Someone is working on a pull request. labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant