Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Pet) predicate.Pet
- func HasOwner() predicate.Pet
- func HasOwnerWith(preds ...predicate.User) predicate.Pet
- func HasUserPets() predicate.Pet
- func HasUserPetsWith(preds ...predicate.UserPet) 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 Name(v string) predicate.Pet
- func NameContains(v string) predicate.Pet
- func NameContainsFold(v string) predicate.Pet
- func NameEQ(v string) predicate.Pet
- func NameEqualFold(v string) predicate.Pet
- func NameGT(v string) predicate.Pet
- func NameGTE(v string) predicate.Pet
- func NameHasPrefix(v string) predicate.Pet
- func NameHasSuffix(v string) predicate.Pet
- func NameIn(vs ...string) predicate.Pet
- func NameLT(v string) predicate.Pet
- func NameLTE(v string) predicate.Pet
- func NameNEQ(v string) predicate.Pet
- func NameNotIn(vs ...string) predicate.Pet
- func Not(p predicate.Pet) predicate.Pet
- func Or(predicates ...predicate.Pet) predicate.Pet
- func SvgRaw(v string) predicate.Pet
- func SvgRawContains(v string) predicate.Pet
- func SvgRawContainsFold(v string) predicate.Pet
- func SvgRawEQ(v string) predicate.Pet
- func SvgRawEqualFold(v string) predicate.Pet
- func SvgRawGT(v string) predicate.Pet
- func SvgRawGTE(v string) predicate.Pet
- func SvgRawHasPrefix(v string) predicate.Pet
- func SvgRawHasSuffix(v string) predicate.Pet
- func SvgRawIn(vs ...string) predicate.Pet
- func SvgRawLT(v string) predicate.Pet
- func SvgRawLTE(v string) predicate.Pet
- func SvgRawNEQ(v string) predicate.Pet
- func SvgRawNotIn(vs ...string) predicate.Pet
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOwner(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByOwnerCount(opts ...sql.OrderTermOption) OrderOption
- func BySvgRaw(opts ...sql.OrderTermOption) OrderOption
- func ByUserPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByUserPetsCount(opts ...sql.OrderTermOption) 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" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldSvgRaw holds the string denoting the svg_raw field in the database. FieldSvgRaw = "svg_raw" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // EdgeUserPets holds the string denoting the user_pets edge name in mutations. EdgeUserPets = "user_pets" // Table holds the table name of the pet in the database. Table = "pets" // OwnerTable is the table that holds the owner relation/edge. The primary key declared below. OwnerTable = "user_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" // UserPetsTable is the table that holds the user_pets relation/edge. UserPetsTable = "user_pets" // UserPetsInverseTable is the table name for the UserPet entity. // It exists in this package in order to avoid circular dependency with the "userpet" package. UserPetsInverseTable = "user_pets" // UserPetsColumn is the table column denoting the user_pets relation/edge. UserPetsColumn = "pet_id" )
Variables ¶
var Columns = []string{ FieldID, FieldName, FieldSvgRaw, }
Columns holds all SQL columns for pet fields.
var ( // OwnerPrimaryKey and OwnerColumn2 are the table columns denoting the // primary key for the owner relation (M2M). OwnerPrimaryKey = []string{"pet_id", "user_id"} )
Functions ¶
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func HasUserPets ¶
HasUserPets applies the HasEdge predicate on the "user_pets" edge.
func HasUserPetsWith ¶
HasUserPetsWith applies the HasEdge predicate on the "user_pets" edge with a given conditions (other predicates).
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 SvgRaw ¶
SvgRaw applies equality check predicate on the "svg_raw" field. It's identical to SvgRawEQ.
func SvgRawContains ¶
SvgRawContains applies the Contains predicate on the "svg_raw" field.
func SvgRawContainsFold ¶
SvgRawContainsFold applies the ContainsFold predicate on the "svg_raw" field.
func SvgRawEqualFold ¶
SvgRawEqualFold applies the EqualFold predicate on the "svg_raw" field.
func SvgRawHasPrefix ¶
SvgRawHasPrefix applies the HasPrefix predicate on the "svg_raw" field.
func SvgRawHasSuffix ¶
SvgRawHasSuffix applies the HasSuffix predicate on the "svg_raw" field.
func SvgRawNotIn ¶
SvgRawNotIn applies the NotIn predicate on the "svg_raw" 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 Pet queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByOwner ¶
func ByOwner(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByOwner orders the results by owner terms.
func ByOwnerCount ¶
func ByOwnerCount(opts ...sql.OrderTermOption) OrderOption
ByOwnerCount orders the results by owner count.
func BySvgRaw ¶
func BySvgRaw(opts ...sql.OrderTermOption) OrderOption
BySvgRaw orders the results by the svg_raw field.
func ByUserPets ¶
func ByUserPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByUserPets orders the results by user_pets terms.
func ByUserPetsCount ¶
func ByUserPetsCount(opts ...sql.OrderTermOption) OrderOption
ByUserPetsCount orders the results by user_pets count.