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

Support DateTime instances #308

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Aug 5, 2023

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

@what-the-diff
Copy link

what-the-diff bot commented Aug 5, 2023

PR Summary

  • Enhancement to the ColumnSchema Class
    A new function called hasTimezone() has been included to allow the program to check if a specific database column utilizes a timezone.

  • Revamp of the Schema Class

    • The property name numeric_precision has been simplified to precision for easier usage.
    • Integration of the abstime data type support has been enforced to handle absolute time data types.
    • The findColumns function was adjusted to retrieve both precision variations (numeric_precision and just precision) from the database.
    • The loadColumnSchema function has been revamped to set the column precision property.
    • Introduced a new function getDateTimeFormat to figure out the format of date/time associated columns.
  • Testing and Validation

    • The testing class, ColumnSchemaTest, now includes tests for the new date/time columns and verification of their type casting.
  • Improvements in the SchemaProvider Class

    • The class now includes definitions for the newly added date/time columns.
  • Changes in the pgsql.sql Fixture 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
Copy link

codecov bot commented Aug 5, 2023

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%> (ø)

☔ 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 August 5, 2023 16:17
@Tigrov Tigrov marked this pull request as draft August 17, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant