Documentation
¶
Index ¶
- Constants
- Variables
- func Age(v int) predicate.User
- func AgeEQ(v int) predicate.User
- func AgeGT(v int) predicate.User
- func AgeGTE(v int) predicate.User
- func AgeIn(vs ...int) predicate.User
- func AgeIsNil() predicate.User
- func AgeLT(v int) predicate.User
- func AgeLTE(v int) predicate.User
- func AgeNEQ(v int) predicate.User
- func AgeNotIn(vs ...int) predicate.User
- func AgeNotNil() predicate.User
- func And(predicates ...predicate.User) predicate.User
- func Created(v time.Time) predicate.User
- func CreatedEQ(v time.Time) predicate.User
- func CreatedGT(v time.Time) predicate.User
- func CreatedGTE(v time.Time) predicate.User
- func CreatedIn(vs ...time.Time) predicate.User
- func CreatedLT(v time.Time) predicate.User
- func CreatedLTE(v time.Time) predicate.User
- func CreatedNEQ(v time.Time) predicate.User
- func CreatedNotIn(vs ...time.Time) predicate.User
- func Email(v string) predicate.User
- func EmailContains(v string) predicate.User
- func EmailContainsFold(v string) predicate.User
- func EmailEQ(v string) predicate.User
- func EmailEqualFold(v string) predicate.User
- func EmailGT(v string) predicate.User
- func EmailGTE(v string) predicate.User
- func EmailHasPrefix(v string) predicate.User
- func EmailHasSuffix(v string) predicate.User
- func EmailIn(vs ...string) predicate.User
- func EmailLT(v string) predicate.User
- func EmailLTE(v string) predicate.User
- func EmailNEQ(v string) predicate.User
- func EmailNotIn(vs ...string) predicate.User
- func HasCars() predicate.User
- func HasCarsWith(preds ...predicate.Car) predicate.User
- func HasParent() predicate.User
- func HasParentWith(preds ...predicate.User) predicate.User
- func HasPets() predicate.User
- func HasPetsWith(preds ...predicate.Pet) predicate.User
- func HasPosts() predicate.User
- func HasPostsWith(preds ...predicate.Post) predicate.User
- func ID(id int) predicate.User
- func IDEQ(id int) predicate.User
- func IDGT(id int) predicate.User
- func IDGTE(id int) predicate.User
- func IDIn(ids ...int) predicate.User
- func IDLT(id int) predicate.User
- func IDLTE(id int) predicate.User
- func IDNEQ(id int) predicate.User
- func IDNotIn(ids ...int) predicate.User
- func Name(v string) predicate.User
- func NameContains(v string) predicate.User
- func NameContainsFold(v string) predicate.User
- func NameEQ(v string) predicate.User
- func NameEqualFold(v string) predicate.User
- func NameGT(v string) predicate.User
- func NameGTE(v string) predicate.User
- func NameHasPrefix(v string) predicate.User
- func NameHasSuffix(v string) predicate.User
- func NameIn(vs ...string) predicate.User
- func NameLT(v string) predicate.User
- func NameLTE(v string) predicate.User
- func NameNEQ(v string) predicate.User
- func NameNotIn(vs ...string) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func Role(v int8) predicate.User
- func RoleEQ(v int8) predicate.User
- func RoleGT(v int8) predicate.User
- func RoleGTE(v int8) predicate.User
- func RoleIn(vs ...int8) predicate.User
- func RoleLT(v int8) predicate.User
- func RoleLTE(v int8) predicate.User
- func RoleNEQ(v int8) predicate.User
- func RoleNotIn(vs ...int8) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByAge(opts ...sql.OrderTermOption) OrderOption
- func ByCars(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCarsCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreated(opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPetsCount(opts ...sql.OrderTermOption) OrderOption
- func ByPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPostsCount(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
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 = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // FieldCreated holds the string denoting the created field in the database. FieldCreated = "created" // FieldAge holds the string denoting the age field in the database. FieldAge = "age" // EdgePets holds the string denoting the pets edge name in mutations. EdgePets = "pets" // EdgePosts holds the string denoting the posts edge name in mutations. EdgePosts = "posts" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // EdgeCars holds the string denoting the cars edge name in mutations. EdgeCars = "cars" // Table holds the table name of the user in the database. Table = "users" // PetsTable is the table that holds the pets relation/edge. PetsTable = "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" // PetsColumn is the table column denoting the pets relation/edge. PetsColumn = "user_pets" // PostsTable is the table that holds the posts relation/edge. PostsTable = "posts" // PostsInverseTable is the table name for the Post entity. // It exists in this package in order to avoid circular dependency with the "post" package. PostsInverseTable = "posts" // PostsColumn is the table column denoting the posts relation/edge. PostsColumn = "user_posts" // ParentTable is the table that holds the parent relation/edge. ParentTable = "users" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "user_parent" // CarsTable is the table that holds the cars relation/edge. CarsTable = "cars" // CarsInverseTable is the table name for the Car entity. // It exists in this package in order to avoid circular dependency with the "car" package. CarsInverseTable = "cars" // CarsColumn is the table column denoting the cars relation/edge. CarsColumn = "user_cars" )
Variables ¶
var ( // DefaultCreated holds the default value on creation for the "created" field. DefaultCreated func() time.Time // 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, FieldEmail, FieldRole, FieldCreated, FieldAge, }
Columns holds all SQL columns for user fields.
var ForeignKeys = []string{
"user_parent",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "users" table and are not defined as standalone fields in the schema.
Functions ¶
func Created ¶
Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.
func CreatedGTE ¶
CreatedGTE applies the GTE predicate on the "created" field.
func CreatedLTE ¶
CreatedLTE applies the LTE predicate on the "created" field.
func CreatedNEQ ¶
CreatedNEQ applies the NEQ predicate on the "created" field.
func CreatedNotIn ¶
CreatedNotIn applies the NotIn predicate on the "created" field.
func Email ¶
Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
func EmailContains ¶
EmailContains applies the Contains predicate on the "email" field.
func EmailContainsFold ¶
EmailContainsFold applies the ContainsFold predicate on the "email" field.
func EmailEqualFold ¶
EmailEqualFold applies the EqualFold predicate on the "email" field.
func EmailHasPrefix ¶
EmailHasPrefix applies the HasPrefix predicate on the "email" field.
func EmailHasSuffix ¶
EmailHasSuffix applies the HasSuffix predicate on the "email" field.
func EmailNotIn ¶
EmailNotIn applies the NotIn predicate on the "email" field.
func HasCarsWith ¶
HasCarsWith applies the HasEdge predicate on the "cars" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
func HasPetsWith ¶
HasPetsWith applies the HasEdge predicate on the "pets" edge with a given conditions (other predicates).
func HasPostsWith ¶
HasPostsWith applies the HasEdge predicate on the "posts" 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 User queries.
func ByAge ¶
func ByAge(opts ...sql.OrderTermOption) OrderOption
ByAge orders the results by the age field.
func ByCars ¶
func ByCars(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByCars orders the results by cars terms.
func ByCarsCount ¶
func ByCarsCount(opts ...sql.OrderTermOption) OrderOption
ByCarsCount orders the results by cars count.
func ByCreated ¶
func ByCreated(opts ...sql.OrderTermOption) OrderOption
ByCreated orders the results by the created field.
func ByEmail ¶
func ByEmail(opts ...sql.OrderTermOption) OrderOption
ByEmail orders the results by the email 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 ByParentField ¶
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
ByParentField orders the results by parent field.
func ByPets ¶
func ByPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByPets orders the results by pets terms.
func ByPetsCount ¶
func ByPetsCount(opts ...sql.OrderTermOption) OrderOption
ByPetsCount orders the results by pets count.
func ByPosts ¶
func ByPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByPosts orders the results by posts terms.
func ByPostsCount ¶
func ByPostsCount(opts ...sql.OrderTermOption) OrderOption
ByPostsCount orders the results by posts count.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.