models

package
v0.0.0-...-835c9c4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 15 Imported by: 0

README

This folder is generated

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdminSessionColumns = struct {
	ID        string
	IP        string
	Email     string
	CreatedAt string
}{
	ID:        "id",
	IP:        "ip",
	Email:     "email",
	CreatedAt: "created_at",
}
View Source
var AdminSessionRels = struct {
}{}

AdminSessionRels is where relationship names are stored.

View Source
var AdminSessionWhere = struct {
	ID        whereHelperint
	IP        whereHelperstring
	Email     whereHelperstring
	CreatedAt whereHelpertime_Time
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	IP:        whereHelperstring{/* contains filtered or unexported fields */},
	Email:     whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
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 GroupColumns = struct {
	ID        string
	Name      string
	ZoomLink  string
	Published string
	Archived  string
	UpdatedAt string
	CreatedAt string
}{
	ID:        "id",
	Name:      "name",
	ZoomLink:  "zoom_link",
	Published: "published",
	Archived:  "archived",
	UpdatedAt: "updated_at",
	CreatedAt: "created_at",
}
View Source
var GroupRels = struct {
	Users string
}{
	Users: "Users",
}

GroupRels is where relationship names are stored.

View Source
var GroupWhere = struct {
	ID        whereHelperint
	Name      whereHelperstring
	ZoomLink  whereHelperstring
	Published whereHelperbool
	Archived  whereHelperbool
	UpdatedAt whereHelpertime_Time
	CreatedAt whereHelpertime_Time
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	ZoomLink:  whereHelperstring{/* contains filtered or unexported fields */},
	Published: whereHelperbool{/* contains filtered or unexported fields */},
	Archived:  whereHelperbool{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var OauthColumns = struct {
	ID         string
	Provider   string
	ProviderID string
	UpdatedAt  string
	CreatedAt  string
}{
	ID:         "id",
	Provider:   "provider",
	ProviderID: "provider_id",
	UpdatedAt:  "updated_at",
	CreatedAt:  "created_at",
}
View Source
var OauthRels = struct {
	Users string
}{
	Users: "Users",
}

OauthRels is where relationship names are stored.

View Source
var OauthWhere = struct {
	ID         whereHelperint
	Provider   whereHelperstring
	ProviderID whereHelperstring
	UpdatedAt  whereHelpertime_Time
	CreatedAt  whereHelpertime_Time
}{
	ID:         whereHelperint{/* contains filtered or unexported fields */},
	Provider:   whereHelperstring{/* contains filtered or unexported fields */},
	ProviderID: whereHelperstring{/* contains filtered or unexported fields */},
	UpdatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var SessionColumns = struct {
	ID        string
	IP        string
	UserID    string
	CreatedAt string
}{
	ID:        "id",
	IP:        "ip",
	UserID:    "user_id",
	CreatedAt: "created_at",
}
View Source
var SessionRels = struct {
	User string
}{
	User: "User",
}

SessionRels is where relationship names are stored.

View Source
var SessionWhere = struct {
	ID        whereHelperint
	IP        whereHelperstring
	UserID    whereHelperint
	CreatedAt whereHelpertime_Time
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	IP:        whereHelperstring{/* contains filtered or unexported fields */},
	UserID:    whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var SettingColumns = struct {
	ID        string
	Sheet     string
	Script    string
	SyncOnce  string
	UpdatedAt string
}{
	ID:        "id",
	Sheet:     "sheet",
	Script:    "script",
	SyncOnce:  "sync_once",
	UpdatedAt: "updated_at",
}
View Source
var SettingRels = struct {
}{}

SettingRels is where relationship names are stored.

View Source
var SettingWhere = struct {
	ID        whereHelperint
	Sheet     whereHelperstring
	Script    whereHelperstring
	SyncOnce  whereHelperstring
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	Sheet:     whereHelperstring{/* contains filtered or unexported fields */},
	Script:    whereHelperstring{/* contains filtered or unexported fields */},
	SyncOnce:  whereHelperstring{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	AdminSessions string
	GroupMembers  string
	Groups        string
	OauthUsers    string
	Oauths        string
	Sessions      string
	Settings      string
	Users         string
}{
	AdminSessions: "admin_sessions",
	GroupMembers:  "group_members",
	Groups:        "groups",
	OauthUsers:    "oauth_users",
	Oauths:        "oauths",
	Sessions:      "sessions",
	Settings:      "settings",
	Users:         "users",
}
View Source
var UserColumns = struct {
	ID        string
	Name      string
	Email     string
	Blocked   string
	UpdatedAt string
	CreatedAt string
}{
	ID:        "id",
	Name:      "name",
	Email:     "email",
	Blocked:   "blocked",
	UpdatedAt: "updated_at",
	CreatedAt: "created_at",
}
View Source
var UserRels = struct {
	Groups   string
	Oauths   string
	Sessions string
}{
	Groups:   "Groups",
	Oauths:   "Oauths",
	Sessions: "Sessions",
}

UserRels is where relationship names are stored.

View Source
var UserWhere = struct {
	ID        whereHelperint
	Name      whereHelperstring
	Email     whereHelperstring
	Blocked   whereHelperbool
	UpdatedAt whereHelpertime_Time
	CreatedAt whereHelpertime_Time
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	Email:     whereHelperstring{/* contains filtered or unexported fields */},
	Blocked:   whereHelperbool{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}

Functions

func AdminSessionExists

func AdminSessionExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

AdminSessionExists checks if the AdminSession row exists.

func AdminSessions

func AdminSessions(mods ...qm.QueryMod) adminSessionQuery

AdminSessions retrieves all the records using an executor.

func GroupExists

func GroupExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

GroupExists checks if the Group row exists.

func Groups

func Groups(mods ...qm.QueryMod) groupQuery

Groups retrieves all the records using an executor.

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

func OauthExists

func OauthExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

OauthExists checks if the Oauth row exists.

func Oauths

func Oauths(mods ...qm.QueryMod) oauthQuery

Oauths retrieves all the records using an executor.

func SessionExists

func SessionExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

SessionExists checks if the Session row exists.

func Sessions

func Sessions(mods ...qm.QueryMod) sessionQuery

Sessions retrieves all the records using an executor.

func SettingExists

func SettingExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

SettingExists checks if the Setting row exists.

func Settings

func Settings(mods ...qm.QueryMod) settingQuery

Settings retrieves all the records using an executor.

func UserExists

func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

UserExists checks if the User row exists.

func Users

func Users(mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

Types

type AdminSession

type AdminSession struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	IP        string    `boil:"ip" json:"ip" toml:"ip" yaml:"ip"`
	Email     string    `boil:"email" json:"email" toml:"email" yaml:"email"`
	CreatedAt time.Time `boil:"created_at" json:"createdAt" toml:"createdAt" yaml:"createdAt"`

	R *adminSessionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L adminSessionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AdminSession is an object representing the database table.

func FindAdminSession

func FindAdminSession(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*AdminSession, error)

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

func (*AdminSession) Delete

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

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

func (*AdminSession) Insert

func (o *AdminSession) 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 (*AdminSession) Reload

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

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

func (*AdminSession) Update

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

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

func (o *AdminSession) 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 AdminSessionSlice

type AdminSessionSlice []*AdminSession

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

func (AdminSessionSlice) DeleteAll

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

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

func (*AdminSessionSlice) ReloadAll

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

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

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

type Group

type Group struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	ZoomLink  string    `boil:"zoom_link" json:"zoomLink" toml:"zoomLink" yaml:"zoomLink"`
	Published bool      `boil:"published" json:"published" toml:"published" yaml:"published"`
	Archived  bool      `boil:"archived" json:"archived" toml:"archived" yaml:"archived"`
	UpdatedAt time.Time `boil:"updated_at" json:"updatedAt" toml:"updatedAt" yaml:"updatedAt"`
	CreatedAt time.Time `boil:"created_at" json:"createdAt" toml:"createdAt" yaml:"createdAt"`

	R *groupR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L groupL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Group is an object representing the database table.

func FindGroup

func FindGroup(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Group, error)

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

func (*Group) AddUsers

func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddUsers adds the given related objects to the existing relationships of the group, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Groups appropriately.

func (*Group) Delete

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

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

func (*Group) Insert

func (o *Group) 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 (*Group) Reload

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

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

func (*Group) RemoveUsers

func (o *Group) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Groups.

func (*Group) SetUsers

func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetUsers removes all previously related items of the group replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Groups's Users accordingly. Replaces o.R.Users with related. Sets related.R.Groups's Users accordingly.

func (*Group) Update

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

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

func (o *Group) 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 (*Group) Users

func (o *Group) Users(mods ...qm.QueryMod) userQuery

Users retrieves all the user's Users with an executor.

type GroupSlice

type GroupSlice []*Group

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

func (GroupSlice) DeleteAll

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

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

func (*GroupSlice) ReloadAll

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

func (o GroupSlice) 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 Oauth

type Oauth struct {
	ID         int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Provider   string    `boil:"provider" json:"provider" toml:"provider" yaml:"provider"`
	ProviderID string    `boil:"provider_id" json:"providerID" toml:"providerID" yaml:"providerID"`
	UpdatedAt  time.Time `boil:"updated_at" json:"updatedAt" toml:"updatedAt" yaml:"updatedAt"`
	CreatedAt  time.Time `boil:"created_at" json:"createdAt" toml:"createdAt" yaml:"createdAt"`

	R *oauthR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L oauthL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Oauth is an object representing the database table.

func FindOauth

func FindOauth(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Oauth, error)

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

func (*Oauth) AddUsers

func (o *Oauth) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddUsers adds the given related objects to the existing relationships of the oauth, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Oauths appropriately.

func (*Oauth) Delete

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

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

func (*Oauth) Insert

func (o *Oauth) 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 (*Oauth) Reload

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

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

func (*Oauth) RemoveUsers

func (o *Oauth) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Oauths.

func (*Oauth) SetUsers

func (o *Oauth) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetUsers removes all previously related items of the oauth replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Oauths's Users accordingly. Replaces o.R.Users with related. Sets related.R.Oauths's Users accordingly.

func (*Oauth) Update

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

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

func (o *Oauth) 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 (*Oauth) Users

func (o *Oauth) Users(mods ...qm.QueryMod) userQuery

Users retrieves all the user's Users with an executor.

type OauthSlice

type OauthSlice []*Oauth

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

func (OauthSlice) DeleteAll

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

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

func (*OauthSlice) ReloadAll

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

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

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

type Session

type Session struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	IP        string    `boil:"ip" json:"ip" toml:"ip" yaml:"ip"`
	UserID    int       `boil:"user_id" json:"userID" toml:"userID" yaml:"userID"`
	CreatedAt time.Time `boil:"created_at" json:"createdAt" toml:"createdAt" yaml:"createdAt"`

	R *sessionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L sessionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Session is an object representing the database table.

func FindSession

func FindSession(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Session, error)

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

func (*Session) Delete

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

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

func (*Session) Insert

func (o *Session) 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 (*Session) Reload

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

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

func (*Session) SetUser

func (o *Session) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetUser of the session to the related item. Sets o.R.User to related. Adds o to related.R.Sessions.

func (*Session) Update

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

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

func (o *Session) 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 (*Session) User

func (o *Session) User(mods ...qm.QueryMod) userQuery

User pointed to by the foreign key.

type SessionSlice

type SessionSlice []*Session

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

func (SessionSlice) DeleteAll

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

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

func (*SessionSlice) ReloadAll

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

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

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

type Setting

type Setting struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Sheet     string    `boil:"sheet" json:"sheet" toml:"sheet" yaml:"sheet"`
	Script    string    `boil:"script" json:"script" toml:"script" yaml:"script"`
	SyncOnce  string    `boil:"sync_once" json:"syncOnce" toml:"syncOnce" yaml:"syncOnce"`
	UpdatedAt time.Time `boil:"updated_at" json:"updatedAt" toml:"updatedAt" yaml:"updatedAt"`

	R *settingR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L settingL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Setting is an object representing the database table.

func FindSetting

func FindSetting(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Setting, error)

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

func (*Setting) Delete

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

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

func (*Setting) Insert

func (o *Setting) 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 (*Setting) Reload

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

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

func (*Setting) Update

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

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

func (o *Setting) 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 SettingSlice

type SettingSlice []*Setting

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

func (SettingSlice) DeleteAll

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

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

func (*SettingSlice) ReloadAll

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

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

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

type User

type User struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	Email     string    `boil:"email" json:"email" toml:"email" yaml:"email"`
	Blocked   bool      `boil:"blocked" json:"blocked" toml:"blocked" yaml:"blocked"`
	UpdatedAt time.Time `boil:"updated_at" json:"updatedAt" toml:"updatedAt" yaml:"updatedAt"`
	CreatedAt time.Time `boil:"created_at" json:"createdAt" toml:"createdAt" yaml:"createdAt"`

	R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

User is an object representing the database table.

func FindUser

func FindUser(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*User, error)

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

func (*User) AddGroups

func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error

AddGroups adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Groups. Sets related.R.Users appropriately.

func (*User) AddOauths

func (o *User) AddOauths(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Oauth) error

AddOauths adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Oauths. Sets related.R.Users appropriately.

func (*User) AddSessions

func (o *User) AddSessions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Session) error

AddSessions adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Sessions. Sets related.R.User appropriately.

func (*User) Delete

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

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

func (*User) Groups

func (o *User) Groups(mods ...qm.QueryMod) groupQuery

Groups retrieves all the group's Groups with an executor.

func (*User) Insert

func (o *User) 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 (*User) Oauths

func (o *User) Oauths(mods ...qm.QueryMod) oauthQuery

Oauths retrieves all the oauth's Oauths with an executor.

func (*User) Reload

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

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

func (*User) RemoveGroups

func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error

RemoveGroups relationships from objects passed in. Removes related items from R.Groups (uses pointer comparison, removal does not keep order) Sets related.R.Users.

func (*User) RemoveOauths

func (o *User) RemoveOauths(ctx context.Context, exec boil.ContextExecutor, related ...*Oauth) error

RemoveOauths relationships from objects passed in. Removes related items from R.Oauths (uses pointer comparison, removal does not keep order) Sets related.R.Users.

func (*User) Sessions

func (o *User) Sessions(mods ...qm.QueryMod) sessionQuery

Sessions retrieves all the session's Sessions with an executor.

func (*User) SetGroups

func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error

SetGroups removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Groups accordingly. Replaces o.R.Groups with related. Sets related.R.Users's Groups accordingly.

func (*User) SetOauths

func (o *User) SetOauths(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Oauth) error

SetOauths removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Oauths accordingly. Replaces o.R.Oauths with related. Sets related.R.Users's Oauths accordingly.

func (*User) Update

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

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

func (o *User) 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 UserSlice

type UserSlice []*User

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

func (UserSlice) DeleteAll

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

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

func (*UserSlice) ReloadAll

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

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

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

Jump to

Keyboard shortcuts

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