Search in sources :

Example 1 with ExecutedSqlCounter

use of org.dbflute.bhv.proposal.callback.ExecutedSqlCounter in project lastaflute by lastaflute.

the class SimpleAsyncManager method extractSqlCounter.

// ===================================================================================
// SQL Counter
// ===========
protected OptionalThing<ExecutedSqlCounter> extractSqlCounter() {
    final CallbackContext context = CallbackContext.getCallbackContextOnThread();
    if (context == null) {
        return OptionalThing.empty();
    }
    final SqlStringFilter filter = context.getSqlStringFilter();
    if (filter == null || !(filter instanceof ExecutedSqlCounter)) {
        return OptionalThing.empty();
    }
    return OptionalThing.of(((ExecutedSqlCounter) filter));
}
Also used : RomanticTraceableSqlStringFilter(org.lastaflute.db.dbflute.callbackcontext.traceablesql.RomanticTraceableSqlStringFilter) SqlStringFilter(org.dbflute.hook.SqlStringFilter) CallbackContext(org.dbflute.hook.CallbackContext) ExecutedSqlCounter(org.dbflute.bhv.proposal.callback.ExecutedSqlCounter)

Aggregations

ExecutedSqlCounter (org.dbflute.bhv.proposal.callback.ExecutedSqlCounter)1 CallbackContext (org.dbflute.hook.CallbackContext)1 SqlStringFilter (org.dbflute.hook.SqlStringFilter)1 RomanticTraceableSqlStringFilter (org.lastaflute.db.dbflute.callbackcontext.traceablesql.RomanticTraceableSqlStringFilter)1