Documentation ¶
Index ¶
- Constants
- Variables
- func Age(v int) predicate.Pet
- func AgeEQ(v int) predicate.Pet
- func AgeGT(v int) predicate.Pet
- func AgeGTE(v int) predicate.Pet
- func AgeIn(vs ...int) predicate.Pet
- func AgeLT(v int) predicate.Pet
- func AgeLTE(v int) predicate.Pet
- func AgeNEQ(v int) predicate.Pet
- func AgeNotIn(vs ...int) predicate.Pet
- func And(predicates ...predicate.Pet) predicate.Pet
- func Breed(v string) predicate.Pet
- func BreedContains(v string) predicate.Pet
- func BreedContainsFold(v string) predicate.Pet
- func BreedEQ(v string) predicate.Pet
- func BreedEqualFold(v string) predicate.Pet
- func BreedGT(v string) predicate.Pet
- func BreedGTE(v string) predicate.Pet
- func BreedHasPrefix(v string) predicate.Pet
- func BreedHasSuffix(v string) predicate.Pet
- func BreedIn(vs ...string) predicate.Pet
- func BreedLT(v string) predicate.Pet
- func BreedLTE(v string) predicate.Pet
- func BreedNEQ(v string) predicate.Pet
- func BreedNotIn(vs ...string) 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 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 ValidColumn(column string) bool
- type OrderOption
- func ByAge(opts ...sql.OrderTermOption) OrderOption
- func ByBreed(opts ...sql.OrderTermOption) 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
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" // FieldBreed holds the string denoting the breed field in the database. FieldBreed = "breed" // FieldAge holds the string denoting the age field in the database. FieldAge = "age" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // 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" )
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // BreedValidator is a validator for the "breed" field. It is called by the builders before save. BreedValidator func(string) error // AgeValidator is a validator for the "age" field. It is called by the builders before save. AgeValidator func(int) error )
var Columns = []string{ FieldID, FieldName, FieldBreed, FieldAge, }
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{"user_id", "pet_id"} )
Functions ¶
func Breed ¶
Breed applies equality check predicate on the "breed" field. It's identical to BreedEQ.
func BreedContains ¶
BreedContains applies the Contains predicate on the "breed" field.
func BreedContainsFold ¶
BreedContainsFold applies the ContainsFold predicate on the "breed" field.
func BreedEqualFold ¶
BreedEqualFold applies the EqualFold predicate on the "breed" field.
func BreedHasPrefix ¶
BreedHasPrefix applies the HasPrefix predicate on the "breed" field.
func BreedHasSuffix ¶
BreedHasSuffix applies the HasSuffix predicate on the "breed" field.
func BreedNotIn ¶
BreedNotIn applies the NotIn predicate on the "breed" field.
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" 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 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 ByAge ¶
func ByAge(opts ...sql.OrderTermOption) OrderOption
ByAge orders the results by the age field.
func ByBreed ¶
func ByBreed(opts ...sql.OrderTermOption) OrderOption
ByBreed orders the results by the breed field.
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.