Class RawLanguageDriver
java.lang.Object
org.apache.ibatis.scripting.xmltags.XMLLanguageDriver
org.apache.ibatis.scripting.defaults.RawLanguageDriver
- All Implemented Interfaces:
LanguageDriver
As of 3.2.4 the default XML language is able to identify static statements and create a
RawSqlSource
. So
there is no need to use RAW unless you want to make sure that there is not any dynamic tag for any reason.- Since:
- 3.2.0
- Author:
- Eduardo Macarron
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateSqlSource
(Configuration configuration, String script, Class<?> parameterType) Creates anSqlSource
that will hold the statement read from an annotation.createSqlSource
(Configuration configuration, XNode script, Class<?> parameterType) Creates anSqlSource
that will hold the statement read from a mapper xml file.Methods inherited from class org.apache.ibatis.scripting.xmltags.XMLLanguageDriver
createParameterHandler
-
Constructor Details
-
RawLanguageDriver
public RawLanguageDriver()
-
-
Method Details
-
createSqlSource
Description copied from interface:LanguageDriver
Creates anSqlSource
that will hold the statement read from a mapper xml file. It is called during startup, when the mapped statement is read from a class or an xml file.- Specified by:
createSqlSource
in interfaceLanguageDriver
- Overrides:
createSqlSource
in classXMLLanguageDriver
- Parameters:
configuration
- The MyBatis configurationscript
- XNode parsed from a XML fileparameterType
- input parameter type got from a mapper method or specified in the parameterType xml attribute. Can be null.- Returns:
- the sql source
-
createSqlSource
public SqlSource createSqlSource(Configuration configuration, String script, Class<?> parameterType) Description copied from interface:LanguageDriver
Creates anSqlSource
that will hold the statement read from an annotation. It is called during startup, when the mapped statement is read from a class or an xml file.- Specified by:
createSqlSource
in interfaceLanguageDriver
- Overrides:
createSqlSource
in classXMLLanguageDriver
- Parameters:
configuration
- The MyBatis configurationscript
- The content of the annotationparameterType
- input parameter type got from a mapper method or specified in the parameterType xml attribute. Can be null.- Returns:
- the sql source
-