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.
Overview
Dao dependencies will be improved. There is no immediate impact on current functionality. That's required for future modifications.
Goal
Preparation for future modifications. Arrangements will be made so that some SQLs can be automatically switched to dedicated SQLs in a specific DB. Mainly to speed up scanning.
Non-Goal
This pull request does not include query rewriting. Change only the mechanism without changing the existing processing.
Details
Broadly speaking, there are three fixes related to Dao dependencies.
Change to inverse AbstractDao dependencies
It used to be like this:
Abstract classes are deprecated in favor of dependency injection. The class name will be changed to TemplateWrapper.
Split dao package into three packages
This is not required, but the package will be split. There are advantages to both splitting and not splitting. The advantage of splitting is that it is easy to understand.
Add dialect to switch part of MediafileDao for each DB
For example, MediafileDao looks like this:
There are about 12 methods extracted in DialectMediaFileDao. There is a high possibility that speeding up these queries can be expected by replacing them with queries that are highly dependent on the DB grammar.