code: func AllReleases(db *sql.DB, bundle string) ([]*Release, error) {
  	if !validBundle(bundle) {
  		return nil, errors.New("model/certdb: invalid bundle " + bundle)
  	}
  
  	tx, err := db.Begin()
  	if err != nil {
  		return nil, err
  	}
  	defer tx.Rollback() // nop if commit is called.
  
  	tbl := tableForBundle(bundle)
  	var releases []*Release
  
  	rows, err := tx.Query(fmt.Sprintf(`SELECT version,released_at FROM %s_releases ORDER BY released_at DESC`, tbl))
  	if err != nil {
  		return nil, err
  	}
  
  	for rows.Next() {
  		release := &Release{Bundle: bundle}
  		err = rows.Scan(&release.Version, &release.ReleasedAt)
  		if err != nil {
  			break
  		}
  		releases = append(releases, release)
  	}
  
  	if err == nil {
  		err = tx.Commit()
  	}
  
  	return releases, err
  }
docs: // AllReleases returns the list of all releases, sorted in reverse chronological
  // order.