-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use native DELIMITER #95
Comments
Both of your ideas require to implement database dependent patterns (dialects) in Migrations code and we do not do that. Instead, I plan to add a new option In your case, the configuration will look like...
This meets your requirement, doesn't it? |
My case? Sure. The general case? No. For oracle, the syntax is
example: SET CMDSEP ON
SET CMDSEP "!"
SHOW CMDSEP! SHOW BUFFER! So, while it won't be easy (hence the suggestion of using predicates and an AbstractFactory) what you have won't work. |
Hi @chb0github , Sorry for a late reply. |
How about we leave the issue open as a feature request? Closing an issue means it's not an issue any more and becomes less visible. And, as I suggested: A dialectic approach is the right approach but is definitely involved |
Okay. |
following on #88 mybatis should honor native DB delimiters in order to support stored procedures and such.
Benefits to this approach
migrate script
may generate a script that is intended to be run with a native client. However, without the native delimiter this would not be possible.Since all DBs potentially (likely) use different delimiters, basically either a simple
Map<String,Consumer<String>>
need be implemented where the key is the command word to check to see if it's a delimiter word and the consumer is what should be done with the word to correctly process it. This follows the Command Patterna sketched implementation:
An alternative implementation might require deeper logical inspection with the application of a series of predicates. Hopefully that's not necessary
The text was updated successfully, but these errors were encountered: