Relations dictionary to order tables #35
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We might be able to make a default implementation like this that takes a dictionary and orders things properly, but for now I have put it as a provider specific implementation to get some thoughts.
In general I would like some feedback on this sort of way of doing it - it requires changes in the BaseProvider (hence this would bump the dependencies to 10.4.0 and should not be merged till we actually make a release with those new additions)
I do realize that if we have a dependency that says table C has a foreign key to B and B has a foreign key to A, then A should always be first, but in this implementation that is not considered as there is no relations that goes like that, only 1 step down.