Documentation ¶
Index ¶
- Variables
- func AddDiaryHook(hookPoint boil.HookPoint, diaryHook DiaryHook)
- func AddPersonHook(hookPoint boil.HookPoint, personHook PersonHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func Diaries(mods ...qm.QueryMod) diaryQuery
- func DiaryExists(exec boil.Executor, iD int) (bool, error)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func People(mods ...qm.QueryMod) personQuery
- func PersonExists(exec boil.Executor, iD int) (bool, error)
- func UserExists(exec boil.Executor, iD int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Diary
- func (o *Diary) Delete(exec boil.Executor) (int64, error)
- func (o *Diary) Insert(exec boil.Executor, columns boil.Columns) error
- func (o *Diary) Reload(exec boil.Executor) error
- func (o *Diary) RemoveUser(exec boil.Executor, related *User) error
- func (o *Diary) SetUser(exec boil.Executor, insert bool, related *User) error
- func (o *Diary) Update(exec boil.Executor, columns boil.Columns) (int64, error)
- func (o *Diary) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, ...) error
- func (o *Diary) User(mods ...qm.QueryMod) userQuery
- type DiaryHook
- type DiarySlice
- type M
- type Person
- func (o *Person) Delete(exec boil.Executor) (int64, error)
- func (o *Person) Insert(exec boil.Executor, columns boil.Columns) error
- func (o *Person) Reload(exec boil.Executor) error
- func (o *Person) RemoveUser(exec boil.Executor, related *User) error
- func (o *Person) SetUser(exec boil.Executor, insert bool, related *User) error
- func (o *Person) Update(exec boil.Executor, columns boil.Columns) (int64, error)
- func (o *Person) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, ...) error
- func (o *Person) User(mods ...qm.QueryMod) userQuery
- type PersonHook
- type PersonSlice
- type User
- func (o *User) AddDiaries(exec boil.Executor, insert bool, related ...*Diary) error
- func (o *User) AddPeople(exec boil.Executor, insert bool, related ...*Person) error
- func (o *User) Delete(exec boil.Executor) (int64, error)
- func (o *User) Diaries(mods ...qm.QueryMod) diaryQuery
- func (o *User) Insert(exec boil.Executor, columns boil.Columns) error
- func (o *User) People(mods ...qm.QueryMod) personQuery
- func (o *User) Reload(exec boil.Executor) error
- func (o *User) RemoveDiaries(exec boil.Executor, related ...*Diary) error
- func (o *User) RemovePeople(exec boil.Executor, related ...*Person) error
- func (o *User) SetDiaries(exec boil.Executor, insert bool, related ...*Diary) error
- func (o *User) SetPeople(exec boil.Executor, insert bool, related ...*Person) error
- func (o *User) Update(exec boil.Executor, columns boil.Columns) (int64, error)
- func (o *User) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, ...) error
- type UserHook
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var DiaryColumns = struct { ID string CreatedAt string UpdatedAt string DeletedAt string Year string UserID string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", Year: "year", UserID: "user_id", }
var DiaryRels = struct { User string }{ User: "User", }
DiaryRels is where relationship names are stored.
var DiaryWhere = struct { ID whereHelperint CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time Year whereHelperint UserID whereHelpernull_Int }{ ID: 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 */}, Year: whereHelperint{/* contains filtered or unexported fields */}, UserID: whereHelpernull_Int{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("model: 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 PersonColumns = struct { ID string CreatedAt string UpdatedAt string DeletedAt string FirstName string LastName string Phone string Email string UserID string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", FirstName: "first_name", LastName: "last_name", Phone: "phone", Email: "email", UserID: "user_id", }
var PersonRels = struct { User string }{ User: "User", }
PersonRels is where relationship names are stored.
var PersonWhere = struct { ID whereHelperint CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time FirstName whereHelperstring LastName whereHelpernull_String Phone whereHelpernull_String Email whereHelpernull_String UserID whereHelpernull_Int }{ ID: 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 */}, FirstName: whereHelperstring{/* contains filtered or unexported fields */}, LastName: whereHelpernull_String{/* contains filtered or unexported fields */}, Phone: whereHelpernull_String{/* contains filtered or unexported fields */}, Email: whereHelpernull_String{/* contains filtered or unexported fields */}, UserID: whereHelpernull_Int{/* contains filtered or unexported fields */}, }
var TableNames = struct { Diary string Person string Users string }{ Diary: "diary", Person: "person", Users: "users", }
var UserColumns = struct { ID string CreatedAt string UpdatedAt string DeletedAt string Login string Password string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", Login: "login", Password: "password", }
var UserRels = struct { Diaries string People string }{ Diaries: "Diaries", People: "People", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperint CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time Login whereHelperstring Password whereHelperstring }{ ID: 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 */}, Login: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelperstring{/* contains filtered or unexported fields */}, }
Functions ¶
func AddDiaryHook ¶
AddDiaryHook registers your hook function for all future operations.
func AddPersonHook ¶
func AddPersonHook(hookPoint boil.HookPoint, personHook PersonHook)
AddPersonHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func DiaryExists ¶
DiaryExists checks if the Diary row exists.
func PersonExists ¶
PersonExists checks if the Person row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Diary ¶
type Diary struct { ID int `boil:"id" json:"id" toml:"id" yaml:"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"` Year int `boil:"year" json:"year" toml:"year" yaml:"year"` UserID null.Int `boil:"user_id" json:"user_id,omitempty" toml:"user_id" yaml:"user_id,omitempty"` R *diaryR `boil:"-" json:"-" toml:"-" yaml:"-"` L diaryL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Diary is an object representing the database table.
func FindDiary ¶
FindDiary retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Diary) Delete ¶
Delete deletes a single Diary record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Diary) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Diary) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Diary) RemoveUser ¶
RemoveUser relationship. Sets o.R.User to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Diary) SetUser ¶
SetUser of the diary to the related item. Sets o.R.User to related. Adds o to related.R.Diaries.
func (*Diary) Update ¶
Update uses an executor to update the Diary. 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 (*Diary) Upsert ¶
func (o *Diary) Upsert(exec boil.Executor, 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 DiarySlice ¶
type DiarySlice []*Diary
DiarySlice is an alias for a slice of pointers to Diary. This should generally be used opposed to []Diary.
func (DiarySlice) DeleteAll ¶
func (o DiarySlice) DeleteAll(exec boil.Executor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Person ¶
type Person struct { ID int `boil:"id" json:"id" toml:"id" yaml:"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"` 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"` Phone null.String `boil:"phone" json:"phone,omitempty" toml:"phone" yaml:"phone,omitempty"` Email null.String `boil:"email" json:"email,omitempty" toml:"email" yaml:"email,omitempty"` UserID null.Int `boil:"user_id" json:"user_id,omitempty" toml:"user_id" yaml:"user_id,omitempty"` R *personR `boil:"-" json:"-" toml:"-" yaml:"-"` L personL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Person is an object representing the database table.
func FindPerson ¶
FindPerson retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Person) Delete ¶
Delete deletes a single Person record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Person) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Person) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Person) RemoveUser ¶
RemoveUser relationship. Sets o.R.User to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Person) SetUser ¶
SetUser of the person to the related item. Sets o.R.User to related. Adds o to related.R.People.
func (*Person) Update ¶
Update uses an executor to update the Person. 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 (*Person) Upsert ¶
func (o *Person) Upsert(exec boil.Executor, 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 PersonHook ¶
PersonHook is the signature for custom Person hook methods
type PersonSlice ¶
type PersonSlice []*Person
PersonSlice is an alias for a slice of pointers to Person. This should generally be used opposed to []Person.
func (PersonSlice) DeleteAll ¶
func (o PersonSlice) DeleteAll(exec boil.Executor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
type User ¶
type User struct { ID int `boil:"id" json:"id" toml:"id" yaml:"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"` Login string `boil:"login" json:"login" toml:"login" yaml:"login"` Password string `boil:"password" json:"password" toml:"password" yaml:"password"` R *userR `boil:"-" json:"-" toml:"-" yaml:"-"` L userL `boil:"-" json:"-" toml:"-" yaml:"-"` }
User is an object representing the database table.
func FindUser ¶
FindUser retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*User) AddDiaries ¶
AddDiaries adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Diaries. Sets related.R.User appropriately.
func (*User) AddPeople ¶
AddPeople adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.People. Sets related.R.User appropriately.
func (*User) Delete ¶
Delete deletes a single User record with an executor. Delete will match against the primary key column to find the record to delete.
func (*User) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) RemoveDiaries ¶
RemoveDiaries relationships from objects passed in. Removes related items from R.Diaries (uses pointer comparison, removal does not keep order) Sets related.R.User.
func (*User) RemovePeople ¶
RemovePeople relationships from objects passed in. Removes related items from R.People (uses pointer comparison, removal does not keep order) Sets related.R.User.
func (*User) SetDiaries ¶
SetDiaries 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 Diaries accordingly. Replaces o.R.Diaries with related. Sets related.R.User's Diaries accordingly.
func (*User) SetPeople ¶
SetPeople 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 People accordingly. Replaces o.R.People with related. Sets related.R.User's People accordingly.
func (*User) Update ¶
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(exec boil.Executor, 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.