-
Notifications
You must be signed in to change notification settings - Fork 12.9k
LanguageDriver interface added method for scriptings sql source #1715
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
Comments
I think you can resolve this with using the TemplateFilePathProvider.
templateFile.pathProvider.includesMapperNameWhenSeparateDirectory = false It find a template file from namespace/method+'.ftl' (e.g. |
-Not only this , the class TemplateFilePathProvider you provided is in fact a SqlProvider ,isn't it? -Actually ,it just convert declaring a @select Annotation to a @SelectProvider Annotation,I was always defined the common CURD operation of every POJO entity by this way ,but there usually has amount of other mapper methods need be load scripting file from some agreed path . -I thought to create its SqlSource without declaring any Annotation to a method but use Mapper class and Mapper method to get it at LanguageDriver createSqlSource method from som called "The appointment is greater than configuration". |
LanguageDriver's task is to process an already loaded SQL script and I think it's better to keep this separation. |
Hi @stepjacky , My English is not very good, so please let me clarify. |
@harawata |
Hi @stepjacky , Thank you for the clarification. |
@harawata |
As @kazuki43zoo and I explained, we don't plan to pass method related information to language driver at present. |
in using mybatis scripting language ,like freemarker ,usually define mapper interface like below:
as you know , In @select value style like namespace/method+'.ftl',it always has much more methods in mappers ,developer must write many of this style code for mybatis LanguageDriver to creating SqlSource, this style of Annotation is more common templated,think to add overload a method in LanguageDriver like below :
to help find the sql templated styling ,current method in interface LanguageDriver is not friendly for annotation style by scripting sql template found!
THANKS
The text was updated successfully, but these errors were encountered: