Skip to content

Conversation

@mbrandonw
Copy link
Member

@mbrandonw mbrandonw commented May 30, 2025

Added:

  • An isDistinct option
  • An overload on optional tables that automatically filters out nil values and unwraps them
  • Documentation

@mbrandonw mbrandonw requested a review from stephencelis May 30, 2025 18:33
@PixelPirate
Copy link

Hi. What do you think about adding jsonGroupArray(isDistinct: true, …) here? If a reminders list has both milestones and reminders entries, then the resulting object will have duplicated entries without isDistinct. And I think in the case of the example here, and also in most cases in general, we don't want that. So an inclusion of that in the documentation here seems appropriate.

@mbrandonw
Copy link
Member Author

Hi @PixelPirate, thanks again for pointing this out! Just pushed some updates along with a test to show the behavior.

@stephencelis stephencelis changed the title Add docs about pre-loading multiple associations. jsonGroupArray Improvements Jun 17, 2025
@stephencelis stephencelis merged commit 5194b49 into main Jun 17, 2025
3 checks passed
@stephencelis stephencelis deleted the more-association-docs branch June 17, 2025 19:16
coenttb pushed a commit to coenttb/swift-structured-queries-postgres that referenced this pull request Oct 14, 2025
Added:

  * An isDistinct option
  * An overload on optional tables that automatically filters out nil values and unwraps them
  * Documentation

Co-authored-by: Stephen Celis <[email protected]>
coenttb pushed a commit to coenttb/swift-structured-queries-postgres that referenced this pull request Oct 15, 2025
Added:

  * An isDistinct option
  * An overload on optional tables that automatically filters out nil values and unwraps them
  * Documentation

Co-authored-by: Stephen Celis <[email protected]>
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.

4 participants