vapor / fluent-kit

Swift ORM (queries, models, and relations) for NoSQL and SQL databases
MIT License
218 stars 116 forks source link

added some missing `CustomStringConvertible` conformances #568

Closed RandomHashTags closed 1 year ago

RandomHashTags commented 1 year ago

Some properties already conform to this protocol, but I found some that do not. This fixes a case where getting the description of an AnyProperty will not be in the correct format, and also missing the key.

Changes

Examples

Unit Testing

codecov-commenter commented 1 year ago

Codecov Report

Merging #568 (3e51559) into main (2d7dce5) will decrease coverage by 0.25%. The diff coverage is 0.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #568 +/- ## ========================================== - Coverage 47.53% 47.29% -0.25% ========================================== Files 106 106 Lines 4706 4730 +24 ========================================== Hits 2237 2237 - Misses 2469 2493 +24 ``` | [Impacted Files](https://app.codecov.io/gh/vapor/fluent-kit/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [Sources/FluentKit/Enum/EnumProperty.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvRW51bS9FbnVtUHJvcGVydHkuc3dpZnQ=) | `54.90% <0.00%> (-2.25%)` | :arrow_down: | | [Sources/FluentKit/Enum/OptionalEnumProperty.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvRW51bS9PcHRpb25hbEVudW1Qcm9wZXJ0eS5zd2lmdA==) | `67.74% <0.00%> (-2.26%)` | :arrow_down: | | [Sources/FluentKit/Properties/Boolean.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvUHJvcGVydGllcy9Cb29sZWFuLnN3aWZ0) | `0.00% <0.00%> (ø)` | | | [...s/FluentKit/Properties/BooleanPropertyFormat.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvUHJvcGVydGllcy9Cb29sZWFuUHJvcGVydHlGb3JtYXQuc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [Sources/FluentKit/Properties/OptionalBoolean.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvUHJvcGVydGllcy9PcHRpb25hbEJvb2xlYW4uc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [Sources/FluentKit/Properties/OptionalField.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvUHJvcGVydGllcy9PcHRpb25hbEZpZWxkLnN3aWZ0) | `79.71% <0.00%> (-2.38%)` | :arrow_down: |
RandomHashTags commented 1 year ago

Closing due to the CustomStringConvertible property conformance and associated implementation not really meaning to be there. A more accurate reasoning would be: I hold the same opinion shared by Gwynne during discussion.

While I do support this pull request, I will not continue pursuing implementation due to it being a legacy design.