db-oracle icon indicating copy to clipboard operation
db-oracle copied to clipboard

Support DateTime instances

Open Tigrov opened this issue 2 years ago • 3 comments

Support for the time type with test coverage will be added after review of #230

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues #725

Tigrov avatar Aug 05 '23 13:08 Tigrov

PR Summary

  • Enhanced ColumnSchema class with a new method This change introduces a phpTypecast method to the ColumnSchema class, paving the way for a more versatile use of the class in different scenarios.

  • Enhanced Connection class We've added a new method initConnection to the Connection class. This would help in setting up the initial configurations for the database connection with ease.

  • Advanced datetime handling Through the addition of getDateTimeFormat in the Schema class and modifying the createColumnSchema method, we're now more adept in handling time and date data types. The normalizeDefaultValue modification further optimizes how we handle default values for timestamps.

  • Improved testing We're enforcing code quality and reliability by introducing new tests to ColumnSchemaTest and SchemaProvider. These additions ensure our methods for handling different column types and their attributes are thoroughly checked.

  • Updated SQL fixture The oci.sql fixture file has seen changes, too, to support columns with different default values for timestamps and dates. This change makes our test data align better with the real-world scenarios.

what-the-diff[bot] avatar Aug 05 '23 13:08 what-the-diff[bot]

Codecov Report

Patch coverage: 97.05% and project coverage change: -0.08% :warning:

Comparison is base (744eb43) 98.29% compared to head (1269d82) 98.21%. Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #231      +/-   ##
============================================
- Coverage     98.29%   98.21%   -0.08%     
- Complexity      186      194       +8     
============================================
  Files            16       16              
  Lines           585      617      +32     
============================================
+ Hits            575      606      +31     
- Misses           10       11       +1     
Files Changed Coverage Δ
src/ColumnSchema.php 92.85% <83.33%> (-7.15%) :arrow_down:
src/Connection.php 97.22% <100.00%> (+0.55%) :arrow_up:
src/Schema.php 100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 05 '23 13:08 codecov[bot]

Need restore code coverage

Yes, mentioned about this in the description:

Support for the time type with test coverage will be added after review of #230

Tigrov avatar Aug 06 '23 12:08 Tigrov