Documentation ¶
Index ¶
- Variables
- func AddAlbumArtistHook(hookPoint boil.HookPoint, albumArtistHook AlbumArtistHook)
- func AddAlbumHook(hookPoint boil.HookPoint, albumHook AlbumHook)
- func AddGenreHook(hookPoint boil.HookPoint, genreHook GenreHook)
- func AddTrackHook(hookPoint boil.HookPoint, trackHook TrackHook)
- func AlbumArtistExists(ctx context.Context, exec boil.ContextExecutor, albumArtistID int) (bool, error)
- func AlbumArtists(mods ...qm.QueryMod) albumArtistQuery
- func AlbumExists(ctx context.Context, exec boil.ContextExecutor, albumID int) (bool, error)
- func Albums(mods ...qm.QueryMod) albumQuery
- func GenreExists(ctx context.Context, exec boil.ContextExecutor, genreID int) (bool, error)
- func Genres(mods ...qm.QueryMod) genreQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func TrackExists(ctx context.Context, exec boil.ContextExecutor, trackID int) (bool, error)
- func Tracks(mods ...qm.QueryMod) trackQuery
- type Album
- func (o *Album) AddTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
- func (o *Album) AlbumArtist(mods ...qm.QueryMod) albumArtistQuery
- func (o *Album) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Album) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Album) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Album) SetAlbumArtist(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Album) Tracks(mods ...qm.QueryMod) trackQuery
- func (o *Album) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Album) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type AlbumArtist
- func (o *AlbumArtist) AddAlbums(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Album) error
- func (o *AlbumArtist) AddTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
- func (o *AlbumArtist) Albums(mods ...qm.QueryMod) albumQuery
- func (o *AlbumArtist) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *AlbumArtist) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *AlbumArtist) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *AlbumArtist) Tracks(mods ...qm.QueryMod) trackQuery
- func (o *AlbumArtist) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *AlbumArtist) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type AlbumArtistHook
- type AlbumArtistSlice
- type AlbumHook
- type AlbumSlice
- type Genre
- func (o *Genre) AddTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
- func (o *Genre) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Genre) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Genre) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Genre) Tracks(mods ...qm.QueryMod) trackQuery
- func (o *Genre) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Genre) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type GenreHook
- type GenreSlice
- type M
- type Track
- func (o *Track) Album(mods ...qm.QueryMod) albumQuery
- func (o *Track) AlbumArtist(mods ...qm.QueryMod) albumArtistQuery
- func (o *Track) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Track) Genre(mods ...qm.QueryMod) genreQuery
- func (o *Track) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Track) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Track) SetAlbum(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Album) error
- func (o *Track) SetAlbumArtist(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Track) SetGenre(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Genre) error
- func (o *Track) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Track) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type TrackHook
- type TrackSlice
Constants ¶
This section is empty.
Variables ¶
var AlbumArtistColumns = struct { AlbumArtistID string Name string NameHash string CreatedAt string UpdatedAt string }{ AlbumArtistID: "album_artist_id", Name: "name", NameHash: "name_hash", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var AlbumArtistRels = struct { Albums string Tracks string }{ Albums: "Albums", Tracks: "Tracks", }
AlbumArtistRels is where relationship names are stored.
var AlbumArtistTableColumns = struct { AlbumArtistID string Name string NameHash string CreatedAt string UpdatedAt string }{ AlbumArtistID: "album_artists.album_artist_id", Name: "album_artists.name", NameHash: "album_artists.name_hash", CreatedAt: "album_artists.created_at", UpdatedAt: "album_artists.updated_at", }
var AlbumArtistWhere = struct { AlbumArtistID whereHelperint Name whereHelperstring NameHash whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ AlbumArtistID: whereHelperint{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, NameHash: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var AlbumColumns = struct { AlbumID string Name string AlbumArtistID string DiscNo string DiscTotal string CreatedAt string UpdatedAt string }{ AlbumID: "album_id", Name: "name", AlbumArtistID: "album_artist_id", DiscNo: "disc_no", DiscTotal: "disc_total", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var AlbumRels = struct { AlbumArtist string Tracks string }{ AlbumArtist: "AlbumArtist", Tracks: "Tracks", }
AlbumRels is where relationship names are stored.
var AlbumTableColumns = struct { AlbumID string Name string AlbumArtistID string DiscNo string DiscTotal string CreatedAt string UpdatedAt string }{ AlbumID: "albums.album_id", Name: "albums.name", AlbumArtistID: "albums.album_artist_id", DiscNo: "albums.disc_no", DiscTotal: "albums.disc_total", CreatedAt: "albums.created_at", UpdatedAt: "albums.updated_at", }
var AlbumWhere = struct { AlbumID whereHelperint Name whereHelperstring AlbumArtistID whereHelperint DiscNo whereHelperint DiscTotal whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ AlbumID: whereHelperint{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, AlbumArtistID: whereHelperint{/* contains filtered or unexported fields */}, DiscNo: whereHelperint{/* contains filtered or unexported fields */}, DiscTotal: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("dbmodel: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var GenreColumns = struct { GenreID string Name string NameHash string CreatedAt string UpdatedAt string }{ GenreID: "genre_id", Name: "name", NameHash: "name_hash", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var GenreRels = struct { Tracks string }{ Tracks: "Tracks", }
GenreRels is where relationship names are stored.
var GenreTableColumns = struct { GenreID string Name string NameHash string CreatedAt string UpdatedAt string }{ GenreID: "genres.genre_id", Name: "genres.name", NameHash: "genres.name_hash", CreatedAt: "genres.created_at", UpdatedAt: "genres.updated_at", }
var GenreWhere = struct { GenreID whereHelperint Name whereHelperstring NameHash whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ GenreID: whereHelperint{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, NameHash: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { AlbumArtists string Albums string Genres string Tracks string }{ AlbumArtists: "album_artists", Albums: "albums", Genres: "genres", Tracks: "tracks", }
var TrackColumns = struct { TrackID string Title string Artist string Composer string TrackNo string Lyrics string Comment string Year string FilePath string FilePathHash string FileHash string Format string FileType string AlbumArtistID string AlbumID string GenreID string CreatedAt string UpdatedAt string }{ TrackID: "track_id", Title: "title", Artist: "artist", Composer: "composer", TrackNo: "track_no", Lyrics: "lyrics", Comment: "comment", Year: "year", FilePath: "file_path", FilePathHash: "file_path_hash", FileHash: "file_hash", Format: "format", FileType: "file_type", AlbumArtistID: "album_artist_id", AlbumID: "album_id", GenreID: "genre_id", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var TrackRels = struct { AlbumArtist string Album string Genre string }{ AlbumArtist: "AlbumArtist", Album: "Album", Genre: "Genre", }
TrackRels is where relationship names are stored.
var TrackTableColumns = struct { TrackID string Title string Artist string Composer string TrackNo string Lyrics string Comment string Year string FilePath string FilePathHash string FileHash string Format string FileType string AlbumArtistID string AlbumID string GenreID string CreatedAt string UpdatedAt string }{ TrackID: "tracks.track_id", Title: "tracks.title", Artist: "tracks.artist", Composer: "tracks.composer", TrackNo: "tracks.track_no", Lyrics: "tracks.lyrics", Comment: "tracks.comment", Year: "tracks.year", FilePath: "tracks.file_path", FilePathHash: "tracks.file_path_hash", FileHash: "tracks.file_hash", Format: "tracks.format", FileType: "tracks.file_type", AlbumArtistID: "tracks.album_artist_id", AlbumID: "tracks.album_id", GenreID: "tracks.genre_id", CreatedAt: "tracks.created_at", UpdatedAt: "tracks.updated_at", }
var TrackWhere = struct { TrackID whereHelperint Title whereHelperstring Artist whereHelperstring Composer whereHelperstring TrackNo whereHelperint Lyrics whereHelperstring Comment whereHelperstring Year whereHelperint FilePath whereHelperstring FilePathHash whereHelperstring FileHash whereHelperstring Format whereHelperstring FileType whereHelperstring AlbumArtistID whereHelperint AlbumID whereHelperint GenreID whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ TrackID: whereHelperint{/* contains filtered or unexported fields */}, Title: whereHelperstring{/* contains filtered or unexported fields */}, Artist: whereHelperstring{/* contains filtered or unexported fields */}, Composer: whereHelperstring{/* contains filtered or unexported fields */}, TrackNo: whereHelperint{/* contains filtered or unexported fields */}, Lyrics: whereHelperstring{/* contains filtered or unexported fields */}, Comment: whereHelperstring{/* contains filtered or unexported fields */}, Year: whereHelperint{/* contains filtered or unexported fields */}, FilePath: whereHelperstring{/* contains filtered or unexported fields */}, FilePathHash: whereHelperstring{/* contains filtered or unexported fields */}, FileHash: whereHelperstring{/* contains filtered or unexported fields */}, Format: whereHelperstring{/* contains filtered or unexported fields */}, FileType: whereHelperstring{/* contains filtered or unexported fields */}, AlbumArtistID: whereHelperint{/* contains filtered or unexported fields */}, AlbumID: whereHelperint{/* contains filtered or unexported fields */}, GenreID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
Functions ¶
func AddAlbumArtistHook ¶
func AddAlbumArtistHook(hookPoint boil.HookPoint, albumArtistHook AlbumArtistHook)
AddAlbumArtistHook registers your hook function for all future operations.
func AddAlbumHook ¶
AddAlbumHook registers your hook function for all future operations.
func AddGenreHook ¶
AddGenreHook registers your hook function for all future operations.
func AddTrackHook ¶
AddTrackHook registers your hook function for all future operations.
func AlbumArtistExists ¶
func AlbumArtistExists(ctx context.Context, exec boil.ContextExecutor, albumArtistID int) (bool, error)
AlbumArtistExists checks if the AlbumArtist row exists.
func AlbumArtists ¶
AlbumArtists retrieves all the records using an executor.
func AlbumExists ¶
AlbumExists checks if the Album row exists.
func GenreExists ¶
GenreExists checks if the Genre row exists.
func TrackExists ¶
TrackExists checks if the Track row exists.
Types ¶
type Album ¶
type Album struct { AlbumID int `boil:"album_id" json:"album_id" toml:"album_id" yaml:"album_id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` AlbumArtistID int `boil:"album_artist_id" json:"album_artist_id" toml:"album_artist_id" yaml:"album_artist_id"` DiscNo int `boil:"disc_no" json:"disc_no" toml:"disc_no" yaml:"disc_no"` DiscTotal int `boil:"disc_total" json:"disc_total" toml:"disc_total" yaml:"disc_total"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` R *albumR `boil:"-" json:"-" toml:"-" yaml:"-"` L albumL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Album is an object representing the database table.
func FindAlbum ¶
func FindAlbum(ctx context.Context, exec boil.ContextExecutor, albumID int, selectCols ...string) (*Album, error)
FindAlbum retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Album) AddTracks ¶
func (o *Album) AddTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
AddTracks adds the given related objects to the existing relationships of the album, optionally inserting them as new records. Appends related to o.R.Tracks. Sets related.R.Album appropriately.
func (*Album) AlbumArtist ¶
AlbumArtist pointed to by the foreign key.
func (*Album) Delete ¶
Delete deletes a single Album record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Album) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Album) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Album) SetAlbumArtist ¶
func (o *Album) SetAlbumArtist(ctx context.Context, exec boil.ContextExecutor, insert bool, related *AlbumArtist) error
SetAlbumArtist of the album to the related item. Sets o.R.AlbumArtist to related. Adds o to related.R.Albums.
func (*Album) Update ¶
func (o *Album) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Album. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Album) Upsert ¶
func (o *Album) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type AlbumArtist ¶
type AlbumArtist struct { AlbumArtistID int `boil:"album_artist_id" json:"album_artist_id" toml:"album_artist_id" yaml:"album_artist_id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` NameHash string `boil:"name_hash" json:"name_hash" toml:"name_hash" yaml:"name_hash"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` R *albumArtistR `boil:"-" json:"-" toml:"-" yaml:"-"` L albumArtistL `boil:"-" json:"-" toml:"-" yaml:"-"` }
AlbumArtist is an object representing the database table.
func FindAlbumArtist ¶
func FindAlbumArtist(ctx context.Context, exec boil.ContextExecutor, albumArtistID int, selectCols ...string) (*AlbumArtist, error)
FindAlbumArtist retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*AlbumArtist) AddAlbums ¶
func (o *AlbumArtist) AddAlbums(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Album) error
AddAlbums adds the given related objects to the existing relationships of the album_artist, optionally inserting them as new records. Appends related to o.R.Albums. Sets related.R.AlbumArtist appropriately.
func (*AlbumArtist) AddTracks ¶
func (o *AlbumArtist) AddTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
AddTracks adds the given related objects to the existing relationships of the album_artist, optionally inserting them as new records. Appends related to o.R.Tracks. Sets related.R.AlbumArtist appropriately.
func (*AlbumArtist) Albums ¶
func (o *AlbumArtist) Albums(mods ...qm.QueryMod) albumQuery
Albums retrieves all the album's Albums with an executor.
func (*AlbumArtist) Delete ¶
func (o *AlbumArtist) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single AlbumArtist record with an executor. Delete will match against the primary key column to find the record to delete.
func (*AlbumArtist) Insert ¶
func (o *AlbumArtist) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*AlbumArtist) Reload ¶
func (o *AlbumArtist) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*AlbumArtist) Tracks ¶
func (o *AlbumArtist) Tracks(mods ...qm.QueryMod) trackQuery
Tracks retrieves all the track's Tracks with an executor.
func (*AlbumArtist) Update ¶
func (o *AlbumArtist) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the AlbumArtist. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*AlbumArtist) Upsert ¶
func (o *AlbumArtist) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type AlbumArtistHook ¶
type AlbumArtistHook func(context.Context, boil.ContextExecutor, *AlbumArtist) error
AlbumArtistHook is the signature for custom AlbumArtist hook methods
type AlbumArtistSlice ¶
type AlbumArtistSlice []*AlbumArtist
AlbumArtistSlice is an alias for a slice of pointers to AlbumArtist. This should almost always be used instead of []AlbumArtist.
func (AlbumArtistSlice) DeleteAll ¶
func (o AlbumArtistSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*AlbumArtistSlice) ReloadAll ¶
func (o *AlbumArtistSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (AlbumArtistSlice) UpdateAll ¶
func (o AlbumArtistSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type AlbumSlice ¶
type AlbumSlice []*Album
AlbumSlice is an alias for a slice of pointers to Album. This should almost always be used instead of []Album.
func (AlbumSlice) DeleteAll ¶
func (o AlbumSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*AlbumSlice) ReloadAll ¶
func (o *AlbumSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (AlbumSlice) UpdateAll ¶
func (o AlbumSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Genre ¶
type Genre struct { GenreID int `boil:"genre_id" json:"genre_id" toml:"genre_id" yaml:"genre_id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` NameHash string `boil:"name_hash" json:"name_hash" toml:"name_hash" yaml:"name_hash"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` R *genreR `boil:"-" json:"-" toml:"-" yaml:"-"` L genreL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Genre is an object representing the database table.
func FindGenre ¶
func FindGenre(ctx context.Context, exec boil.ContextExecutor, genreID int, selectCols ...string) (*Genre, error)
FindGenre retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Genre) AddTracks ¶
func (o *Genre) AddTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
AddTracks adds the given related objects to the existing relationships of the genre, optionally inserting them as new records. Appends related to o.R.Tracks. Sets related.R.Genre appropriately.
func (*Genre) Delete ¶
Delete deletes a single Genre record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Genre) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Genre) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Genre) Update ¶
func (o *Genre) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Genre. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Genre) Upsert ¶
func (o *Genre) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type GenreSlice ¶
type GenreSlice []*Genre
GenreSlice is an alias for a slice of pointers to Genre. This should almost always be used instead of []Genre.
func (GenreSlice) DeleteAll ¶
func (o GenreSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*GenreSlice) ReloadAll ¶
func (o *GenreSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (GenreSlice) UpdateAll ¶
func (o GenreSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Track ¶
type Track struct { TrackID int `boil:"track_id" json:"track_id" toml:"track_id" yaml:"track_id"` Title string `boil:"title" json:"title" toml:"title" yaml:"title"` Artist string `boil:"artist" json:"artist" toml:"artist" yaml:"artist"` Composer string `boil:"composer" json:"composer" toml:"composer" yaml:"composer"` TrackNo int `boil:"track_no" json:"track_no" toml:"track_no" yaml:"track_no"` Lyrics string `boil:"lyrics" json:"lyrics" toml:"lyrics" yaml:"lyrics"` Comment string `boil:"comment" json:"comment" toml:"comment" yaml:"comment"` Year int `boil:"year" json:"year" toml:"year" yaml:"year"` FilePath string `boil:"file_path" json:"file_path" toml:"file_path" yaml:"file_path"` FilePathHash string `boil:"file_path_hash" json:"file_path_hash" toml:"file_path_hash" yaml:"file_path_hash"` FileHash string `boil:"file_hash" json:"file_hash" toml:"file_hash" yaml:"file_hash"` Format string `boil:"format" json:"format" toml:"format" yaml:"format"` FileType string `boil:"file_type" json:"file_type" toml:"file_type" yaml:"file_type"` AlbumArtistID int `boil:"album_artist_id" json:"album_artist_id" toml:"album_artist_id" yaml:"album_artist_id"` AlbumID int `boil:"album_id" json:"album_id" toml:"album_id" yaml:"album_id"` GenreID int `boil:"genre_id" json:"genre_id" toml:"genre_id" yaml:"genre_id"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` R *trackR `boil:"-" json:"-" toml:"-" yaml:"-"` L trackL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Track is an object representing the database table.
func FindTrack ¶
func FindTrack(ctx context.Context, exec boil.ContextExecutor, trackID int, selectCols ...string) (*Track, error)
FindTrack retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Track) AlbumArtist ¶
AlbumArtist pointed to by the foreign key.
func (*Track) Delete ¶
Delete deletes a single Track record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Track) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Track) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Track) SetAlbum ¶
func (o *Track) SetAlbum(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Album) error
SetAlbum of the track to the related item. Sets o.R.Album to related. Adds o to related.R.Tracks.
func (*Track) SetAlbumArtist ¶
func (o *Track) SetAlbumArtist(ctx context.Context, exec boil.ContextExecutor, insert bool, related *AlbumArtist) error
SetAlbumArtist of the track to the related item. Sets o.R.AlbumArtist to related. Adds o to related.R.Tracks.
func (*Track) SetGenre ¶
func (o *Track) SetGenre(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Genre) error
SetGenre of the track to the related item. Sets o.R.Genre to related. Adds o to related.R.Tracks.
func (*Track) Update ¶
func (o *Track) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Track. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Track) Upsert ¶
func (o *Track) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type TrackSlice ¶
type TrackSlice []*Track
TrackSlice is an alias for a slice of pointers to Track. This should almost always be used instead of []Track.
func (TrackSlice) DeleteAll ¶
func (o TrackSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*TrackSlice) ReloadAll ¶
func (o *TrackSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (TrackSlice) UpdateAll ¶
func (o TrackSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.