//GetAllBeers gets all the beers from postgres
GetAllBeers gets all the beers from postgres
// GetAllBeers gets all the beers from postgres
func (db *Db) GetAllBeers() (d []model.Drink, error error) {
	rows, err := db.conn.Query("SELECT * FROM drink WHERE tyyppi = 'oluet'")
	if err != nil {
		log.Errorf("db: %s", err)
	}
	defer rows.Close()
	drinks, scanErr := scanDrinks(rows)
	if scanErr != nil {
		log.Errorf("db: failed to scan drinks: %v\n", err)
	}
	return drinks, nil
}
func ( db * Db ) GetAllBeers ( ) ( d [ ] model . Drink , error error ) { rows , err := db . conn . Query ( " " ) if err != nil { log . Errorf ( " " , err ) } defer rows . Close ( ) drinks , scanErr := scanDrinks ( rows ) if scanErr != nil { log . Errorf ( " \n " , err ) } return drinks , nil }
GetAllBeers gets all the beers from postgres
GetAllBeers gets all the beers from postgres