db-mssql
db-mssql copied to clipboard
ColumnSchema classes for performance of typecasting
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ✔️ |
Fixed issues | yiisoft/db#737 |
PR Summary
-
Introduced a New File & Class for MSSQL Binary Column Schema The new file
BinaryColumnSchema.php
has introduced a new classBinaryColumnSchema
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
, andscale
properties providing detailed information about the column schema. - Revisions to
loadColumnSchema
andnormalizeDefaultValue
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 newBinaryColumnSchema
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 theBinaryColumnSchema
class, providing a higher degree of specificity for handling MSSQL binary columns.
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
).
:exclamation: 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 :warning: |
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.