This repository was archived by the owner on May 17, 2024. It is now read-only.
Simplify: Squash the MD5 & NormalizerValue & OptimizerHints mixins into the base dialect #754
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.
Little improvements step by step:
Following the removal of unused mixins in #753, remove the last ones that are still used:
OptimizerHints
,MD5
&NormalizerValue
.Simply squash their methods into the base dialect class. The
MD5
&Normalizer
are present in ALL our databases, so there is no change required from the real dialect classes anyway.The
OptimizerHints
mixin is present only in MS SQL, MySQL, and Oracle. But it was using the undeclared methods where called, so it was buggy anyway (if it was used at all). Now, we will add optimizer hints in all databases, though most of them will ignore this comment.In the end, we get a plain & simple hierarchy of dialects:
BaseDialect
-> specificWhateverDialect
— with no multiple inheritance and unclear source of methods.If that helps, here is the matrix of databases & their mixins that they inherit from: