Search in sources :

Example 1 with TnBasicParameterHandler

use of org.dbflute.s2dao.sqlhandler.TnBasicParameterHandler in project dbflute-core by dbflute.

the class TnAbstractTwoWaySqlCommand method createBasicParameterHandler.

// ===================================================================================
// Handler
// =======
protected TnBasicParameterHandler createBasicParameterHandler(CommandContext context, String executedSql) {
    final TnBasicParameterHandler handler = newBasicParameterHandler(executedSql);
    final Object[] bindVariables = context.getBindVariables();
    handler.setExceptionMessageSqlArgs(bindVariables);
    return handler;
}
Also used : TnBasicParameterHandler(org.dbflute.s2dao.sqlhandler.TnBasicParameterHandler)

Example 2 with TnBasicParameterHandler

use of org.dbflute.s2dao.sqlhandler.TnBasicParameterHandler in project dbflute-core by dbflute.

the class TnAbstractTwoWaySqlCommand method execute.

// ===================================================================================
// Execute
// =======
public Object execute(Object[] args) {
    final Node rootNode = getRootNode(args);
    final CommandContext ctx = apply(rootNode, args, getArgNames(args), getArgTypes(args));
    final String executedSql = filterExecutedSql(ctx);
    final TnBasicParameterHandler handler = createBasicParameterHandler(ctx, executedSql);
    final Object[] bindVariables = ctx.getBindVariables();
    final Class<?>[] bindVariableTypes = ctx.getBindVariableTypes();
    return filterReturnValue(handler.execute(bindVariables, bindVariableTypes));
}
Also used : CommandContext(org.dbflute.twowaysql.context.CommandContext) Node(org.dbflute.twowaysql.node.Node) TnBasicParameterHandler(org.dbflute.s2dao.sqlhandler.TnBasicParameterHandler)

Aggregations

TnBasicParameterHandler (org.dbflute.s2dao.sqlhandler.TnBasicParameterHandler)2 CommandContext (org.dbflute.twowaysql.context.CommandContext)1 Node (org.dbflute.twowaysql.node.Node)1