Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Attachment) predicate.Attachment
- func HasRecipients() predicate.Attachment
- func HasRecipientsWith(preds ...predicate.User) predicate.Attachment
- func HasUser() predicate.Attachment
- func HasUserWith(preds ...predicate.User) 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 ValidColumn(column string) bool
- type OrderOption
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" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeRecipients holds the string denoting the recipients edge name in mutations. EdgeRecipients = "recipients" // UserFieldID holds the string denoting the ID field of the User. UserFieldID = "user_id" // Table holds the table name of the attachment in the database. Table = "attachments" // UserTable is the table that holds the user relation/edge. UserTable = "attachments" // 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_attachment" // RecipientsTable is the table that holds the recipients relation/edge. The primary key declared below. RecipientsTable = "attachment_recipients" // RecipientsInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. RecipientsInverseTable = "users" )
Variables ¶
var Columns = []string{ FieldID, }
Columns holds all SQL columns for attachment fields.
var ( // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var ForeignKeys = []string{
"pet_attachment",
"user_attachment",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "attachments" table and are not defined as standalone fields in the schema.
var ( // RecipientsPrimaryKey and RecipientsColumn2 are the table columns denoting the // primary key for the recipients relation (M2M). RecipientsPrimaryKey = []string{"attachment_id", "user_id"} )
Functions ¶
func And ¶
func And(predicates ...predicate.Attachment) predicate.Attachment
And groups predicates with the AND operator between them.
func HasRecipients ¶
func HasRecipients() predicate.Attachment
HasRecipients applies the HasEdge predicate on the "recipients" edge.
func HasRecipientsWith ¶
func HasRecipientsWith(preds ...predicate.User) predicate.Attachment
HasRecipientsWith applies the HasEdge predicate on the "recipients" edge with a given conditions (other predicates).
func HasUser ¶
func HasUser() predicate.Attachment
HasUser applies the HasEdge predicate on the "user" edge.
func HasUserWith ¶
func HasUserWith(preds ...predicate.User) predicate.Attachment
HasUserWith applies the HasEdge predicate on the "user" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶ added in v0.4.1
OrderOption defines the ordering options for the Attachment queries.
func ByID ¶ added in v0.4.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByRecipients ¶ added in v0.4.0
func ByRecipients(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRecipients orders the results by recipients terms.
func ByRecipientsCount ¶ added in v0.4.0
func ByRecipientsCount(opts ...sql.OrderTermOption) OrderOption
ByRecipientsCount orders the results by recipients count.
func ByUserField ¶ added in v0.4.0
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.