code: private List<Row> getRows(String sql) throws SQLException
     {
        allocateConnection();
  
        try
        {
           List<Row> result = new LinkedList<Row>();
  
           m_ps = m_connection.prepareStatement(sql);
           m_rs = m_ps.executeQuery();
           populateMetaData();
           while (m_rs.next())
           {
              result.add(new MpdResultSetRow(m_rs, m_meta));
           }
  
           return (result);
        }
  
        finally
        {
           releaseConnection();
        }
     }
docs: Retrieve a number of rows matching the supplied query.
  
  @param sql query statement
  @return result set
  @throws SQLException