public boolean execute ( final String query ) throws SQLException { startTimer ( ) ; try { if ( queryResult != null ) { queryResult . close ( ) ; } queryResult = protocol . executeQuery ( queryFactory . createQuery ( query ) ) ; if ( queryResult . getResultSetType ( ) == ResultSetType . SELECT ) { setResultSet ( new DrizzleResultSet ( queryResult , this , getProtocol ( ) ) ) ; return true ; } setUpdateCount ( ( ( ModifyQueryResult ) queryResult ) . getUpdateCount ( ) ) ; return false ; } catch ( QueryException e ) { throw SQLExceptionMapper . get ( e ) ; } finally { stopTimer ( ) ; } }
executes a query .