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

1st class schemas #644

Merged
merged 3 commits into from
Jul 3, 2021
Merged

1st class schemas #644

merged 3 commits into from
Jul 3, 2021

Conversation

solnic
Copy link
Member

@solnic solnic commented Jul 2, 2021

Schemas are now part of the runtime, lazy-loaded and configured just
like all other components, and they are decoupled from relations now.

This drastically simplified handling
everything that may need access to schemas and further simplifications
are still possible.

This has a temporary breaking change because Relation.dataset receives
a schema now, instead of a relation class. I will restore original
behavior in rom/compat later on in a PR that will improve handling of
the default dataset (this is part of 6.0.0 feature scope).

Apart from lazy-loading, there's another big benefit of this refactor -
relation classes no longer hold their schemas as class variables. This
means that the same relation class can be re-used in the same process in
different configurations. It also means that standard inheritance will
be finally possible.

Schemas are now part of the runtime, lazy-loaded and configured just
like all other components. This drastically simplified handling
everything that may need access to schemas and further simplifications
are still possible.

This has a temporary breaking change because Relation.dataset receives
a schema now, instead of a relation class. I will restore original
behavior in rom/compat later on in a PR that will improve handling of
the default dataset (this is part of 6.0.0 feature scope).

Apart from lazy-loading, there's another big benefit of this refactor -
relation classes no longer hold their schemas as class variables. This
means that the same relation class can be re-used in the same process in
different configurations. It also means that standard inheritance will
be finally possible.
@solnic solnic marked this pull request as ready for review July 3, 2021 08:08
@solnic solnic merged commit a60c3b6 into master Jul 3, 2021
@solnic solnic deleted the 1st-class-schemas branch July 3, 2021 08:14
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.

1 participant