Documentation
¶
Index ¶
- Constants
- Variables
- func ChatExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Chats(mods ...qm.QueryMod) chatQuery
- func DownloadExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Downloads(mods ...qm.QueryMod) downloadQuery
- func FileExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Files(mods ...qm.QueryMod) fileQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Chat
- func (o *Chat) AddRestrictionsChatFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
- func (o *Chat) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Chat) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Chat) Owner(mods ...qm.QueryMod) userQuery
- func (o *Chat) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Chat) RemoveRestrictionsChatFiles(ctx context.Context, exec boil.ContextExecutor, related ...*File) error
- func (o *Chat) RestrictionsChatFiles(mods ...qm.QueryMod) fileQuery
- func (o *Chat) SetOwner(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Chat) SetRestrictionsChatFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
- func (o *Chat) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Chat) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type ChatSlice
- type Download
- func (o *Download) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Download) File(mods ...qm.QueryMod) fileQuery
- func (o *Download) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Download) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Download) RemoveFile(ctx context.Context, exec boil.ContextExecutor, related *File) error
- func (o *Download) RemoveUser(ctx context.Context, exec boil.ContextExecutor, related *User) error
- func (o *Download) SetFile(ctx context.Context, exec boil.ContextExecutor, insert bool, related *File) error
- func (o *Download) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Download) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Download) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Download) User(mods ...qm.QueryMod) userQuery
- type DownloadSlice
- type File
- func (o *File) AddDownloads(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *File) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *File) Downloads(mods ...qm.QueryMod) downloadQuery
- func (o *File) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *File) Owner(mods ...qm.QueryMod) userQuery
- func (o *File) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *File) RemoveDownloads(ctx context.Context, exec boil.ContextExecutor, related ...*Download) error
- func (o *File) RemoveRestrictionsChat(ctx context.Context, exec boil.ContextExecutor, related *Chat) error
- func (o *File) RestrictionsChat(mods ...qm.QueryMod) chatQuery
- func (o *File) SetDownloads(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *File) SetOwner(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *File) SetRestrictionsChat(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Chat) error
- func (o *File) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *File) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type FileSlice
- type M
- type User
- func (o *User) AddDownloads(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddOwnerChats(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Chat) error
- func (o *User) AddOwnerFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Downloads(mods ...qm.QueryMod) downloadQuery
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) OwnerChats(mods ...qm.QueryMod) chatQuery
- func (o *User) OwnerFiles(mods ...qm.QueryMod) fileQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) RemoveDownloads(ctx context.Context, exec boil.ContextExecutor, related ...*Download) error
- func (o *User) SetDownloads(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
- type UserSlice
Constants ¶
const ( ChatTypeGroup = "Group" ChatTypeSuperGroup = "SuperGroup" ChatTypeChannel = "Channel" )
Enum values for chat_type
const ( FileKindDocument = "Document" FileKindAnimation = "Animation" FileKindAudio = "Audio" FileKindSticker = "Sticker" FileKindVideo = "Video" FileKindVideoNote = "VideoNote" FileKindVoice = "Voice" FileKindPhoto = "Photo" )
Enum values for file_kind
Variables ¶
var ChatColumns = struct { ID string TelegramID string Title string Type string OwnerID string LinkedAt string UpdatedAt string }{ ID: "id", TelegramID: "telegram_id", Title: "title", Type: "type", OwnerID: "owner_id", LinkedAt: "linked_at", UpdatedAt: "updated_at", }
var ChatRels = struct { Owner string RestrictionsChatFiles string }{ Owner: "Owner", RestrictionsChatFiles: "RestrictionsChatFiles", }
ChatRels is where relationship names are stored.
var ChatWhere = struct { ID whereHelperint TelegramID whereHelperint64 Title whereHelperstring Type whereHelperstring OwnerID whereHelperint LinkedAt whereHelpertime_Time UpdatedAt whereHelpernull_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, TelegramID: whereHelperint64{/* contains filtered or unexported fields */}, Title: whereHelperstring{/* contains filtered or unexported fields */}, Type: whereHelperstring{/* contains filtered or unexported fields */}, OwnerID: whereHelperint{/* contains filtered or unexported fields */}, LinkedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var DownloadColumns = struct { ID string FileID string UserID string At string NewSubscription string }{ ID: "id", FileID: "file_id", UserID: "user_id", At: "at", NewSubscription: "new_subscription", }
var DownloadRels = struct { File string User string }{ File: "File", User: "User", }
DownloadRels is where relationship names are stored.
var DownloadWhere = struct { ID whereHelperint FileID whereHelpernull_Int UserID whereHelpernull_Int At whereHelpertime_Time NewSubscription whereHelpernull_Bool }{ ID: whereHelperint{/* contains filtered or unexported fields */}, FileID: whereHelpernull_Int{/* contains filtered or unexported fields */}, UserID: whereHelpernull_Int{/* contains filtered or unexported fields */}, At: whereHelpertime_Time{/* contains filtered or unexported fields */}, NewSubscription: whereHelpernull_Bool{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("dal: 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 FileColumns = struct { ID string FileID string Caption string MimeType string Size string Name string OwnerID string CreatedAt string PublicID string Kind string Metadata string RestrictionsChatID string IsViolatesCopyright string LinkedPostURI string }{ ID: "id", FileID: "file_id", Caption: "caption", MimeType: "mime_type", Size: "size", Name: "name", OwnerID: "owner_id", CreatedAt: "created_at", PublicID: "public_id", Kind: "kind", Metadata: "metadata", RestrictionsChatID: "restrictions_chat_id", IsViolatesCopyright: "is_violates_copyright", LinkedPostURI: "linked_post_uri", }
var FileRels = struct { Owner string RestrictionsChat string Downloads string }{ Owner: "Owner", RestrictionsChat: "RestrictionsChat", Downloads: "Downloads", }
FileRels is where relationship names are stored.
var FileWhere = struct { ID whereHelperint FileID whereHelperstring Caption whereHelpernull_String MimeType whereHelpernull_String Size whereHelperint Name whereHelperstring OwnerID whereHelperint CreatedAt whereHelpertime_Time PublicID whereHelperstring Kind whereHelperstring Metadata whereHelperstring RestrictionsChatID whereHelpernull_Int IsViolatesCopyright whereHelpernull_Bool LinkedPostURI whereHelpernull_String }{ ID: whereHelperint{/* contains filtered or unexported fields */}, FileID: whereHelperstring{/* contains filtered or unexported fields */}, Caption: whereHelpernull_String{/* contains filtered or unexported fields */}, MimeType: whereHelpernull_String{/* contains filtered or unexported fields */}, Size: whereHelperint{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, OwnerID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, PublicID: whereHelperstring{/* contains filtered or unexported fields */}, Kind: whereHelperstring{/* contains filtered or unexported fields */}, Metadata: whereHelperstring{/* contains filtered or unexported fields */}, RestrictionsChatID: whereHelpernull_Int{/* contains filtered or unexported fields */}, IsViolatesCopyright: whereHelpernull_Bool{/* contains filtered or unexported fields */}, LinkedPostURI: whereHelpernull_String{/* contains filtered or unexported fields */}, }
var TableNames = struct { Chat string Download string File string User string }{ Chat: "chat", Download: "download", File: "file", User: "user", }
var UserColumns = struct { ID string FirstName string LastName string Username string LanguageCode string IsAdmin string JoinedAt string UpdatedAt string Settings string Ref string }{ ID: "id", FirstName: "first_name", LastName: "last_name", Username: "username", LanguageCode: "language_code", IsAdmin: "is_admin", JoinedAt: "joined_at", UpdatedAt: "updated_at", Settings: "settings", Ref: "ref", }
var UserRels = struct { OwnerChats string Downloads string OwnerFiles string }{ OwnerChats: "OwnerChats", Downloads: "Downloads", OwnerFiles: "OwnerFiles", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperint FirstName whereHelperstring LastName whereHelpernull_String Username whereHelpernull_String LanguageCode whereHelperstring IsAdmin whereHelperbool JoinedAt whereHelpertime_Time UpdatedAt whereHelpernull_Time Settings whereHelperstring Ref whereHelpernull_String }{ ID: whereHelperint{/* contains filtered or unexported fields */}, FirstName: whereHelperstring{/* contains filtered or unexported fields */}, LastName: whereHelpernull_String{/* contains filtered or unexported fields */}, Username: whereHelpernull_String{/* contains filtered or unexported fields */}, LanguageCode: whereHelperstring{/* contains filtered or unexported fields */}, IsAdmin: whereHelperbool{/* contains filtered or unexported fields */}, JoinedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, Settings: whereHelperstring{/* contains filtered or unexported fields */}, Ref: whereHelpernull_String{/* contains filtered or unexported fields */}, }
Functions ¶
func ChatExists ¶
ChatExists checks if the Chat row exists.
func DownloadExists ¶
DownloadExists checks if the Download row exists.
func FileExists ¶
FileExists checks if the File row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Chat ¶
type Chat struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` TelegramID int64 `boil:"telegram_id" json:"telegram_id" toml:"telegram_id" yaml:"telegram_id"` Title string `boil:"title" json:"title" toml:"title" yaml:"title"` Type string `boil:"type" json:"type" toml:"type" yaml:"type"` OwnerID int `boil:"owner_id" json:"owner_id" toml:"owner_id" yaml:"owner_id"` LinkedAt time.Time `boil:"linked_at" json:"linked_at" toml:"linked_at" yaml:"linked_at"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` R *chatR `boil:"-" json:"-" toml:"-" yaml:"-"` L chatL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Chat is an object representing the database table.
func FindChat ¶
func FindChat(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Chat, error)
FindChat retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Chat) AddRestrictionsChatFiles ¶
func (o *Chat) AddRestrictionsChatFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
AddRestrictionsChatFiles adds the given related objects to the existing relationships of the chat, optionally inserting them as new records. Appends related to o.R.RestrictionsChatFiles. Sets related.R.RestrictionsChat appropriately.
func (*Chat) Delete ¶
Delete deletes a single Chat record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Chat) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Chat) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Chat) RemoveRestrictionsChatFiles ¶
func (o *Chat) RemoveRestrictionsChatFiles(ctx context.Context, exec boil.ContextExecutor, related ...*File) error
RemoveRestrictionsChatFiles relationships from objects passed in. Removes related items from R.RestrictionsChatFiles (uses pointer comparison, removal does not keep order) Sets related.R.RestrictionsChat.
func (*Chat) RestrictionsChatFiles ¶
RestrictionsChatFiles retrieves all the file's Files with an executor via restrictions_chat_id column.
func (*Chat) SetOwner ¶
func (o *Chat) SetOwner(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetOwner of the chat to the related item. Sets o.R.Owner to related. Adds o to related.R.OwnerChats.
func (*Chat) SetRestrictionsChatFiles ¶
func (o *Chat) SetRestrictionsChatFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
SetRestrictionsChatFiles removes all previously related items of the chat replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.RestrictionsChat's RestrictionsChatFiles accordingly. Replaces o.R.RestrictionsChatFiles with related. Sets related.R.RestrictionsChat's RestrictionsChatFiles accordingly.
func (*Chat) Update ¶
func (o *Chat) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Chat. 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 (*Chat) Upsert ¶
func (o *Chat) 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 ChatSlice ¶
type ChatSlice []*Chat
ChatSlice is an alias for a slice of pointers to Chat. This should generally be used opposed to []Chat.
type Download ¶
type Download struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` FileID null.Int `boil:"file_id" json:"file_id,omitempty" toml:"file_id" yaml:"file_id,omitempty"` UserID null.Int `boil:"user_id" json:"user_id,omitempty" toml:"user_id" yaml:"user_id,omitempty"` At time.Time `boil:"at" json:"at" toml:"at" yaml:"at"` NewSubscription null.Bool `boil:"new_subscription" json:"new_subscription,omitempty" toml:"new_subscription" yaml:"new_subscription,omitempty"` R *downloadR `boil:"-" json:"-" toml:"-" yaml:"-"` L downloadL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Download is an object representing the database table.
func FindDownload ¶
func FindDownload(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Download, error)
FindDownload retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Download) Delete ¶
Delete deletes a single Download record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Download) Insert ¶
func (o *Download) 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 (*Download) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Download) RemoveFile ¶
RemoveFile relationship. Sets o.R.File to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Download) RemoveUser ¶
RemoveUser relationship. Sets o.R.User to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Download) SetFile ¶
func (o *Download) SetFile(ctx context.Context, exec boil.ContextExecutor, insert bool, related *File) error
SetFile of the download to the related item. Sets o.R.File to related. Adds o to related.R.Downloads.
func (*Download) SetUser ¶
func (o *Download) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the download to the related item. Sets o.R.User to related. Adds o to related.R.Downloads.
func (*Download) Update ¶
func (o *Download) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Download. 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 (*Download) Upsert ¶
func (o *Download) 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 DownloadSlice ¶
type DownloadSlice []*Download
DownloadSlice is an alias for a slice of pointers to Download. This should generally be used opposed to []Download.
func (DownloadSlice) DeleteAll ¶
func (o DownloadSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*DownloadSlice) ReloadAll ¶
func (o *DownloadSlice) 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 (DownloadSlice) UpdateAll ¶
func (o DownloadSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type File ¶
type File struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` FileID string `boil:"file_id" json:"file_id" toml:"file_id" yaml:"file_id"` Caption null.String `boil:"caption" json:"caption,omitempty" toml:"caption" yaml:"caption,omitempty"` MimeType null.String `boil:"mime_type" json:"mime_type,omitempty" toml:"mime_type" yaml:"mime_type,omitempty"` Size int `boil:"size" json:"size" toml:"size" yaml:"size"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` OwnerID int `boil:"owner_id" json:"owner_id" toml:"owner_id" yaml:"owner_id"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` PublicID string `boil:"public_id" json:"public_id" toml:"public_id" yaml:"public_id"` Kind string `boil:"kind" json:"kind" toml:"kind" yaml:"kind"` Metadata string `boil:"metadata" json:"metadata" toml:"metadata" yaml:"metadata"` RestrictionsChatID null.Int `` /* 131-byte string literal not displayed */ IsViolatesCopyright null.Bool `` /* 135-byte string literal not displayed */ LinkedPostURI null.String `boil:"linked_post_uri" json:"linked_post_uri,omitempty" toml:"linked_post_uri" yaml:"linked_post_uri,omitempty"` R *fileR `boil:"-" json:"-" toml:"-" yaml:"-"` L fileL `boil:"-" json:"-" toml:"-" yaml:"-"` }
File is an object representing the database table.
func FindFile ¶
func FindFile(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*File, error)
FindFile retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*File) AddDownloads ¶
func (o *File) AddDownloads(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Download) error
AddDownloads adds the given related objects to the existing relationships of the file, optionally inserting them as new records. Appends related to o.R.Downloads. Sets related.R.File appropriately.
func (*File) Delete ¶
Delete deletes a single File record with an executor. Delete will match against the primary key column to find the record to delete.
func (*File) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*File) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*File) RemoveDownloads ¶
func (o *File) RemoveDownloads(ctx context.Context, exec boil.ContextExecutor, related ...*Download) error
RemoveDownloads relationships from objects passed in. Removes related items from R.Downloads (uses pointer comparison, removal does not keep order) Sets related.R.File.
func (*File) RemoveRestrictionsChat ¶
func (o *File) RemoveRestrictionsChat(ctx context.Context, exec boil.ContextExecutor, related *Chat) error
RemoveRestrictionsChat relationship. Sets o.R.RestrictionsChat to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*File) RestrictionsChat ¶
RestrictionsChat pointed to by the foreign key.
func (*File) SetDownloads ¶
func (o *File) SetDownloads(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Download) error
SetDownloads removes all previously related items of the file replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.File's Downloads accordingly. Replaces o.R.Downloads with related. Sets related.R.File's Downloads accordingly.
func (*File) SetOwner ¶
func (o *File) SetOwner(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetOwner of the file to the related item. Sets o.R.Owner to related. Adds o to related.R.OwnerFiles.
func (*File) SetRestrictionsChat ¶
func (o *File) SetRestrictionsChat(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Chat) error
SetRestrictionsChat of the file to the related item. Sets o.R.RestrictionsChat to related. Adds o to related.R.RestrictionsChatFiles.
func (*File) Update ¶
func (o *File) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the File. 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 (*File) Upsert ¶
func (o *File) 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 FileSlice ¶
type FileSlice []*File
FileSlice is an alias for a slice of pointers to File. This should generally be used opposed to []File.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type User ¶
type User struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` FirstName string `boil:"first_name" json:"first_name" toml:"first_name" yaml:"first_name"` LastName null.String `boil:"last_name" json:"last_name,omitempty" toml:"last_name" yaml:"last_name,omitempty"` Username null.String `boil:"username" json:"username,omitempty" toml:"username" yaml:"username,omitempty"` LanguageCode string `boil:"language_code" json:"language_code" toml:"language_code" yaml:"language_code"` IsAdmin bool `boil:"is_admin" json:"is_admin" toml:"is_admin" yaml:"is_admin"` JoinedAt time.Time `boil:"joined_at" json:"joined_at" toml:"joined_at" yaml:"joined_at"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` Settings string `boil:"settings" json:"settings" toml:"settings" yaml:"settings"` Ref null.String `boil:"ref" json:"ref,omitempty" toml:"ref" yaml:"ref,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) AddDownloads ¶
func (o *User) AddDownloads(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Download) error
AddDownloads adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Downloads. Sets related.R.User appropriately.
func (*User) AddOwnerChats ¶
func (o *User) AddOwnerChats(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Chat) error
AddOwnerChats adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.OwnerChats. Sets related.R.Owner appropriately.
func (*User) AddOwnerFiles ¶
func (o *User) AddOwnerFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
AddOwnerFiles adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.OwnerFiles. Sets related.R.Owner 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) OwnerChats ¶
OwnerChats retrieves all the chat's Chats with an executor via owner_id column.
func (*User) OwnerFiles ¶
OwnerFiles retrieves all the file's Files with an executor via owner_id column.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) RemoveDownloads ¶
func (o *User) RemoveDownloads(ctx context.Context, exec boil.ContextExecutor, related ...*Download) error
RemoveDownloads relationships from objects passed in. Removes related items from R.Downloads (uses pointer comparison, removal does not keep order) Sets related.R.User.
func (*User) SetDownloads ¶
func (o *User) SetDownloads(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Download) error
SetDownloads 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.User's Downloads accordingly. Replaces o.R.Downloads with related. Sets related.R.User's Downloads 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.