models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: AGPL-3.0 Imports: 17 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 GorpMigrationTableColumns = struct {
	ID        string
	AppliedAt string
}{
	ID:        "gorp_migrations.id",
	AppliedAt: "gorp_migrations.applied_at",
}
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 HeaderColumns = struct {
	Record          string
	Lastknownrecord string
	Block           string
	Lastknownblock  string
	Deleted         string
	Typeflag        string
	Name            string
	Linkname        string
	Size            string
	Mode            string
	UID             string
	Gid             string
	Uname           string
	Gname           string
	Modtime         string
	Accesstime      string
	Changetime      string
	Devmajor        string
	Devminor        string
	Paxrecords      string
	Format          string
}{
	Record:          "record",
	Lastknownrecord: "lastknownrecord",
	Block:           "block",
	Lastknownblock:  "lastknownblock",
	Deleted:         "deleted",
	Typeflag:        "typeflag",
	Name:            "name",
	Linkname:        "linkname",
	Size:            "size",
	Mode:            "mode",
	UID:             "uid",
	Gid:             "gid",
	Uname:           "uname",
	Gname:           "gname",
	Modtime:         "modtime",
	Accesstime:      "accesstime",
	Changetime:      "changetime",
	Devmajor:        "devmajor",
	Devminor:        "devminor",
	Paxrecords:      "paxrecords",
	Format:          "format",
}
View Source
var HeaderRels = struct {
}{}

HeaderRels is where relationship names are stored.

View Source
var HeaderTableColumns = struct {
	Record          string
	Lastknownrecord string
	Block           string
	Lastknownblock  string
	Deleted         string
	Typeflag        string
	Name            string
	Linkname        string
	Size            string
	Mode            string
	UID             string
	Gid             string
	Uname           string
	Gname           string
	Modtime         string
	Accesstime      string
	Changetime      string
	Devmajor        string
	Devminor        string
	Paxrecords      string
	Format          string
}{
	Record:          "headers.record",
	Lastknownrecord: "headers.lastknownrecord",
	Block:           "headers.block",
	Lastknownblock:  "headers.lastknownblock",
	Deleted:         "headers.deleted",
	Typeflag:        "headers.typeflag",
	Name:            "headers.name",
	Linkname:        "headers.linkname",
	Size:            "headers.size",
	Mode:            "headers.mode",
	UID:             "headers.uid",
	Gid:             "headers.gid",
	Uname:           "headers.uname",
	Gname:           "headers.gname",
	Modtime:         "headers.modtime",
	Accesstime:      "headers.accesstime",
	Changetime:      "headers.changetime",
	Devmajor:        "headers.devmajor",
	Devminor:        "headers.devminor",
	Paxrecords:      "headers.paxrecords",
	Format:          "headers.format",
}
View Source
var HeaderWhere = struct {
	Record          whereHelperint64
	Lastknownrecord whereHelperint64
	Block           whereHelperint64
	Lastknownblock  whereHelperint64
	Deleted         whereHelperint64
	Typeflag        whereHelperint64
	Name            whereHelperstring
	Linkname        whereHelperstring
	Size            whereHelperint64
	Mode            whereHelperint64
	UID             whereHelperint64
	Gid             whereHelperint64
	Uname           whereHelperstring
	Gname           whereHelperstring
	Modtime         whereHelpertime_Time
	Accesstime      whereHelpertime_Time
	Changetime      whereHelpertime_Time
	Devmajor        whereHelperint64
	Devminor        whereHelperint64
	Paxrecords      whereHelperstring
	Format          whereHelperint64
}{
	Record:          whereHelperint64{/* contains filtered or unexported fields */},
	Lastknownrecord: whereHelperint64{/* contains filtered or unexported fields */},
	Block:           whereHelperint64{/* contains filtered or unexported fields */},
	Lastknownblock:  whereHelperint64{/* contains filtered or unexported fields */},
	Deleted:         whereHelperint64{/* contains filtered or unexported fields */},
	Typeflag:        whereHelperint64{/* contains filtered or unexported fields */},
	Name:            whereHelperstring{/* contains filtered or unexported fields */},
	Linkname:        whereHelperstring{/* contains filtered or unexported fields */},
	Size:            whereHelperint64{/* contains filtered or unexported fields */},
	Mode:            whereHelperint64{/* contains filtered or unexported fields */},
	UID:             whereHelperint64{/* contains filtered or unexported fields */},
	Gid:             whereHelperint64{/* contains filtered or unexported fields */},
	Uname:           whereHelperstring{/* contains filtered or unexported fields */},
	Gname:           whereHelperstring{/* contains filtered or unexported fields */},
	Modtime:         whereHelpertime_Time{/* contains filtered or unexported fields */},
	Accesstime:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	Changetime:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	Devmajor:        whereHelperint64{/* contains filtered or unexported fields */},
	Devminor:        whereHelperint64{/* contains filtered or unexported fields */},
	Paxrecords:      whereHelperstring{/* contains filtered or unexported fields */},
	Format:          whereHelperint64{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	GorpMigrations string
	Headers        string
}{
	GorpMigrations: "gorp_migrations",
	Headers:        "headers",
}
View Source
var ViewNames = struct {
}{}

Functions

func AddGorpMigrationHook

func AddGorpMigrationHook(hookPoint boil.HookPoint, gorpMigrationHook GorpMigrationHook)

AddGorpMigrationHook registers your hook function for all future operations.

func AddHeaderHook

func AddHeaderHook(hookPoint boil.HookPoint, headerHook HeaderHook)

AddHeaderHook 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 HeaderExists

func HeaderExists(ctx context.Context, exec boil.ContextExecutor, name string, linkname string) (bool, error)

HeaderExists checks if the Header row exists.

func Headers

func Headers(mods ...qm.QueryMod) headerQuery

Headers 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

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) Exists added in v0.1.1

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

Exists checks if the GorpMigration row exists.

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.

func (*GorpMigration) Upsert

func (o *GorpMigration) 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 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 almost always be used instead of []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 Header struct {
	Record          int64     `boil:"record" json:"record" toml:"record" yaml:"record"`
	Lastknownrecord int64     `boil:"lastknownrecord" json:"lastknownrecord" toml:"lastknownrecord" yaml:"lastknownrecord"`
	Block           int64     `boil:"block" json:"block" toml:"block" yaml:"block"`
	Lastknownblock  int64     `boil:"lastknownblock" json:"lastknownblock" toml:"lastknownblock" yaml:"lastknownblock"`
	Deleted         int64     `boil:"deleted" json:"deleted" toml:"deleted" yaml:"deleted"`
	Typeflag        int64     `boil:"typeflag" json:"typeflag" toml:"typeflag" yaml:"typeflag"`
	Name            string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	Linkname        string    `boil:"linkname" json:"linkname" toml:"linkname" yaml:"linkname"`
	Size            int64     `boil:"size" json:"size" toml:"size" yaml:"size"`
	Mode            int64     `boil:"mode" json:"mode" toml:"mode" yaml:"mode"`
	UID             int64     `boil:"uid" json:"uid" toml:"uid" yaml:"uid"`
	Gid             int64     `boil:"gid" json:"gid" toml:"gid" yaml:"gid"`
	Uname           string    `boil:"uname" json:"uname" toml:"uname" yaml:"uname"`
	Gname           string    `boil:"gname" json:"gname" toml:"gname" yaml:"gname"`
	Modtime         time.Time `boil:"modtime" json:"modtime" toml:"modtime" yaml:"modtime"`
	Accesstime      time.Time `boil:"accesstime" json:"accesstime" toml:"accesstime" yaml:"accesstime"`
	Changetime      time.Time `boil:"changetime" json:"changetime" toml:"changetime" yaml:"changetime"`
	Devmajor        int64     `boil:"devmajor" json:"devmajor" toml:"devmajor" yaml:"devmajor"`
	Devminor        int64     `boil:"devminor" json:"devminor" toml:"devminor" yaml:"devminor"`
	Paxrecords      string    `boil:"paxrecords" json:"paxrecords" toml:"paxrecords" yaml:"paxrecords"`
	Format          int64     `boil:"format" json:"format" toml:"format" yaml:"format"`

	R *headerR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L headerL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Header is an object representing the database table.

func FindHeader

func FindHeader(ctx context.Context, exec boil.ContextExecutor, name string, linkname string, selectCols ...string) (*Header, error)

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

func (*Header) Delete

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

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

func (*Header) Exists added in v0.1.1

func (o *Header) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Header row exists.

func (*Header) Insert

func (o *Header) 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 (*Header) Reload

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

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

func (*Header) Update

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

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

func (o *Header) 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 HeaderHook

type HeaderHook func(context.Context, boil.ContextExecutor, *Header) error

HeaderHook is the signature for custom Header hook methods

type HeaderSlice

type HeaderSlice []*Header

HeaderSlice is an alias for a slice of pointers to Header. This should almost always be used instead of []Header.

func (HeaderSlice) DeleteAll

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

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

func (*HeaderSlice) ReloadAll

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

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

Jump to

Keyboard shortcuts

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