-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support for customized ProviderSqlSource. #1229
Conversation
None of my PRs have been accepted. No one even seems to respond to my requests. There is currently a full implementation pending from one of my colleagues that supports mysql |
His name is pj |
Why are there two nearly identical PRs? Maybe just pick one and close the other one? |
@jeffgbutler The two PRs differ in AbstractProviderSqlSource. Which one is better? |
I'm having a hard time understanding the problem you are trying to solve here. The current implementation allows you to call any Java method. That already gives you tremendous flexibility for generating SQL. The test you submitted shows generating a script that uses the MyBatis XML tags - which will in turn be executed by MyBatis to generate SQL. Why wouldn't you just generate SQL directly? Is there any other use case for this other than generating scripts that use the MyBatis XML tags? |
In order to use XML tags to handle dynamic SQL. In this way you can simply return a DynamicSqlSource without having to deal with too much Java logic. |
OK - you've confirmed what I was thinking. It still seems weird to me in that you are generating a script that will generate SQL - a meta generator if you will :) I think a better approach would be to expose the XML scripting engine so that it could be called directly. Then you could use the existing SQL provider mechanism. |
Can not get configuration in provider implementation method, if provided, can directly call |
I see that. I suppose you would need to do something like this to be able to reuse the XML language driver. If I recall correctly, this is the 4th pull request you've submitted for this function, and there are currently two open PRs. I suggest that you pick the one implementation you think is best and close the other. Then we can all review it and make suggestions in one place. My vote is +0. I would be interested in what the other committers think. |
Sounds good - close this one, then we'll review #1226. |
Enhances the functionality by customizing the ProviderSqlSource.
Abstract classes used to defined Construction methods.
The two PR(the other is #1226) are not very different, do you have any idea or better implementation?
@h3adache @kazuki43zoo @chb0github