class TimedStatement extends StatementWrapper {

        private Statement stmt;

        /**
         * Creates a new TimedStatement that wraps {@code stmt}.
         *
         * @param stmt the statement.
         */
        public TimedStatement(Statement stmt) {
            super(stmt);
            this.stmt = stmt;
        }

        public boolean execute(String sql) throws SQLException {<FILL_FUNCTION_BODY>}

        public ResultSet executeQuery(String sql) throws SQLException {
            long t1 = System.currentTimeMillis();
            ResultSet result = stmt.executeQuery(sql);
            long t2 = System.currentTimeMillis();

            // determine the type of query
            String sqlL = sql.toLowerCase().trim();

            if (sqlL.startsWith("insert")) {
                addQuery(Type.insert, sql, t2 - t1);
            }
            else if (sqlL.startsWith("update")) {
                addQuery(Type.update, sql, t2 - t1);
            }
            else if (sqlL.startsWith("delete")) {
                addQuery(Type.delete, sql, t2 - t1);
            }
            else {
                addQuery(Type.select, sql, t2 - t1);
            }
            return result;
        }

        public int executeUpdate(String sql) throws SQLException {
            long t1 = System.currentTimeMillis();
            int result = stmt.executeUpdate(sql);
            long t2 = System.currentTimeMillis();

            // determine the type of query
            String sqlL = sql.toLowerCase().trim();

            if (sqlL.startsWith("insert")) {
                addQuery(Type.insert, sql, t2 - t1);
            }
            else if (sqlL.startsWith("update")) {
                addQuery(Type.update, sql, t2 - t1);
            }
            else if (sqlL.startsWith("delete")) {
                addQuery(Type.delete, sql, t2 - t1);
            }
            else {
                addQuery(Type.select, sql, t2 - t1);
            }
            return result;
        }
    }


            long t1 = System.currentTimeMillis();
            boolean result = stmt.execute(sql);
            long t2 = System.currentTimeMillis();

            // determine the type of query
            String sqlL = sql.toLowerCase().trim();

            if (sqlL.startsWith("insert")) {
                addQuery(Type.insert, sql, t2 - t1);
            }
            else if (sqlL.startsWith("update")) {
                addQuery(Type.update, sql, t2 - t1);
            }
            else if (sqlL.startsWith("delete")) {
                addQuery(Type.delete, sql, t2 - t1);
            }
            else {
                addQuery(Type.select, sql, t2 - t1);
            }
            return result;
        
<methods>public void abort(java.util.concurrent.Executor) throws java.sql.SQLException,public void clearWarnings() throws java.sql.SQLException,public void close() throws java.sql.SQLException,public void commit() throws java.sql.SQLException,public java.sql.Array createArrayOf(java.lang.String, java.lang.Object[]) throws java.sql.SQLException,public java.sql.Blob createBlob() throws java.sql.SQLException,public java.sql.Clob createClob() throws java.sql.SQLException,public java.sql.NClob createNClob() throws java.sql.SQLException,public java.sql.SQLXML createSQLXML() throws java.sql.SQLException,public java.sql.Statement createStatement() throws java.sql.SQLException,public java.sql.Statement createStatement(int, int) throws java.sql.SQLException,public java.sql.Statement createStatement(int, int, int) throws java.sql.SQLException,public java.sql.Struct createStruct(java.lang.String, java.lang.Object[]) throws java.sql.SQLException,public boolean getAutoCommit() throws java.sql.SQLException,public java.lang.String getCatalog() throws java.sql.SQLException,public java.lang.String getClientInfo(java.lang.String) throws java.sql.SQLException,public java.util.Properties getClientInfo() throws java.sql.SQLException,public int getHoldability() throws java.sql.SQLException,public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException,public int getNetworkTimeout() throws java.sql.SQLException,public java.lang.String getSchema() throws java.sql.SQLException,public int getTransactionIsolation() throws java.sql.SQLException,public Map<java.lang.String,Class<?>> getTypeMap() throws java.sql.SQLException,public java.sql.SQLWarning getWarnings() throws java.sql.SQLException,public boolean isClosed() throws java.sql.SQLException,public boolean isReadOnly() throws java.sql.SQLException,public boolean isValid(int) throws java.sql.SQLException,public boolean isWrapperFor(Class<?>) throws java.sql.SQLException,public java.lang.String nativeSQL(java.lang.String) throws java.sql.SQLException,public java.sql.CallableStatement prepareCall(java.lang.String) throws java.sql.SQLException,public java.sql.CallableStatement prepareCall(java.lang.String, int, int) throws java.sql.SQLException,public java.sql.CallableStatement prepareCall(java.lang.String, int, int, int) throws java.sql.SQLException,public java.sql.PreparedStatement prepareStatement(java.lang.String) throws java.sql.SQLException,public java.sql.PreparedStatement prepareStatement(java.lang.String, int, int) throws java.sql.SQLException,public java.sql.PreparedStatement prepareStatement(java.lang.String, int, int, int) throws java.sql.SQLException,public java.sql.PreparedStatement prepareStatement(java.lang.String, int) throws java.sql.SQLException,public java.sql.PreparedStatement prepareStatement(java.lang.String, int[]) throws java.sql.SQLException,public java.sql.PreparedStatement prepareStatement(java.lang.String, java.lang.String[]) throws java.sql.SQLException,public void releaseSavepoint(java.sql.Savepoint) throws java.sql.SQLException,public void rollback() throws java.sql.SQLException,public void rollback(java.sql.Savepoint) throws java.sql.SQLException,public void setAutoCommit(boolean) throws java.sql.SQLException,public void setCatalog(java.lang.String) throws java.sql.SQLException,public void setClientInfo(java.lang.String, java.lang.String) throws java.sql.SQLClientInfoException,public void setClientInfo(java.util.Properties) throws java.sql.SQLClientInfoException,public void setHoldability(int) throws java.sql.SQLException,public void setNetworkTimeout(java.util.concurrent.Executor, int) throws java.sql.SQLException,public void setReadOnly(boolean) throws java.sql.SQLException,public java.sql.Savepoint setSavepoint() throws java.sql.SQLException,public java.sql.Savepoint setSavepoint(java.lang.String) throws java.sql.SQLException,public void setSchema(java.lang.String) throws java.sql.SQLException,public void setTransactionIsolation(int) throws java.sql.SQLException,public void setTypeMap(Map<java.lang.String,Class<?>>) throws java.sql.SQLException,public T unwrap(Class<T>) throws java.sql.SQLException<variables>protected java.sql.Connection connection