Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.File) predicate.File
- func Content(v []byte) predicate.File
- func ContentEQ(v []byte) predicate.File
- func ContentGT(v []byte) predicate.File
- func ContentGTE(v []byte) predicate.File
- func ContentIn(vs ...[]byte) predicate.File
- func ContentLT(v []byte) predicate.File
- func ContentLTE(v []byte) predicate.File
- func ContentNEQ(v []byte) predicate.File
- func ContentNotIn(vs ...[]byte) predicate.File
- func CreatedAt(v time.Time) predicate.File
- func CreatedAtEQ(v time.Time) predicate.File
- func CreatedAtGT(v time.Time) predicate.File
- func CreatedAtGTE(v time.Time) predicate.File
- func CreatedAtIn(vs ...time.Time) predicate.File
- func CreatedAtLT(v time.Time) predicate.File
- func CreatedAtLTE(v time.Time) predicate.File
- func CreatedAtNEQ(v time.Time) predicate.File
- func CreatedAtNotIn(vs ...time.Time) predicate.File
- func HasTomes() predicate.File
- func HasTomesWith(preds ...predicate.Tome) predicate.File
- func Hash(v string) predicate.File
- func HashContains(v string) predicate.File
- func HashContainsFold(v string) predicate.File
- func HashEQ(v string) predicate.File
- func HashEqualFold(v string) predicate.File
- func HashGT(v string) predicate.File
- func HashGTE(v string) predicate.File
- func HashHasPrefix(v string) predicate.File
- func HashHasSuffix(v string) predicate.File
- func HashIn(vs ...string) predicate.File
- func HashLT(v string) predicate.File
- func HashLTE(v string) predicate.File
- func HashNEQ(v string) predicate.File
- func HashNotIn(vs ...string) predicate.File
- func ID(id int) predicate.File
- func IDEQ(id int) predicate.File
- func IDGT(id int) predicate.File
- func IDGTE(id int) predicate.File
- func IDIn(ids ...int) predicate.File
- func IDLT(id int) predicate.File
- func IDLTE(id int) predicate.File
- func IDNEQ(id int) predicate.File
- func IDNotIn(ids ...int) predicate.File
- func LastModifiedAt(v time.Time) predicate.File
- func LastModifiedAtEQ(v time.Time) predicate.File
- func LastModifiedAtGT(v time.Time) predicate.File
- func LastModifiedAtGTE(v time.Time) predicate.File
- func LastModifiedAtIn(vs ...time.Time) predicate.File
- func LastModifiedAtLT(v time.Time) predicate.File
- func LastModifiedAtLTE(v time.Time) predicate.File
- func LastModifiedAtNEQ(v time.Time) predicate.File
- func LastModifiedAtNotIn(vs ...time.Time) predicate.File
- func Name(v string) predicate.File
- func NameContains(v string) predicate.File
- func NameContainsFold(v string) predicate.File
- func NameEQ(v string) predicate.File
- func NameEqualFold(v string) predicate.File
- func NameGT(v string) predicate.File
- func NameGTE(v string) predicate.File
- func NameHasPrefix(v string) predicate.File
- func NameHasSuffix(v string) predicate.File
- func NameIn(vs ...string) predicate.File
- func NameLT(v string) predicate.File
- func NameLTE(v string) predicate.File
- func NameNEQ(v string) predicate.File
- func NameNotIn(vs ...string) predicate.File
- func Not(p predicate.File) predicate.File
- func Or(predicates ...predicate.File) predicate.File
- func Size(v int) predicate.File
- func SizeEQ(v int) predicate.File
- func SizeGT(v int) predicate.File
- func SizeGTE(v int) predicate.File
- func SizeIn(vs ...int) predicate.File
- func SizeLT(v int) predicate.File
- func SizeLTE(v int) predicate.File
- func SizeNEQ(v int) predicate.File
- func SizeNotIn(vs ...int) predicate.File
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByHash(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByLastModifiedAt(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func BySize(opts ...sql.OrderTermOption) OrderOption
- func ByTomes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTomesCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldLastModifiedAt, FieldName, FieldSize, FieldHash, FieldContent, }
Columns holds all SQL columns for file fields.
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 Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasTomesWith ¶ added in v0.0.5
HasTomesWith applies the HasEdge predicate on the "tomes" edge with a given conditions (other predicates).
func HashContains ¶
HashContains applies the Contains predicate on the "hash" field.
func HashContainsFold ¶
HashContainsFold applies the ContainsFold predicate on the "hash" field.
func HashEqualFold ¶
HashEqualFold applies the EqualFold predicate on the "hash" field.
func HashHasPrefix ¶
HashHasPrefix applies the HasPrefix predicate on the "hash" field.
func HashHasSuffix ¶
HashHasSuffix applies the HasSuffix predicate on the "hash" field.
func LastModifiedAt ¶
LastModifiedAt applies equality check predicate on the "last_modified_at" field. It's identical to LastModifiedAtEQ.
func LastModifiedAtEQ ¶
LastModifiedAtEQ applies the EQ predicate on the "last_modified_at" field.
func LastModifiedAtGT ¶
LastModifiedAtGT applies the GT predicate on the "last_modified_at" field.
func LastModifiedAtGTE ¶
LastModifiedAtGTE applies the GTE predicate on the "last_modified_at" field.
func LastModifiedAtIn ¶
LastModifiedAtIn applies the In predicate on the "last_modified_at" field.
func LastModifiedAtLT ¶
LastModifiedAtLT applies the LT predicate on the "last_modified_at" field.
func LastModifiedAtLTE ¶
LastModifiedAtLTE applies the LTE predicate on the "last_modified_at" field.
func LastModifiedAtNEQ ¶
LastModifiedAtNEQ applies the NEQ predicate on the "last_modified_at" field.
func LastModifiedAtNotIn ¶
LastModifiedAtNotIn applies the NotIn predicate on the "last_modified_at" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.