Documentation ¶
Index ¶
- Variables
- func ActorExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Actors(mods ...qm.QueryMod) actorQuery
- func AddActorHook(hookPoint boil.HookPoint, actorHook ActorHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func UserExists(ctx context.Context, exec boil.ContextExecutor, username string) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Actor
- func (o *Actor) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Actor) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Actor) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Actor) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Actor) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Actor) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Actor) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Actor) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Actor) Users(mods ...qm.QueryMod) userQuery
- type ActorHook
- type ActorSlice
- type M
- type User
- func (o *User) Actors(mods ...qm.QueryMod) actorQuery
- func (o *User) AddActors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Actor) error
- 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) RemoveActors(ctx context.Context, exec boil.ContextExecutor, related ...*Actor) error
- func (o *User) SetActors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Actor) 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 ActorColumns = struct { ID string URL string PublicKey string }{ ID: "id", URL: "url", PublicKey: "public_key", }
var ActorRels = struct { Users string }{ Users: "Users", }
ActorRels is where relationship names are stored.
var ActorTableColumns = struct { ID string URL string PublicKey string }{ ID: "actors.id", URL: "actors.url", PublicKey: "actors.public_key", }
var ActorWhere = struct { ID whereHelperstring URL whereHelperstring PublicKey whereHelper__byte }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, URL: whereHelperstring{/* contains filtered or unexported fields */}, PublicKey: whereHelper__byte{/* 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 TableNames = struct { Actors string Followers string Users string }{ Actors: "actors", Followers: "followers", Users: "users", }
var UserColumns = struct { Username string ID string PrivateKey string CreatedAt string }{ Username: "username", ID: "id", PrivateKey: "private_key", CreatedAt: "created_at", }
var UserRels = struct { Actors string }{ Actors: "Actors", }
UserRels is where relationship names are stored.
var UserTableColumns = struct { Username string ID string PrivateKey string CreatedAt string }{ Username: "users.username", ID: "users.id", PrivateKey: "users.private_key", CreatedAt: "users.created_at", }
var UserWhere = struct { Username whereHelperstring ID whereHelperstring PrivateKey whereHelper__byte CreatedAt whereHelpertime_Time }{ Username: whereHelperstring{/* contains filtered or unexported fields */}, ID: whereHelperstring{/* contains filtered or unexported fields */}, PrivateKey: whereHelper__byte{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func ActorExists ¶
ActorExists checks if the Actor row exists.
func AddActorHook ¶
AddActorHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Actor ¶
type Actor struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` URL string `boil:"url" json:"url" toml:"url" yaml:"url"` PublicKey []byte `boil:"public_key" json:"public_key" toml:"public_key" yaml:"public_key"` R *actorR `boil:"-" json:"-" toml:"-" yaml:"-"` L actorL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Actor is an object representing the database table.
func FindActor ¶
func FindActor(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Actor, error)
FindActor retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Actor) AddUsers ¶
func (o *Actor) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
AddUsers adds the given related objects to the existing relationships of the actor, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Actors appropriately.
func (*Actor) Delete ¶
Delete deletes a single Actor record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Actor) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Actor) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Actor) RemoveUsers ¶
RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Actors.
func (*Actor) SetUsers ¶
func (o *Actor) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
SetUsers removes all previously related items of the actor replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Actors's Users accordingly. Replaces o.R.Users with related. Sets related.R.Actors's Users accordingly.
func (*Actor) Update ¶
func (o *Actor) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Actor. 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 (*Actor) Upsert ¶
func (o *Actor) 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 ActorSlice ¶
type ActorSlice []*Actor
ActorSlice is an alias for a slice of pointers to Actor. This should almost always be used instead of []Actor.
func (ActorSlice) DeleteAll ¶
func (o ActorSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ActorSlice) ReloadAll ¶
func (o *ActorSlice) 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 (ActorSlice) UpdateAll ¶
func (o ActorSlice) 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 User ¶
type User struct { Username string `boil:"username" json:"username" toml:"username" yaml:"username"` ID string `boil:"id" json:"id" toml:"id" yaml:"id"` PrivateKey []byte `boil:"private_key" json:"private_key" toml:"private_key" yaml:"private_key"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` 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, username string, 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) AddActors ¶
func (o *User) AddActors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Actor) error
AddActors adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Actors. Sets related.R.Users 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) RemoveActors ¶
func (o *User) RemoveActors(ctx context.Context, exec boil.ContextExecutor, related ...*Actor) error
RemoveActors relationships from objects passed in. Removes related items from R.Actors (uses pointer comparison, removal does not keep order) Sets related.R.Users.
func (*User) SetActors ¶
func (o *User) SetActors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Actor) error
SetActors 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.Users's Actors accordingly. Replaces o.R.Actors with related. Sets related.R.Users's Actors 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 almost always be used instead of []User.