Documentation ¶
Index ¶
- Constants
- Variables
- func Age(v float64) predicate.Pet
- func AgeEQ(v float64) predicate.Pet
- func AgeGT(v float64) predicate.Pet
- func AgeGTE(v float64) predicate.Pet
- func AgeIn(vs ...float64) predicate.Pet
- func AgeLT(v float64) predicate.Pet
- func AgeLTE(v float64) predicate.Pet
- func AgeNEQ(v float64) predicate.Pet
- func AgeNotIn(vs ...float64) predicate.Pet
- func And(predicates ...predicate.Pet) predicate.Pet
- func BestFriendID(v uuid.UUID) predicate.Pet
- func BestFriendIDEQ(v uuid.UUID) predicate.Pet
- func BestFriendIDIn(vs ...uuid.UUID) predicate.Pet
- func BestFriendIDNEQ(v uuid.UUID) predicate.Pet
- func BestFriendIDNotIn(vs ...uuid.UUID) predicate.Pet
- func HasBestFriend() predicate.Pet
- func HasBestFriendWith(preds ...predicate.Pet) predicate.Pet
- func HasOwner() predicate.Pet
- func HasOwnerWith(preds ...predicate.User) predicate.Pet
- func ID(id uuid.UUID) predicate.Pet
- func IDEQ(id uuid.UUID) predicate.Pet
- func IDGT(id uuid.UUID) predicate.Pet
- func IDGTE(id uuid.UUID) predicate.Pet
- func IDIn(ids ...uuid.UUID) predicate.Pet
- func IDLT(id uuid.UUID) predicate.Pet
- func IDLTE(id uuid.UUID) predicate.Pet
- func IDNEQ(id uuid.UUID) predicate.Pet
- func IDNotIn(ids ...uuid.UUID) 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 OwnerID(v int) predicate.Pet
- func OwnerIDEQ(v int) predicate.Pet
- func OwnerIDIn(vs ...int) predicate.Pet
- func OwnerIDNEQ(v int) predicate.Pet
- func OwnerIDNotIn(vs ...int) predicate.Pet
- func ValidColumn(column string) bool
- func Weight(v float64) predicate.Pet
- func WeightEQ(v float64) predicate.Pet
- func WeightGT(v float64) predicate.Pet
- func WeightGTE(v float64) predicate.Pet
- func WeightIn(vs ...float64) predicate.Pet
- func WeightLT(v float64) predicate.Pet
- func WeightLTE(v float64) predicate.Pet
- func WeightNEQ(v float64) predicate.Pet
- func WeightNotIn(vs ...float64) predicate.Pet
- type OrderOption
- func ByAge(opts ...sql.OrderTermOption) OrderOption
- func ByBestFriendField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByBestFriendID(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByOwnerID(opts ...sql.OrderTermOption) OrderOption
- func ByWeight(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" // FieldAge holds the string denoting the age field in the database. FieldAge = "age" // FieldWeight holds the string denoting the weight field in the database. FieldWeight = "weight" // FieldBestFriendID holds the string denoting the best_friend_id field in the database. FieldBestFriendID = "best_friend_id" // FieldOwnerID holds the string denoting the owner_id field in the database. FieldOwnerID = "owner_id" // EdgeBestFriend holds the string denoting the best_friend edge name in mutations. EdgeBestFriend = "best_friend" // 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" // BestFriendTable is the table that holds the best_friend relation/edge. BestFriendTable = "pets" // BestFriendColumn is the table column denoting the best_friend relation/edge. BestFriendColumn = "best_friend_id" // 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 = "owner_id" )
Variables ¶
var ( // DefaultOwnerID holds the default value on creation for the "owner_id" field. DefaultOwnerID int // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldName, FieldAge, FieldWeight, FieldBestFriendID, FieldOwnerID, }
Columns holds all SQL columns for pet fields.
Functions ¶
func BestFriendID ¶
BestFriendID applies equality check predicate on the "best_friend_id" field. It's identical to BestFriendIDEQ.
func BestFriendIDEQ ¶
BestFriendIDEQ applies the EQ predicate on the "best_friend_id" field.
func BestFriendIDIn ¶
BestFriendIDIn applies the In predicate on the "best_friend_id" field.
func BestFriendIDNEQ ¶
BestFriendIDNEQ applies the NEQ predicate on the "best_friend_id" field.
func BestFriendIDNotIn ¶
BestFriendIDNotIn applies the NotIn predicate on the "best_friend_id" field.
func HasBestFriend ¶
HasBestFriend applies the HasEdge predicate on the "best_friend" edge.
func HasBestFriendWith ¶
HasBestFriendWith applies the HasEdge predicate on the "best_friend" 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 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 OwnerID ¶
OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.
func OwnerIDNEQ ¶
OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.
func OwnerIDNotIn ¶
OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Weight ¶
Weight applies equality check predicate on the "weight" field. It's identical to WeightEQ.
func WeightNotIn ¶
WeightNotIn applies the NotIn predicate on the "weight" field.
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 ByBestFriendField ¶
func ByBestFriendField(field string, opts ...sql.OrderTermOption) OrderOption
ByBestFriendField orders the results by best_friend field.
func ByBestFriendID ¶
func ByBestFriendID(opts ...sql.OrderTermOption) OrderOption
ByBestFriendID orders the results by the best_friend_id 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 ByOwnerField ¶
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
ByOwnerField orders the results by owner field.
func ByOwnerID ¶
func ByOwnerID(opts ...sql.OrderTermOption) OrderOption
ByOwnerID orders the results by the owner_id field.
func ByWeight ¶
func ByWeight(opts ...sql.OrderTermOption) OrderOption
ByWeight orders the results by the weight field.