file

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the file type in the database.
	Label = "file"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldLastModifiedAt holds the string denoting the last_modified_at field in the database.
	FieldLastModifiedAt = "last_modified_at"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldSize holds the string denoting the size field in the database.
	FieldSize = "size"
	// FieldHash holds the string denoting the hash field in the database.
	FieldHash = "hash"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// EdgeTomes holds the string denoting the tomes edge name in mutations.
	EdgeTomes = "tomes"
	// Table holds the table name of the file in the database.
	Table = "files"
	// TomesTable is the table that holds the tomes relation/edge. The primary key declared below.
	TomesTable = "tome_files"
	// TomesInverseTable is the table name for the Tome entity.
	// It exists in this package in order to avoid circular dependency with the "tome" package.
	TomesInverseTable = "tomes"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultLastModifiedAt holds the default value on creation for the "last_modified_at" field.
	DefaultLastModifiedAt func() time.Time
	// UpdateDefaultLastModifiedAt holds the default value on update for the "last_modified_at" field.
	UpdateDefaultLastModifiedAt func() time.Time
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultSize holds the default value on creation for the "size" field.
	DefaultSize int
	// SizeValidator is a validator for the "size" field. It is called by the builders before save.
	SizeValidator func(int) error
	// HashValidator is a validator for the "hash" field. It is called by the builders before save.
	HashValidator func(string) error
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "realm.pub/tavern/internal/ent/runtime"

Columns holds all SQL columns for file fields.

View Source
var (
	// TomesPrimaryKey and TomesColumn2 are the table columns denoting the
	// primary key for the tomes relation (M2M).
	TomesPrimaryKey = []string{"tome_id", "file_id"}
)

Functions

func And

func And(predicates ...predicate.File) predicate.File

And groups predicates with the AND operator between them.

func Content

func Content(v []byte) predicate.File

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentEQ

func ContentEQ(v []byte) predicate.File

ContentEQ applies the EQ predicate on the "content" field.

func ContentGT

func ContentGT(v []byte) predicate.File

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v []byte) predicate.File

ContentGTE applies the GTE predicate on the "content" field.

func ContentIn

func ContentIn(vs ...[]byte) predicate.File

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v []byte) predicate.File

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v []byte) predicate.File

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v []byte) predicate.File

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...[]byte) predicate.File

ContentNotIn applies the NotIn predicate on the "content" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.File

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.File

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.File

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.File

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.File

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.File

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.File

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

func CreatedAtNotIn

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

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

func HasTomes added in v0.0.5

func HasTomes() predicate.File

HasTomes applies the HasEdge predicate on the "tomes" edge.

func HasTomesWith added in v0.0.5

func HasTomesWith(preds ...predicate.Tome) predicate.File

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

func Hash

func Hash(v string) predicate.File

Hash applies equality check predicate on the "hash" field. It's identical to HashEQ.

func HashContains

func HashContains(v string) predicate.File

HashContains applies the Contains predicate on the "hash" field.

func HashContainsFold

func HashContainsFold(v string) predicate.File

HashContainsFold applies the ContainsFold predicate on the "hash" field.

func HashEQ

func HashEQ(v string) predicate.File

HashEQ applies the EQ predicate on the "hash" field.

func HashEqualFold

func HashEqualFold(v string) predicate.File

HashEqualFold applies the EqualFold predicate on the "hash" field.

func HashGT

func HashGT(v string) predicate.File

HashGT applies the GT predicate on the "hash" field.

func HashGTE

func HashGTE(v string) predicate.File

HashGTE applies the GTE predicate on the "hash" field.

func HashHasPrefix

func HashHasPrefix(v string) predicate.File

HashHasPrefix applies the HasPrefix predicate on the "hash" field.

func HashHasSuffix

func HashHasSuffix(v string) predicate.File

HashHasSuffix applies the HasSuffix predicate on the "hash" field.

func HashIn

func HashIn(vs ...string) predicate.File

HashIn applies the In predicate on the "hash" field.

func HashLT

func HashLT(v string) predicate.File

HashLT applies the LT predicate on the "hash" field.

func HashLTE

func HashLTE(v string) predicate.File

HashLTE applies the LTE predicate on the "hash" field.

func HashNEQ

func HashNEQ(v string) predicate.File

HashNEQ applies the NEQ predicate on the "hash" field.

func HashNotIn

func HashNotIn(vs ...string) predicate.File

HashNotIn applies the NotIn predicate on the "hash" field.

func ID

func ID(id int) predicate.File

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.File

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.File

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.File

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.File

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.File

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.File

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func LastModifiedAt

func LastModifiedAt(v time.Time) predicate.File

LastModifiedAt applies equality check predicate on the "last_modified_at" field. It's identical to LastModifiedAtEQ.

func LastModifiedAtEQ

func LastModifiedAtEQ(v time.Time) predicate.File

LastModifiedAtEQ applies the EQ predicate on the "last_modified_at" field.

func LastModifiedAtGT

func LastModifiedAtGT(v time.Time) predicate.File

LastModifiedAtGT applies the GT predicate on the "last_modified_at" field.

func LastModifiedAtGTE

func LastModifiedAtGTE(v time.Time) predicate.File

LastModifiedAtGTE applies the GTE predicate on the "last_modified_at" field.

func LastModifiedAtIn

func LastModifiedAtIn(vs ...time.Time) predicate.File

LastModifiedAtIn applies the In predicate on the "last_modified_at" field.

func LastModifiedAtLT

func LastModifiedAtLT(v time.Time) predicate.File

LastModifiedAtLT applies the LT predicate on the "last_modified_at" field.

func LastModifiedAtLTE

func LastModifiedAtLTE(v time.Time) predicate.File

LastModifiedAtLTE applies the LTE predicate on the "last_modified_at" field.

func LastModifiedAtNEQ

func LastModifiedAtNEQ(v time.Time) predicate.File

LastModifiedAtNEQ applies the NEQ predicate on the "last_modified_at" field.

func LastModifiedAtNotIn

func LastModifiedAtNotIn(vs ...time.Time) predicate.File

LastModifiedAtNotIn applies the NotIn predicate on the "last_modified_at" field.

func Name

func Name(v string) predicate.File

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

func NameContains

func NameContains(v string) predicate.File

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

func NameContainsFold

func NameContainsFold(v string) predicate.File

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

func NameEQ

func NameEQ(v string) predicate.File

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

func NameEqualFold

func NameEqualFold(v string) predicate.File

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

func NameGT

func NameGT(v string) predicate.File

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

func NameGTE

func NameGTE(v string) predicate.File

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.File

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.File

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.File

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

func NameLTE

func NameLTE(v string) predicate.File

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

func NameNEQ

func NameNEQ(v string) predicate.File

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.File) predicate.File

Or groups predicates with the OR operator between them.

func Size

func Size(v int) predicate.File

Size applies equality check predicate on the "size" field. It's identical to SizeEQ.

func SizeEQ

func SizeEQ(v int) predicate.File

SizeEQ applies the EQ predicate on the "size" field.

func SizeGT

func SizeGT(v int) predicate.File

SizeGT applies the GT predicate on the "size" field.

func SizeGTE

func SizeGTE(v int) predicate.File

SizeGTE applies the GTE predicate on the "size" field.

func SizeIn

func SizeIn(vs ...int) predicate.File

SizeIn applies the In predicate on the "size" field.

func SizeLT

func SizeLT(v int) predicate.File

SizeLT applies the LT predicate on the "size" field.

func SizeLTE

func SizeLTE(v int) predicate.File

SizeLTE applies the LTE predicate on the "size" field.

func SizeNEQ

func SizeNEQ(v int) predicate.File

SizeNEQ applies the NEQ predicate on the "size" field.

func SizeNotIn

func SizeNotIn(vs ...int) predicate.File

SizeNotIn applies the NotIn predicate on the "size" field.

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 File queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByHash

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

ByHash orders the results by the hash field.

func ByID

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

ByID orders the results by the id field.

func ByLastModifiedAt

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

ByLastModifiedAt orders the results by the last_modified_at field.

func ByName

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

ByName orders the results by the name field.

func BySize

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

BySize orders the results by the size field.

func ByTomes added in v0.0.5

func ByTomes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByTomes orders the results by tomes terms.

func ByTomesCount added in v0.0.5

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

ByTomesCount orders the results by tomes count.

Jump to

Keyboard shortcuts

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