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 HasMemberships() predicate.User
- func HasMembershipsWith(preds ...predicate.Membership) predicate.User
- func ID(id uuid.UUID) predicate.User
- func IDEQ(id uuid.UUID) predicate.User
- func IDGT(id uuid.UUID) predicate.User
- func IDGTE(id uuid.UUID) predicate.User
- func IDIn(ids ...uuid.UUID) predicate.User
- func IDLT(id uuid.UUID) predicate.User
- func IDLTE(id uuid.UUID) predicate.User
- func IDNEQ(id uuid.UUID) predicate.User
- func IDNotIn(ids ...uuid.UUID) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMemberships(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByMembershipsCount(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" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeMemberships holds the string denoting the memberships edge name in mutations. EdgeMemberships = "memberships" // Table holds the table name of the user in the database. Table = "users" // MembershipsTable is the table that holds the memberships relation/edge. MembershipsTable = "memberships" // MembershipsInverseTable is the table name for the Membership entity. // It exists in this package in order to avoid circular dependency with the "membership" package. MembershipsInverseTable = "memberships" // MembershipsColumn is the table column denoting the memberships relation/edge. MembershipsColumn = "user_memberships" )
Variables ¶
var ( // EmailValidator is a validator for the "email" field. It is called by the builders before save. EmailValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldEmail, FieldCreatedAt, }
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 HasMemberships ¶
HasMemberships applies the HasEdge predicate on the "memberships" edge.
func HasMembershipsWith ¶
func HasMembershipsWith(preds ...predicate.Membership) predicate.User
HasMembershipsWith applies the HasEdge predicate on the "memberships" edge with a given conditions (other predicates).
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶ added in v0.13.0
OrderOption defines the ordering options for the User queries.
func ByCreatedAt ¶ added in v0.13.0
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByEmail ¶ added in v0.13.0
func ByEmail(opts ...sql.OrderTermOption) OrderOption
ByEmail orders the results by the email field.
func ByID ¶ added in v0.13.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMemberships ¶ added in v0.13.0
func ByMemberships(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByMemberships orders the results by memberships terms.
func ByMembershipsCount ¶ added in v0.13.0
func ByMembershipsCount(opts ...sql.OrderTermOption) OrderOption
ByMembershipsCount orders the results by memberships count.