vapor / fluent-kit

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

Allow sorting by `@Group` field properties #476

Closed davdroman closed 2 years ago

davdroman commented 2 years ago

Adds missing generic functions to allow @Group fields to be sorted

0xTim commented 2 years ago

@davdroman could you add a test to confirm this works? Thanks!

davdroman commented 2 years ago

@0xTim done! Sorry for the long delay, I had a much needed hiatus.

codecov-commenter commented 2 years ago

Codecov Report

Merging #476 (9b84808) into main (8958da5) will increase coverage by 3.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #476      +/-   ##
==========================================
+ Coverage   39.74%   42.78%   +3.03%     
==========================================
  Files         106       97       -9     
  Lines        5681     5273     -408     
==========================================
- Hits         2258     2256       -2     
+ Misses       3423     3017     -406     
Flag Coverage Δ
unittests 42.78% <100.00%> (+3.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...es/FluentKit/Query/Builder/QueryBuilder+Sort.swift 86.20% <100.00%> (+1.59%) :arrow_up:
Sources/FluentBenchmark/SolarSystem/Galaxy.swift
Sources/FluentBenchmark/FluentBenchmarker.swift
Sources/FluentBenchmark/SolarSystem/Planet.swift
Sources/FluentBenchmark/SolarSystem/Tag.swift
Sources/FluentBenchmark/SolarSystem/Star.swift
...ources/FluentBenchmark/SolarSystem/PlanetTag.swift
...rces/FluentBenchmark/SolarSystem/SolarSystem.swift
Sources/FluentBenchmark/SolarSystem/Moon.swift
Sources/FluentBenchmark/SolarSystem/Governor.swift
... and 8 more
VaporBot commented 2 years ago

These changes are now available in 1.26.1