return counter;
}
public JdbcSqlStat createSqlStat(StatementProxy statement, String sql) {
DataSourceProxy dataSource = statement.getConnectionProxy().getDirectDataSource();
JdbcDataSourceStat dataSourceStat = dataSource.getDataSourceStat();
JdbcStatContext context = JdbcStatManager.getInstance().getStatContext();
String contextSql = context != null ? context.getSql() : null;
if (contextSql != null && contextSql.length() > 0) {
return dataSourceStat.createSqlStat(contextSql);
} else {
String dbType = this.dbType;
if (dbType == null) {
dbType = dataSource.getDbType();
}
sql = mergeSql(sql, dbType);
return dataSourceStat.createSqlStat(sql);
}