models

package
v1.18.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var ScheduledEventColumns = struct {
	ID           string
	CreatedAt    string
	TriggersAt   string
	RetryOnError string
	GuildID      string
	EventName    string
	Data         string
	Processed    string
}{
	ID:           "id",
	CreatedAt:    "created_at",
	TriggersAt:   "triggers_at",
	RetryOnError: "retry_on_error",
	GuildID:      "guild_id",
	EventName:    "event_name",
	Data:         "data",
	Processed:    "processed",
}
View Source
var ScheduledEventRels = struct {
}{}

ScheduledEventRels is where relationship names are stored.

View Source
var ScheduledEventWhere = struct {
	ID           whereHelperint64
	CreatedAt    whereHelpertime_Time
	TriggersAt   whereHelpertime_Time
	RetryOnError whereHelperbool
	GuildID      whereHelperint64
	EventName    whereHelperstring
	Data         whereHelpertypes_JSON
	Processed    whereHelperbool
}{
	ID:           whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	TriggersAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
	RetryOnError: whereHelperbool{/* contains filtered or unexported fields */},
	GuildID:      whereHelperint64{/* contains filtered or unexported fields */},
	EventName:    whereHelperstring{/* contains filtered or unexported fields */},
	Data:         whereHelpertypes_JSON{/* contains filtered or unexported fields */},
	Processed:    whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	ScheduledEvents string
}{
	ScheduledEvents: "scheduled_events",
}

Functions

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func ScheduledEventExists

func ScheduledEventExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

ScheduledEventExists checks if the ScheduledEvent row exists.

func ScheduledEventExistsG

func ScheduledEventExistsG(ctx context.Context, iD int64) (bool, error)

ScheduledEventExistsG checks if the ScheduledEvent row exists.

func ScheduledEvents

func ScheduledEvents(mods ...qm.QueryMod) scheduledEventQuery

ScheduledEvents retrieves all the records using an executor.

Types

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type ScheduledEvent

type ScheduledEvent struct {
	ID           int64      `boil:"id" json:"id" toml:"id" yaml:"id"`
	CreatedAt    time.Time  `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	TriggersAt   time.Time  `boil:"triggers_at" json:"triggers_at" toml:"triggers_at" yaml:"triggers_at"`
	RetryOnError bool       `boil:"retry_on_error" json:"retry_on_error" toml:"retry_on_error" yaml:"retry_on_error"`
	GuildID      int64      `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	EventName    string     `boil:"event_name" json:"event_name" toml:"event_name" yaml:"event_name"`
	Data         types.JSON `boil:"data" json:"data" toml:"data" yaml:"data"`
	Processed    bool       `boil:"processed" json:"processed" toml:"processed" yaml:"processed"`

	R *scheduledEventR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L scheduledEventL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

ScheduledEvent is an object representing the database table.

func FindScheduledEvent

func FindScheduledEvent(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*ScheduledEvent, error)

FindScheduledEvent retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindScheduledEventG

func FindScheduledEventG(ctx context.Context, iD int64, selectCols ...string) (*ScheduledEvent, error)

FindScheduledEventG retrieves a single record by ID.

func (*ScheduledEvent) Delete

func (o *ScheduledEvent) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single ScheduledEvent record with an executor. Delete will match against the primary key column to find the record to delete.

func (*ScheduledEvent) DeleteG

func (o *ScheduledEvent) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single ScheduledEvent record. DeleteG will match against the primary key column to find the record to delete.

func (*ScheduledEvent) Insert

func (o *ScheduledEvent) 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 (*ScheduledEvent) InsertG

func (o *ScheduledEvent) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*ScheduledEvent) Reload

func (o *ScheduledEvent) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*ScheduledEvent) ReloadG

func (o *ScheduledEvent) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*ScheduledEvent) Update

func (o *ScheduledEvent) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the ScheduledEvent. 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 (*ScheduledEvent) UpdateG

func (o *ScheduledEvent) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single ScheduledEvent record using the global executor. See Update for more documentation.

func (*ScheduledEvent) Upsert

func (o *ScheduledEvent) 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.

func (*ScheduledEvent) UpsertG

func (o *ScheduledEvent) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type ScheduledEventSlice

type ScheduledEventSlice []*ScheduledEvent

ScheduledEventSlice is an alias for a slice of pointers to ScheduledEvent. This should generally be used opposed to []ScheduledEvent.

func (ScheduledEventSlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (ScheduledEventSlice) DeleteAllG

func (o ScheduledEventSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*ScheduledEventSlice) ReloadAll

func (o *ScheduledEventSlice) 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 (*ScheduledEventSlice) ReloadAllG

func (o *ScheduledEventSlice) ReloadAllG(ctx context.Context) error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (ScheduledEventSlice) UpdateAll

func (o ScheduledEventSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (ScheduledEventSlice) UpdateAllG

func (o ScheduledEventSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

Jump to

Keyboard shortcuts

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