models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: AGPL-3.0 Imports: 16 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 NodeWakeColumns = struct {
	ID         string
	CreatedAt  string
	Done       string
	MacAddress string
	PoweredOn  string
}{
	ID:         "id",
	CreatedAt:  "created_at",
	Done:       "done",
	MacAddress: "mac_address",
	PoweredOn:  "powered_on",
}
View Source
var NodeWakeRels = struct {
}{}

NodeWakeRels is where relationship names are stored.

View Source
var NodeWakeWhere = struct {
	ID         whereHelperint64
	CreatedAt  whereHelpertime_Time
	Done       whereHelperint64
	MacAddress whereHelperstring
	PoweredOn  whereHelperint64
}{
	ID:         whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	Done:       whereHelperint64{/* contains filtered or unexported fields */},
	MacAddress: whereHelperstring{/* contains filtered or unexported fields */},
	PoweredOn:  whereHelperint64{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	GorpMigrations string
	NodeWakes      string
}{
	GorpMigrations: "gorp_migrations",
	NodeWakes:      "node_wakes",
}

Functions

func AddGorpMigrationHook

func AddGorpMigrationHook(hookPoint boil.HookPoint, gorpMigrationHook GorpMigrationHook)

AddGorpMigrationHook registers your hook function for all future operations.

func AddNodeWakeHook

func AddNodeWakeHook(hookPoint boil.HookPoint, nodeWakeHook NodeWakeHook)

AddNodeWakeHook registers your hook function for all future operations.

func GorpMigrationExists

func GorpMigrationExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

GorpMigrationExists checks if the GorpMigration row exists.

func GorpMigrations

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

GorpMigrations 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 NodeWakeExists

func NodeWakeExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

NodeWakeExists checks if the NodeWake row exists.

func NodeWakes

func NodeWakes(mods ...qm.QueryMod) nodeWakeQuery

NodeWakes 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(ctx context.Context, exec boil.ContextExecutor, 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 (*GorpMigration) Delete

func (o *GorpMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (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) Insert

func (o *GorpMigration) Insert(ctx context.Context, exec boil.ContextExecutor, 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) Reload

func (o *GorpMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*GorpMigration) Update

func (o *GorpMigration) Update(ctx context.Context, exec boil.ContextExecutor, 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.

type GorpMigrationHook

type GorpMigrationHook func(context.Context, boil.ContextExecutor, *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(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*GorpMigrationSlice) ReloadAll

func (o *GorpMigrationSlice) 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 (GorpMigrationSlice) UpdateAll

func (o GorpMigrationSlice) 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 NodeWake

type NodeWake struct {
	ID         int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	CreatedAt  time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	Done       int64     `boil:"done" json:"done" toml:"done" yaml:"done"`
	MacAddress string    `boil:"mac_address" json:"mac_address" toml:"mac_address" yaml:"mac_address"`
	PoweredOn  int64     `boil:"powered_on" json:"powered_on" toml:"powered_on" yaml:"powered_on"`

	R *nodeWakeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L nodeWakeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

NodeWake is an object representing the database table.

func FindNodeWake

func FindNodeWake(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*NodeWake, error)

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

func (*NodeWake) Delete

func (o *NodeWake) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*NodeWake) Insert

func (o *NodeWake) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

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

func (*NodeWake) Reload

func (o *NodeWake) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*NodeWake) Update

func (o *NodeWake) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the NodeWake. 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.

type NodeWakeHook

type NodeWakeHook func(context.Context, boil.ContextExecutor, *NodeWake) error

NodeWakeHook is the signature for custom NodeWake hook methods

type NodeWakeSlice

type NodeWakeSlice []*NodeWake

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

func (NodeWakeSlice) DeleteAll

func (o NodeWakeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*NodeWakeSlice) ReloadAll

func (o *NodeWakeSlice) 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 (NodeWakeSlice) UpdateAll

func (o NodeWakeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

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

Jump to

Keyboard shortcuts

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