Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization: set_source and group_by_source callbacks on types that support loading through #1131

Open
zachdaniel opened this issue May 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@zachdaniel
Copy link
Contributor

Right now, when an attribute supports being "loaded through", what we do is we do its load logic for each record. If we add the following optional callbacks to type:

@callback set_source(list({record, value})) :: list(value)
@callback group_by_source(list(value)) :: %{primary_key => list(value)}

We can use this to allow loading through types in a single pass.

@zachdaniel zachdaniel added enhancement New feature or request needs review and removed needs review labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant