vapor / fluent-kit

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

Add `@discardableResult` to QueryBuilder's range and sort methods #592

Closed jiahan-wu closed 8 months ago

jiahan-wu commented 8 months ago

These changes are now available in 1.46.0

This Pull Request addresses an issue where calling the sort methods in the QueryBuilder class would result in a "Result of call to 'sort' is unused" warning. To resolve this, I have added the @discardableResult attribute to these methods, allowing users to call them without triggering the warning when the result is not explicitly used.

jiahan-wu commented 8 months ago

Thanks, nice catch!! The range methods in QueryBuilder+Range.swift also appear to be missing this attribute, could you add it to those as well?

Hello, thank you for pointing that out! I've already made the modifications to the range methods in QueryBuilder+Range.swift.