version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the version type in the database.
	Label = "version"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldNumber holds the string denoting the number field in the database.
	FieldNumber = "number"
	// FieldFileHashes holds the string denoting the file_hashes field in the database.
	FieldFileHashes = "file_hashes"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeStorage holds the string denoting the storage edge name in mutations.
	EdgeStorage = "storage"
	// EdgeResource holds the string denoting the resource edge name in mutations.
	EdgeResource = "resource"
	// Table holds the table name of the version in the database.
	Table = "versions"
	// StorageTable is the table that holds the storage relation/edge.
	StorageTable = "storages"
	// StorageInverseTable is the table name for the Storage entity.
	// It exists in this package in order to avoid circular dependency with the "storage" package.
	StorageInverseTable = "storages"
	// StorageColumn is the table column denoting the storage relation/edge.
	StorageColumn = "version_storage"
	// ResourceTable is the table that holds the resource relation/edge.
	ResourceTable = "versions"
	// ResourceInverseTable is the table name for the Resource entity.
	// It exists in this package in order to avoid circular dependency with the "resource" package.
	ResourceInverseTable = "resources"
	// ResourceColumn is the table column denoting the resource relation/edge.
	ResourceColumn = "resource_versions"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt time.Time
)

Columns holds all SQL columns for version fields.

View Source
var ForeignKeys = []string{
	"resource_versions",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "versions" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Version) predicate.Version

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Version

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Version

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Version

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Version

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Version

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Version

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Version

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Version

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Version

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func FileHashesIsNil added in v0.2.0

func FileHashesIsNil() predicate.Version

FileHashesIsNil applies the IsNil predicate on the "file_hashes" field.

func FileHashesNotNil added in v0.2.0

func FileHashesNotNil() predicate.Version

FileHashesNotNil applies the NotNil predicate on the "file_hashes" field.

func HasResource

func HasResource() predicate.Version

HasResource applies the HasEdge predicate on the "resource" edge.

func HasResourceWith

func HasResourceWith(preds ...predicate.Resource) predicate.Version

HasResourceWith applies the HasEdge predicate on the "resource" edge with a given conditions (other predicates).

func HasStorage

func HasStorage() predicate.Version

HasStorage applies the HasEdge predicate on the "storage" edge.

func HasStorageWith

func HasStorageWith(preds ...predicate.Storage) predicate.Version

HasStorageWith applies the HasEdge predicate on the "storage" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Version

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Version

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Version

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Version

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Version

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Version

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Version

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Version

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Version

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Version

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Version

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Version

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Version

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Version

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Version

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Version

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Version

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Version

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Version

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Version

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Version

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Version

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Version

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Number

func Number(v uint64) predicate.Version

Number applies equality check predicate on the "number" field. It's identical to NumberEQ.

func NumberEQ

func NumberEQ(v uint64) predicate.Version

NumberEQ applies the EQ predicate on the "number" field.

func NumberGT

func NumberGT(v uint64) predicate.Version

NumberGT applies the GT predicate on the "number" field.

func NumberGTE

func NumberGTE(v uint64) predicate.Version

NumberGTE applies the GTE predicate on the "number" field.

func NumberIn

func NumberIn(vs ...uint64) predicate.Version

NumberIn applies the In predicate on the "number" field.

func NumberLT

func NumberLT(v uint64) predicate.Version

NumberLT applies the LT predicate on the "number" field.

func NumberLTE

func NumberLTE(v uint64) predicate.Version

NumberLTE applies the LTE predicate on the "number" field.

func NumberNEQ

func NumberNEQ(v uint64) predicate.Version

NumberNEQ applies the NEQ predicate on the "number" field.

func NumberNotIn

func NumberNotIn(vs ...uint64) predicate.Version

NumberNotIn applies the NotIn predicate on the "number" field.

func Or

func Or(predicates ...predicate.Version) predicate.Version

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Version queries.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByNumber

func ByNumber(opts ...sql.OrderTermOption) OrderOption

ByNumber orders the results by the number field.

func ByResourceField

func ByResourceField(field string, opts ...sql.OrderTermOption) OrderOption

ByResourceField orders the results by resource field.

func ByStorageField added in v0.2.0

func ByStorageField(field string, opts ...sql.OrderTermOption) OrderOption

ByStorageField orders the results by storage field.

Jump to

Keyboard shortcuts

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