Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func HasCar() predicate.User
- func HasCarWith(preds ...predicate.Car) predicate.User
- func HasDept() predicate.User
- func HasDeptWith(preds ...predicate.Dept) predicate.User
- func ID(id string) predicate.User
- func IDEQ(id string) predicate.User
- func IDGT(id string) predicate.User
- func IDGTE(id string) predicate.User
- func IDIn(ids ...string) predicate.User
- func IDLT(id string) predicate.User
- func IDLTE(id string) predicate.User
- func IDNEQ(id string) predicate.User
- func IDNotIn(ids ...string) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func Phone(v string) predicate.User
- func PhoneContains(v string) predicate.User
- func PhoneContainsFold(v string) predicate.User
- func PhoneEQ(v string) predicate.User
- func PhoneEqualFold(v string) predicate.User
- func PhoneGT(v string) predicate.User
- func PhoneGTE(v string) predicate.User
- func PhoneHasPrefix(v string) predicate.User
- func PhoneHasSuffix(v string) predicate.User
- func PhoneIn(vs ...string) predicate.User
- func PhoneIsNil() predicate.User
- func PhoneLT(v string) predicate.User
- func PhoneLTE(v string) predicate.User
- func PhoneNEQ(v string) predicate.User
- func PhoneNotIn(vs ...string) predicate.User
- func PhoneNotNil() predicate.User
- func RaceEQ(v Race) predicate.User
- func RaceIn(vs ...Race) predicate.User
- func RaceNEQ(v Race) predicate.User
- func RaceNotIn(vs ...Race) predicate.User
- func RaceValidator(r Race) error
- func ValidColumn(column string) bool
- type Race
Constants ¶
const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. FieldID = "user_id" // FieldPhone holds the string denoting the phone field in the database. FieldPhone = "phone" // FieldRace holds the string denoting the race field in the database. FieldRace = "race" // EdgeCar holds the string denoting the car edge name in mutations. EdgeCar = "car" // EdgeDept holds the string denoting the dept edge name in mutations. EdgeDept = "dept" // CarFieldID holds the string denoting the ID field of the Car. CarFieldID = "car_id" // DeptFieldID holds the string denoting the ID field of the Dept. DeptFieldID = "dept_id" // Table holds the table name of the user in the database. Table = "users" // CarTable is the table that holds the car relation/edge. CarTable = "cars" // CarInverseTable is the table name for the Car entity. // It exists in this package in order to avoid circular dependency with the "car" package. CarInverseTable = "cars" // CarColumn is the table column denoting the car relation/edge. CarColumn = "user_id" // DeptTable is the table that holds the dept relation/edge. The primary key declared below. DeptTable = "dept_user" // DeptInverseTable is the table name for the Dept entity. // It exists in this package in order to avoid circular dependency with the "dept" package. DeptInverseTable = "depts" )
Variables ¶
var ( // PhoneValidator is a validator for the "phone" field. It is called by the builders before save. PhoneValidator func(string) error // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
var Columns = []string{ FieldID, FieldPhone, FieldRace, }
Columns holds all SQL columns for user fields.
var ( // DeptPrimaryKey and DeptColumn2 are the table columns denoting the // primary key for the dept relation (M2M). DeptPrimaryKey = []string{"dept_id", "user_id"} )
Functions ¶
func HasCarWith ¶
HasCarWith applies the HasEdge predicate on the "car" edge with a given conditions (other predicates).
func HasDeptWith ¶
HasDeptWith applies the HasEdge predicate on the "dept" edge with a given conditions (other predicates).
func Phone ¶
Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ.
func PhoneContains ¶
PhoneContains applies the Contains predicate on the "phone" field.
func PhoneContainsFold ¶
PhoneContainsFold applies the ContainsFold predicate on the "phone" field.
func PhoneEqualFold ¶
PhoneEqualFold applies the EqualFold predicate on the "phone" field.
func PhoneHasPrefix ¶
PhoneHasPrefix applies the HasPrefix predicate on the "phone" field.
func PhoneHasSuffix ¶
PhoneHasSuffix applies the HasSuffix predicate on the "phone" field.
func PhoneIsNil ¶
PhoneIsNil applies the IsNil predicate on the "phone" field.
func PhoneNotIn ¶
PhoneNotIn applies the NotIn predicate on the "phone" field.
func PhoneNotNil ¶
PhoneNotNil applies the NotNil predicate on the "phone" field.
func RaceValidator ¶
RaceValidator is a validator for the "race" field enum values. It is called by the builders before save.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).