models

package
v0.0.0-...-0e2ff85 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: GPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeTypeFile      = "file"
	NodeTypeDirectory = "directory"
)

Enum values for node_type

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 InfoColumns = struct {
	ID     string
	NodeID string
	UserID string
	Type   string
	Data   string
}{
	ID:     "id",
	NodeID: "node_id",
	UserID: "user_id",
	Type:   "type",
	Data:   "data",
}
View Source
var InfoRels = struct {
	Node string
	User string
}{
	Node: "Node",
	User: "User",
}

InfoRels is where relationship names are stored.

View Source
var InfoTableColumns = struct {
	ID     string
	NodeID string
	UserID string
	Type   string
	Data   string
}{
	ID:     "infos.id",
	NodeID: "infos.node_id",
	UserID: "infos.user_id",
	Type:   "infos.type",
	Data:   "infos.data",
}
View Source
var InfoWhere = struct {
	ID     whereHelperint
	NodeID whereHelperint
	UserID whereHelperint
	Type   whereHelperstring
	Data   whereHelpertypes_JSON
}{
	ID:     whereHelperint{/* contains filtered or unexported fields */},
	NodeID: whereHelperint{/* contains filtered or unexported fields */},
	UserID: whereHelperint{/* contains filtered or unexported fields */},
	Type:   whereHelperstring{/* contains filtered or unexported fields */},
	Data:   whereHelpertypes_JSON{/* contains filtered or unexported fields */},
}
View Source
var NodeColumns = struct {
	ID             string
	Name           string
	Size           string
	Type           string
	MimeType       string
	OwnerID        string
	ParentID       string
	ModifiedOn     string
	HasCustomThumb string
	Length         string
}{
	ID:             "id",
	Name:           "name",
	Size:           "size",
	Type:           "type",
	MimeType:       "mime_type",
	OwnerID:        "owner_id",
	ParentID:       "parent_id",
	ModifiedOn:     "modified_on",
	HasCustomThumb: "has_custom_thumb",
	Length:         "length",
}
View Source
var NodeProcessReqColumns = struct {
	ID           string
	NodeID       string
	Path         string
	RemoveUpload string
}{
	ID:           "id",
	NodeID:       "node_id",
	Path:         "path",
	RemoveUpload: "remove_upload",
}
View Source
var NodeProcessReqRels = struct {
	Node string
}{
	Node: "Node",
}

NodeProcessReqRels is where relationship names are stored.

View Source
var NodeProcessReqTableColumns = struct {
	ID           string
	NodeID       string
	Path         string
	RemoveUpload string
}{
	ID:           "node_process_reqs.id",
	NodeID:       "node_process_reqs.node_id",
	Path:         "node_process_reqs.path",
	RemoveUpload: "node_process_reqs.remove_upload",
}
View Source
var NodeProcessReqWhere = struct {
	ID           whereHelperint
	NodeID       whereHelperint
	Path         whereHelperstring
	RemoveUpload whereHelperbool
}{
	ID:           whereHelperint{/* contains filtered or unexported fields */},
	NodeID:       whereHelperint{/* contains filtered or unexported fields */},
	Path:         whereHelperstring{/* contains filtered or unexported fields */},
	RemoveUpload: whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var NodeRels = struct {
	Owner           string
	Parent          string
	Infos           string
	NodeProcessReqs string
	ParentNodes     string
	Progresses      string
	RootUsers       string
}{
	Owner:           "Owner",
	Parent:          "Parent",
	Infos:           "Infos",
	NodeProcessReqs: "NodeProcessReqs",
	ParentNodes:     "ParentNodes",
	Progresses:      "Progresses",
	RootUsers:       "RootUsers",
}

NodeRels is where relationship names are stored.

View Source
var NodeTableColumns = struct {
	ID             string
	Name           string
	Size           string
	Type           string
	MimeType       string
	OwnerID        string
	ParentID       string
	ModifiedOn     string
	HasCustomThumb string
	Length         string
}{
	ID:             "nodes.id",
	Name:           "nodes.name",
	Size:           "nodes.size",
	Type:           "nodes.type",
	MimeType:       "nodes.mime_type",
	OwnerID:        "nodes.owner_id",
	ParentID:       "nodes.parent_id",
	ModifiedOn:     "nodes.modified_on",
	HasCustomThumb: "nodes.has_custom_thumb",
	Length:         "nodes.length",
}
View Source
var NodeWhere = struct {
	ID             whereHelperint
	Name           whereHelperstring
	Size           whereHelpernull_Int64
	Type           whereHelperstring
	MimeType       whereHelperstring
	OwnerID        whereHelpernull_Int
	ParentID       whereHelpernull_Int
	ModifiedOn     whereHelpertime_Time
	HasCustomThumb whereHelperbool
	Length         whereHelpernull_Float64
}{
	ID:             whereHelperint{/* contains filtered or unexported fields */},
	Name:           whereHelperstring{/* contains filtered or unexported fields */},
	Size:           whereHelpernull_Int64{/* contains filtered or unexported fields */},
	Type:           whereHelperstring{/* contains filtered or unexported fields */},
	MimeType:       whereHelperstring{/* contains filtered or unexported fields */},
	OwnerID:        whereHelpernull_Int{/* contains filtered or unexported fields */},
	ParentID:       whereHelpernull_Int{/* contains filtered or unexported fields */},
	ModifiedOn:     whereHelpertime_Time{/* contains filtered or unexported fields */},
	HasCustomThumb: whereHelperbool{/* contains filtered or unexported fields */},
	Length:         whereHelpernull_Float64{/* contains filtered or unexported fields */},
}
View Source
var ProgressColumns = struct {
	ID       string
	NodeID   string
	UserID   string
	Progress string
	Volume   string
}{
	ID:       "id",
	NodeID:   "node_id",
	UserID:   "user_id",
	Progress: "progress",
	Volume:   "volume",
}
View Source
var ProgressRels = struct {
	Node string
	User string
}{
	Node: "Node",
	User: "User",
}

ProgressRels is where relationship names are stored.

View Source
var ProgressTableColumns = struct {
	ID       string
	NodeID   string
	UserID   string
	Progress string
	Volume   string
}{
	ID:       "progress.id",
	NodeID:   "progress.node_id",
	UserID:   "progress.user_id",
	Progress: "progress.progress",
	Volume:   "progress.volume",
}
View Source
var ProgressWhere = struct {
	ID       whereHelperint
	NodeID   whereHelperint
	UserID   whereHelperint
	Progress whereHelpernull_Float32
	Volume   whereHelpernull_Float32
}{
	ID:       whereHelperint{/* contains filtered or unexported fields */},
	NodeID:   whereHelperint{/* contains filtered or unexported fields */},
	UserID:   whereHelperint{/* contains filtered or unexported fields */},
	Progress: whereHelpernull_Float32{/* contains filtered or unexported fields */},
	Volume:   whereHelpernull_Float32{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Infos           string
	NodeProcessReqs string
	Nodes           string
	Progress        string
	Users           string
}{
	Infos:           "infos",
	NodeProcessReqs: "node_process_reqs",
	Nodes:           "nodes",
	Progress:        "progress",
	Users:           "users",
}
View Source
var UserColumns = struct {
	ID       string
	Name     string
	Password string
	Admin    string
	RootID   string
}{
	ID:       "id",
	Name:     "name",
	Password: "password",
	Admin:    "admin",
	RootID:   "root_id",
}
View Source
var UserRels = struct {
	Root       string
	Infos      string
	OwnerNodes string
	Progresses string
}{
	Root:       "Root",
	Infos:      "Infos",
	OwnerNodes: "OwnerNodes",
	Progresses: "Progresses",
}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	ID       string
	Name     string
	Password string
	Admin    string
	RootID   string
}{
	ID:       "users.id",
	Name:     "users.name",
	Password: "users.password",
	Admin:    "users.admin",
	RootID:   "users.root_id",
}
View Source
var UserWhere = struct {
	ID       whereHelperint
	Name     whereHelperstring
	Password whereHelpernull_String
	Admin    whereHelperbool
	RootID   whereHelpernull_Int
}{
	ID:       whereHelperint{/* contains filtered or unexported fields */},
	Name:     whereHelperstring{/* contains filtered or unexported fields */},
	Password: whereHelpernull_String{/* contains filtered or unexported fields */},
	Admin:    whereHelperbool{/* contains filtered or unexported fields */},
	RootID:   whereHelpernull_Int{/* contains filtered or unexported fields */},
}

Functions

func AddInfoHook

func AddInfoHook(hookPoint boil.HookPoint, infoHook InfoHook)

AddInfoHook registers your hook function for all future operations.

func AddNodeHook

func AddNodeHook(hookPoint boil.HookPoint, nodeHook NodeHook)

AddNodeHook registers your hook function for all future operations.

func AddNodeProcessReqHook

func AddNodeProcessReqHook(hookPoint boil.HookPoint, nodeProcessReqHook NodeProcessReqHook)

AddNodeProcessReqHook registers your hook function for all future operations.

func AddProgressHook

func AddProgressHook(hookPoint boil.HookPoint, progressHook ProgressHook)

AddProgressHook 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 InfoExists

func InfoExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

InfoExists checks if the Info row exists.

func Infos

func Infos(mods ...qm.QueryMod) infoQuery

Infos 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 NodeExists

func NodeExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

NodeExists checks if the Node row exists.

func NodeProcessReqExists

func NodeProcessReqExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

NodeProcessReqExists checks if the NodeProcessReq row exists.

func NodeProcessReqs

func NodeProcessReqs(mods ...qm.QueryMod) nodeProcessReqQuery

NodeProcessReqs retrieves all the records using an executor.

func Nodes

func Nodes(mods ...qm.QueryMod) nodeQuery

Nodes retrieves all the records using an executor.

func ProgressExists

func ProgressExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

ProgressExists checks if the Progress row exists.

func Progresses

func Progresses(mods ...qm.QueryMod) progressQuery

Progresses retrieves all the records using an executor.

func UserExists

func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

UserExists checks if the User row exists.

func Users

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

Users retrieves all the records using an executor.

Types

type Info

type Info struct {
	ID     int        `boil:"id" json:"id" toml:"id" yaml:"id"`
	NodeID int        `boil:"node_id" json:"node_id" toml:"node_id" yaml:"node_id"`
	UserID int        `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	Type   string     `boil:"type" json:"type" toml:"type" yaml:"type"`
	Data   types.JSON `boil:"data" json:"data" toml:"data" yaml:"data"`

	R *infoR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L infoL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Info is an object representing the database table.

func FindInfo

func FindInfo(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Info, error)

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

func (*Info) Delete

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

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

func (*Info) Insert

func (o *Info) 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 (*Info) Node

func (o *Info) Node(mods ...qm.QueryMod) nodeQuery

Node pointed to by the foreign key.

func (*Info) Reload

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

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

func (*Info) SetNode

func (o *Info) SetNode(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Node) error

SetNode of the info to the related item. Sets o.R.Node to related. Adds o to related.R.Infos.

func (*Info) SetUser

func (o *Info) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetUser of the info to the related item. Sets o.R.User to related. Adds o to related.R.Infos.

func (*Info) Update

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

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

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

func (*Info) User

func (o *Info) User(mods ...qm.QueryMod) userQuery

User pointed to by the foreign key.

type InfoHook

type InfoHook func(context.Context, boil.ContextExecutor, *Info) error

InfoHook is the signature for custom Info hook methods

type InfoSlice

type InfoSlice []*Info

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

func (InfoSlice) DeleteAll

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

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

func (*InfoSlice) ReloadAll

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

func (o InfoSlice) 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 Node

type Node struct {
	ID             int          `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name           string       `boil:"name" json:"name" toml:"name" yaml:"name"`
	Size           null.Int64   `boil:"size" json:"size,omitempty" toml:"size" yaml:"size,omitempty"`
	Type           string       `boil:"type" json:"type" toml:"type" yaml:"type"`
	MimeType       string       `boil:"mime_type" json:"mime_type" toml:"mime_type" yaml:"mime_type"`
	OwnerID        null.Int     `boil:"owner_id" json:"owner_id,omitempty" toml:"owner_id" yaml:"owner_id,omitempty"`
	ParentID       null.Int     `boil:"parent_id" json:"parent_id,omitempty" toml:"parent_id" yaml:"parent_id,omitempty"`
	ModifiedOn     time.Time    `boil:"modified_on" json:"modified_on" toml:"modified_on" yaml:"modified_on"`
	HasCustomThumb bool         `boil:"has_custom_thumb" json:"has_custom_thumb" toml:"has_custom_thumb" yaml:"has_custom_thumb"`
	Length         null.Float64 `boil:"length" json:"length,omitempty" toml:"length" yaml:"length,omitempty"`

	R *nodeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L nodeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Node is an object representing the database table.

func FindNode

func FindNode(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Node, error)

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

func (*Node) AddInfos

func (o *Node) AddInfos(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Info) error

AddInfos adds the given related objects to the existing relationships of the node, optionally inserting them as new records. Appends related to o.R.Infos. Sets related.R.Node appropriately.

func (*Node) AddNodeProcessReqs

func (o *Node) AddNodeProcessReqs(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*NodeProcessReq) error

AddNodeProcessReqs adds the given related objects to the existing relationships of the node, optionally inserting them as new records. Appends related to o.R.NodeProcessReqs. Sets related.R.Node appropriately.

func (*Node) AddParentNodes

func (o *Node) AddParentNodes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Node) error

AddParentNodes adds the given related objects to the existing relationships of the node, optionally inserting them as new records. Appends related to o.R.ParentNodes. Sets related.R.Parent appropriately.

func (*Node) AddProgresses

func (o *Node) AddProgresses(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Progress) error

AddProgresses adds the given related objects to the existing relationships of the node, optionally inserting them as new records. Appends related to o.R.Progresses. Sets related.R.Node appropriately.

func (*Node) AddRootUsers

func (o *Node) AddRootUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddRootUsers adds the given related objects to the existing relationships of the node, optionally inserting them as new records. Appends related to o.R.RootUsers. Sets related.R.Root appropriately.

func (*Node) Delete

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

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

func (*Node) Infos

func (o *Node) Infos(mods ...qm.QueryMod) infoQuery

Infos retrieves all the info's Infos with an executor.

func (*Node) Insert

func (o *Node) 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 (*Node) NodeProcessReqs

func (o *Node) NodeProcessReqs(mods ...qm.QueryMod) nodeProcessReqQuery

NodeProcessReqs retrieves all the node_process_req's NodeProcessReqs with an executor.

func (*Node) Owner

func (o *Node) Owner(mods ...qm.QueryMod) userQuery

Owner pointed to by the foreign key.

func (*Node) Parent

func (o *Node) Parent(mods ...qm.QueryMod) nodeQuery

Parent pointed to by the foreign key.

func (*Node) ParentNodes

func (o *Node) ParentNodes(mods ...qm.QueryMod) nodeQuery

ParentNodes retrieves all the node's Nodes with an executor via parent_id column.

func (*Node) Progresses

func (o *Node) Progresses(mods ...qm.QueryMod) progressQuery

Progresses retrieves all the progress's Progresses with an executor.

func (*Node) Reload

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

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

func (*Node) RemoveOwner

func (o *Node) RemoveOwner(ctx context.Context, exec boil.ContextExecutor, related *User) error

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

func (*Node) RemoveParent

func (o *Node) RemoveParent(ctx context.Context, exec boil.ContextExecutor, related *Node) error

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

func (*Node) RemoveParentNodes

func (o *Node) RemoveParentNodes(ctx context.Context, exec boil.ContextExecutor, related ...*Node) error

RemoveParentNodes relationships from objects passed in. Removes related items from R.ParentNodes (uses pointer comparison, removal does not keep order) Sets related.R.Parent.

func (*Node) RemoveRootUsers

func (o *Node) RemoveRootUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveRootUsers relationships from objects passed in. Removes related items from R.RootUsers (uses pointer comparison, removal does not keep order) Sets related.R.Root.

func (*Node) RootUsers

func (o *Node) RootUsers(mods ...qm.QueryMod) userQuery

RootUsers retrieves all the user's Users with an executor via root_id column.

func (*Node) SetOwner

func (o *Node) SetOwner(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetOwner of the node to the related item. Sets o.R.Owner to related. Adds o to related.R.OwnerNodes.

func (*Node) SetParent

func (o *Node) SetParent(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Node) error

SetParent of the node to the related item. Sets o.R.Parent to related. Adds o to related.R.ParentNodes.

func (*Node) SetParentNodes

func (o *Node) SetParentNodes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Node) error

SetParentNodes removes all previously related items of the node replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Parent's ParentNodes accordingly. Replaces o.R.ParentNodes with related. Sets related.R.Parent's ParentNodes accordingly.

func (*Node) SetRootUsers

func (o *Node) SetRootUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetRootUsers removes all previously related items of the node replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Root's RootUsers accordingly. Replaces o.R.RootUsers with related. Sets related.R.Root's RootUsers accordingly.

func (*Node) Update

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

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

func (o *Node) 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 NodeHook

type NodeHook func(context.Context, boil.ContextExecutor, *Node) error

NodeHook is the signature for custom Node hook methods

type NodeProcessReq

type NodeProcessReq struct {
	ID           int    `boil:"id" json:"id" toml:"id" yaml:"id"`
	NodeID       int    `boil:"node_id" json:"node_id" toml:"node_id" yaml:"node_id"`
	Path         string `boil:"path" json:"path" toml:"path" yaml:"path"`
	RemoveUpload bool   `boil:"remove_upload" json:"remove_upload" toml:"remove_upload" yaml:"remove_upload"`

	R *nodeProcessReqR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L nodeProcessReqL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

NodeProcessReq is an object representing the database table.

func FindNodeProcessReq

func FindNodeProcessReq(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*NodeProcessReq, error)

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

func (*NodeProcessReq) Delete

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

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

func (*NodeProcessReq) Insert

func (o *NodeProcessReq) 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 (*NodeProcessReq) Node

func (o *NodeProcessReq) Node(mods ...qm.QueryMod) nodeQuery

Node pointed to by the foreign key.

func (*NodeProcessReq) Reload

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

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

func (*NodeProcessReq) SetNode

func (o *NodeProcessReq) SetNode(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Node) error

SetNode of the nodeProcessReq to the related item. Sets o.R.Node to related. Adds o to related.R.NodeProcessReqs.

func (*NodeProcessReq) Update

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

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

func (o *NodeProcessReq) 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 NodeProcessReqHook

type NodeProcessReqHook func(context.Context, boil.ContextExecutor, *NodeProcessReq) error

NodeProcessReqHook is the signature for custom NodeProcessReq hook methods

type NodeProcessReqSlice

type NodeProcessReqSlice []*NodeProcessReq

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

func (NodeProcessReqSlice) DeleteAll

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

func (*NodeProcessReqSlice) ReloadAll

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

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

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

type NodeSlice

type NodeSlice []*Node

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

func (NodeSlice) DeleteAll

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

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

func (*NodeSlice) ReloadAll

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

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

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

type Progress

type Progress struct {
	ID       int          `boil:"id" json:"id" toml:"id" yaml:"id"`
	NodeID   int          `boil:"node_id" json:"node_id" toml:"node_id" yaml:"node_id"`
	UserID   int          `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	Progress null.Float32 `boil:"progress" json:"progress,omitempty" toml:"progress" yaml:"progress,omitempty"`
	Volume   null.Float32 `boil:"volume" json:"volume,omitempty" toml:"volume" yaml:"volume,omitempty"`

	R *progressR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L progressL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Progress is an object representing the database table.

func FindProgress

func FindProgress(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Progress, error)

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

func (*Progress) Delete

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

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

func (*Progress) Insert

func (o *Progress) 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 (*Progress) Node

func (o *Progress) Node(mods ...qm.QueryMod) nodeQuery

Node pointed to by the foreign key.

func (*Progress) Reload

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

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

func (*Progress) SetNode

func (o *Progress) SetNode(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Node) error

SetNode of the progress to the related item. Sets o.R.Node to related. Adds o to related.R.Progresses.

func (*Progress) SetUser

func (o *Progress) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetUser of the progress to the related item. Sets o.R.User to related. Adds o to related.R.Progresses.

func (*Progress) Update

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

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

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

func (*Progress) User

func (o *Progress) User(mods ...qm.QueryMod) userQuery

User pointed to by the foreign key.

type ProgressHook

type ProgressHook func(context.Context, boil.ContextExecutor, *Progress) error

ProgressHook is the signature for custom Progress hook methods

type ProgressSlice

type ProgressSlice []*Progress

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

func (ProgressSlice) DeleteAll

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

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

func (*ProgressSlice) ReloadAll

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

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

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

type User

type User struct {
	ID       int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name     string      `boil:"name" json:"name" toml:"name" yaml:"name"`
	Password null.String `boil:"password" json:"password,omitempty" toml:"password" yaml:"password,omitempty"`
	Admin    bool        `boil:"admin" json:"admin" toml:"admin" yaml:"admin"`
	RootID   null.Int    `boil:"root_id" json:"root_id,omitempty" toml:"root_id" yaml:"root_id,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(ctx context.Context, exec boil.ContextExecutor, 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 (*User) AddInfos

func (o *User) AddInfos(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Info) error

AddInfos adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Infos. Sets related.R.User appropriately.

func (*User) AddOwnerNodes

func (o *User) AddOwnerNodes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Node) error

AddOwnerNodes adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.OwnerNodes. Sets related.R.Owner appropriately.

func (*User) AddProgresses

func (o *User) AddProgresses(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Progress) error

AddProgresses adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Progresses. Sets related.R.User appropriately.

func (*User) Delete

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

func (o *User) Infos(mods ...qm.QueryMod) infoQuery

Infos retrieves all the info's Infos with an executor.

func (*User) Insert

func (o *User) 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 (*User) OwnerNodes

func (o *User) OwnerNodes(mods ...qm.QueryMod) nodeQuery

OwnerNodes retrieves all the node's Nodes with an executor via owner_id column.

func (*User) Progresses

func (o *User) Progresses(mods ...qm.QueryMod) progressQuery

Progresses retrieves all the progress's Progresses with an executor.

func (*User) Reload

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

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

func (*User) RemoveOwnerNodes

func (o *User) RemoveOwnerNodes(ctx context.Context, exec boil.ContextExecutor, related ...*Node) error

RemoveOwnerNodes relationships from objects passed in. Removes related items from R.OwnerNodes (uses pointer comparison, removal does not keep order) Sets related.R.Owner.

func (*User) RemoveRoot

func (o *User) RemoveRoot(ctx context.Context, exec boil.ContextExecutor, related *Node) error

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

func (*User) Root

func (o *User) Root(mods ...qm.QueryMod) nodeQuery

Root pointed to by the foreign key.

func (*User) SetOwnerNodes

func (o *User) SetOwnerNodes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Node) error

SetOwnerNodes 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.Owner's OwnerNodes accordingly. Replaces o.R.OwnerNodes with related. Sets related.R.Owner's OwnerNodes accordingly.

func (*User) SetRoot

func (o *User) SetRoot(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Node) error

SetRoot of the user to the related item. Sets o.R.Root to related. Adds o to related.R.RootUsers.

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 UserHook

type UserHook func(context.Context, boil.ContextExecutor, *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 almost always be used instead of []User.

func (UserSlice) DeleteAll

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

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

func (*UserSlice) ReloadAll

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

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