public static ResultSet query ( Connection connection , String sql , String [ ] selectionArgs ) { PreparedStatement statement = null ; ResultSet resultSet = null ; try { statement = connection . prepareStatement ( sql ) ; setArguments ( statement , selectionArgs ) ; resultSet = statement . executeQuery ( ) ; } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to execute SQL statement: " + sql , e ) ; } finally { if ( resultSet == null ) { closeStatement ( statement , sql ) ; } } return resultSet ; }
Query for results