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 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 HasImage() predicate.File
- func HasImageWith(preds ...predicate.Image) predicate.File
- func HasOwner() predicate.File
- func HasOwnerWith(preds ...predicate.User) predicate.File
- func ID(id model.InternalID) predicate.File
- func IDEQ(id model.InternalID) predicate.File
- func IDGT(id model.InternalID) predicate.File
- func IDGTE(id model.InternalID) predicate.File
- func IDIn(ids ...model.InternalID) predicate.File
- func IDLT(id model.InternalID) predicate.File
- func IDLTE(id model.InternalID) predicate.File
- func IDNEQ(id model.InternalID) predicate.File
- func IDNotIn(ids ...model.InternalID) 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 Sha256(v []byte) predicate.File
- func Sha256EQ(v []byte) predicate.File
- func Sha256GT(v []byte) predicate.File
- func Sha256GTE(v []byte) predicate.File
- func Sha256In(vs ...[]byte) predicate.File
- func Sha256LT(v []byte) predicate.File
- func Sha256LTE(v []byte) predicate.File
- func Sha256NEQ(v []byte) predicate.File
- func Sha256NotIn(vs ...[]byte) predicate.File
- func Size(v int64) predicate.File
- func SizeEQ(v int64) predicate.File
- func SizeGT(v int64) predicate.File
- func SizeGTE(v int64) predicate.File
- func SizeIn(vs ...int64) predicate.File
- func SizeLT(v int64) predicate.File
- func SizeLTE(v int64) predicate.File
- func SizeNEQ(v int64) predicate.File
- func SizeNotIn(vs ...int64) predicate.File
- func TypeEQ(v Type) predicate.File
- func TypeIn(vs ...Type) predicate.File
- func TypeNEQ(v Type) predicate.File
- func TypeNotIn(vs ...Type) predicate.File
- func TypeValidator(_type Type) error
- 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 ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByImageField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
- func BySize(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Type
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" // 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" // FieldSha256 holds the string denoting the sha256 field in the database. FieldSha256 = "sha256" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // EdgeImage holds the string denoting the image edge name in mutations. EdgeImage = "image" // Table holds the table name of the file in the database. Table = "files" // OwnerTable is the table that holds the owner relation/edge. OwnerTable = "files" // OwnerInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. OwnerInverseTable = "users" // OwnerColumn is the table column denoting the owner relation/edge. OwnerColumn = "user_file" // ImageTable is the table that holds the image relation/edge. ImageTable = "images" // ImageInverseTable is the table name for the Image entity. // It exists in this package in order to avoid circular dependency with the "image" package. ImageInverseTable = "images" // ImageColumn is the table column denoting the image relation/edge. ImageColumn = "file_image" )
Variables ¶
var ( // 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 // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldName, FieldSize, FieldType, FieldSha256, FieldUpdatedAt, FieldCreatedAt, }
Columns holds all SQL columns for file fields.
var ForeignKeys = []string{
"user_file",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "files" table and are not defined as standalone fields in the schema.
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 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 HasImageWith ¶
HasImageWith applies the HasEdge predicate on the "image" edge with a given conditions (other predicates).
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func IDEQ ¶
func IDEQ(id model.InternalID) predicate.File
IDEQ applies the EQ predicate on the ID field.
func IDGT ¶
func IDGT(id model.InternalID) predicate.File
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id model.InternalID) predicate.File
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...model.InternalID) predicate.File
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id model.InternalID) predicate.File
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id model.InternalID) predicate.File
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id model.InternalID) predicate.File
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...model.InternalID) predicate.File
IDNotIn applies the NotIn predicate on the ID 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 Sha256 ¶
Sha256 applies equality check predicate on the "sha256" field. It's identical to Sha256EQ.
func Sha256NotIn ¶
Sha256NotIn applies the NotIn predicate on the "sha256" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶ added in v0.1.4
OrderOption defines the ordering options for the File queries.
func ByCreatedAt ¶ added in v0.1.4
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByID ¶ added in v0.1.4
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByImageField ¶ added in v0.1.4
func ByImageField(field string, opts ...sql.OrderTermOption) OrderOption
ByImageField orders the results by image field.
func ByName ¶ added in v0.1.4
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByOwnerField ¶ added in v0.1.4
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
ByOwnerField orders the results by owner field.
func BySize ¶ added in v0.1.4
func BySize(opts ...sql.OrderTermOption) OrderOption
BySize orders the results by the size field.
func ByType ¶ added in v0.1.4
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUpdatedAt ¶ added in v0.1.4
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.