Documentation ¶
Index ¶
- type ArtistDAO
- func (dao *ArtistDAO) Count(rs app.RequestScope) (int, error)
- func (dao *ArtistDAO) Create(rs app.RequestScope, artist *models.Artist) error
- func (dao *ArtistDAO) Delete(rs app.RequestScope, id int) error
- func (dao *ArtistDAO) Get(rs app.RequestScope, id int) (*models.Artist, error)
- func (dao *ArtistDAO) Query(rs app.RequestScope, offset, limit int) ([]models.Artist, error)
- func (dao *ArtistDAO) Update(rs app.RequestScope, id int, artist *models.Artist) error
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 (*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 ¶
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.
Click to show internal directories.
Click to hide internal directories.