Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func HasBlogPosts() predicate.User
- func HasBlogPostsWith(preds ...predicate.BlogPost) predicate.User
- func HasProfilePic() predicate.User
- func HasProfilePicWith(preds ...predicate.Image) predicate.User
- func HasSkipEdge() predicate.User
- func HasSkipEdgeWith(preds ...predicate.SkipEdgeExample) 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 Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func StatusEQ(v Status) predicate.User
- func StatusIn(vs ...Status) predicate.User
- func StatusNEQ(v Status) predicate.User
- func StatusNotIn(vs ...Status) predicate.User
- func StatusValidator(s Status) error
- func Unnecessary(v string) predicate.User
- func UnnecessaryContains(v string) predicate.User
- func UnnecessaryContainsFold(v string) predicate.User
- func UnnecessaryEQ(v string) predicate.User
- func UnnecessaryEqualFold(v string) predicate.User
- func UnnecessaryGT(v string) predicate.User
- func UnnecessaryGTE(v string) predicate.User
- func UnnecessaryHasPrefix(v string) predicate.User
- func UnnecessaryHasSuffix(v string) predicate.User
- func UnnecessaryIn(vs ...string) predicate.User
- func UnnecessaryIsNil() predicate.User
- func UnnecessaryLT(v string) predicate.User
- func UnnecessaryLTE(v string) predicate.User
- func UnnecessaryNEQ(v string) predicate.User
- func UnnecessaryNotIn(vs ...string) predicate.User
- func UnnecessaryNotNil() predicate.User
- func UserName(v string) predicate.User
- func UserNameContains(v string) predicate.User
- func UserNameContainsFold(v string) predicate.User
- func UserNameEQ(v string) predicate.User
- func UserNameEqualFold(v string) predicate.User
- func UserNameGT(v string) predicate.User
- func UserNameGTE(v string) predicate.User
- func UserNameHasPrefix(v string) predicate.User
- func UserNameHasSuffix(v string) predicate.User
- func UserNameIn(vs ...string) predicate.User
- func UserNameLT(v string) predicate.User
- func UserNameLTE(v string) predicate.User
- func UserNameNEQ(v string) predicate.User
- func UserNameNotIn(vs ...string) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByBlogPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByBlogPostsCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByProfilePicField(field string, opts ...sql.OrderTermOption) OrderOption
- func BySkipEdgeField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByUnnecessary(opts ...sql.OrderTermOption) OrderOption
- func ByUserName(opts ...sql.OrderTermOption) OrderOption
- type Status
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" // FieldUserName holds the string denoting the user_name field in the database. FieldUserName = "user_name" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldUnnecessary holds the string denoting the unnecessary field in the database. FieldUnnecessary = "unnecessary" // EdgeBlogPosts holds the string denoting the blog_posts edge name in mutations. EdgeBlogPosts = "blog_posts" // EdgeProfilePic holds the string denoting the profile_pic edge name in mutations. EdgeProfilePic = "profile_pic" // EdgeSkipEdge holds the string denoting the skip_edge edge name in mutations. EdgeSkipEdge = "skip_edge" // Table holds the table name of the user in the database. Table = "users" // BlogPostsTable is the table that holds the blog_posts relation/edge. BlogPostsTable = "blog_posts" // BlogPostsInverseTable is the table name for the BlogPost entity. // It exists in this package in order to avoid circular dependency with the "blogpost" package. BlogPostsInverseTable = "blog_posts" // BlogPostsColumn is the table column denoting the blog_posts relation/edge. BlogPostsColumn = "blog_post_author" // ProfilePicTable is the table that holds the profile_pic relation/edge. ProfilePicTable = "users" // ProfilePicInverseTable is the table name for the Image entity. // It exists in this package in order to avoid circular dependency with the "image" package. ProfilePicInverseTable = "images" // ProfilePicColumn is the table column denoting the profile_pic relation/edge. ProfilePicColumn = "user_profile_pic" // SkipEdgeTable is the table that holds the skip_edge relation/edge. SkipEdgeTable = "skip_edge_examples" // SkipEdgeInverseTable is the table name for the SkipEdgeExample entity. // It exists in this package in order to avoid circular dependency with the "skipedgeexample" package. SkipEdgeInverseTable = "skip_edge_examples" // SkipEdgeColumn is the table column denoting the skip_edge relation/edge. SkipEdgeColumn = "user_skip_edge" )
Variables ¶
var Columns = []string{ FieldID, FieldUserName, FieldStatus, FieldUnnecessary, }
Columns holds all SQL columns for user fields.
var ForeignKeys = []string{
"user_profile_pic",
}
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 HasBlogPosts ¶
HasBlogPosts applies the HasEdge predicate on the "blog_posts" edge.
func HasBlogPostsWith ¶
HasBlogPostsWith applies the HasEdge predicate on the "blog_posts" edge with a given conditions (other predicates).
func HasProfilePic ¶
HasProfilePic applies the HasEdge predicate on the "profile_pic" edge.
func HasProfilePicWith ¶
HasProfilePicWith applies the HasEdge predicate on the "profile_pic" edge with a given conditions (other predicates).
func HasSkipEdge ¶ added in v0.3.0
HasSkipEdge applies the HasEdge predicate on the "skip_edge" edge.
func HasSkipEdgeWith ¶ added in v0.3.0
func HasSkipEdgeWith(preds ...predicate.SkipEdgeExample) predicate.User
HasSkipEdgeWith applies the HasEdge predicate on the "skip_edge" edge with a given conditions (other predicates).
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func Unnecessary ¶ added in v0.3.0
Unnecessary applies equality check predicate on the "unnecessary" field. It's identical to UnnecessaryEQ.
func UnnecessaryContains ¶ added in v0.3.0
UnnecessaryContains applies the Contains predicate on the "unnecessary" field.
func UnnecessaryContainsFold ¶ added in v0.3.0
UnnecessaryContainsFold applies the ContainsFold predicate on the "unnecessary" field.
func UnnecessaryEQ ¶ added in v0.3.0
UnnecessaryEQ applies the EQ predicate on the "unnecessary" field.
func UnnecessaryEqualFold ¶ added in v0.3.0
UnnecessaryEqualFold applies the EqualFold predicate on the "unnecessary" field.
func UnnecessaryGT ¶ added in v0.3.0
UnnecessaryGT applies the GT predicate on the "unnecessary" field.
func UnnecessaryGTE ¶ added in v0.3.0
UnnecessaryGTE applies the GTE predicate on the "unnecessary" field.
func UnnecessaryHasPrefix ¶ added in v0.3.0
UnnecessaryHasPrefix applies the HasPrefix predicate on the "unnecessary" field.
func UnnecessaryHasSuffix ¶ added in v0.3.0
UnnecessaryHasSuffix applies the HasSuffix predicate on the "unnecessary" field.
func UnnecessaryIn ¶ added in v0.3.0
UnnecessaryIn applies the In predicate on the "unnecessary" field.
func UnnecessaryIsNil ¶ added in v0.3.0
UnnecessaryIsNil applies the IsNil predicate on the "unnecessary" field.
func UnnecessaryLT ¶ added in v0.3.0
UnnecessaryLT applies the LT predicate on the "unnecessary" field.
func UnnecessaryLTE ¶ added in v0.3.0
UnnecessaryLTE applies the LTE predicate on the "unnecessary" field.
func UnnecessaryNEQ ¶ added in v0.3.0
UnnecessaryNEQ applies the NEQ predicate on the "unnecessary" field.
func UnnecessaryNotIn ¶ added in v0.3.0
UnnecessaryNotIn applies the NotIn predicate on the "unnecessary" field.
func UnnecessaryNotNil ¶ added in v0.3.0
UnnecessaryNotNil applies the NotNil predicate on the "unnecessary" field.
func UserName ¶
UserName applies equality check predicate on the "user_name" field. It's identical to UserNameEQ.
func UserNameContains ¶
UserNameContains applies the Contains predicate on the "user_name" field.
func UserNameContainsFold ¶
UserNameContainsFold applies the ContainsFold predicate on the "user_name" field.
func UserNameEQ ¶
UserNameEQ applies the EQ predicate on the "user_name" field.
func UserNameEqualFold ¶
UserNameEqualFold applies the EqualFold predicate on the "user_name" field.
func UserNameGT ¶
UserNameGT applies the GT predicate on the "user_name" field.
func UserNameGTE ¶
UserNameGTE applies the GTE predicate on the "user_name" field.
func UserNameHasPrefix ¶
UserNameHasPrefix applies the HasPrefix predicate on the "user_name" field.
func UserNameHasSuffix ¶
UserNameHasSuffix applies the HasSuffix predicate on the "user_name" field.
func UserNameIn ¶
UserNameIn applies the In predicate on the "user_name" field.
func UserNameLT ¶
UserNameLT applies the LT predicate on the "user_name" field.
func UserNameLTE ¶
UserNameLTE applies the LTE predicate on the "user_name" field.
func UserNameNEQ ¶
UserNameNEQ applies the NEQ predicate on the "user_name" field.
func UserNameNotIn ¶
UserNameNotIn applies the NotIn predicate on the "user_name" 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 User queries.
func ByBlogPosts ¶ added in v0.4.0
func ByBlogPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByBlogPosts orders the results by blog_posts terms.
func ByBlogPostsCount ¶ added in v0.4.0
func ByBlogPostsCount(opts ...sql.OrderTermOption) OrderOption
ByBlogPostsCount orders the results by blog_posts count.
func ByID ¶ added in v0.4.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByProfilePicField ¶ added in v0.4.0
func ByProfilePicField(field string, opts ...sql.OrderTermOption) OrderOption
ByProfilePicField orders the results by profile_pic field.
func BySkipEdgeField ¶ added in v0.4.0
func BySkipEdgeField(field string, opts ...sql.OrderTermOption) OrderOption
BySkipEdgeField orders the results by skip_edge field.
func ByStatus ¶ added in v0.4.0
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByUnnecessary ¶ added in v0.4.0
func ByUnnecessary(opts ...sql.OrderTermOption) OrderOption
ByUnnecessary orders the results by the unnecessary field.
func ByUserName ¶ added in v0.4.0
func ByUserName(opts ...sql.OrderTermOption) OrderOption
ByUserName orders the results by the user_name field.