Class RawLanguageDriver

  • All Implemented Interfaces:
    LanguageDriver

    public class RawLanguageDriver
    extends XMLLanguageDriver
    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 Detail

      • RawLanguageDriver

        public RawLanguageDriver()
    • Method Detail

      • createSqlSource

        public SqlSource createSqlSource​(Configuration configuration,
                                         XNode script,
                                         java.lang.Class<?> parameterType)
        Description copied from interface: LanguageDriver
        Creates an SqlSource 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 interface LanguageDriver
        Overrides:
        createSqlSource in class XMLLanguageDriver
        Parameters:
        configuration - The MyBatis configuration
        script - XNode parsed from a XML file
        parameterType - input parameter type got from a mapper method or specified in the parameterType xml attribute. Can be null.
        Returns:
      • createSqlSource

        public SqlSource createSqlSource​(Configuration configuration,
                                         java.lang.String script,
                                         java.lang.Class<?> parameterType)
        Description copied from interface: LanguageDriver
        Creates an SqlSource 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 interface LanguageDriver
        Overrides:
        createSqlSource in class XMLLanguageDriver
        Parameters:
        configuration - The MyBatis configuration
        script - The content of the annotation
        parameterType - input parameter type got from a mapper method or specified in the parameterType xml attribute. Can be null.
        Returns: