Documentation
¶
Index ¶
- Variables
- func AddStreamHook(hookPoint boil.HookPoint, streamHook StreamHook)
- func AddTrackHook(hookPoint boil.HookPoint, trackHook TrackHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func StreamExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Streams(mods ...qm.QueryMod) streamQuery
- func TrackExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Tracks(mods ...qm.QueryMod) trackQuery
- type M
- type Stream
- func (o *Stream) AddCastTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
- func (o *Stream) CastTracks(mods ...qm.QueryMod) trackQuery
- func (o *Stream) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Stream) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Stream) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Stream) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Stream) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type StreamHook
- type StreamSlice
- type Track
- func (o *Track) Cast(mods ...qm.QueryMod) streamQuery
- func (o *Track) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- 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) SetCast(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Stream) 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, updateOnConflict bool, ...) error
- type TrackHook
- type TrackSlice
Constants ¶
This section is empty.
Variables ¶
var ErrSyncFail = errors.New("models: 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 StreamColumns = struct { ID string CreatedAt string UpdatedAt string Name string Description string URL string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", Name: "name", Description: "description", URL: "url", }
var StreamRels = struct { CastTracks string }{ CastTracks: "CastTracks", }
StreamRels is where relationship names are stored.
var StreamTableColumns = struct { ID string CreatedAt string UpdatedAt string Name string Description string URL string }{ ID: "stream.id", CreatedAt: "stream.created_at", UpdatedAt: "stream.updated_at", Name: "stream.name", Description: "stream.description", URL: "stream.url", }
var StreamWhere = struct { ID whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time Name whereHelperstring Description whereHelpernull_String URL whereHelperstring }{ ID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Description: whereHelpernull_String{/* contains filtered or unexported fields */}, URL: whereHelperstring{/* contains filtered or unexported fields */}, }
var TableNames = struct { Stream string Track string }{ Stream: "stream", Track: "track", }
var TrackColumns = struct { ID string CastID string StartedAt string EndedAt string Title string Listeners string }{ ID: "id", CastID: "cast_id", StartedAt: "started_at", EndedAt: "ended_at", Title: "title", Listeners: "listeners", }
var TrackRels = struct { Cast string }{ Cast: "Cast", }
TrackRels is where relationship names are stored.
var TrackTableColumns = struct { ID string CastID string StartedAt string EndedAt string Title string Listeners string }{ ID: "track.id", CastID: "track.cast_id", StartedAt: "track.started_at", EndedAt: "track.ended_at", Title: "track.title", Listeners: "track.listeners", }
var TrackWhere = struct { ID whereHelperint64 CastID whereHelperint StartedAt whereHelpertime_Time EndedAt whereHelpertime_Time Title whereHelperstring Listeners whereHelperint }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, CastID: whereHelperint{/* contains filtered or unexported fields */}, StartedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, EndedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Title: whereHelperstring{/* contains filtered or unexported fields */}, Listeners: whereHelperint{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func AddStreamHook ¶
func AddStreamHook(hookPoint boil.HookPoint, streamHook StreamHook)
AddStreamHook registers your hook function for all future operations.
func AddTrackHook ¶
AddTrackHook registers your hook function for all future operations.
func StreamExists ¶
StreamExists checks if the Stream row exists.
func TrackExists ¶
TrackExists checks if the Track row exists.
Types ¶
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Stream ¶
type Stream struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"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"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
Description null.String `boil:"description" json:"description,omitempty" toml:"description" yaml:"description,omitempty"`
URL string `boil:"url" json:"url" toml:"url" yaml:"url"`
R *streamR `boil:"-" json:"-" toml:"-" yaml:"-"`
L streamL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Stream is an object representing the database table.
func FindStream ¶
func FindStream(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Stream, error)
FindStream retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Stream) AddCastTracks ¶
func (o *Stream) AddCastTracks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Track) error
AddCastTracks adds the given related objects to the existing relationships of the stream, optionally inserting them as new records. Appends related to o.R.CastTracks. Sets related.R.Cast appropriately.
func (*Stream) CastTracks ¶
CastTracks retrieves all the track's Tracks with an executor via cast_id column.
func (*Stream) Delete ¶
Delete deletes a single Stream record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Stream) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Stream) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Stream) Update ¶
func (o *Stream) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Stream. 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 (*Stream) Upsert ¶
func (o *Stream) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, 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 StreamHook ¶
StreamHook is the signature for custom Stream hook methods
type StreamSlice ¶
type StreamSlice []*Stream
StreamSlice is an alias for a slice of pointers to Stream. This should almost always be used instead of []Stream.
func (StreamSlice) DeleteAll ¶
func (o StreamSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*StreamSlice) ReloadAll ¶
func (o *StreamSlice) 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 (StreamSlice) UpdateAll ¶
func (o StreamSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Track ¶
type Track struct {
ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"`
CastID int `boil:"cast_id" json:"cast_id" toml:"cast_id" yaml:"cast_id"`
StartedAt time.Time `boil:"started_at" json:"started_at" toml:"started_at" yaml:"started_at"`
EndedAt time.Time `boil:"ended_at" json:"ended_at" toml:"ended_at" yaml:"ended_at"`
Title string `boil:"title" json:"title" toml:"title" yaml:"title"`
Listeners int `boil:"listeners" json:"listeners" toml:"listeners" yaml:"listeners"`
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, iD int64, 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) 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) SetCast ¶
func (o *Track) SetCast(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Stream) error
SetCast of the track to the related item. Sets o.R.Cast to related. Adds o to related.R.CastTracks.
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, updateOnConflict bool, conflictColumns []string, 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.