Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Category) predicate.Category
- func HasPets() predicate.Category
- func HasPetsWith(preds ...predicate.Pet) predicate.Category
- func ID(id int) predicate.Category
- func IDEQ(id int) predicate.Category
- func IDGT(id int) predicate.Category
- func IDGTE(id int) predicate.Category
- func IDIn(ids ...int) predicate.Category
- func IDLT(id int) predicate.Category
- func IDLTE(id int) predicate.Category
- func IDNEQ(id int) predicate.Category
- func IDNotIn(ids ...int) predicate.Category
- func Name(v string) predicate.Category
- func NameContains(v string) predicate.Category
- func NameContainsFold(v string) predicate.Category
- func NameEQ(v string) predicate.Category
- func NameEqualFold(v string) predicate.Category
- func NameGT(v string) predicate.Category
- func NameGTE(v string) predicate.Category
- func NameHasPrefix(v string) predicate.Category
- func NameHasSuffix(v string) predicate.Category
- func NameIn(vs ...string) predicate.Category
- func NameLT(v string) predicate.Category
- func NameLTE(v string) predicate.Category
- func NameNEQ(v string) predicate.Category
- func NameNotIn(vs ...string) predicate.Category
- func Not(p predicate.Category) predicate.Category
- func Or(predicates ...predicate.Category) predicate.Category
- func Readonly(v string) predicate.Category
- func ReadonlyContains(v string) predicate.Category
- func ReadonlyContainsFold(v string) predicate.Category
- func ReadonlyEQ(v string) predicate.Category
- func ReadonlyEqualFold(v string) predicate.Category
- func ReadonlyGT(v string) predicate.Category
- func ReadonlyGTE(v string) predicate.Category
- func ReadonlyHasPrefix(v string) predicate.Category
- func ReadonlyHasSuffix(v string) predicate.Category
- func ReadonlyIn(vs ...string) predicate.Category
- func ReadonlyLT(v string) predicate.Category
- func ReadonlyLTE(v string) predicate.Category
- func ReadonlyNEQ(v string) predicate.Category
- func ReadonlyNotIn(vs ...string) predicate.Category
- func SkipInSpec(v string) predicate.Category
- func SkipInSpecContains(v string) predicate.Category
- func SkipInSpecContainsFold(v string) predicate.Category
- func SkipInSpecEQ(v string) predicate.Category
- func SkipInSpecEqualFold(v string) predicate.Category
- func SkipInSpecGT(v string) predicate.Category
- func SkipInSpecGTE(v string) predicate.Category
- func SkipInSpecHasPrefix(v string) predicate.Category
- func SkipInSpecHasSuffix(v string) predicate.Category
- func SkipInSpecIn(vs ...string) predicate.Category
- func SkipInSpecLT(v string) predicate.Category
- func SkipInSpecLTE(v string) predicate.Category
- func SkipInSpecNEQ(v string) predicate.Category
- func SkipInSpecNotIn(vs ...string) predicate.Category
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPetsCount(opts ...sql.OrderTermOption) OrderOption
- func ByReadonly(opts ...sql.OrderTermOption) OrderOption
- func BySkipInSpec(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the category type in the database. Label = "category" // 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" // FieldReadonly holds the string denoting the readonly field in the database. FieldReadonly = "readonly" // FieldSkipInSpec holds the string denoting the skip_in_spec field in the database. FieldSkipInSpec = "skip_in_spec" // EdgePets holds the string denoting the pets edge name in mutations. EdgePets = "pets" // Table holds the table name of the category in the database. Table = "categories" // PetsTable is the table that holds the pets relation/edge. The primary key declared below. PetsTable = "category_pets" // PetsInverseTable is the table name for the Pet entity. // It exists in this package in order to avoid circular dependency with the "pet" package. PetsInverseTable = "pets" )
Variables ¶
var Columns = []string{ FieldID, FieldName, FieldReadonly, FieldSkipInSpec, }
Columns holds all SQL columns for category fields.
var ( // PetsPrimaryKey and PetsColumn2 are the table columns denoting the // primary key for the pets relation (M2M). PetsPrimaryKey = []string{"category_id", "pet_id"} )
Functions ¶
func HasPetsWith ¶
HasPetsWith applies the HasEdge predicate on the "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 Readonly ¶ added in v0.3.0
Readonly applies equality check predicate on the "readonly" field. It's identical to ReadonlyEQ.
func ReadonlyContains ¶ added in v0.3.0
ReadonlyContains applies the Contains predicate on the "readonly" field.
func ReadonlyContainsFold ¶ added in v0.3.0
ReadonlyContainsFold applies the ContainsFold predicate on the "readonly" field.
func ReadonlyEQ ¶ added in v0.3.0
ReadonlyEQ applies the EQ predicate on the "readonly" field.
func ReadonlyEqualFold ¶ added in v0.3.0
ReadonlyEqualFold applies the EqualFold predicate on the "readonly" field.
func ReadonlyGT ¶ added in v0.3.0
ReadonlyGT applies the GT predicate on the "readonly" field.
func ReadonlyGTE ¶ added in v0.3.0
ReadonlyGTE applies the GTE predicate on the "readonly" field.
func ReadonlyHasPrefix ¶ added in v0.3.0
ReadonlyHasPrefix applies the HasPrefix predicate on the "readonly" field.
func ReadonlyHasSuffix ¶ added in v0.3.0
ReadonlyHasSuffix applies the HasSuffix predicate on the "readonly" field.
func ReadonlyIn ¶ added in v0.3.0
ReadonlyIn applies the In predicate on the "readonly" field.
func ReadonlyLT ¶ added in v0.3.0
ReadonlyLT applies the LT predicate on the "readonly" field.
func ReadonlyLTE ¶ added in v0.3.0
ReadonlyLTE applies the LTE predicate on the "readonly" field.
func ReadonlyNEQ ¶ added in v0.3.0
ReadonlyNEQ applies the NEQ predicate on the "readonly" field.
func ReadonlyNotIn ¶ added in v0.3.0
ReadonlyNotIn applies the NotIn predicate on the "readonly" field.
func SkipInSpec ¶ added in v0.3.1
SkipInSpec applies equality check predicate on the "skip_in_spec" field. It's identical to SkipInSpecEQ.
func SkipInSpecContains ¶ added in v0.3.1
SkipInSpecContains applies the Contains predicate on the "skip_in_spec" field.
func SkipInSpecContainsFold ¶ added in v0.3.1
SkipInSpecContainsFold applies the ContainsFold predicate on the "skip_in_spec" field.
func SkipInSpecEQ ¶ added in v0.3.1
SkipInSpecEQ applies the EQ predicate on the "skip_in_spec" field.
func SkipInSpecEqualFold ¶ added in v0.3.1
SkipInSpecEqualFold applies the EqualFold predicate on the "skip_in_spec" field.
func SkipInSpecGT ¶ added in v0.3.1
SkipInSpecGT applies the GT predicate on the "skip_in_spec" field.
func SkipInSpecGTE ¶ added in v0.3.1
SkipInSpecGTE applies the GTE predicate on the "skip_in_spec" field.
func SkipInSpecHasPrefix ¶ added in v0.3.1
SkipInSpecHasPrefix applies the HasPrefix predicate on the "skip_in_spec" field.
func SkipInSpecHasSuffix ¶ added in v0.3.1
SkipInSpecHasSuffix applies the HasSuffix predicate on the "skip_in_spec" field.
func SkipInSpecIn ¶ added in v0.3.1
SkipInSpecIn applies the In predicate on the "skip_in_spec" field.
func SkipInSpecLT ¶ added in v0.3.1
SkipInSpecLT applies the LT predicate on the "skip_in_spec" field.
func SkipInSpecLTE ¶ added in v0.3.1
SkipInSpecLTE applies the LTE predicate on the "skip_in_spec" field.
func SkipInSpecNEQ ¶ added in v0.3.1
SkipInSpecNEQ applies the NEQ predicate on the "skip_in_spec" field.
func SkipInSpecNotIn ¶ added in v0.3.1
SkipInSpecNotIn applies the NotIn predicate on the "skip_in_spec" field.
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 Category queries.
func ByID ¶ added in v0.4.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶ added in v0.4.0
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByPets ¶ added in v0.4.0
func ByPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByPets orders the results by pets terms.
func ByPetsCount ¶ added in v0.4.0
func ByPetsCount(opts ...sql.OrderTermOption) OrderOption
ByPetsCount orders the results by pets count.
func ByReadonly ¶ added in v0.4.0
func ByReadonly(opts ...sql.OrderTermOption) OrderOption
ByReadonly orders the results by the readonly field.
func BySkipInSpec ¶ added in v0.4.0
func BySkipInSpec(opts ...sql.OrderTermOption) OrderOption
BySkipInSpec orders the results by the skip_in_spec field.