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

Make db repo model aware #1046

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ajscholl
Copy link
Contributor

@ajscholl ajscholl commented Aug 7, 2023

Closes #1045

This commit changes the way you work with `Repository`s and CRUD
handlers. For repositories, we can now use strings as primary keys as
well (using `DistributedModel`s) and the methods to access entities are
now tied to the actual entities (giving you more type safety). The
repository now returns you the correct values directly, no need to pass
an empty value into the repository anymore.

The CRUD handlers are now also fully typed (so if you have `FooCreateInput`
as your create input, that is exactly the type you are getting in the
`TransformCreate` callback, no manual type casting needed). The
`GetCreateInput` and similar methods have also been removed as we can
now just create a zero value as needed.

** This is a breaking change. **
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.

Improve apiserver CRUD and db_repo with generics
1 participant