models

package
v0.14.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var GorpMigrationColumns = struct {
	ID        string
	AppliedAt string
}{
	ID:        "id",
	AppliedAt: "applied_at",
}
View Source
var GorpMigrationRels = struct {
}{}

GorpMigrationRels is where relationship names are stored.

View Source
var GorpMigrationWhere = struct {
	ID        whereHelperstring
	AppliedAt whereHelpernull_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	AppliedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var LbrynetServerColumns = struct {
	ID        string
	Name      string
	Address   string
	Weight    string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	Name:      "name",
	Address:   "address",
	Weight:    "weight",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var LbrynetServerRels = struct {
	Users string
}{
	Users: "Users",
}

LbrynetServerRels is where relationship names are stored.

View Source
var LbrynetServerWhere = struct {
	ID        whereHelperint
	Name      whereHelperstring
	Address   whereHelperstring
	Weight    whereHelperint
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	Address:   whereHelperstring{/* contains filtered or unexported fields */},
	Weight:    whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var QueryLogColumns = struct {
	ID        string
	Method    string
	Timestamp string
	UserID    string
	RemoteIP  string
	Body      string
}{
	ID:        "id",
	Method:    "method",
	Timestamp: "timestamp",
	UserID:    "user_id",
	RemoteIP:  "remote_ip",
	Body:      "body",
}
View Source
var QueryLogRels = struct {
}{}

QueryLogRels is where relationship names are stored.

View Source
var QueryLogWhere = struct {
	ID        whereHelperint
	Method    whereHelperstring
	Timestamp whereHelpertime_Time
	UserID    whereHelpernull_Int
	RemoteIP  whereHelperstring
	Body      whereHelpernull_JSON
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	Method:    whereHelperstring{/* contains filtered or unexported fields */},
	Timestamp: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UserID:    whereHelpernull_Int{/* contains filtered or unexported fields */},
	RemoteIP:  whereHelperstring{/* contains filtered or unexported fields */},
	Body:      whereHelpernull_JSON{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	GorpMigrations string
	LbrynetServers string
	QueryLog       string
	Users          string
}{
	GorpMigrations: "gorp_migrations",
	LbrynetServers: "lbrynet_servers",
	QueryLog:       "query_log",
	Users:          "users",
}
View Source
var UserColumns = struct {
	ID              string
	CreatedAt       string
	UpdatedAt       string
	SDKAccountID    string
	LbrynetServerID string
	LastSeenAt      string
}{
	ID:              "id",
	CreatedAt:       "created_at",
	UpdatedAt:       "updated_at",
	SDKAccountID:    "sdk_account_id",
	LbrynetServerID: "lbrynet_server_id",
	LastSeenAt:      "last_seen_at",
}
View Source
var UserRels = struct {
	LbrynetServer string
}{
	LbrynetServer: "LbrynetServer",
}

UserRels is where relationship names are stored.

View Source
var UserWhere = struct {
	ID              whereHelperint
	CreatedAt       whereHelpertime_Time
	UpdatedAt       whereHelpertime_Time
	SDKAccountID    whereHelpernull_String
	LbrynetServerID whereHelpernull_Int
	LastSeenAt      whereHelpernull_Time
}{
	ID:              whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	SDKAccountID:    whereHelpernull_String{/* contains filtered or unexported fields */},
	LbrynetServerID: whereHelpernull_Int{/* contains filtered or unexported fields */},
	LastSeenAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
}

Functions

func AddGorpMigrationHook

func AddGorpMigrationHook(hookPoint boil.HookPoint, gorpMigrationHook GorpMigrationHook)

AddGorpMigrationHook registers your hook function for all future operations.

func AddLbrynetServerHook added in v0.10.4

func AddLbrynetServerHook(hookPoint boil.HookPoint, lbrynetServerHook LbrynetServerHook)

AddLbrynetServerHook registers your hook function for all future operations.

func AddQueryLogHook added in v0.14.4

func AddQueryLogHook(hookPoint boil.HookPoint, queryLogHook QueryLogHook)

AddQueryLogHook registers your hook function for all future operations.

func AddUserHook

func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)

AddUserHook registers your hook function for all future operations.

func GorpMigrationExists

func GorpMigrationExists(exec boil.Executor, iD string) (bool, error)

GorpMigrationExists checks if the GorpMigration row exists.

func GorpMigrationExistsG

func GorpMigrationExistsG(iD string) (bool, error)

GorpMigrationExistsG checks if the GorpMigration row exists.

func GorpMigrations

func GorpMigrations(mods ...qm.QueryMod) gorpMigrationQuery

GorpMigrations retrieves all the records using an executor.

func LbrynetServerExists added in v0.10.4

func LbrynetServerExists(exec boil.Executor, iD int) (bool, error)

LbrynetServerExists checks if the LbrynetServer row exists.

func LbrynetServerExistsG added in v0.10.4

func LbrynetServerExistsG(iD int) (bool, error)

LbrynetServerExistsG checks if the LbrynetServer row exists.

func LbrynetServers added in v0.10.4

func LbrynetServers(mods ...qm.QueryMod) lbrynetServerQuery

LbrynetServers retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func QueryLogExists added in v0.14.4

func QueryLogExists(exec boil.Executor, iD int) (bool, error)

QueryLogExists checks if the QueryLog row exists.

func QueryLogExistsG added in v0.14.4

func QueryLogExistsG(iD int) (bool, error)

QueryLogExistsG checks if the QueryLog row exists.

func QueryLogs added in v0.14.4

func QueryLogs(mods ...qm.QueryMod) queryLogQuery

QueryLogs retrieves all the records using an executor.

func UserExists

func UserExists(exec boil.Executor, iD int) (bool, error)

UserExists checks if the User row exists.

func UserExistsG

func UserExistsG(iD int) (bool, error)

UserExistsG checks if the User row exists.

func Users

func Users(mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

Types

type GorpMigration

type GorpMigration struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	AppliedAt null.Time `boil:"applied_at" json:"applied_at,omitempty" toml:"applied_at" yaml:"applied_at,omitempty"`

	R *gorpMigrationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L gorpMigrationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

GorpMigration is an object representing the database table.

func FindGorpMigration

func FindGorpMigration(exec boil.Executor, iD string, selectCols ...string) (*GorpMigration, error)

FindGorpMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindGorpMigrationG

func FindGorpMigrationG(iD string, selectCols ...string) (*GorpMigration, error)

FindGorpMigrationG retrieves a single record by ID.

func (*GorpMigration) Delete

func (o *GorpMigration) Delete(exec boil.Executor) (int64, error)

Delete deletes a single GorpMigration record with an executor. Delete will match against the primary key column to find the record to delete.

func (*GorpMigration) DeleteG

func (o *GorpMigration) DeleteG() (int64, error)

DeleteG deletes a single GorpMigration record. DeleteG will match against the primary key column to find the record to delete.

func (*GorpMigration) Insert

func (o *GorpMigration) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*GorpMigration) InsertG

func (o *GorpMigration) InsertG(columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*GorpMigration) Reload

func (o *GorpMigration) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*GorpMigration) ReloadG

func (o *GorpMigration) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*GorpMigration) Update

func (o *GorpMigration) Update(exec boil.Executor, columns boil.Columns) (int64, error)

Update uses an executor to update the GorpMigration. 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 (*GorpMigration) UpdateG

func (o *GorpMigration) UpdateG(columns boil.Columns) (int64, error)

UpdateG a single GorpMigration record using the global executor. See Update for more documentation.

func (*GorpMigration) Upsert

func (o *GorpMigration) 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.

func (*GorpMigration) UpsertG

func (o *GorpMigration) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type GorpMigrationHook

type GorpMigrationHook func(boil.Executor, *GorpMigration) error

GorpMigrationHook is the signature for custom GorpMigration hook methods

type GorpMigrationSlice

type GorpMigrationSlice []*GorpMigration

GorpMigrationSlice is an alias for a slice of pointers to GorpMigration. This should generally be used opposed to []GorpMigration.

func (GorpMigrationSlice) DeleteAll

func (o GorpMigrationSlice) DeleteAll(exec boil.Executor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (GorpMigrationSlice) DeleteAllG

func (o GorpMigrationSlice) DeleteAllG() (int64, error)

DeleteAllG deletes all rows in the slice.

func (*GorpMigrationSlice) ReloadAll

func (o *GorpMigrationSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*GorpMigrationSlice) ReloadAllG

func (o *GorpMigrationSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (GorpMigrationSlice) UpdateAll

func (o GorpMigrationSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (GorpMigrationSlice) UpdateAllG

func (o GorpMigrationSlice) UpdateAllG(cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type LbrynetServer added in v0.10.4

type LbrynetServer struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	Address   string    `boil:"address" json:"address" toml:"address" yaml:"address"`
	Weight    int       `boil:"weight" json:"weight" toml:"weight" yaml:"weight"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *lbrynetServerR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L lbrynetServerL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

LbrynetServer is an object representing the database table.

func FindLbrynetServer added in v0.10.4

func FindLbrynetServer(exec boil.Executor, iD int, selectCols ...string) (*LbrynetServer, error)

FindLbrynetServer retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindLbrynetServerG added in v0.10.4

func FindLbrynetServerG(iD int, selectCols ...string) (*LbrynetServer, error)

FindLbrynetServerG retrieves a single record by ID.

func (*LbrynetServer) AddUsers added in v0.10.4

func (o *LbrynetServer) AddUsers(exec boil.Executor, insert bool, related ...*User) error

AddUsers adds the given related objects to the existing relationships of the lbrynet_server, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.LbrynetServer appropriately.

func (*LbrynetServer) AddUsersG added in v0.10.4

func (o *LbrynetServer) AddUsersG(insert bool, related ...*User) error

AddUsersG adds the given related objects to the existing relationships of the lbrynet_server, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.LbrynetServer appropriately. Uses the global database handle.

func (*LbrynetServer) Delete added in v0.10.4

func (o *LbrynetServer) Delete(exec boil.Executor) (int64, error)

Delete deletes a single LbrynetServer record with an executor. Delete will match against the primary key column to find the record to delete.

func (*LbrynetServer) DeleteG added in v0.10.4

func (o *LbrynetServer) DeleteG() (int64, error)

DeleteG deletes a single LbrynetServer record. DeleteG will match against the primary key column to find the record to delete.

func (*LbrynetServer) Insert added in v0.10.4

func (o *LbrynetServer) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*LbrynetServer) InsertG added in v0.10.4

func (o *LbrynetServer) InsertG(columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*LbrynetServer) Reload added in v0.10.4

func (o *LbrynetServer) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*LbrynetServer) ReloadG added in v0.10.4

func (o *LbrynetServer) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*LbrynetServer) RemoveUsers added in v0.10.4

func (o *LbrynetServer) RemoveUsers(exec boil.Executor, related ...*User) error

RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.LbrynetServer.

func (*LbrynetServer) RemoveUsersG added in v0.10.4

func (o *LbrynetServer) RemoveUsersG(related ...*User) error

RemoveUsersG relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.LbrynetServer. Uses the global database handle.

func (*LbrynetServer) SetUsers added in v0.10.4

func (o *LbrynetServer) SetUsers(exec boil.Executor, insert bool, related ...*User) error

SetUsers removes all previously related items of the lbrynet_server replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.LbrynetServer's Users accordingly. Replaces o.R.Users with related. Sets related.R.LbrynetServer's Users accordingly.

func (*LbrynetServer) SetUsersG added in v0.10.4

func (o *LbrynetServer) SetUsersG(insert bool, related ...*User) error

SetUsersG removes all previously related items of the lbrynet_server replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.LbrynetServer's Users accordingly. Replaces o.R.Users with related. Sets related.R.LbrynetServer's Users accordingly. Uses the global database handle.

func (*LbrynetServer) Update added in v0.10.4

func (o *LbrynetServer) Update(exec boil.Executor, columns boil.Columns) (int64, error)

Update uses an executor to update the LbrynetServer. 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 (*LbrynetServer) UpdateG added in v0.10.4

func (o *LbrynetServer) UpdateG(columns boil.Columns) (int64, error)

UpdateG a single LbrynetServer record using the global executor. See Update for more documentation.

func (*LbrynetServer) Upsert added in v0.10.4

func (o *LbrynetServer) 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.

func (*LbrynetServer) UpsertG added in v0.10.4

func (o *LbrynetServer) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

func (*LbrynetServer) Users added in v0.10.4

func (o *LbrynetServer) Users(mods ...qm.QueryMod) userQuery

Users retrieves all the user's Users with an executor.

type LbrynetServerHook added in v0.10.4

type LbrynetServerHook func(boil.Executor, *LbrynetServer) error

LbrynetServerHook is the signature for custom LbrynetServer hook methods

type LbrynetServerSlice added in v0.10.4

type LbrynetServerSlice []*LbrynetServer

LbrynetServerSlice is an alias for a slice of pointers to LbrynetServer. This should generally be used opposed to []LbrynetServer.

func (LbrynetServerSlice) DeleteAll added in v0.10.4

func (o LbrynetServerSlice) DeleteAll(exec boil.Executor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (LbrynetServerSlice) DeleteAllG added in v0.10.4

func (o LbrynetServerSlice) DeleteAllG() (int64, error)

DeleteAllG deletes all rows in the slice.

func (*LbrynetServerSlice) ReloadAll added in v0.10.4

func (o *LbrynetServerSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*LbrynetServerSlice) ReloadAllG added in v0.10.4

func (o *LbrynetServerSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (LbrynetServerSlice) UpdateAll added in v0.10.4

func (o LbrynetServerSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (LbrynetServerSlice) UpdateAllG added in v0.10.4

func (o LbrynetServerSlice) UpdateAllG(cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type QueryLog added in v0.14.4

type QueryLog struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Method    string    `boil:"method" json:"method" toml:"method" yaml:"method"`
	Timestamp time.Time `boil:"timestamp" json:"timestamp" toml:"timestamp" yaml:"timestamp"`
	UserID    null.Int  `boil:"user_id" json:"user_id,omitempty" toml:"user_id" yaml:"user_id,omitempty"`
	RemoteIP  string    `boil:"remote_ip" json:"remote_ip" toml:"remote_ip" yaml:"remote_ip"`
	Body      null.JSON `boil:"body" json:"body,omitempty" toml:"body" yaml:"body,omitempty"`

	R *queryLogR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L queryLogL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

QueryLog is an object representing the database table.

func FindQueryLog added in v0.14.4

func FindQueryLog(exec boil.Executor, iD int, selectCols ...string) (*QueryLog, error)

FindQueryLog retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindQueryLogG added in v0.14.4

func FindQueryLogG(iD int, selectCols ...string) (*QueryLog, error)

FindQueryLogG retrieves a single record by ID.

func (*QueryLog) Delete added in v0.14.4

func (o *QueryLog) Delete(exec boil.Executor) (int64, error)

Delete deletes a single QueryLog record with an executor. Delete will match against the primary key column to find the record to delete.

func (*QueryLog) DeleteG added in v0.14.4

func (o *QueryLog) DeleteG() (int64, error)

DeleteG deletes a single QueryLog record. DeleteG will match against the primary key column to find the record to delete.

func (*QueryLog) Insert added in v0.14.4

func (o *QueryLog) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*QueryLog) InsertG added in v0.14.4

func (o *QueryLog) InsertG(columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*QueryLog) Reload added in v0.14.4

func (o *QueryLog) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*QueryLog) ReloadG added in v0.14.4

func (o *QueryLog) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*QueryLog) Update added in v0.14.4

func (o *QueryLog) Update(exec boil.Executor, columns boil.Columns) (int64, error)

Update uses an executor to update the QueryLog. 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 (*QueryLog) UpdateG added in v0.14.4

func (o *QueryLog) UpdateG(columns boil.Columns) (int64, error)

UpdateG a single QueryLog record using the global executor. See Update for more documentation.

func (*QueryLog) Upsert added in v0.14.4

func (o *QueryLog) 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.

func (*QueryLog) UpsertG added in v0.14.4

func (o *QueryLog) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type QueryLogHook added in v0.14.4

type QueryLogHook func(boil.Executor, *QueryLog) error

QueryLogHook is the signature for custom QueryLog hook methods

type QueryLogSlice added in v0.14.4

type QueryLogSlice []*QueryLog

QueryLogSlice is an alias for a slice of pointers to QueryLog. This should generally be used opposed to []QueryLog.

func (QueryLogSlice) DeleteAll added in v0.14.4

func (o QueryLogSlice) DeleteAll(exec boil.Executor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (QueryLogSlice) DeleteAllG added in v0.14.4

func (o QueryLogSlice) DeleteAllG() (int64, error)

DeleteAllG deletes all rows in the slice.

func (*QueryLogSlice) ReloadAll added in v0.14.4

func (o *QueryLogSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*QueryLogSlice) ReloadAllG added in v0.14.4

func (o *QueryLogSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (QueryLogSlice) UpdateAll added in v0.14.4

func (o QueryLogSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (QueryLogSlice) UpdateAllG added in v0.14.4

func (o QueryLogSlice) UpdateAllG(cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type User

type User struct {
	ID              int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	CreatedAt       time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt       time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	SDKAccountID    null.String `boil:"sdk_account_id" json:"sdk_account_id,omitempty" toml:"sdk_account_id" yaml:"sdk_account_id,omitempty"`
	LbrynetServerID null.Int    `boil:"lbrynet_server_id" json:"lbrynet_server_id,omitempty" toml:"lbrynet_server_id" yaml:"lbrynet_server_id,omitempty"`
	LastSeenAt      null.Time   `boil:"last_seen_at" json:"last_seen_at,omitempty" toml:"last_seen_at" yaml:"last_seen_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(exec boil.Executor, 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 FindUserG

func FindUserG(iD int, selectCols ...string) (*User, error)

FindUserG retrieves a single record by ID.

func (*User) Delete

func (o *User) Delete(exec boil.Executor) (int64, error)

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) DeleteG

func (o *User) DeleteG() (int64, error)

DeleteG deletes a single User record. DeleteG will match against the primary key column to find the record to delete.

func (*User) Insert

func (o *User) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*User) InsertG

func (o *User) InsertG(columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*User) LbrynetServer added in v0.10.4

func (o *User) LbrynetServer(mods ...qm.QueryMod) lbrynetServerQuery

LbrynetServer pointed to by the foreign key.

func (*User) Reload

func (o *User) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*User) ReloadG

func (o *User) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*User) RemoveLbrynetServer added in v0.10.4

func (o *User) RemoveLbrynetServer(exec boil.Executor, related *LbrynetServer) error

RemoveLbrynetServer relationship. Sets o.R.LbrynetServer to nil. Removes o from all passed in related items' relationships struct (Optional).

func (*User) RemoveLbrynetServerG added in v0.10.4

func (o *User) RemoveLbrynetServerG(related *LbrynetServer) error

RemoveLbrynetServerG relationship. Sets o.R.LbrynetServer to nil. Removes o from all passed in related items' relationships struct (Optional). Uses the global database handle.

func (*User) SetLbrynetServer added in v0.10.4

func (o *User) SetLbrynetServer(exec boil.Executor, insert bool, related *LbrynetServer) error

SetLbrynetServer of the user to the related item. Sets o.R.LbrynetServer to related. Adds o to related.R.Users.

func (*User) SetLbrynetServerG added in v0.10.4

func (o *User) SetLbrynetServerG(insert bool, related *LbrynetServer) error

SetLbrynetServerG of the user to the related item. Sets o.R.LbrynetServer to related. Adds o to related.R.Users. Uses the global database handle.

func (*User) Update

func (o *User) Update(exec boil.Executor, 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) UpdateG

func (o *User) UpdateG(columns boil.Columns) (int64, error)

UpdateG a single User record using the global executor. See Update for more documentation.

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.

func (*User) UpsertG

func (o *User) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type UserHook

type UserHook func(boil.Executor, *User) error

UserHook is the signature for custom User hook methods

type UserSlice

type UserSlice []*User

UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.

func (UserSlice) DeleteAll

func (o UserSlice) DeleteAll(exec boil.Executor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (UserSlice) DeleteAllG

func (o UserSlice) DeleteAllG() (int64, error)

DeleteAllG deletes all rows in the slice.

func (*UserSlice) ReloadAll

func (o *UserSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*UserSlice) ReloadAllG

func (o *UserSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (UserSlice) UpdateAll

func (o UserSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (UserSlice) UpdateAllG

func (o UserSlice) UpdateAllG(cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL