public static String execQueryAllRows ( @ NotNull final SQLInputs sqlInputs ) throws Exception { ConnectionService connectionService = new ConnectionService ( ) ; try ( final Connection connection = connectionService . setUpConnection ( sqlInputs ) ) { connection . setReadOnly ( true ) ; Statement statement = connection . createStatement ( sqlInputs . getResultSetType ( ) , sqlInputs . getResultSetConcurrency ( ) ) ; statement . setQueryTimeout ( sqlInputs . getTimeout ( ) ) ; final ResultSet resultSet = statement . executeQuery ( sqlInputs . getSqlCommand ( ) ) ; final String resultSetToDelimitedColsAndRows = Format . resultSetToDelimitedColsAndRows ( resultSet , sqlInputs . isNetcool ( ) , sqlInputs . getColDelimiter ( ) , sqlInputs . getRowDelimiter ( ) ) ; if ( resultSet != null ) { resultSet . close ( ) ; } return resultSetToDelimitedColsAndRows ; } }
todo Run a SQL query with given configuration