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 AgeIsNil() 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 AgeNotNil() predicate.Pet
- func And(predicates ...predicate.Pet) predicate.Pet
- func HasCategories() predicate.Pet
- func HasCategoriesWith(preds ...predicate.Category) predicate.Pet
- func HasFriends() predicate.Pet
- func HasFriendsWith(preds ...predicate.Pet) 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 NicknamesIsNil() predicate.Pet
- func NicknamesNotNil() predicate.Pet
- func Not(p predicate.Pet) predicate.Pet
- func Or(predicates ...predicate.Pet) predicate.Pet
- func ValidColumn(column string) bool
- type Order
- func ByAge(opts ...sql.OrderTermOption) Order
- func ByCategories(term sql.OrderTerm, terms ...sql.OrderTerm) Order
- func ByCategoriesCount(opts ...sql.OrderTermOption) Order
- func ByFriends(term sql.OrderTerm, terms ...sql.OrderTerm) Order
- func ByFriendsCount(opts ...sql.OrderTermOption) Order
- func ByID(opts ...sql.OrderTermOption) Order
- func ByName(opts ...sql.OrderTermOption) Order
- func ByOwnerField(field string, opts ...sql.OrderTermOption) Order
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" // FieldNicknames holds the string denoting the nicknames field in the database. FieldNicknames = "nicknames" // FieldAge holds the string denoting the age field in the database. FieldAge = "age" // EdgeCategories holds the string denoting the categories edge name in mutations. EdgeCategories = "categories" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // EdgeFriends holds the string denoting the friends edge name in mutations. EdgeFriends = "friends" // Table holds the table name of the pet in the database. Table = "pets" // CategoriesTable is the table that holds the categories relation/edge. The primary key declared below. CategoriesTable = "category_pets" // CategoriesInverseTable is the table name for the Category entity. // It exists in this package in order to avoid circular dependency with the "category" package. CategoriesInverseTable = "categories" // 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_pets" // FriendsTable is the table that holds the friends relation/edge. The primary key declared below. FriendsTable = "pet_friends" )
Variables ¶
var ( // CategoriesPrimaryKey and CategoriesColumn2 are the table columns denoting the // primary key for the categories relation (M2M). CategoriesPrimaryKey = []string{"category_id", "pet_id"} // FriendsPrimaryKey and FriendsColumn2 are the table columns denoting the // primary key for the friends relation (M2M). FriendsPrimaryKey = []string{"pet_id", "friend_id"} )
var Columns = []string{ FieldID, FieldName, FieldNicknames, FieldAge, }
Columns holds all SQL columns for pet fields.
var ForeignKeys = []string{
"user_pets",
}
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 HasCategories ¶
HasCategories applies the HasEdge predicate on the "categories" edge.
func HasCategoriesWith ¶
HasCategoriesWith applies the HasEdge predicate on the "categories" edge with a given conditions (other predicates).
func HasFriends ¶
HasFriends applies the HasEdge predicate on the "friends" edge.
func HasFriendsWith ¶
HasFriendsWith applies the HasEdge predicate on the "friends" 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 NicknamesIsNil ¶
NicknamesIsNil applies the IsNil predicate on the "nicknames" field.
func NicknamesNotNil ¶
NicknamesNotNil applies the NotNil predicate on the "nicknames" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type Order ¶ added in v0.4.0
Order defines the ordering method for the Pet queries.
func ByAge ¶ added in v0.4.0
func ByAge(opts ...sql.OrderTermOption) Order
ByAge orders the results by the age field.
func ByCategories ¶ added in v0.4.0
ByCategories orders the results by categories terms.
func ByCategoriesCount ¶ added in v0.4.0
func ByCategoriesCount(opts ...sql.OrderTermOption) Order
ByCategoriesCount orders the results by categories count.
func ByFriendsCount ¶ added in v0.4.0
func ByFriendsCount(opts ...sql.OrderTermOption) Order
ByFriendsCount orders the results by friends count.
func ByID ¶ added in v0.4.0
func ByID(opts ...sql.OrderTermOption) Order
ByID orders the results by the id field.
func ByName ¶ added in v0.4.0
func ByName(opts ...sql.OrderTermOption) Order
ByName orders the results by the name field.
func ByOwnerField ¶ added in v0.4.0
func ByOwnerField(field string, opts ...sql.OrderTermOption) Order
ByOwnerField orders the results by owner field.