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 HasDocument() predicate.Attachment
- func HasDocumentWith(preds ...predicate.Document) predicate.Attachment
- func HasItem() predicate.Attachment
- func HasItemWith(preds ...predicate.Item) 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 Not(p predicate.Attachment) predicate.Attachment
- func Or(predicates ...predicate.Attachment) predicate.Attachment
- func Primary(v bool) predicate.Attachment
- func PrimaryEQ(v bool) predicate.Attachment
- func PrimaryNEQ(v bool) 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 ByDocumentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByItemField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByPrimary(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" // EdgeItem holds the string denoting the item edge name in mutations. EdgeItem = "item" // EdgeDocument holds the string denoting the document edge name in mutations. EdgeDocument = "document" // 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" // DocumentTable is the table that holds the document relation/edge. DocumentTable = "attachments" // DocumentInverseTable is the table name for the Document entity. // It exists in this package in order to avoid circular dependency with the "document" package. DocumentInverseTable = "documents" // DocumentColumn is the table column denoting the document relation/edge. DocumentColumn = "document_attachments" )
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 // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldType, FieldPrimary, }
Columns holds all SQL columns for attachment fields.
var ForeignKeys = []string{
"document_attachments",
"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 HasDocument ¶
func HasDocument() predicate.Attachment
HasDocument applies the HasEdge predicate on the "document" edge.
func HasDocumentWith ¶
func HasDocumentWith(preds ...predicate.Document) predicate.Attachment
HasDocumentWith applies the HasEdge predicate on the "document" edge with a given conditions (other predicates).
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 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 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 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 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 ByDocumentField ¶
func ByDocumentField(field string, opts ...sql.OrderTermOption) OrderOption
ByDocumentField orders the results by document 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 ByPrimary ¶
func ByPrimary(opts ...sql.OrderTermOption) OrderOption
ByPrimary orders the results by the primary 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.