dolphinscheduler
dolphinscheduler copied to clipboard
[Improvement][Dao] Further encapsulation of BaseDao avoids writing many conditional queries
Search before asking
- [x] I had searched in the issues and found no similar feature requirement.
Description
Avoid provide many query method in dao/mapper e.g. queryByName, queryByNameAndStatus
Are you willing to submit a PR?
- [x] Yes I am willing to submit a PR!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Hey, I have a idea with that.
We can integrate the ServiceImpl class from MyBatis-Plus into the BaseDao.
The ServiceImpl provides a lambdaQueryChain method that enables basic data querying with multiple conditions without writing new methods.
Hey, I have a idea with that. We can integrate the
ServiceImplclass fromMyBatis-Plusinto theBaseDao. TheServiceImplprovides alambdaQueryChainmethod that enables basic data querying with multiple conditions without writing new methods.
I don't want to provide queryByCodes in Dao, since this still need to write a lot of query method in dao, and we can exposed queryByCondition in dao https://github.com/apache/dolphinscheduler/pull/17163.
This may cause the service to add some work when using the dao, but this is ok, since some query method is only used once.