Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Attachment) predicate.Attachment
- func CreatedAt(v time.Time) predicate.Attachment
- func CreatedAtEQ(v time.Time) predicate.Attachment
- func CreatedAtGT(v time.Time) predicate.Attachment
- func CreatedAtGTE(v time.Time) predicate.Attachment
- func CreatedAtIn(vs ...time.Time) predicate.Attachment
- func CreatedAtLT(v time.Time) predicate.Attachment
- func CreatedAtLTE(v time.Time) predicate.Attachment
- func CreatedAtNEQ(v time.Time) predicate.Attachment
- func CreatedAtNotIn(vs ...time.Time) predicate.Attachment
- func HasItem() predicate.Attachment
- func HasItemWith(preds ...predicate.Item) predicate.Attachment
- func HasThumbnail() predicate.Attachment
- func HasThumbnailWith(preds ...predicate.Attachment) predicate.Attachment
- func ID(id uuid.UUID) predicate.Attachment
- func IDEQ(id uuid.UUID) predicate.Attachment
- func IDGT(id uuid.UUID) predicate.Attachment
- func IDGTE(id uuid.UUID) predicate.Attachment
- func IDIn(ids ...uuid.UUID) predicate.Attachment
- func IDLT(id uuid.UUID) predicate.Attachment
- func IDLTE(id uuid.UUID) predicate.Attachment
- func IDNEQ(id uuid.UUID) predicate.Attachment
- func IDNotIn(ids ...uuid.UUID) predicate.Attachment
- func MimeType(v string) predicate.Attachment
- func MimeTypeContains(v string) predicate.Attachment
- func MimeTypeContainsFold(v string) predicate.Attachment
- func MimeTypeEQ(v string) predicate.Attachment
- func MimeTypeEqualFold(v string) predicate.Attachment
- func MimeTypeGT(v string) predicate.Attachment
- func MimeTypeGTE(v string) predicate.Attachment
- func MimeTypeHasPrefix(v string) predicate.Attachment
- func MimeTypeHasSuffix(v string) predicate.Attachment
- func MimeTypeIn(vs ...string) predicate.Attachment
- func MimeTypeLT(v string) predicate.Attachment
- func MimeTypeLTE(v string) predicate.Attachment
- func MimeTypeNEQ(v string) predicate.Attachment
- func MimeTypeNotIn(vs ...string) predicate.Attachment
- func Not(p predicate.Attachment) predicate.Attachment
- func Or(predicates ...predicate.Attachment) predicate.Attachment
- func Path(v string) predicate.Attachment
- func PathContains(v string) predicate.Attachment
- func PathContainsFold(v string) predicate.Attachment
- func PathEQ(v string) predicate.Attachment
- func PathEqualFold(v string) predicate.Attachment
- func PathGT(v string) predicate.Attachment
- func PathGTE(v string) predicate.Attachment
- func PathHasPrefix(v string) predicate.Attachment
- func PathHasSuffix(v string) predicate.Attachment
- func PathIn(vs ...string) predicate.Attachment
- func PathLT(v string) predicate.Attachment
- func PathLTE(v string) predicate.Attachment
- func PathNEQ(v string) predicate.Attachment
- func PathNotIn(vs ...string) predicate.Attachment
- func Primary(v bool) predicate.Attachment
- func PrimaryEQ(v bool) predicate.Attachment
- func PrimaryNEQ(v bool) predicate.Attachment
- func Title(v string) predicate.Attachment
- func TitleContains(v string) predicate.Attachment
- func TitleContainsFold(v string) predicate.Attachment
- func TitleEQ(v string) predicate.Attachment
- func TitleEqualFold(v string) predicate.Attachment
- func TitleGT(v string) predicate.Attachment
- func TitleGTE(v string) predicate.Attachment
- func TitleHasPrefix(v string) predicate.Attachment
- func TitleHasSuffix(v string) predicate.Attachment
- func TitleIn(vs ...string) predicate.Attachment
- func TitleLT(v string) predicate.Attachment
- func TitleLTE(v string) predicate.Attachment
- func TitleNEQ(v string) predicate.Attachment
- func TitleNotIn(vs ...string) predicate.Attachment
- func TypeEQ(v Type) predicate.Attachment
- func TypeIn(vs ...Type) predicate.Attachment
- func TypeNEQ(v Type) predicate.Attachment
- func TypeNotIn(vs ...Type) predicate.Attachment
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Attachment
- func UpdatedAtEQ(v time.Time) predicate.Attachment
- func UpdatedAtGT(v time.Time) predicate.Attachment
- func UpdatedAtGTE(v time.Time) predicate.Attachment
- func UpdatedAtIn(vs ...time.Time) predicate.Attachment
- func UpdatedAtLT(v time.Time) predicate.Attachment
- func UpdatedAtLTE(v time.Time) predicate.Attachment
- func UpdatedAtNEQ(v time.Time) predicate.Attachment
- func UpdatedAtNotIn(vs ...time.Time) predicate.Attachment
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByItemField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByMimeType(opts ...sql.OrderTermOption) OrderOption
- func ByPath(opts ...sql.OrderTermOption) OrderOption
- func ByPrimary(opts ...sql.OrderTermOption) OrderOption
- func ByThumbnailField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByTitle(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 attachment type in the database. Label = "attachment" // 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" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldPrimary holds the string denoting the primary field in the database. FieldPrimary = "primary" // FieldTitle holds the string denoting the title field in the database. FieldTitle = "title" // FieldPath holds the string denoting the path field in the database. FieldPath = "path" // FieldMimeType holds the string denoting the mime_type field in the database. FieldMimeType = "mime_type" // EdgeItem holds the string denoting the item edge name in mutations. EdgeItem = "item" // EdgeThumbnail holds the string denoting the thumbnail edge name in mutations. EdgeThumbnail = "thumbnail" // Table holds the table name of the attachment in the database. Table = "attachments" // ItemTable is the table that holds the item relation/edge. ItemTable = "attachments" // ItemInverseTable is the table name for the Item entity. // It exists in this package in order to avoid circular dependency with the "item" package. ItemInverseTable = "items" // ItemColumn is the table column denoting the item relation/edge. ItemColumn = "item_attachments" // ThumbnailTable is the table that holds the thumbnail relation/edge. ThumbnailTable = "attachments" // ThumbnailColumn is the table column denoting the thumbnail relation/edge. ThumbnailColumn = "attachment_thumbnail" )
const DefaultType = TypeAttachment
TypeAttachment is the default value of the Type enum.
Variables ¶
var ( // 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 // DefaultPrimary holds the default value on creation for the "primary" field. DefaultPrimary bool // DefaultTitle holds the default value on creation for the "title" field. DefaultTitle string // DefaultPath holds the default value on creation for the "path" field. DefaultPath string // DefaultMimeType holds the default value on creation for the "mime_type" field. DefaultMimeType string // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldType, FieldPrimary, FieldTitle, FieldPath, FieldMimeType, }
Columns holds all SQL columns for attachment fields.
var ForeignKeys = []string{
"attachment_thumbnail",
"item_attachments",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "attachments" table and are not defined as standalone fields in the schema.
Functions ¶
func And ¶
func And(predicates ...predicate.Attachment) predicate.Attachment
And groups predicates with the AND operator between them.
func CreatedAt ¶
func CreatedAt(v time.Time) predicate.Attachment
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
func CreatedAtEQ(v time.Time) predicate.Attachment
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
func CreatedAtGT(v time.Time) predicate.Attachment
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
func CreatedAtGTE(v time.Time) predicate.Attachment
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
func CreatedAtIn(vs ...time.Time) predicate.Attachment
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
func CreatedAtLT(v time.Time) predicate.Attachment
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
func CreatedAtLTE(v time.Time) predicate.Attachment
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
func CreatedAtNEQ(v time.Time) predicate.Attachment
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
func CreatedAtNotIn(vs ...time.Time) predicate.Attachment
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasItem ¶
func HasItem() predicate.Attachment
HasItem applies the HasEdge predicate on the "item" edge.
func HasItemWith ¶
func HasItemWith(preds ...predicate.Item) predicate.Attachment
HasItemWith applies the HasEdge predicate on the "item" edge with a given conditions (other predicates).
func HasThumbnail ¶
func HasThumbnail() predicate.Attachment
HasThumbnail applies the HasEdge predicate on the "thumbnail" edge.
func HasThumbnailWith ¶
func HasThumbnailWith(preds ...predicate.Attachment) predicate.Attachment
HasThumbnailWith applies the HasEdge predicate on the "thumbnail" edge with a given conditions (other predicates).
func IDEQ ¶
func IDEQ(id uuid.UUID) predicate.Attachment
IDEQ applies the EQ predicate on the ID field.
func IDGT ¶
func IDGT(id uuid.UUID) predicate.Attachment
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id uuid.UUID) predicate.Attachment
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...uuid.UUID) predicate.Attachment
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id uuid.UUID) predicate.Attachment
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id uuid.UUID) predicate.Attachment
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id uuid.UUID) predicate.Attachment
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...uuid.UUID) predicate.Attachment
IDNotIn applies the NotIn predicate on the ID field.
func MimeType ¶
func MimeType(v string) predicate.Attachment
MimeType applies equality check predicate on the "mime_type" field. It's identical to MimeTypeEQ.
func MimeTypeContains ¶
func MimeTypeContains(v string) predicate.Attachment
MimeTypeContains applies the Contains predicate on the "mime_type" field.
func MimeTypeContainsFold ¶
func MimeTypeContainsFold(v string) predicate.Attachment
MimeTypeContainsFold applies the ContainsFold predicate on the "mime_type" field.
func MimeTypeEQ ¶
func MimeTypeEQ(v string) predicate.Attachment
MimeTypeEQ applies the EQ predicate on the "mime_type" field.
func MimeTypeEqualFold ¶
func MimeTypeEqualFold(v string) predicate.Attachment
MimeTypeEqualFold applies the EqualFold predicate on the "mime_type" field.
func MimeTypeGT ¶
func MimeTypeGT(v string) predicate.Attachment
MimeTypeGT applies the GT predicate on the "mime_type" field.
func MimeTypeGTE ¶
func MimeTypeGTE(v string) predicate.Attachment
MimeTypeGTE applies the GTE predicate on the "mime_type" field.
func MimeTypeHasPrefix ¶
func MimeTypeHasPrefix(v string) predicate.Attachment
MimeTypeHasPrefix applies the HasPrefix predicate on the "mime_type" field.
func MimeTypeHasSuffix ¶
func MimeTypeHasSuffix(v string) predicate.Attachment
MimeTypeHasSuffix applies the HasSuffix predicate on the "mime_type" field.
func MimeTypeIn ¶
func MimeTypeIn(vs ...string) predicate.Attachment
MimeTypeIn applies the In predicate on the "mime_type" field.
func MimeTypeLT ¶
func MimeTypeLT(v string) predicate.Attachment
MimeTypeLT applies the LT predicate on the "mime_type" field.
func MimeTypeLTE ¶
func MimeTypeLTE(v string) predicate.Attachment
MimeTypeLTE applies the LTE predicate on the "mime_type" field.
func MimeTypeNEQ ¶
func MimeTypeNEQ(v string) predicate.Attachment
MimeTypeNEQ applies the NEQ predicate on the "mime_type" field.
func MimeTypeNotIn ¶
func MimeTypeNotIn(vs ...string) predicate.Attachment
MimeTypeNotIn applies the NotIn predicate on the "mime_type" field.
func Not ¶
func Not(p predicate.Attachment) predicate.Attachment
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.Attachment) predicate.Attachment
Or groups predicates with the OR operator between them.
func Path ¶
func Path(v string) predicate.Attachment
Path applies equality check predicate on the "path" field. It's identical to PathEQ.
func PathContains ¶
func PathContains(v string) predicate.Attachment
PathContains applies the Contains predicate on the "path" field.
func PathContainsFold ¶
func PathContainsFold(v string) predicate.Attachment
PathContainsFold applies the ContainsFold predicate on the "path" field.
func PathEQ ¶
func PathEQ(v string) predicate.Attachment
PathEQ applies the EQ predicate on the "path" field.
func PathEqualFold ¶
func PathEqualFold(v string) predicate.Attachment
PathEqualFold applies the EqualFold predicate on the "path" field.
func PathGT ¶
func PathGT(v string) predicate.Attachment
PathGT applies the GT predicate on the "path" field.
func PathGTE ¶
func PathGTE(v string) predicate.Attachment
PathGTE applies the GTE predicate on the "path" field.
func PathHasPrefix ¶
func PathHasPrefix(v string) predicate.Attachment
PathHasPrefix applies the HasPrefix predicate on the "path" field.
func PathHasSuffix ¶
func PathHasSuffix(v string) predicate.Attachment
PathHasSuffix applies the HasSuffix predicate on the "path" field.
func PathIn ¶
func PathIn(vs ...string) predicate.Attachment
PathIn applies the In predicate on the "path" field.
func PathLT ¶
func PathLT(v string) predicate.Attachment
PathLT applies the LT predicate on the "path" field.
func PathLTE ¶
func PathLTE(v string) predicate.Attachment
PathLTE applies the LTE predicate on the "path" field.
func PathNEQ ¶
func PathNEQ(v string) predicate.Attachment
PathNEQ applies the NEQ predicate on the "path" field.
func PathNotIn ¶
func PathNotIn(vs ...string) predicate.Attachment
PathNotIn applies the NotIn predicate on the "path" field.
func Primary ¶
func Primary(v bool) predicate.Attachment
Primary applies equality check predicate on the "primary" field. It's identical to PrimaryEQ.
func PrimaryEQ ¶
func PrimaryEQ(v bool) predicate.Attachment
PrimaryEQ applies the EQ predicate on the "primary" field.
func PrimaryNEQ ¶
func PrimaryNEQ(v bool) predicate.Attachment
PrimaryNEQ applies the NEQ predicate on the "primary" field.
func Title ¶
func Title(v string) predicate.Attachment
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
func TitleContains(v string) predicate.Attachment
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
func TitleContainsFold(v string) predicate.Attachment
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEQ ¶
func TitleEQ(v string) predicate.Attachment
TitleEQ applies the EQ predicate on the "title" field.
func TitleEqualFold ¶
func TitleEqualFold(v string) predicate.Attachment
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleGT ¶
func TitleGT(v string) predicate.Attachment
TitleGT applies the GT predicate on the "title" field.
func TitleGTE ¶
func TitleGTE(v string) predicate.Attachment
TitleGTE applies the GTE predicate on the "title" field.
func TitleHasPrefix ¶
func TitleHasPrefix(v string) predicate.Attachment
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
func TitleHasSuffix(v string) predicate.Attachment
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleIn ¶
func TitleIn(vs ...string) predicate.Attachment
TitleIn applies the In predicate on the "title" field.
func TitleLT ¶
func TitleLT(v string) predicate.Attachment
TitleLT applies the LT predicate on the "title" field.
func TitleLTE ¶
func TitleLTE(v string) predicate.Attachment
TitleLTE applies the LTE predicate on the "title" field.
func TitleNEQ ¶
func TitleNEQ(v string) predicate.Attachment
TitleNEQ applies the NEQ predicate on the "title" field.
func TitleNotIn ¶
func TitleNotIn(vs ...string) predicate.Attachment
TitleNotIn applies the NotIn predicate on the "title" field.
func TypeEQ ¶
func TypeEQ(v Type) predicate.Attachment
TypeEQ applies the EQ predicate on the "type" field.
func TypeIn ¶
func TypeIn(vs ...Type) predicate.Attachment
TypeIn applies the In predicate on the "type" field.
func TypeNEQ ¶
func TypeNEQ(v Type) predicate.Attachment
TypeNEQ applies the NEQ predicate on the "type" field.
func TypeNotIn ¶
func TypeNotIn(vs ...Type) predicate.Attachment
TypeNotIn applies the NotIn predicate on the "type" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func UpdatedAt ¶
func UpdatedAt(v time.Time) predicate.Attachment
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
func UpdatedAtEQ(v time.Time) predicate.Attachment
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
func UpdatedAtGT(v time.Time) predicate.Attachment
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
func UpdatedAtGTE(v time.Time) predicate.Attachment
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
func UpdatedAtIn(vs ...time.Time) predicate.Attachment
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
func UpdatedAtLT(v time.Time) predicate.Attachment
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
func UpdatedAtLTE(v time.Time) predicate.Attachment
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
func UpdatedAtNEQ(v time.Time) predicate.Attachment
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
func UpdatedAtNotIn(vs ...time.Time) predicate.Attachment
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 ¶
OrderOption defines the ordering options for the Attachment 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 ByItemField ¶
func ByItemField(field string, opts ...sql.OrderTermOption) OrderOption
ByItemField orders the results by item field.
func ByMimeType ¶
func ByMimeType(opts ...sql.OrderTermOption) OrderOption
ByMimeType orders the results by the mime_type field.
func ByPath ¶
func ByPath(opts ...sql.OrderTermOption) OrderOption
ByPath orders the results by the path field.
func ByPrimary ¶
func ByPrimary(opts ...sql.OrderTermOption) OrderOption
ByPrimary orders the results by the primary field.
func ByThumbnailField ¶
func ByThumbnailField(field string, opts ...sql.OrderTermOption) OrderOption
ByThumbnailField orders the results by thumbnail field.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.