daos

package
v0.0.0-...-243484f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtistDAO

type ArtistDAO struct{}

ArtistDAO persists artist data in database

func NewArtistDAO

func NewArtistDAO() *ArtistDAO

NewArtistDAO creates a new ArtistDAO

func (*ArtistDAO) Count

func (dao *ArtistDAO) Count(rs app.RequestScope) (int, error)

Count returns the number of the artist records in the database.

func (*ArtistDAO) Create

func (dao *ArtistDAO) Create(rs app.RequestScope, artist *models.Artist) error

Create saves a new artist record in the database. The Artist.Id field will be populated with an automatically generated ID upon successful saving.

func (*ArtistDAO) Delete

func (dao *ArtistDAO) Delete(rs app.RequestScope, id int) error

Delete deletes an artist with the specified ID from the database.

func (*ArtistDAO) Get

func (dao *ArtistDAO) Get(rs app.RequestScope, id int) (*models.Artist, error)

Get reads the artist with the specified ID from the database.

func (*ArtistDAO) Query

func (dao *ArtistDAO) Query(rs app.RequestScope, offset, limit int) ([]models.Artist, error)

Query retrieves the artist records with the specified offset and limit from the database.

func (*ArtistDAO) Update

func (dao *ArtistDAO) Update(rs app.RequestScope, id int, artist *models.Artist) error

Update saves the changes to an artist in the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL