Documentation ¶
Index ¶
- Variables
- func AddChannelHook(hookPoint boil.HookPoint, channelHook ChannelHook)
- func AddChannelMemberHook(hookPoint boil.HookPoint, channelMemberHook ChannelMemberHook)
- func AddChannelPermissionHook(hookPoint boil.HookPoint, channelPermissionHook ChannelPermissionHook)
- func AddMessageHook(hookPoint boil.HookPoint, messageHook MessageHook)
- func AddMigrationHook(hookPoint boil.HookPoint, migrationHook MigrationHook)
- func AddRoleHook(hookPoint boil.HookPoint, roleHook RoleHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func AddUserRoleHook(hookPoint boil.HookPoint, userRoleHook UserRoleHook)
- func ChannelExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func ChannelMemberExists(ctx context.Context, exec boil.ContextExecutor, channelID int, userID int) (bool, error)
- func ChannelMembers(mods ...qm.QueryMod) channelMemberQuery
- func ChannelPermissionExists(ctx context.Context, exec boil.ContextExecutor, channelID int, userID int) (bool, error)
- func ChannelPermissions(mods ...qm.QueryMod) channelPermissionQuery
- func Channels(mods ...qm.QueryMod) channelQuery
- func MessageExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Messages(mods ...qm.QueryMod) messageQuery
- func MigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)
- func Migrations(mods ...qm.QueryMod) migrationQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func RoleExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Roles(mods ...qm.QueryMod) roleQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func UserRoleExists(ctx context.Context, exec boil.ContextExecutor, userID int, roleID int) (bool, error)
- func UserRoles(mods ...qm.QueryMod) userRoleQuery
- func Users(mods ...qm.QueryMod) userQuery
- type Channel
- func (o *Channel) AddChannelMembers(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Channel) AddChannelPermissions(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Channel) AddDSTMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Channel) ChannelMembers(mods ...qm.QueryMod) channelMemberQuery
- func (o *Channel) ChannelPermissions(mods ...qm.QueryMod) channelPermissionQuery
- func (o *Channel) Creator(mods ...qm.QueryMod) userQuery
- func (o *Channel) DSTMessages(mods ...qm.QueryMod) messageQuery
- func (o *Channel) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Channel) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Channel) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Channel) RemoveCreator(ctx context.Context, exec boil.ContextExecutor, related *User) error
- func (o *Channel) RemoveDSTMessages(ctx context.Context, exec boil.ContextExecutor, related ...*Message) error
- func (o *Channel) SetCreator(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Channel) SetDSTMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Channel) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Channel) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type ChannelHook
- type ChannelMember
- func (o *ChannelMember) Channel(mods ...qm.QueryMod) channelQuery
- func (o *ChannelMember) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ChannelMember) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *ChannelMember) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *ChannelMember) SetChannel(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Channel) error
- func (o *ChannelMember) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *ChannelMember) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *ChannelMember) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *ChannelMember) User(mods ...qm.QueryMod) userQuery
- type ChannelMemberHook
- type ChannelMemberSlice
- func (o ChannelMemberSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ChannelMemberSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o ChannelMemberSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type ChannelPermission
- func (o *ChannelPermission) Channel(mods ...qm.QueryMod) channelQuery
- func (o *ChannelPermission) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ChannelPermission) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *ChannelPermission) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *ChannelPermission) SetChannel(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Channel) error
- func (o *ChannelPermission) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *ChannelPermission) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *ChannelPermission) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *ChannelPermission) User(mods ...qm.QueryMod) userQuery
- type ChannelPermissionHook
- type ChannelPermissionSlice
- func (o ChannelPermissionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ChannelPermissionSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o ChannelPermissionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type ChannelSlice
- type M
- type Message
- func (o *Message) AddParentMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Message) DST(mods ...qm.QueryMod) channelQuery
- func (o *Message) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Message) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Message) Origin(mods ...qm.QueryMod) userQuery
- func (o *Message) Parent(mods ...qm.QueryMod) messageQuery
- func (o *Message) ParentMessages(mods ...qm.QueryMod) messageQuery
- func (o *Message) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Message) RemoveDST(ctx context.Context, exec boil.ContextExecutor, related *Channel) error
- func (o *Message) RemoveOrigin(ctx context.Context, exec boil.ContextExecutor, related *User) error
- func (o *Message) RemoveParent(ctx context.Context, exec boil.ContextExecutor, related *Message) error
- func (o *Message) RemoveParentMessages(ctx context.Context, exec boil.ContextExecutor, related ...*Message) error
- func (o *Message) SetDST(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Channel) error
- func (o *Message) SetOrigin(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Message) SetParent(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Message) error
- func (o *Message) SetParentMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Message) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Message) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type MessageHook
- type MessageSlice
- type Migration
- func (o *Migration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Migration) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Migration) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Migration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Migration) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type MigrationHook
- type MigrationSlice
- type Role
- func (o *Role) AddUserRoles(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Role) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Role) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Role) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Role) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Role) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Role) UserRoles(mods ...qm.QueryMod) userRoleQuery
- type RoleHook
- type RoleSlice
- type User
- func (o *User) AddChannelMembers(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddChannelPermissions(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddCreatorChannels(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddOriginMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddUserRoles(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) ChannelMembers(mods ...qm.QueryMod) channelMemberQuery
- func (o *User) ChannelPermissions(mods ...qm.QueryMod) channelPermissionQuery
- func (o *User) CreatorChannels(mods ...qm.QueryMod) channelQuery
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) OriginMessages(mods ...qm.QueryMod) messageQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) RemoveCreatorChannels(ctx context.Context, exec boil.ContextExecutor, related ...*Channel) error
- func (o *User) RemoveOriginMessages(ctx context.Context, exec boil.ContextExecutor, related ...*Message) error
- func (o *User) SetCreatorChannels(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) SetOriginMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) 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
- func (o *User) UserRoles(mods ...qm.QueryMod) userRoleQuery
- type UserHook
- type UserRole
- func (o *UserRole) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *UserRole) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *UserRole) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *UserRole) Role(mods ...qm.QueryMod) roleQuery
- func (o *UserRole) SetRole(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Role) error
- func (o *UserRole) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *UserRole) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *UserRole) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *UserRole) User(mods ...qm.QueryMod) userQuery
- type UserRoleHook
- type UserRoleSlice
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var ChannelColumns = struct { ID string CreatorID string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", CreatorID: "creator_id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var ChannelMemberColumns = struct { ChannelID string UserID string CreatedAt string UpdatedAt string DeletedAt string }{ ChannelID: "channel_id", UserID: "user_id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var ChannelMemberRels = struct { Channel string User string }{ Channel: "Channel", User: "User", }
ChannelMemberRels is where relationship names are stored.
var ChannelMemberWhere = struct { ChannelID whereHelperint UserID whereHelperint CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time }{ ChannelID: whereHelperint{/* contains filtered or unexported fields */}, UserID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var ChannelPermissionColumns = struct { ChannelID string UserID string Permission string CreatedAt string UpdatedAt string DeletedAt string }{ ChannelID: "channel_id", UserID: "user_id", Permission: "permission", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var ChannelPermissionRels = struct { Channel string User string }{ Channel: "Channel", User: "User", }
ChannelPermissionRels is where relationship names are stored.
var ChannelPermissionWhere = struct { ChannelID whereHelperint UserID whereHelperint Permission whereHelpernull_Int CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time }{ ChannelID: whereHelperint{/* contains filtered or unexported fields */}, UserID: whereHelperint{/* contains filtered or unexported fields */}, Permission: whereHelpernull_Int{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var ChannelRels = struct { Creator string ChannelMembers string ChannelPermissions string DSTMessages string }{ Creator: "Creator", ChannelMembers: "ChannelMembers", ChannelPermissions: "ChannelPermissions", DSTMessages: "DSTMessages", }
ChannelRels is where relationship names are stored.
var ChannelWhere = struct { ID whereHelperint CreatorID whereHelpernull_Int CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, CreatorID: whereHelpernull_Int{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_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 MessageColumns = struct { ID string OriginID string DSTID string ParentID string Body string State string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", OriginID: "origin_id", DSTID: "dst_id", ParentID: "parent_id", Body: "body", State: "state", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var MessageRels = struct { DST string Origin string Parent string ParentMessages string }{ DST: "DST", Origin: "Origin", Parent: "Parent", ParentMessages: "ParentMessages", }
MessageRels is where relationship names are stored.
var MessageWhere = struct { ID whereHelperint OriginID whereHelpernull_Int DSTID whereHelpernull_Int ParentID whereHelpernull_Int Body whereHelpernull_String State whereHelpernull_Int CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, OriginID: whereHelpernull_Int{/* contains filtered or unexported fields */}, DSTID: whereHelpernull_Int{/* contains filtered or unexported fields */}, ParentID: whereHelpernull_Int{/* contains filtered or unexported fields */}, Body: whereHelpernull_String{/* contains filtered or unexported fields */}, State: whereHelpernull_Int{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var MigrationColumns = struct { Version string Dirty string }{ Version: "version", Dirty: "dirty", }
var MigrationRels = struct {
}{}
MigrationRels is where relationship names are stored.
var MigrationWhere = struct { Version whereHelperint64 Dirty whereHelperbool }{ Version: whereHelperint64{/* contains filtered or unexported fields */}, Dirty: whereHelperbool{/* contains filtered or unexported fields */}, }
var RoleColumns = struct { ID string Name string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", Name: "name", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var RoleRels = struct { UserRoles string }{ UserRoles: "UserRoles", }
RoleRels is where relationship names are stored.
var RoleWhere = struct { ID whereHelperint Name whereHelperstring CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { ChannelMembers string ChannelPermissions string Channels string Messages string Migrations string Roles string UserRole string Users string }{ ChannelMembers: "channel_members", ChannelPermissions: "channel_permissions", Channels: "channels", Messages: "messages", Migrations: "migrations", Roles: "roles", UserRole: "user_role", Users: "users", }
var UserColumns = struct { ID string PhoneNumber string Username string Password string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", PhoneNumber: "phone_number", Username: "username", Password: "password", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var UserRels = struct { ChannelMembers string ChannelPermissions string CreatorChannels string OriginMessages string UserRoles string }{ ChannelMembers: "ChannelMembers", ChannelPermissions: "ChannelPermissions", CreatorChannels: "CreatorChannels", OriginMessages: "OriginMessages", UserRoles: "UserRoles", }
UserRels is where relationship names are stored.
var UserRoleColumns = struct { UserID string RoleID string CreatedAt string UpdatedAt string DeletedAt string }{ UserID: "user_id", RoleID: "role_id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var UserRoleRels = struct { Role string User string }{ Role: "Role", User: "User", }
UserRoleRels is where relationship names are stored.
var UserRoleWhere = struct { UserID whereHelperint RoleID whereHelperint CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time }{ UserID: whereHelperint{/* contains filtered or unexported fields */}, RoleID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var UserWhere = struct { ID whereHelperint PhoneNumber whereHelperstring Username whereHelperstring Password whereHelperstring CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, PhoneNumber: whereHelperstring{/* contains filtered or unexported fields */}, Username: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
Functions ¶
func AddChannelHook ¶
func AddChannelHook(hookPoint boil.HookPoint, channelHook ChannelHook)
AddChannelHook registers your hook function for all future operations.
func AddChannelMemberHook ¶
func AddChannelMemberHook(hookPoint boil.HookPoint, channelMemberHook ChannelMemberHook)
AddChannelMemberHook registers your hook function for all future operations.
func AddChannelPermissionHook ¶
func AddChannelPermissionHook(hookPoint boil.HookPoint, channelPermissionHook ChannelPermissionHook)
AddChannelPermissionHook registers your hook function for all future operations.
func AddMessageHook ¶
func AddMessageHook(hookPoint boil.HookPoint, messageHook MessageHook)
AddMessageHook registers your hook function for all future operations.
func AddMigrationHook ¶
func AddMigrationHook(hookPoint boil.HookPoint, migrationHook MigrationHook)
AddMigrationHook registers your hook function for all future operations.
func AddRoleHook ¶
AddRoleHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func AddUserRoleHook ¶
func AddUserRoleHook(hookPoint boil.HookPoint, userRoleHook UserRoleHook)
AddUserRoleHook registers your hook function for all future operations.
func ChannelExists ¶
ChannelExists checks if the Channel row exists.
func ChannelMemberExists ¶
func ChannelMemberExists(ctx context.Context, exec boil.ContextExecutor, channelID int, userID int) (bool, error)
ChannelMemberExists checks if the ChannelMember row exists.
func ChannelMembers ¶
ChannelMembers retrieves all the records using an executor.
func ChannelPermissionExists ¶
func ChannelPermissionExists(ctx context.Context, exec boil.ContextExecutor, channelID int, userID int) (bool, error)
ChannelPermissionExists checks if the ChannelPermission row exists.
func ChannelPermissions ¶
ChannelPermissions retrieves all the records using an executor.
func MessageExists ¶
MessageExists checks if the Message row exists.
func MigrationExists ¶
MigrationExists checks if the Migration row exists.
func Migrations ¶
Migrations retrieves all the records using an executor.
func RoleExists ¶
RoleExists checks if the Role row exists.
func UserExists ¶
UserExists checks if the User row exists.
func UserRoleExists ¶
func UserRoleExists(ctx context.Context, exec boil.ContextExecutor, userID int, roleID int) (bool, error)
UserRoleExists checks if the UserRole row exists.
Types ¶
type Channel ¶
type Channel struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` CreatorID null.Int `boil:"creator_id" json:"creator_id,omitempty" toml:"creator_id" yaml:"creator_id,omitempty"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *channelR `boil:"-" json:"-" toml:"-" yaml:"-"` L channelL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Channel is an object representing the database table.
func FindChannel ¶
func FindChannel(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Channel, error)
FindChannel retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Channel) AddChannelMembers ¶
func (o *Channel) AddChannelMembers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ChannelMember) error
AddChannelMembers adds the given related objects to the existing relationships of the channel, optionally inserting them as new records. Appends related to o.R.ChannelMembers. Sets related.R.Channel appropriately.
func (*Channel) AddChannelPermissions ¶
func (o *Channel) AddChannelPermissions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ChannelPermission) error
AddChannelPermissions adds the given related objects to the existing relationships of the channel, optionally inserting them as new records. Appends related to o.R.ChannelPermissions. Sets related.R.Channel appropriately.
func (*Channel) AddDSTMessages ¶
func (o *Channel) AddDSTMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Message) error
AddDSTMessages adds the given related objects to the existing relationships of the channel, optionally inserting them as new records. Appends related to o.R.DSTMessages. Sets related.R.DST appropriately.
func (*Channel) ChannelMembers ¶
ChannelMembers retrieves all the channel_member's ChannelMembers with an executor.
func (*Channel) ChannelPermissions ¶
ChannelPermissions retrieves all the channel_permission's ChannelPermissions with an executor.
func (*Channel) DSTMessages ¶
DSTMessages retrieves all the message's Messages with an executor via dst_id column.
func (*Channel) Delete ¶
Delete deletes a single Channel record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Channel) Insert ¶
func (o *Channel) 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 (*Channel) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Channel) RemoveCreator ¶
func (o *Channel) RemoveCreator(ctx context.Context, exec boil.ContextExecutor, related *User) error
RemoveCreator relationship. Sets o.R.Creator to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Channel) RemoveDSTMessages ¶
func (o *Channel) RemoveDSTMessages(ctx context.Context, exec boil.ContextExecutor, related ...*Message) error
RemoveDSTMessages relationships from objects passed in. Removes related items from R.DSTMessages (uses pointer comparison, removal does not keep order) Sets related.R.DST.
func (*Channel) SetCreator ¶
func (o *Channel) SetCreator(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetCreator of the channel to the related item. Sets o.R.Creator to related. Adds o to related.R.CreatorChannels.
func (*Channel) SetDSTMessages ¶
func (o *Channel) SetDSTMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Message) error
SetDSTMessages removes all previously related items of the channel replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.DST's DSTMessages accordingly. Replaces o.R.DSTMessages with related. Sets related.R.DST's DSTMessages accordingly.
func (*Channel) Update ¶
func (o *Channel) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Channel. 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 (*Channel) Upsert ¶
func (o *Channel) 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 ChannelHook ¶
ChannelHook is the signature for custom Channel hook methods
type ChannelMember ¶
type ChannelMember struct { ChannelID int `boil:"channel_id" json:"channel_id" toml:"channel_id" yaml:"channel_id"` UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *channelMemberR `boil:"-" json:"-" toml:"-" yaml:"-"` L channelMemberL `boil:"-" json:"-" toml:"-" yaml:"-"` }
ChannelMember is an object representing the database table.
func FindChannelMember ¶
func FindChannelMember(ctx context.Context, exec boil.ContextExecutor, channelID int, userID int, selectCols ...string) (*ChannelMember, error)
FindChannelMember retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*ChannelMember) Channel ¶
func (o *ChannelMember) Channel(mods ...qm.QueryMod) channelQuery
Channel pointed to by the foreign key.
func (*ChannelMember) Delete ¶
func (o *ChannelMember) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single ChannelMember record with an executor. Delete will match against the primary key column to find the record to delete.
func (*ChannelMember) Insert ¶
func (o *ChannelMember) 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 (*ChannelMember) Reload ¶
func (o *ChannelMember) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*ChannelMember) SetChannel ¶
func (o *ChannelMember) SetChannel(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Channel) error
SetChannel of the channelMember to the related item. Sets o.R.Channel to related. Adds o to related.R.ChannelMembers.
func (*ChannelMember) SetUser ¶
func (o *ChannelMember) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the channelMember to the related item. Sets o.R.User to related. Adds o to related.R.ChannelMembers.
func (*ChannelMember) Update ¶
func (o *ChannelMember) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the ChannelMember. 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 (*ChannelMember) Upsert ¶
func (o *ChannelMember) 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 (*ChannelMember) User ¶
func (o *ChannelMember) User(mods ...qm.QueryMod) userQuery
User pointed to by the foreign key.
type ChannelMemberHook ¶
type ChannelMemberHook func(context.Context, boil.ContextExecutor, *ChannelMember) error
ChannelMemberHook is the signature for custom ChannelMember hook methods
type ChannelMemberSlice ¶
type ChannelMemberSlice []*ChannelMember
ChannelMemberSlice is an alias for a slice of pointers to ChannelMember. This should generally be used opposed to []ChannelMember.
func (ChannelMemberSlice) DeleteAll ¶
func (o ChannelMemberSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ChannelMemberSlice) ReloadAll ¶
func (o *ChannelMemberSlice) 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 (ChannelMemberSlice) UpdateAll ¶
func (o ChannelMemberSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type ChannelPermission ¶
type ChannelPermission struct { ChannelID int `boil:"channel_id" json:"channel_id" toml:"channel_id" yaml:"channel_id"` UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` Permission null.Int `boil:"permission" json:"permission,omitempty" toml:"permission" yaml:"permission,omitempty"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *channelPermissionR `boil:"-" json:"-" toml:"-" yaml:"-"` L channelPermissionL `boil:"-" json:"-" toml:"-" yaml:"-"` }
ChannelPermission is an object representing the database table.
func FindChannelPermission ¶
func FindChannelPermission(ctx context.Context, exec boil.ContextExecutor, channelID int, userID int, selectCols ...string) (*ChannelPermission, error)
FindChannelPermission retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*ChannelPermission) Channel ¶
func (o *ChannelPermission) Channel(mods ...qm.QueryMod) channelQuery
Channel pointed to by the foreign key.
func (*ChannelPermission) Delete ¶
func (o *ChannelPermission) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single ChannelPermission record with an executor. Delete will match against the primary key column to find the record to delete.
func (*ChannelPermission) Insert ¶
func (o *ChannelPermission) 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 (*ChannelPermission) Reload ¶
func (o *ChannelPermission) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*ChannelPermission) SetChannel ¶
func (o *ChannelPermission) SetChannel(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Channel) error
SetChannel of the channelPermission to the related item. Sets o.R.Channel to related. Adds o to related.R.ChannelPermissions.
func (*ChannelPermission) SetUser ¶
func (o *ChannelPermission) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the channelPermission to the related item. Sets o.R.User to related. Adds o to related.R.ChannelPermissions.
func (*ChannelPermission) Update ¶
func (o *ChannelPermission) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the ChannelPermission. 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 (*ChannelPermission) Upsert ¶
func (o *ChannelPermission) 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 (*ChannelPermission) User ¶
func (o *ChannelPermission) User(mods ...qm.QueryMod) userQuery
User pointed to by the foreign key.
type ChannelPermissionHook ¶
type ChannelPermissionHook func(context.Context, boil.ContextExecutor, *ChannelPermission) error
ChannelPermissionHook is the signature for custom ChannelPermission hook methods
type ChannelPermissionSlice ¶
type ChannelPermissionSlice []*ChannelPermission
ChannelPermissionSlice is an alias for a slice of pointers to ChannelPermission. This should generally be used opposed to []ChannelPermission.
func (ChannelPermissionSlice) DeleteAll ¶
func (o ChannelPermissionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ChannelPermissionSlice) ReloadAll ¶
func (o *ChannelPermissionSlice) 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 (ChannelPermissionSlice) UpdateAll ¶
func (o ChannelPermissionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type ChannelSlice ¶
type ChannelSlice []*Channel
ChannelSlice is an alias for a slice of pointers to Channel. This should generally be used opposed to []Channel.
func (ChannelSlice) DeleteAll ¶
func (o ChannelSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ChannelSlice) ReloadAll ¶
func (o *ChannelSlice) 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 (ChannelSlice) UpdateAll ¶
func (o ChannelSlice) 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 Message ¶
type Message struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` OriginID null.Int `boil:"origin_id" json:"origin_id,omitempty" toml:"origin_id" yaml:"origin_id,omitempty"` DSTID null.Int `boil:"dst_id" json:"dst_id,omitempty" toml:"dst_id" yaml:"dst_id,omitempty"` ParentID null.Int `boil:"parent_id" json:"parent_id,omitempty" toml:"parent_id" yaml:"parent_id,omitempty"` Body null.String `boil:"body" json:"body,omitempty" toml:"body" yaml:"body,omitempty"` State null.Int `boil:"state" json:"state,omitempty" toml:"state" yaml:"state,omitempty"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *messageR `boil:"-" json:"-" toml:"-" yaml:"-"` L messageL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Message is an object representing the database table.
func FindMessage ¶
func FindMessage(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Message, error)
FindMessage retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Message) AddParentMessages ¶
func (o *Message) AddParentMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Message) error
AddParentMessages adds the given related objects to the existing relationships of the message, optionally inserting them as new records. Appends related to o.R.ParentMessages. Sets related.R.Parent appropriately.
func (*Message) Delete ¶
Delete deletes a single Message record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Message) Insert ¶
func (o *Message) 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 (*Message) ParentMessages ¶
ParentMessages retrieves all the message's Messages with an executor via parent_id column.
func (*Message) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Message) RemoveDST ¶
RemoveDST relationship. Sets o.R.DST to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Message) RemoveOrigin ¶
RemoveOrigin relationship. Sets o.R.Origin to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Message) RemoveParent ¶
func (o *Message) RemoveParent(ctx context.Context, exec boil.ContextExecutor, related *Message) error
RemoveParent relationship. Sets o.R.Parent to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Message) RemoveParentMessages ¶
func (o *Message) RemoveParentMessages(ctx context.Context, exec boil.ContextExecutor, related ...*Message) error
RemoveParentMessages relationships from objects passed in. Removes related items from R.ParentMessages (uses pointer comparison, removal does not keep order) Sets related.R.Parent.
func (*Message) SetDST ¶
func (o *Message) SetDST(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Channel) error
SetDST of the message to the related item. Sets o.R.DST to related. Adds o to related.R.DSTMessages.
func (*Message) SetOrigin ¶
func (o *Message) SetOrigin(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetOrigin of the message to the related item. Sets o.R.Origin to related. Adds o to related.R.OriginMessages.
func (*Message) SetParent ¶
func (o *Message) SetParent(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Message) error
SetParent of the message to the related item. Sets o.R.Parent to related. Adds o to related.R.ParentMessages.
func (*Message) SetParentMessages ¶
func (o *Message) SetParentMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Message) error
SetParentMessages removes all previously related items of the message replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Parent's ParentMessages accordingly. Replaces o.R.ParentMessages with related. Sets related.R.Parent's ParentMessages accordingly.
func (*Message) Update ¶
func (o *Message) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Message. 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 (*Message) Upsert ¶
func (o *Message) 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 MessageHook ¶
MessageHook is the signature for custom Message hook methods
type MessageSlice ¶
type MessageSlice []*Message
MessageSlice is an alias for a slice of pointers to Message. This should generally be used opposed to []Message.
func (MessageSlice) DeleteAll ¶
func (o MessageSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*MessageSlice) ReloadAll ¶
func (o *MessageSlice) 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 (MessageSlice) UpdateAll ¶
func (o MessageSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Migration ¶
type Migration struct { Version int64 `boil:"version" json:"version" toml:"version" yaml:"version"` Dirty bool `boil:"dirty" json:"dirty" toml:"dirty" yaml:"dirty"` R *migrationR `boil:"-" json:"-" toml:"-" yaml:"-"` L migrationL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Migration is an object representing the database table.
func FindMigration ¶
func FindMigration(ctx context.Context, exec boil.ContextExecutor, version int64, selectCols ...string) (*Migration, error)
FindMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Migration) Delete ¶
Delete deletes a single Migration record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Migration) Insert ¶
func (o *Migration) 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 (*Migration) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Migration) Update ¶
func (o *Migration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Migration. 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 (*Migration) Upsert ¶
func (o *Migration) 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 MigrationHook ¶
MigrationHook is the signature for custom Migration hook methods
type MigrationSlice ¶
type MigrationSlice []*Migration
MigrationSlice is an alias for a slice of pointers to Migration. This should generally be used opposed to []Migration.
func (MigrationSlice) DeleteAll ¶
func (o MigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*MigrationSlice) ReloadAll ¶
func (o *MigrationSlice) 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 (MigrationSlice) UpdateAll ¶
func (o MigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Role ¶
type Role struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *roleR `boil:"-" json:"-" toml:"-" yaml:"-"` L roleL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Role is an object representing the database table.
func FindRole ¶
func FindRole(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Role, error)
FindRole retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Role) AddUserRoles ¶
func (o *Role) AddUserRoles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*UserRole) error
AddUserRoles adds the given related objects to the existing relationships of the role, optionally inserting them as new records. Appends related to o.R.UserRoles. Sets related.R.Role appropriately.
func (*Role) Delete ¶
Delete deletes a single Role record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Role) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Role) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Role) Update ¶
func (o *Role) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Role. 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 (*Role) Upsert ¶
func (o *Role) 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 RoleSlice ¶
type RoleSlice []*Role
RoleSlice is an alias for a slice of pointers to Role. This should generally be used opposed to []Role.
type User ¶
type User struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` PhoneNumber string `boil:"phone_number" json:"phone_number" toml:"phone_number" yaml:"phone_number"` Username string `boil:"username" json:"username" toml:"username" yaml:"username"` Password string `boil:"password" json:"password" toml:"password" yaml:"password"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` 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) AddChannelMembers ¶
func (o *User) AddChannelMembers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ChannelMember) error
AddChannelMembers adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.ChannelMembers. Sets related.R.User appropriately.
func (*User) AddChannelPermissions ¶
func (o *User) AddChannelPermissions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ChannelPermission) error
AddChannelPermissions adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.ChannelPermissions. Sets related.R.User appropriately.
func (*User) AddCreatorChannels ¶
func (o *User) AddCreatorChannels(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Channel) error
AddCreatorChannels adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.CreatorChannels. Sets related.R.Creator appropriately.
func (*User) AddOriginMessages ¶
func (o *User) AddOriginMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Message) error
AddOriginMessages adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.OriginMessages. Sets related.R.Origin appropriately.
func (*User) AddUserRoles ¶
func (o *User) AddUserRoles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*UserRole) error
AddUserRoles adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.UserRoles. Sets related.R.User appropriately.
func (*User) ChannelMembers ¶
ChannelMembers retrieves all the channel_member's ChannelMembers with an executor.
func (*User) ChannelPermissions ¶
ChannelPermissions retrieves all the channel_permission's ChannelPermissions with an executor.
func (*User) CreatorChannels ¶
CreatorChannels retrieves all the channel's Channels with an executor via creator_id column.
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) OriginMessages ¶
OriginMessages retrieves all the message's Messages with an executor via origin_id column.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) RemoveCreatorChannels ¶
func (o *User) RemoveCreatorChannels(ctx context.Context, exec boil.ContextExecutor, related ...*Channel) error
RemoveCreatorChannels relationships from objects passed in. Removes related items from R.CreatorChannels (uses pointer comparison, removal does not keep order) Sets related.R.Creator.
func (*User) RemoveOriginMessages ¶
func (o *User) RemoveOriginMessages(ctx context.Context, exec boil.ContextExecutor, related ...*Message) error
RemoveOriginMessages relationships from objects passed in. Removes related items from R.OriginMessages (uses pointer comparison, removal does not keep order) Sets related.R.Origin.
func (*User) SetCreatorChannels ¶
func (o *User) SetCreatorChannels(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Channel) error
SetCreatorChannels 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.Creator's CreatorChannels accordingly. Replaces o.R.CreatorChannels with related. Sets related.R.Creator's CreatorChannels accordingly.
func (*User) SetOriginMessages ¶
func (o *User) SetOriginMessages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Message) error
SetOriginMessages 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.Origin's OriginMessages accordingly. Replaces o.R.OriginMessages with related. Sets related.R.Origin's OriginMessages 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 UserRole ¶
type UserRole struct { UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` RoleID int `boil:"role_id" json:"role_id" toml:"role_id" yaml:"role_id"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *userRoleR `boil:"-" json:"-" toml:"-" yaml:"-"` L userRoleL `boil:"-" json:"-" toml:"-" yaml:"-"` }
UserRole is an object representing the database table.
func FindUserRole ¶
func FindUserRole(ctx context.Context, exec boil.ContextExecutor, userID int, roleID int, selectCols ...string) (*UserRole, error)
FindUserRole retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*UserRole) Delete ¶
Delete deletes a single UserRole record with an executor. Delete will match against the primary key column to find the record to delete.
func (*UserRole) Insert ¶
func (o *UserRole) 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 (*UserRole) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*UserRole) SetRole ¶
func (o *UserRole) SetRole(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Role) error
SetRole of the userRole to the related item. Sets o.R.Role to related. Adds o to related.R.UserRoles.
func (*UserRole) SetUser ¶
func (o *UserRole) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the userRole to the related item. Sets o.R.User to related. Adds o to related.R.UserRoles.
func (*UserRole) Update ¶
func (o *UserRole) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the UserRole. 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 (*UserRole) Upsert ¶
func (o *UserRole) 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 UserRoleHook ¶
UserRoleHook is the signature for custom UserRole hook methods
type UserRoleSlice ¶
type UserRoleSlice []*UserRole
UserRoleSlice is an alias for a slice of pointers to UserRole. This should generally be used opposed to []UserRole.
func (UserRoleSlice) DeleteAll ¶
func (o UserRoleSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*UserRoleSlice) ReloadAll ¶
func (o *UserRoleSlice) 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 (UserRoleSlice) UpdateAll ¶
func (o UserRoleSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type UserSlice ¶
type UserSlice []*User
UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.