Search in sources :

Example 1 with MultiSqlConsumer

use of com.developmentontheedge.dbms.MultiSqlConsumer in project be5 by DevelopmentOnTheEdge.

the class FreemarkerSqlHandler method execute.

public void execute(FreemarkerScript freemarkerScript) throws ProjectElementException, FreemarkerSqlException {
    DataElementPath path = freemarkerScript.getCompletePath();
    if (log != null) {
        log.setOperationName("[>] " + path);
    }
    sqlExecutor.comment("Execute " + path);
    Project project = freemarkerScript.getProject();
    ResultToConsumerWriter out = new ResultToConsumerWriter(new MultiSqlConsumer(project.getDatabaseSystem().getType(), this));
    FreemarkerUtils.mergeTemplateByPath(path.toString(), project.getContext(freemarkerScript), project.getConfiguration(), out);
    for (int j = includeChain.size() - 1; j >= 0; j--) {
        sqlExecutor.comment("End of included " + includeChain.get(j), false);
    }
}
Also used : Project(com.developmentontheedge.be5.metadata.model.Project) DataElementPath(com.developmentontheedge.be5.metadata.model.base.DataElementPath) MultiSqlConsumer(com.developmentontheedge.dbms.MultiSqlConsumer)

Aggregations

Project (com.developmentontheedge.be5.metadata.model.Project)1 DataElementPath (com.developmentontheedge.be5.metadata.model.base.DataElementPath)1 MultiSqlConsumer (com.developmentontheedge.dbms.MultiSqlConsumer)1