Documentation
¶
Index ¶
- Variables
- 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 M
- type User
- 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) Reload(ctx context.Context, exec boil.ContextExecutor) 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 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 TableNames = struct { User string }{ User: "user", }
var UserColumns = struct { ID string TelegramID string TelegramUsername string FirstName string LastName string LanguageCode string PreferredLanguageCode string Deeplink string StoppedAt string CreatedAt string UpdatedAt string }{ ID: "id", TelegramID: "telegram_id", TelegramUsername: "telegram_username", FirstName: "first_name", LastName: "last_name", LanguageCode: "language_code", PreferredLanguageCode: "preferred_language_code", Deeplink: "deeplink", StoppedAt: "stopped_at", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var UserRels = struct {
}{}
UserRels is where relationship names are stored.
var UserTableColumns = struct { ID string TelegramID string TelegramUsername string FirstName string LastName string LanguageCode string PreferredLanguageCode string Deeplink string StoppedAt string CreatedAt string UpdatedAt string }{ ID: "user.id", TelegramID: "user.telegram_id", TelegramUsername: "user.telegram_username", FirstName: "user.first_name", LastName: "user.last_name", LanguageCode: "user.language_code", PreferredLanguageCode: "user.preferred_language_code", Deeplink: "user.deeplink", StoppedAt: "user.stopped_at", CreatedAt: "user.created_at", UpdatedAt: "user.updated_at", }
var UserWhere = struct { ID whereHelperint TelegramID whereHelperint64 TelegramUsername whereHelpernull_String FirstName whereHelperstring LastName whereHelpernull_String LanguageCode whereHelpernull_String PreferredLanguageCode whereHelpernull_String Deeplink whereHelpernull_String StoppedAt whereHelpernull_Time CreatedAt whereHelpertime_Time UpdatedAt whereHelpernull_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, TelegramID: whereHelperint64{/* contains filtered or unexported fields */}, TelegramUsername: whereHelpernull_String{/* contains filtered or unexported fields */}, FirstName: whereHelperstring{/* contains filtered or unexported fields */}, LastName: whereHelpernull_String{/* contains filtered or unexported fields */}, LanguageCode: whereHelpernull_String{/* contains filtered or unexported fields */}, PreferredLanguageCode: whereHelpernull_String{/* contains filtered or unexported fields */}, Deeplink: whereHelpernull_String{/* contains filtered or unexported fields */}, StoppedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
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"` TelegramID int64 `boil:"telegram_id" json:"telegram_id" toml:"telegram_id" yaml:"telegram_id"` TelegramUsername null.String `boil:"telegram_username" json:"telegram_username,omitempty" toml:"telegram_username" yaml:"telegram_username,omitempty"` 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"` LanguageCode null.String `boil:"language_code" json:"language_code,omitempty" toml:"language_code" yaml:"language_code,omitempty"` PreferredLanguageCode null.String `` /* 143-byte string literal not displayed */ Deeplink null.String `boil:"deeplink" json:"deeplink,omitempty" toml:"deeplink" yaml:"deeplink,omitempty"` StoppedAt null.Time `boil:"stopped_at" json:"stopped_at,omitempty" toml:"stopped_at" yaml:"stopped_at,omitempty"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_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) 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) 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 almost always be used instead of []User.