Skip to content

Sorting attachments #11

Description

@sodapopcan

Code of Conduct

  • I agree to follow this project's Code of Conduct

AI Policy

  • I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.

Is your feature request related to a problem? Please describe.

I would like to be able to set a default sort for attachments at the db level.

Describe the solution you'd like

Ash's "regular" relationship DSL has a sort option, ash_storage's relationship macros do not and I would like them to. This is convenient when loading attachments via :load.

Describe alternatives you've considered

  • Sorting in Elixir.
  • Adding a domain function to retrieve attachments by host id with sort option.
  • Using load: sorted_attachments().

These work but default-sort would be very convenient in some cases.

Additional context

I'm happy to do the work here!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions