Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func CreatedAt(v time.Time) predicate.User
- func CreatedAtEQ(v time.Time) predicate.User
- func CreatedAtGT(v time.Time) predicate.User
- func CreatedAtGTE(v time.Time) predicate.User
- func CreatedAtIn(vs ...time.Time) predicate.User
- func CreatedAtLT(v time.Time) predicate.User
- func CreatedAtLTE(v time.Time) predicate.User
- func CreatedAtNEQ(v time.Time) predicate.User
- func CreatedAtNotIn(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 HasAnswers() predicate.User
- func HasAnswersWith(preds ...predicate.Answer) predicate.User
- func HasQuestions() predicate.User
- func HasQuestionsWith(preds ...predicate.Question) predicate.User
- func HasTags() predicate.User
- func HasTagsWith(preds ...predicate.Tag) 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 Password(v string) predicate.User
- func PasswordContains(v string) predicate.User
- func PasswordContainsFold(v string) predicate.User
- func PasswordEQ(v string) predicate.User
- func PasswordEqualFold(v string) predicate.User
- func PasswordGT(v string) predicate.User
- func PasswordGTE(v string) predicate.User
- func PasswordHasPrefix(v string) predicate.User
- func PasswordHasSuffix(v string) predicate.User
- func PasswordIn(vs ...string) predicate.User
- func PasswordLT(v string) predicate.User
- func PasswordLTE(v string) predicate.User
- func PasswordNEQ(v string) predicate.User
- func PasswordNotIn(vs ...string) predicate.User
- func Superuser(v bool) predicate.User
- func SuperuserEQ(v bool) predicate.User
- func SuperuserNEQ(v bool) 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 ByAnswers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAnswersCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByQuestions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByQuestionsCount(opts ...sql.OrderTermOption) OrderOption
- func BySuperuser(opts ...sql.OrderTermOption) OrderOption
- func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
- func ByUsername(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" // FieldUsername holds the string denoting the username field in the database. FieldUsername = "username" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldSuperuser holds the string denoting the superuser field in the database. FieldSuperuser = "superuser" // EdgeQuestions holds the string denoting the questions edge name in mutations. EdgeQuestions = "questions" // EdgeAnswers holds the string denoting the answers edge name in mutations. EdgeAnswers = "answers" // EdgeTags holds the string denoting the tags edge name in mutations. EdgeTags = "tags" // Table holds the table name of the user in the database. Table = "users" // QuestionsTable is the table that holds the questions relation/edge. QuestionsTable = "questions" // QuestionsInverseTable is the table name for the Question entity. // It exists in this package in order to avoid circular dependency with the "question" package. QuestionsInverseTable = "questions" // QuestionsColumn is the table column denoting the questions relation/edge. QuestionsColumn = "user_questions" // AnswersTable is the table that holds the answers relation/edge. AnswersTable = "answers" // AnswersInverseTable is the table name for the Answer entity. // It exists in this package in order to avoid circular dependency with the "answer" package. AnswersInverseTable = "answers" // AnswersColumn is the table column denoting the answers relation/edge. AnswersColumn = "user_answers" // TagsTable is the table that holds the tags relation/edge. TagsTable = "tags" // TagsInverseTable is the table name for the Tag entity. // It exists in this package in order to avoid circular dependency with the "tag" package. TagsInverseTable = "tags" // TagsColumn is the table column denoting the tags relation/edge. TagsColumn = "user_tags" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultSuperuser holds the default value on creation for the "superuser" field. DefaultSuperuser bool )
var Columns = []string{ FieldID, FieldUsername, FieldEmail, FieldPassword, FieldCreatedAt, FieldSuperuser, }
Columns holds all SQL columns for user fields.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" 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 HasAnswers ¶
HasAnswers applies the HasEdge predicate on the "answers" edge.
func HasAnswersWith ¶
HasAnswersWith applies the HasEdge predicate on the "answers" edge with a given conditions (other predicates).
func HasQuestions ¶
HasQuestions applies the HasEdge predicate on the "questions" edge.
func HasQuestionsWith ¶
HasQuestionsWith applies the HasEdge predicate on the "questions" edge with a given conditions (other predicates).
func HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
func Password ¶
Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func PasswordContains ¶
PasswordContains applies the Contains predicate on the "password" field.
func PasswordContainsFold ¶
PasswordContainsFold applies the ContainsFold predicate on the "password" field.
func PasswordEQ ¶
PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEqualFold ¶
PasswordEqualFold applies the EqualFold predicate on the "password" field.
func PasswordGT ¶
PasswordGT applies the GT predicate on the "password" field.
func PasswordGTE ¶
PasswordGTE applies the GTE predicate on the "password" field.
func PasswordHasPrefix ¶
PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
func PasswordHasSuffix ¶
PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
func PasswordIn ¶
PasswordIn applies the In predicate on the "password" field.
func PasswordLT ¶
PasswordLT applies the LT predicate on the "password" field.
func PasswordLTE ¶
PasswordLTE applies the LTE predicate on the "password" field.
func PasswordNEQ ¶
PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNotIn ¶
PasswordNotIn applies the NotIn predicate on the "password" field.
func Superuser ¶
Superuser applies equality check predicate on the "superuser" field. It's identical to SuperuserEQ.
func SuperuserEQ ¶
SuperuserEQ applies the EQ predicate on the "superuser" field.
func SuperuserNEQ ¶
SuperuserNEQ applies the NEQ predicate on the "superuser" field.
func Username ¶
Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
func UsernameContains ¶
UsernameContains applies the Contains predicate on the "username" field.
func UsernameContainsFold ¶
UsernameContainsFold applies the ContainsFold predicate on the "username" field.
func UsernameEQ ¶
UsernameEQ applies the EQ predicate on the "username" field.
func UsernameEqualFold ¶
UsernameEqualFold applies the EqualFold predicate on the "username" field.
func UsernameGT ¶
UsernameGT applies the GT predicate on the "username" field.
func UsernameGTE ¶
UsernameGTE applies the GTE predicate on the "username" field.
func UsernameHasPrefix ¶
UsernameHasPrefix applies the HasPrefix predicate on the "username" field.
func UsernameHasSuffix ¶
UsernameHasSuffix applies the HasSuffix predicate on the "username" field.
func UsernameIn ¶
UsernameIn applies the In predicate on the "username" field.
func UsernameLT ¶
UsernameLT applies the LT predicate on the "username" field.
func UsernameLTE ¶
UsernameLTE applies the LTE predicate on the "username" field.
func UsernameNEQ ¶
UsernameNEQ applies the NEQ predicate on the "username" field.
func UsernameNotIn ¶
UsernameNotIn applies the NotIn predicate on the "username" 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 ByAnswers ¶
func ByAnswers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAnswers orders the results by answers terms.
func ByAnswersCount ¶
func ByAnswersCount(opts ...sql.OrderTermOption) OrderOption
ByAnswersCount orders the results by answers count.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at 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 ByPassword ¶
func ByPassword(opts ...sql.OrderTermOption) OrderOption
ByPassword orders the results by the password field.
func ByQuestions ¶
func ByQuestions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByQuestions orders the results by questions terms.
func ByQuestionsCount ¶
func ByQuestionsCount(opts ...sql.OrderTermOption) OrderOption
ByQuestionsCount orders the results by questions count.
func BySuperuser ¶
func BySuperuser(opts ...sql.OrderTermOption) OrderOption
BySuperuser orders the results by the superuser field.
func ByTags ¶
func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTags orders the results by tags terms.
func ByTagsCount ¶
func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
ByTagsCount orders the results by tags count.
func ByUsername ¶
func ByUsername(opts ...sql.OrderTermOption) OrderOption
ByUsername orders the results by the username field.