vapor / sql-kit

*️⃣ Build SQL queries in Swift. Extensible, protocol-based design that supports DQL, DML, and DDL.
MIT License
244 stars 59 forks source link

Major codebase cleanup #166

Closed gwynne closed 1 year ago

gwynne commented 1 year ago

A massive pass across the entirety of SQLKit, doing the following:

codecov-commenter commented 1 year ago

Codecov Report

Merging #166 (1e1e3f5) into main (054ea50) will increase coverage by 2.21%. The diff coverage is 72.81%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #166 +/- ## ========================================== + Coverage 69.22% 71.44% +2.21% ========================================== Files 94 94 Lines 2749 2444 -305 ========================================== - Hits 1903 1746 -157 + Misses 846 698 -148 ``` | [Impacted Files](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [Sources/SQLKit/Builders/SQLAlterEnumBuilder.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvQnVpbGRlcnMvU1FMQWx0ZXJFbnVtQnVpbGRlci5zd2lmdA==) | `0.00% <0.00%> (ø)` | | | [Sources/SQLKit/Builders/SQLCreateEnumBuilder.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvQnVpbGRlcnMvU1FMQ3JlYXRlRW51bUJ1aWxkZXIuc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [...Kit/Builders/SQLCreateTableAsSubqueryBuilder.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvQnVpbGRlcnMvU1FMQ3JlYXRlVGFibGVBc1N1YnF1ZXJ5QnVpbGRlci5zd2lmdA==) | `100.00% <ø> (ø)` | | | [Sources/SQLKit/Builders/SQLDropEnumBuilder.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvQnVpbGRlcnMvU1FMRHJvcEVudW1CdWlsZGVyLnN3aWZ0) | `0.00% <0.00%> (ø)` | | | [...t/Builders/SQLSecondaryPredicateGroupBuilder.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvQnVpbGRlcnMvU1FMU2Vjb25kYXJ5UHJlZGljYXRlR3JvdXBCdWlsZGVyLnN3aWZ0) | `0.00% <0.00%> (ø)` | | | [...s/SQLKit/Concurrency/SQLDatabase+Concurrency.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvQ29uY3VycmVuY3kvU1FMRGF0YWJhc2UrQ29uY3VycmVuY3kuc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [Sources/SQLKit/Query/SQLAlterEnum.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvUXVlcnkvU1FMQWx0ZXJFbnVtLnN3aWZ0) | `0.00% <ø> (ø)` | | | [Sources/SQLKit/Query/SQLBinaryOperator.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvUXVlcnkvU1FMQmluYXJ5T3BlcmF0b3Iuc3dpZnQ=) | `85.71% <ø> (-1.79%)` | :arrow_down: | | [Sources/SQLKit/Query/SQLCreateEnum.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvUXVlcnkvU1FMQ3JlYXRlRW51bS5zd2lmdA==) | `0.00% <0.00%> (ø)` | | | [Sources/SQLKit/Query/SQLDropEnum.swift](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9TUUxLaXQvUXVlcnkvU1FMRHJvcEVudW0uc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | ... and [79 more](https://app.codecov.io/gh/vapor/sql-kit/pull/166?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | |
0xTim commented 1 year ago

Oh one other comment I had is that with the full readme, DocC support etc this is now ready for a SSWG pitch

gwynne commented 1 year ago

Oh one other comment I had is that with the full readme, DocC support etc this is now ready for a SSWG pitch

Strongly disagree. There are major design flaws with SQLKit despite this cleanup, I'd much rather wait for what I'll be doing with it for Fluent 5.

VaporBot commented 1 year ago

These changes are now available in 3.27.0