Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.File) 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 CreatedAtIsNil() 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 CreatedAtNotNil() predicate.File
- func DeletedAt(v time.Time) predicate.File
- func DeletedAtEQ(v time.Time) predicate.File
- func DeletedAtGT(v time.Time) predicate.File
- func DeletedAtGTE(v time.Time) predicate.File
- func DeletedAtIn(vs ...time.Time) predicate.File
- func DeletedAtIsNil() predicate.File
- func DeletedAtLT(v time.Time) predicate.File
- func DeletedAtLTE(v time.Time) predicate.File
- func DeletedAtNEQ(v time.Time) predicate.File
- func DeletedAtNotIn(vs ...time.Time) predicate.File
- func DeletedAtNotNil() predicate.File
- func HasFiletype() predicate.File
- func HasFiletypeWith(preds ...predicate.Filetype) predicate.File
- func HasTags() predicate.File
- func HasTagsWith(preds ...predicate.Tag) predicate.File
- func HasUser() predicate.File
- func HasUserWith(preds ...predicate.User) 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 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 Type(v string) predicate.File
- func TypeContains(v string) predicate.File
- func TypeContainsFold(v string) predicate.File
- func TypeEQ(v string) predicate.File
- func TypeEqualFold(v string) predicate.File
- func TypeGT(v string) predicate.File
- func TypeGTE(v string) predicate.File
- func TypeHasPrefix(v string) predicate.File
- func TypeHasSuffix(v string) predicate.File
- func TypeIn(vs ...string) predicate.File
- func TypeLT(v string) predicate.File
- func TypeLTE(v string) predicate.File
- func TypeNEQ(v string) predicate.File
- func TypeNotIn(vs ...string) predicate.File
- func UUID(v string) predicate.File
- func UUIDContains(v string) predicate.File
- func UUIDContainsFold(v string) predicate.File
- func UUIDEQ(v string) predicate.File
- func UUIDEqualFold(v string) predicate.File
- func UUIDGT(v string) predicate.File
- func UUIDGTE(v string) predicate.File
- func UUIDHasPrefix(v string) predicate.File
- func UUIDHasSuffix(v string) predicate.File
- func UUIDIn(vs ...string) predicate.File
- func UUIDLT(v string) predicate.File
- func UUIDLTE(v string) predicate.File
- func UUIDNEQ(v string) predicate.File
- func UUIDNotIn(vs ...string) predicate.File
- func UpdatedAt(v time.Time) predicate.File
- func UpdatedAtEQ(v time.Time) predicate.File
- func UpdatedAtGT(v time.Time) predicate.File
- func UpdatedAtGTE(v time.Time) predicate.File
- func UpdatedAtIn(vs ...time.Time) predicate.File
- func UpdatedAtLT(v time.Time) predicate.File
- func UpdatedAtLTE(v time.Time) predicate.File
- func UpdatedAtNEQ(v time.Time) predicate.File
- func UpdatedAtNotIn(vs ...time.Time) predicate.File
- func UserID(v int) predicate.File
- func UserIDEQ(v int) predicate.File
- func UserIDIn(vs ...int) predicate.File
- func UserIDNEQ(v int) predicate.File
- func UserIDNotIn(vs ...int) predicate.File
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByFiletypeField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func BySize(opts ...sql.OrderTermOption) OrderOption
- func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUUID(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUserID(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" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // FieldUUID holds the string denoting the uuid field in the database. FieldUUID = "uuid" // FieldSize holds the string denoting the size field in the database. FieldSize = "size" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeFiletype holds the string denoting the filetype edge name in mutations. EdgeFiletype = "filetype" // EdgeTags holds the string denoting the tags edge name in mutations. EdgeTags = "tags" // FiletypeFieldID holds the string denoting the ID field of the Filetype. FiletypeFieldID = "type" // TagFieldID holds the string denoting the ID field of the Tag. TagFieldID = "name" // Table holds the table name of the file in the database. Table = "files" // UserTable is the table that holds the user relation/edge. UserTable = "files" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "users" // UserColumn is the table column denoting the user relation/edge. UserColumn = "user_id" // FiletypeTable is the table that holds the filetype relation/edge. FiletypeTable = "files" // FiletypeInverseTable is the table name for the Filetype entity. // It exists in this package in order to avoid circular dependency with the "filetype" package. FiletypeInverseTable = "filetypes" // FiletypeColumn is the table column denoting the filetype relation/edge. FiletypeColumn = "type" // TagsTable is the table that holds the tags relation/edge. The primary key declared below. TagsTable = "file_tags" // TagsInverseTable is the table name for the Tag entity. // It exists in this package in order to avoid circular dependency with the "tag" package. TagsInverseTable = "tags" )
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // UUIDValidator is a validator for the "uuid" field. It is called by the builders before save. UUIDValidator func(string) error // TypeValidator is a validator for the "type" field. It is called by the builders before save. TypeValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // DefaultDeletedAt holds the default value on creation for the "deleted_at" field. DefaultDeletedAt func() time.Time )
var Columns = []string{ FieldID, FieldName, FieldUserID, FieldUUID, FieldSize, FieldType, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, }
Columns holds all SQL columns for file fields.
var ( // TagsPrimaryKey and TagsColumn2 are the table columns denoting the // primary key for the tags relation (M2M). TagsPrimaryKey = []string{"file_id", "tag_id"} )
Functions ¶
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 CreatedAtIsNil ¶
CreatedAtIsNil applies the IsNil 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 CreatedAtNotNil ¶
CreatedAtNotNil applies the NotNil predicate on the "created_at" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func HasFiletype ¶
HasFiletype applies the HasEdge predicate on the "filetype" edge.
func HasFiletypeWith ¶
HasFiletypeWith applies the HasEdge predicate on the "filetype" edge with a given conditions (other predicates).
func HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
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 TypeContains ¶
TypeContains applies the Contains predicate on the "type" field.
func TypeContainsFold ¶
TypeContainsFold applies the ContainsFold predicate on the "type" field.
func TypeEqualFold ¶
TypeEqualFold applies the EqualFold predicate on the "type" field.
func TypeHasPrefix ¶
TypeHasPrefix applies the HasPrefix predicate on the "type" field.
func TypeHasSuffix ¶
TypeHasSuffix applies the HasSuffix predicate on the "type" field.
func UUIDContains ¶
UUIDContains applies the Contains predicate on the "uuid" field.
func UUIDContainsFold ¶
UUIDContainsFold applies the ContainsFold predicate on the "uuid" field.
func UUIDEqualFold ¶
UUIDEqualFold applies the EqualFold predicate on the "uuid" field.
func UUIDHasPrefix ¶
UUIDHasPrefix applies the HasPrefix predicate on the "uuid" field.
func UUIDHasSuffix ¶
UUIDHasSuffix applies the HasSuffix predicate on the "uuid" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UserID ¶
UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserIDNotIn ¶
UserIDNotIn applies the NotIn predicate on the "user_id" 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 ByDeletedAt ¶
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
ByDeletedAt orders the results by the deleted_at field.
func ByFiletypeField ¶
func ByFiletypeField(field string, opts ...sql.OrderTermOption) OrderOption
ByFiletypeField orders the results by filetype 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 BySize ¶
func BySize(opts ...sql.OrderTermOption) OrderOption
BySize orders the results by the size field.
func ByTags ¶
func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTags orders the results by tags terms.
func ByTagsCount ¶
func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
ByTagsCount orders the results by tags count.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUUID ¶
func ByUUID(opts ...sql.OrderTermOption) OrderOption
ByUUID orders the results by the uuid field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.
func ByUserID ¶
func ByUserID(opts ...sql.OrderTermOption) OrderOption
ByUserID orders the results by the user_id field.