Thanks to visit codestin.com
Credit goes to github.com

Skip to content

1st class schemas#644

Merged
solnic merged 3 commits intomasterfrom
1st-class-schemas
Jul 3, 2021
Merged

1st class schemas#644
solnic merged 3 commits intomasterfrom
1st-class-schemas

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.

solnic added 3 commits July 3, 2021 07:52
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 force-pushed the 1st-class-schemas branch from db3ec22 to 9388d41 Compare July 3, 2021 07:58
@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