Documentation ¶
Index ¶
- Variables
- func AddEventHook(hookPoint boil.HookPoint, eventHook EventHook)
- func AddWorkshopHook(hookPoint boil.HookPoint, workshopHook WorkshopHook)
- func EventExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Events(mods ...qm.QueryMod) eventQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func WorkshopExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Workshops(mods ...qm.QueryMod) workshopQuery
- type Event
- func (o *Event) AddWorkshops(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Event) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *Event) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Event) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Event) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Event) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Event) Workshops(mods ...qm.QueryMod) workshopQuery
- type EventHook
- type EventSlice
- type M
- type Workshop
- func (o *Workshop) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *Workshop) Event(mods ...qm.QueryMod) eventQuery
- func (o *Workshop) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Workshop) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Workshop) SetEvent(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Event) error
- func (o *Workshop) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Workshop) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type WorkshopHook
- type WorkshopSlice
- func (o WorkshopSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *WorkshopSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o WorkshopSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
Constants ¶
This section is empty.
Variables ¶
var ErrSyncFail = errors.New("dbmodels: 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 EventColumns = struct { ID string Info string Starts string Ends string InstanceID string OwnerID string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", Info: "info", Starts: "starts", Ends: "ends", InstanceID: "instance_id", OwnerID: "owner_id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var EventRels = struct { Workshops string }{ Workshops: "Workshops", }
EventRels is where relationship names are stored.
var EventTableColumns = struct { ID string Info string Starts string Ends string InstanceID string OwnerID string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "events.id", Info: "events.info", Starts: "events.starts", Ends: "events.ends", InstanceID: "events.instance_id", OwnerID: "events.owner_id", CreatedAt: "events.created_at", UpdatedAt: "events.updated_at", DeletedAt: "events.deleted_at", }
var EventWhere = struct { ID whereHelperstring Info whereHelpertypes_JSON Starts whereHelpertime_Time Ends whereHelpernull_Time InstanceID whereHelperstring OwnerID whereHelpernull_String CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Info: whereHelpertypes_JSON{/* contains filtered or unexported fields */}, Starts: whereHelpertime_Time{/* contains filtered or unexported fields */}, Ends: whereHelpernull_Time{/* contains filtered or unexported fields */}, InstanceID: whereHelperstring{/* contains filtered or unexported fields */}, OwnerID: whereHelpernull_String{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { Events string Workshops string }{ Events: "events", Workshops: "workshops", }
var WorkshopColumns = struct { ID string Info string Starts string Ends string EventID string Participants string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", Info: "info", Starts: "starts", Ends: "ends", EventID: "event_id", Participants: "participants", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var WorkshopRels = struct { Event string }{ Event: "Event", }
WorkshopRels is where relationship names are stored.
var WorkshopTableColumns = struct { ID string Info string Starts string Ends string EventID string Participants string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "workshops.id", Info: "workshops.info", Starts: "workshops.starts", Ends: "workshops.ends", EventID: "workshops.event_id", Participants: "workshops.participants", CreatedAt: "workshops.created_at", UpdatedAt: "workshops.updated_at", DeletedAt: "workshops.deleted_at", }
var WorkshopWhere = struct { ID whereHelperstring Info whereHelpertypes_JSON Starts whereHelpertime_Time Ends whereHelpernull_Time EventID whereHelperstring Participants whereHelpertypes_JSON CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Info: whereHelpertypes_JSON{/* contains filtered or unexported fields */}, Starts: whereHelpertime_Time{/* contains filtered or unexported fields */}, Ends: whereHelpernull_Time{/* contains filtered or unexported fields */}, EventID: whereHelperstring{/* contains filtered or unexported fields */}, Participants: whereHelpertypes_JSON{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
Functions ¶
func AddEventHook ¶
AddEventHook registers your hook function for all future operations.
func AddWorkshopHook ¶
func AddWorkshopHook(hookPoint boil.HookPoint, workshopHook WorkshopHook)
AddWorkshopHook registers your hook function for all future operations.
func EventExists ¶
EventExists checks if the Event row exists.
func WorkshopExists ¶
WorkshopExists checks if the Workshop row exists.
Types ¶
type Event ¶
type Event struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Info types.JSON `boil:"info" json:"info" toml:"info" yaml:"info"` Starts time.Time `boil:"starts" json:"starts" toml:"starts" yaml:"starts"` Ends null.Time `boil:"ends" json:"ends,omitempty" toml:"ends" yaml:"ends,omitempty"` InstanceID string `boil:"instance_id" json:"instance_id" toml:"instance_id" yaml:"instance_id"` OwnerID null.String `boil:"owner_id" json:"owner_id,omitempty" toml:"owner_id" yaml:"owner_id,omitempty"` 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"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *eventR `boil:"-" json:"-" toml:"-" yaml:"-"` L eventL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Event is an object representing the database table.
func FindEvent ¶
func FindEvent(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Event, error)
FindEvent retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Event) AddWorkshops ¶
func (o *Event) AddWorkshops(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Workshop) error
AddWorkshops adds the given related objects to the existing relationships of the event, optionally inserting them as new records. Appends related to o.R.Workshops. Sets related.R.Event appropriately.
func (*Event) Delete ¶
func (o *Event) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
Delete deletes a single Event record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Event) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Event) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Event) Update ¶
func (o *Event) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Event. 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 (*Event) Upsert ¶
func (o *Event) 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 EventSlice ¶
type EventSlice []*Event
EventSlice is an alias for a slice of pointers to Event. This should almost always be used instead of []Event.
func (EventSlice) DeleteAll ¶
func (o EventSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*EventSlice) ReloadAll ¶
func (o *EventSlice) 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 (EventSlice) UpdateAll ¶
func (o EventSlice) 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 Workshop ¶
type Workshop struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Info types.JSON `boil:"info" json:"info" toml:"info" yaml:"info"` Starts time.Time `boil:"starts" json:"starts" toml:"starts" yaml:"starts"` Ends null.Time `boil:"ends" json:"ends,omitempty" toml:"ends" yaml:"ends,omitempty"` EventID string `boil:"event_id" json:"event_id" toml:"event_id" yaml:"event_id"` Participants types.JSON `boil:"participants" json:"participants" toml:"participants" yaml:"participants"` 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"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *workshopR `boil:"-" json:"-" toml:"-" yaml:"-"` L workshopL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Workshop is an object representing the database table.
func FindWorkshop ¶
func FindWorkshop(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Workshop, error)
FindWorkshop retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Workshop) Delete ¶
func (o *Workshop) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
Delete deletes a single Workshop record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Workshop) Insert ¶
func (o *Workshop) 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 (*Workshop) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Workshop) SetEvent ¶
func (o *Workshop) SetEvent(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Event) error
SetEvent of the workshop to the related item. Sets o.R.Event to related. Adds o to related.R.Workshops.
func (*Workshop) Update ¶
func (o *Workshop) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Workshop. 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 (*Workshop) Upsert ¶
func (o *Workshop) 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 WorkshopHook ¶
WorkshopHook is the signature for custom Workshop hook methods
type WorkshopSlice ¶
type WorkshopSlice []*Workshop
WorkshopSlice is an alias for a slice of pointers to Workshop. This should almost always be used instead of []Workshop.
func (WorkshopSlice) DeleteAll ¶
func (o WorkshopSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*WorkshopSlice) ReloadAll ¶
func (o *WorkshopSlice) 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 (WorkshopSlice) UpdateAll ¶
func (o WorkshopSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.