Package com.alibaba.druid.stat

Examples of com.alibaba.druid.stat.JdbcSqlStat.error()


        // SQL
        JdbcSqlStat sqlStat = statement.getSqlStat();

        if (sqlStat != null) {
            sqlStat.error(error);
            sqlStat.addExecuteTime(statement.getLastExecuteType(), statement.isFirstResultSet(), nanos);
            statement.setLastExecuteTimeNano(nanos);
        }

        StatFilterContext.getInstance().executeAfter(sql, nanos, error);
View Full Code Here


        // SQL
        JdbcSqlStat sqlStat = statement.getSqlStat();

        if (sqlStat != null) {
            sqlStat.error(error);
            sqlStat.addExecuteTime(statement.getLastExecuteType(), nanoSpan);
            statement.setLastExecuteTimeNano(nanoSpan);
        }

        super.statement_executeErrorAfter(statement, sql, error);
View Full Code Here

        // SQL
        JdbcSqlStat sqlStat = statement.getSqlStat();

        if (sqlStat != null) {
            sqlStat.error(error);
            sqlStat.addExecuteTime(statement.getLastExecuteType(), statement.isFirstResultSet(), nanoSpan);
            statement.setLastExecuteTimeNano(nanoSpan);
        }

        StatFilterContext.getInstance().executeAfter(sql, nanoSpan, error);
View Full Code Here

        JdbcSqlStat stat = new JdbcSqlStat("SELECT * FROM t_user");
        Assert.assertEquals(null, stat.getExecuteLastStartTime());
        Assert.assertEquals(null, stat.getExecuteNanoSpanMaxOccurTime());
        Assert.assertEquals(null, stat.getExecuteErrorLastTime());

        stat.error(new Exception());
        Assert.assertNotNull(stat.getExecuteErrorLast());
        Assert.assertNotNull(stat.getExecuteErrorLastTime());
    }
}
View Full Code Here

        // SQL
        JdbcSqlStat sqlStat = statement.getSqlStat();

        if (sqlStat != null) {
            sqlStat.error(error);
            sqlStat.addExecuteTime(statement.getLastExecuteType(), statement.isFirstResultSet(), nanos);
            statement.setLastExecuteTimeNano(nanos);
        }

        StatFilterContext.getInstance().executeAfter(sql, nanos, error);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.