models

package
v2.40.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 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 RSVPParticipantColumns = struct {
	UserID                  string
	RSVPSessionsMessageID   string
	GuildID                 string
	JoinState               string
	ReminderEnabled         string
	MarkedAsParticipatingAt string
}{
	UserID:                  "user_id",
	RSVPSessionsMessageID:   "rsvp_sessions_message_id",
	GuildID:                 "guild_id",
	JoinState:               "join_state",
	ReminderEnabled:         "reminder_enabled",
	MarkedAsParticipatingAt: "marked_as_participating_at",
}
View Source
var RSVPParticipantRels = struct {
	RSVPSessionsMessage string
}{
	RSVPSessionsMessage: "RSVPSessionsMessage",
}

RSVPParticipantRels is where relationship names are stored.

View Source
var RSVPParticipantTableColumns = struct {
	UserID                  string
	RSVPSessionsMessageID   string
	GuildID                 string
	JoinState               string
	ReminderEnabled         string
	MarkedAsParticipatingAt string
}{
	UserID:                  "rsvp_participants.user_id",
	RSVPSessionsMessageID:   "rsvp_participants.rsvp_sessions_message_id",
	GuildID:                 "rsvp_participants.guild_id",
	JoinState:               "rsvp_participants.join_state",
	ReminderEnabled:         "rsvp_participants.reminder_enabled",
	MarkedAsParticipatingAt: "rsvp_participants.marked_as_participating_at",
}
View Source
var RSVPParticipantWhere = struct {
	UserID                  whereHelperint64
	RSVPSessionsMessageID   whereHelperint64
	GuildID                 whereHelperint64
	JoinState               whereHelperint16
	ReminderEnabled         whereHelperbool
	MarkedAsParticipatingAt whereHelpertime_Time
}{
	UserID:                  whereHelperint64{/* contains filtered or unexported fields */},
	RSVPSessionsMessageID:   whereHelperint64{/* contains filtered or unexported fields */},
	GuildID:                 whereHelperint64{/* contains filtered or unexported fields */},
	JoinState:               whereHelperint16{/* contains filtered or unexported fields */},
	ReminderEnabled:         whereHelperbool{/* contains filtered or unexported fields */},
	MarkedAsParticipatingAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var RSVPSessionColumns = struct {
	MessageID       string
	GuildID         string
	ChannelID       string
	LocalID         string
	AuthorID        string
	CreatedAt       string
	StartsAt        string
	Title           string
	Description     string
	MaxParticipants string
	SendReminders   string
	SentReminders   string
}{
	MessageID:       "message_id",
	GuildID:         "guild_id",
	ChannelID:       "channel_id",
	LocalID:         "local_id",
	AuthorID:        "author_id",
	CreatedAt:       "created_at",
	StartsAt:        "starts_at",
	Title:           "title",
	Description:     "description",
	MaxParticipants: "max_participants",
	SendReminders:   "send_reminders",
	SentReminders:   "sent_reminders",
}
View Source
var RSVPSessionRels = struct {
	RSVPSessionsMessageRSVPParticipants string
}{
	RSVPSessionsMessageRSVPParticipants: "RSVPSessionsMessageRSVPParticipants",
}

RSVPSessionRels is where relationship names are stored.

View Source
var RSVPSessionTableColumns = struct {
	MessageID       string
	GuildID         string
	ChannelID       string
	LocalID         string
	AuthorID        string
	CreatedAt       string
	StartsAt        string
	Title           string
	Description     string
	MaxParticipants string
	SendReminders   string
	SentReminders   string
}{
	MessageID:       "rsvp_sessions.message_id",
	GuildID:         "rsvp_sessions.guild_id",
	ChannelID:       "rsvp_sessions.channel_id",
	LocalID:         "rsvp_sessions.local_id",
	AuthorID:        "rsvp_sessions.author_id",
	CreatedAt:       "rsvp_sessions.created_at",
	StartsAt:        "rsvp_sessions.starts_at",
	Title:           "rsvp_sessions.title",
	Description:     "rsvp_sessions.description",
	MaxParticipants: "rsvp_sessions.max_participants",
	SendReminders:   "rsvp_sessions.send_reminders",
	SentReminders:   "rsvp_sessions.sent_reminders",
}
View Source
var RSVPSessionWhere = struct {
	MessageID       whereHelperint64
	GuildID         whereHelperint64
	ChannelID       whereHelperint64
	LocalID         whereHelperint64
	AuthorID        whereHelperint64
	CreatedAt       whereHelpertime_Time
	StartsAt        whereHelpertime_Time
	Title           whereHelperstring
	Description     whereHelperstring
	MaxParticipants whereHelperint
	SendReminders   whereHelperbool
	SentReminders   whereHelperbool
}{
	MessageID:       whereHelperint64{/* contains filtered or unexported fields */},
	GuildID:         whereHelperint64{/* contains filtered or unexported fields */},
	ChannelID:       whereHelperint64{/* contains filtered or unexported fields */},
	LocalID:         whereHelperint64{/* contains filtered or unexported fields */},
	AuthorID:        whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	StartsAt:        whereHelpertime_Time{/* contains filtered or unexported fields */},
	Title:           whereHelperstring{/* contains filtered or unexported fields */},
	Description:     whereHelperstring{/* contains filtered or unexported fields */},
	MaxParticipants: whereHelperint{/* contains filtered or unexported fields */},
	SendReminders:   whereHelperbool{/* contains filtered or unexported fields */},
	SentReminders:   whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	RSVPParticipants string
	RSVPSessions     string
}{
	RSVPParticipants: "rsvp_participants",
	RSVPSessions:     "rsvp_sessions",
}

Functions

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

func RSVPParticipantExists

func RSVPParticipantExists(ctx context.Context, exec boil.ContextExecutor, rSVPSessionsMessageID int64, userID int64) (bool, error)

RSVPParticipantExists checks if the RSVPParticipant row exists.

func RSVPParticipantExistsG

func RSVPParticipantExistsG(ctx context.Context, rSVPSessionsMessageID int64, userID int64) (bool, error)

RSVPParticipantExistsG checks if the RSVPParticipant row exists.

func RSVPParticipants

func RSVPParticipants(mods ...qm.QueryMod) rsvpParticipantQuery

RSVPParticipants retrieves all the records using an executor.

func RSVPSessionExists

func RSVPSessionExists(ctx context.Context, exec boil.ContextExecutor, messageID int64) (bool, error)

RSVPSessionExists checks if the RSVPSession row exists.

func RSVPSessionExistsG

func RSVPSessionExistsG(ctx context.Context, messageID int64) (bool, error)

RSVPSessionExistsG checks if the RSVPSession row exists.

func RSVPSessions

func RSVPSessions(mods ...qm.QueryMod) rsvpSessionQuery

RSVPSessions 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 RSVPParticipant

type RSVPParticipant struct {
	UserID                  int64     `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	RSVPSessionsMessageID   int64     `` /* 127-byte string literal not displayed */
	GuildID                 int64     `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	JoinState               int16     `boil:"join_state" json:"join_state" toml:"join_state" yaml:"join_state"`
	ReminderEnabled         bool      `boil:"reminder_enabled" json:"reminder_enabled" toml:"reminder_enabled" yaml:"reminder_enabled"`
	MarkedAsParticipatingAt time.Time `` /* 135-byte string literal not displayed */

	R *rsvpParticipantR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L rsvpParticipantL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

RSVPParticipant is an object representing the database table.

func FindRSVPParticipant

func FindRSVPParticipant(ctx context.Context, exec boil.ContextExecutor, rSVPSessionsMessageID int64, userID int64, selectCols ...string) (*RSVPParticipant, error)

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

func FindRSVPParticipantG

func FindRSVPParticipantG(ctx context.Context, rSVPSessionsMessageID int64, userID int64, selectCols ...string) (*RSVPParticipant, error)

FindRSVPParticipantG retrieves a single record by ID.

func (*RSVPParticipant) Delete

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

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

func (*RSVPParticipant) DeleteG

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

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

func (*RSVPParticipant) Exists added in v2.36.0

func (o *RSVPParticipant) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the RSVPParticipant row exists.

func (*RSVPParticipant) Insert

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

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

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

func (*RSVPParticipant) RSVPSessionsMessage

func (o *RSVPParticipant) RSVPSessionsMessage(mods ...qm.QueryMod) rsvpSessionQuery

RSVPSessionsMessage pointed to by the foreign key.

func (*RSVPParticipant) Reload

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

func (*RSVPParticipant) ReloadG

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

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

func (*RSVPParticipant) SetRSVPSessionsMessage

func (o *RSVPParticipant) SetRSVPSessionsMessage(ctx context.Context, exec boil.ContextExecutor, insert bool, related *RSVPSession) error

SetRSVPSessionsMessage of the rsvpParticipant to the related item. Sets o.R.RSVPSessionsMessage to related. Adds o to related.R.RSVPSessionsMessageRSVPParticipants.

func (*RSVPParticipant) SetRSVPSessionsMessageG

func (o *RSVPParticipant) SetRSVPSessionsMessageG(ctx context.Context, insert bool, related *RSVPSession) error

SetRSVPSessionsMessageG of the rsvpParticipant to the related item. Sets o.R.RSVPSessionsMessage to related. Adds o to related.R.RSVPSessionsMessageRSVPParticipants. Uses the global database handle.

func (*RSVPParticipant) Update

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

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

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

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

func (*RSVPParticipant) Upsert

func (o *RSVPParticipant) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 (*RSVPParticipant) UpsertG

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

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

type RSVPParticipantSlice

type RSVPParticipantSlice []*RSVPParticipant

RSVPParticipantSlice is an alias for a slice of pointers to RSVPParticipant. This should almost always be used instead of []RSVPParticipant.

func (RSVPParticipantSlice) DeleteAll

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

func (RSVPParticipantSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*RSVPParticipantSlice) ReloadAll

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

func (*RSVPParticipantSlice) ReloadAllG

func (o *RSVPParticipantSlice) 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 (RSVPParticipantSlice) UpdateAll

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

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

func (RSVPParticipantSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type RSVPSession

type RSVPSession struct {
	MessageID       int64     `boil:"message_id" json:"message_id" toml:"message_id" yaml:"message_id"`
	GuildID         int64     `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	ChannelID       int64     `boil:"channel_id" json:"channel_id" toml:"channel_id" yaml:"channel_id"`
	LocalID         int64     `boil:"local_id" json:"local_id" toml:"local_id" yaml:"local_id"`
	AuthorID        int64     `boil:"author_id" json:"author_id" toml:"author_id" yaml:"author_id"`
	CreatedAt       time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	StartsAt        time.Time `boil:"starts_at" json:"starts_at" toml:"starts_at" yaml:"starts_at"`
	Title           string    `boil:"title" json:"title" toml:"title" yaml:"title"`
	Description     string    `boil:"description" json:"description" toml:"description" yaml:"description"`
	MaxParticipants int       `boil:"max_participants" json:"max_participants" toml:"max_participants" yaml:"max_participants"`
	SendReminders   bool      `boil:"send_reminders" json:"send_reminders" toml:"send_reminders" yaml:"send_reminders"`
	SentReminders   bool      `boil:"sent_reminders" json:"sent_reminders" toml:"sent_reminders" yaml:"sent_reminders"`

	R *rsvpSessionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L rsvpSessionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

RSVPSession is an object representing the database table.

func FindRSVPSession

func FindRSVPSession(ctx context.Context, exec boil.ContextExecutor, messageID int64, selectCols ...string) (*RSVPSession, error)

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

func FindRSVPSessionG

func FindRSVPSessionG(ctx context.Context, messageID int64, selectCols ...string) (*RSVPSession, error)

FindRSVPSessionG retrieves a single record by ID.

func (*RSVPSession) AddRSVPSessionsMessageRSVPParticipants

func (o *RSVPSession) AddRSVPSessionsMessageRSVPParticipants(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*RSVPParticipant) error

AddRSVPSessionsMessageRSVPParticipants adds the given related objects to the existing relationships of the rsvp_session, optionally inserting them as new records. Appends related to o.R.RSVPSessionsMessageRSVPParticipants. Sets related.R.RSVPSessionsMessage appropriately.

func (*RSVPSession) AddRSVPSessionsMessageRSVPParticipantsG

func (o *RSVPSession) AddRSVPSessionsMessageRSVPParticipantsG(ctx context.Context, insert bool, related ...*RSVPParticipant) error

AddRSVPSessionsMessageRSVPParticipantsG adds the given related objects to the existing relationships of the rsvp_session, optionally inserting them as new records. Appends related to o.R.RSVPSessionsMessageRSVPParticipants. Sets related.R.RSVPSessionsMessage appropriately. Uses the global database handle.

func (*RSVPSession) Delete

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

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

func (*RSVPSession) DeleteG

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

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

func (*RSVPSession) Exists added in v2.36.0

func (o *RSVPSession) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the RSVPSession row exists.

func (*RSVPSession) Insert

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

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

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

func (*RSVPSession) RSVPSessionsMessageRSVPParticipants

func (o *RSVPSession) RSVPSessionsMessageRSVPParticipants(mods ...qm.QueryMod) rsvpParticipantQuery

RSVPSessionsMessageRSVPParticipants retrieves all the rsvp_participant's RSVPParticipants with an executor via rsvp_sessions_message_id column.

func (*RSVPSession) Reload

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

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

func (*RSVPSession) ReloadG

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

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

func (*RSVPSession) Update

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

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

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

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

func (*RSVPSession) Upsert

func (o *RSVPSession) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 (*RSVPSession) UpsertG

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

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

type RSVPSessionSlice

type RSVPSessionSlice []*RSVPSession

RSVPSessionSlice is an alias for a slice of pointers to RSVPSession. This should almost always be used instead of []RSVPSession.

func (RSVPSessionSlice) DeleteAll

func (o RSVPSessionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (RSVPSessionSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*RSVPSessionSlice) ReloadAll

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

func (o *RSVPSessionSlice) 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 (RSVPSessionSlice) UpdateAll

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

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

func (RSVPSessionSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type UpsertOptionFunc added in v2.36.0

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget added in v2.36.0

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet added in v2.36.0

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions added in v2.36.0

type UpsertOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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