Documentation ¶
Index ¶
- Variables
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- 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 UserHook
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
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 TableNames = struct { Users string }{ Users: "users", }
var UserColumns = struct { ID string PushURL string PrivateKey string PublicKey string Longitude string Latitude string Threshold string LastCrossover string }{ ID: "id", PushURL: "push_url", PrivateKey: "private_key", PublicKey: "public_key", Longitude: "longitude", Latitude: "latitude", Threshold: "threshold", LastCrossover: "last_crossover", }
var UserRels = struct {
}{}
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperint PushURL whereHelperstring PrivateKey whereHelperstring PublicKey whereHelperstring Longitude whereHelperfloat64 Latitude whereHelperfloat64 Threshold whereHelperfloat64 LastCrossover whereHelpernull_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, PushURL: whereHelperstring{/* contains filtered or unexported fields */}, PrivateKey: whereHelperstring{/* contains filtered or unexported fields */}, PublicKey: whereHelperstring{/* contains filtered or unexported fields */}, Longitude: whereHelperfloat64{/* contains filtered or unexported fields */}, Latitude: whereHelperfloat64{/* contains filtered or unexported fields */}, Threshold: whereHelperfloat64{/* contains filtered or unexported fields */}, LastCrossover: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
Functions ¶
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
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"` PushURL string `boil:"push_url" json:"push_url" toml:"push_url" yaml:"push_url"` PrivateKey string `boil:"private_key" json:"private_key" toml:"private_key" yaml:"private_key"` PublicKey string `boil:"public_key" json:"public_key" toml:"public_key" yaml:"public_key"` Longitude float64 `boil:"longitude" json:"longitude" toml:"longitude" yaml:"longitude"` Latitude float64 `boil:"latitude" json:"latitude" toml:"latitude" yaml:"latitude"` Threshold float64 `boil:"threshold" json:"threshold" toml:"threshold" yaml:"threshold"` LastCrossover null.Time `boil:"last_crossover" json:"last_crossover,omitempty" toml:"last_crossover" yaml:"last_crossover,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 generally be used opposed to []User.