Beispiel #1
0
func (sv *SongVideo) Save(db *sqlpg.DB) error {
	if sv.Item != nil {
		return db.InsertIgnore(sv.Item)
	} else {
		return errors.New("Item field of struct is nil")
	}
}
Beispiel #2
0
func (song *Song) Save(db *sqlpg.DB) error {

	return db.InsertIgnore(song)
}
Beispiel #3
0
func (album *Album) Save(db *sqlpg.DB) error {
	return db.InsertIgnore(album)
}
Beispiel #4
0
Datei: tv.go Projekt: olragon/dna
func (tv *TV) Save(db *sqlpg.DB) error {
	return db.InsertIgnore(tv)
}
Beispiel #5
0
func (album *Album) Save(db *sqlpg.DB) error {
	// return db.Update(album, "id", "description")
	return db.InsertIgnore(album)
}
Beispiel #6
0
func (artist *Artist) Save(db *sqlpg.DB) error {
	return db.InsertIgnore(artist)
}
Beispiel #7
0
func (video *Video) Save(db *sqlpg.DB) error {
	return db.InsertIgnore(video)
}
Beispiel #8
0
func (video *Video) Save(db *sqlpg.DB) error {
	// return db.Update(video, "id", "lyric")
	return db.InsertIgnore(video)
}
Beispiel #9
0
func (song *Song) Save(db *sqlpg.DB) error {
	// return db.Update(song, "id", "artist_id", "video_id")
	return db.InsertIgnore(song)
}