@Override public ResultSet executeQuery() throws SQLException { ResultSet rs = new LoggingPhoenixResultSet(super.executeQuery(), phoenixMetricsLog, sql); this.loggingAutoCommitHelper(); return rs; }
@Override public ResultSet executeQuery(String sql) throws SQLException { this.sql = sql; ResultSet rs = new LoggingPhoenixResultSet(super.executeQuery(sql), phoenixMetricsLog, this.sql); this.loggingAutoCommitHelper(); return rs; }
@Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return new LoggingPhoenixPreparedStatement(super.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability), phoenixMetricsLog, sql, this); }
@Override public void commit() throws SQLException { super.commit(); loggingMetricsHelper(); }
@Override public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { return new LoggingPhoenixStatement( super.createStatement(resultSetType, resultSetConcurrency), phoenixMetricsLog, this); }
@Override public DatabaseMetaData getMetaData() throws SQLException { checkOpen(); return new PhoenixDatabaseMetaData(this); }
@Override public void close() throws SQLException { try { loggingMetricsHelper(); } finally { super.close(); } }
@Override public int executeUpdate(String sql) throws SQLException { int result; this.sql = sql; result = super.executeUpdate(sql); this.loggingAutoCommitHelper(); return result; }
@Override public int executeUpdate() throws SQLException { int res = super.executeUpdate(); this.loggingAutoCommitHelper(); return res; }
@Override public boolean execute(String sql) throws SQLException { boolean result; this.sql = sql; result = super.execute(sql); this.loggingAutoCommitHelper(); return result; }
@Override public ResultSet getResultSet() throws SQLException { // Re-use the cached ResultSet value since call to getResultSet() is not idempotent ResultSet resultSet = super.getResultSet(); return (resultSet == null) ? null : new LoggingPhoenixResultSet(resultSet, phoenixMetricsLog, sql); }
@Override public boolean acceptsURL(String url) throws SQLException { // Accept the url only if test=true attribute set return super.acceptsURL(url) && isTestUrl(url); }
@Override public synchronized Connection connect(String url, Properties info) throws SQLException { checkClosed(); return super.connect(url, info); }
@Override public PreparedStatement prepareStatement(String sql) throws SQLException { return new LoggingPhoenixPreparedStatement(super.prepareStatement(sql), phoenixMetricsLog, sql, this); }
@Override public Statement createStatement() throws SQLException { return new LoggingPhoenixStatement(super.createStatement(), phoenixMetricsLog, this); }
@Override public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { return new LoggingPhoenixPreparedStatement(super.prepareStatement(sql, columnNames), phoenixMetricsLog, sql, this); }
@Override public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return new LoggingPhoenixStatement( super.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability), phoenixMetricsLog, this); }
@Override public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { return new LoggingPhoenixPreparedStatement(super.prepareStatement(sql, columnIndexes), phoenixMetricsLog, sql, this); }
@Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { return new LoggingPhoenixPreparedStatement( super.prepareStatement(sql, resultSetType, resultSetConcurrency), phoenixMetricsLog, sql, this); }
@Override public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { return new LoggingPhoenixPreparedStatement(super.prepareStatement(sql, autoGeneratedKeys), phoenixMetricsLog, sql, this); }