Package org.apache.ibatis.builder

Examples of org.apache.ibatis.builder.StaticSqlSource


  public SqlSource parse(String originalSql, Class<?> parameterType) {
    ParameterMappingTokenHandler handler = new ParameterMappingTokenHandler(configuration, parameterType);
    GenericTokenParser parser = new GenericTokenParser("@{", "}", handler);
    String sql = parser.parse(originalSql);
    return new StaticSqlSource(configuration, sql, handler.getParameterMappings());
  }
View Full Code Here


    String createStatementName = "create_tables";
    configuration.setMapUnderscoreToCamelCase(true);
    configuration.addMappedStatement(new Builder(
        configuration,
        createStatementName,
        new StaticSqlSource(
            configuration,
            CharStreams.toString(
                new InputStreamReader(
                    DbStorage.class.getResourceAsStream("schema.sql"),
                    StandardCharsets.UTF_8))),
View Full Code Here

TOP

Related Classes of org.apache.ibatis.builder.StaticSqlSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.