Support DateTime instances
Support for array of datetimes will be added after review of #303. Some functionality for casting array values is presented there.
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ✔️ |
| Breaks BC? | ✔️ |
| Fixed issues | #725 |
PR Summary
-
Enhancement to the
ColumnSchemaClass A new function calledhasTimezone()has been included to allow the program to check if a specific database column utilizes a timezone. -
Revamp of the
SchemaClass- The property name
numeric_precisionhas been simplified toprecisionfor easier usage. - Integration of the
abstimedata type support has been enforced to handle absolute time data types. - The
findColumnsfunction was adjusted to retrieve both precision variations (numeric_precisionand justprecision) from the database. - The
loadColumnSchemafunction has been revamped to set the columnprecisionproperty. - Introduced a new function
getDateTimeFormatto figure out the format of date/time associated columns.
- The property name
-
Testing and Validation
- The testing class,
ColumnSchemaTest, now includes tests for the new date/time columns and verification of their type casting.
- The testing class,
-
Improvements in the
SchemaProviderClass- The class now includes definitions for the newly added date/time columns.
-
Changes in the
pgsql.sqlFixture File- Newly added columns catering for timestamp, timestamptz, date, and time data types have been incorporated.
- Default values for certain columns have been adjusted.
Codecov Report
Patch coverage: 100.00% and no project coverage change.
Comparison is base (
5359753) 100.00% compared to head (6af8302) 100.00%.
Additional details and impacted files
@@ Coverage Diff @@
## master #308 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 200 202 +2
===========================================
Files 13 13
Lines 598 602 +4
===========================================
+ Hits 598 602 +4
| Files Changed | Coverage Δ | |
|---|---|---|
| src/ColumnSchema.php | 100.00% <100.00%> (ø) |
|
| src/Schema.php | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.