Documentation
¶
Index ¶
- Variables
- func AdminSessionExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func AdminSessions(mods ...qm.QueryMod) adminSessionQuery
- func GroupExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Groups(mods ...qm.QueryMod) groupQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func OauthExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Oauths(mods ...qm.QueryMod) oauthQuery
- func SessionExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Sessions(mods ...qm.QueryMod) sessionQuery
- func SettingExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Settings(mods ...qm.QueryMod) settingQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type AdminSession
- func (o *AdminSession) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *AdminSession) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *AdminSession) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *AdminSession) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *AdminSession) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type AdminSessionSlice
- type Group
- func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Group) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Group) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Group) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Group) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Group) Users(mods ...qm.QueryMod) userQuery
- type GroupSlice
- type M
- type Oauth
- func (o *Oauth) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Oauth) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Oauth) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Oauth) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Oauth) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Oauth) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Oauth) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Oauth) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Oauth) Users(mods ...qm.QueryMod) userQuery
- type OauthSlice
- type Session
- func (o *Session) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Session) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Session) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Session) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Session) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Session) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Session) User(mods ...qm.QueryMod) userQuery
- type SessionSlice
- type Setting
- func (o *Setting) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Setting) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Setting) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Setting) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Setting) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type SettingSlice
- type User
- func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) AddOauths(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Oauth) error
- func (o *User) AddSessions(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Groups(mods ...qm.QueryMod) groupQuery
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Oauths(mods ...qm.QueryMod) oauthQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
- func (o *User) RemoveOauths(ctx context.Context, exec boil.ContextExecutor, related ...*Oauth) error
- func (o *User) Sessions(mods ...qm.QueryMod) sessionQuery
- func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) SetOauths(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Oauth) error
- func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var AdminSessionColumns = struct { ID string IP string Email string CreatedAt string }{ ID: "id", IP: "ip", Email: "email", CreatedAt: "created_at", }
var AdminSessionRels = struct {
}{}
AdminSessionRels is where relationship names are stored.
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 */}, }
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 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", }
var GroupRels = struct { Users string }{ Users: "Users", }
GroupRels is where relationship names are stored.
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 */}, }
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", }
var OauthRels = struct { Users string }{ Users: "Users", }
OauthRels is where relationship names are stored.
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 */}, }
var SessionColumns = struct { ID string IP string UserID string CreatedAt string }{ ID: "id", IP: "ip", UserID: "user_id", CreatedAt: "created_at", }
var SessionRels = struct { User string }{ User: "User", }
SessionRels is where relationship names are stored.
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 */}, }
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", }
var SettingRels = struct {
}{}
SettingRels is where relationship names are stored.
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 */}, }
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", }
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", }
var UserRels = struct { Groups string Oauths string Sessions string }{ Groups: "Groups", Oauths: "Oauths", Sessions: "Sessions", }
UserRels is where relationship names are stored.
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 ¶
AdminSessionExists checks if the AdminSession row exists.
func AdminSessions ¶
AdminSessions retrieves all the records using an executor.
func GroupExists ¶
GroupExists checks if the Group row exists.
func OauthExists ¶
OauthExists checks if the Oauth row exists.
func SessionExists ¶
SessionExists checks if the Session row exists.
func SettingExists ¶
SettingExists checks if the Setting row exists.
func UserExists ¶
UserExists checks if the User row exists.
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 ¶
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 ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Group) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Group) RemoveUsers ¶
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.
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 ¶
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 ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Oauth) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Oauth) RemoveUsers ¶
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.
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 ¶
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 ¶
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.
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 ¶
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 ¶
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 ¶
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) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*User) Reload ¶
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) 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.