Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Pet) predicate.Pet
- func HasAttachment() predicate.Pet
- func HasAttachmentWith(preds ...predicate.Attachment) predicate.Pet
- func HasOwner() predicate.Pet
- func HasOwnerWith(preds ...predicate.User) predicate.Pet
- func ID(id int) predicate.Pet
- func IDEQ(id int) predicate.Pet
- func IDGT(id int) predicate.Pet
- func IDGTE(id int) predicate.Pet
- func IDIn(ids ...int) predicate.Pet
- func IDLT(id int) predicate.Pet
- func IDLTE(id int) predicate.Pet
- func IDNEQ(id int) predicate.Pet
- func IDNotIn(ids ...int) predicate.Pet
- func Not(p predicate.Pet) predicate.Pet
- func Or(predicates ...predicate.Pet) predicate.Pet
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the pet type in the database. Label = "pet" // FieldID holds the string denoting the id field in the database. FieldID = "id" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // EdgeAttachment holds the string denoting the attachment edge name in mutations. EdgeAttachment = "attachment" // UserFieldID holds the string denoting the ID field of the User. UserFieldID = "user_id" // Table holds the table name of the pet in the database. Table = "pets" // OwnerTable is the table that holds the owner relation/edge. OwnerTable = "pets" // 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_pet" // AttachmentTable is the table that holds the attachment relation/edge. AttachmentTable = "attachments" // AttachmentInverseTable is the table name for the Attachment entity. // It exists in this package in order to avoid circular dependency with the "attachment" package. AttachmentInverseTable = "attachments" // AttachmentColumn is the table column denoting the attachment relation/edge. AttachmentColumn = "pet_attachment" )
Variables ¶
var Columns = []string{ FieldID, }
Columns holds all SQL columns for pet fields.
var ForeignKeys = []string{
"user_pet",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "pets" table and are not defined as standalone fields in the schema.
Functions ¶
func HasAttachment ¶
HasAttachment applies the HasEdge predicate on the "attachment" edge.
func HasAttachmentWith ¶
func HasAttachmentWith(preds ...predicate.Attachment) predicate.Pet
HasAttachmentWith applies the HasEdge predicate on the "attachment" 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 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 Pet queries.
func ByAttachment ¶ added in v0.4.0
func ByAttachment(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAttachment orders the results by attachment terms.
func ByAttachmentCount ¶ added in v0.4.0
func ByAttachmentCount(opts ...sql.OrderTermOption) OrderOption
ByAttachmentCount orders the results by attachment count.
func ByID ¶ added in v0.4.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByOwnerField ¶ added in v0.4.0
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
ByOwnerField orders the results by owner field.