user

package
v0.12.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldLocale holds the string denoting the locale field in the database.
	FieldLocale = "locale"
	// FieldXp holds the string denoting the xp field in the database.
	FieldXp = "xp"
	// EdgeOwnGuilds holds the string denoting the own_guilds edge name in mutations.
	EdgeOwnGuilds = "own_guilds"
	// EdgeGuilds holds the string denoting the guilds edge name in mutations.
	EdgeGuilds = "guilds"
	// EdgeWordSuffix holds the string denoting the word_suffix edge name in mutations.
	EdgeWordSuffix = "word_suffix"
	// Table holds the table name of the user in the database.
	Table = "users"
	// OwnGuildsTable is the table that holds the own_guilds relation/edge.
	OwnGuildsTable = "guilds"
	// OwnGuildsInverseTable is the table name for the Guild entity.
	// It exists in this package in order to avoid circular dependency with the "guild" package.
	OwnGuildsInverseTable = "guilds"
	// OwnGuildsColumn is the table column denoting the own_guilds relation/edge.
	OwnGuildsColumn = "user_own_guilds"
	// GuildsTable is the table that holds the guilds relation/edge.
	GuildsTable = "members"
	// GuildsInverseTable is the table name for the Member entity.
	// It exists in this package in order to avoid circular dependency with the "member" package.
	GuildsInverseTable = "members"
	// GuildsColumn is the table column denoting the guilds relation/edge.
	GuildsColumn = "user_id"
	// WordSuffixTable is the table that holds the word_suffix relation/edge.
	WordSuffixTable = "word_suffixes"
	// WordSuffixInverseTable is the table name for the WordSuffix entity.
	// It exists in this package in order to avoid circular dependency with the "wordsuffix" package.
	WordSuffixInverseTable = "word_suffixes"
	// WordSuffixColumn is the table column denoting the word_suffix relation/edge.
	WordSuffixColumn = "user_word_suffix"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultLocale holds the default value on creation for the "locale" field.
	DefaultLocale discord.Locale
	// LocaleValidator is a validator for the "locale" field. It is called by the builders before save.
	LocaleValidator func(string) error
	// DefaultXp holds the default value on creation for the "xp" field.
	DefaultXp xppoint.XP
)

Columns holds all SQL columns for user fields.

Functions

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.User

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.User

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.User

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.User

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.User

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.User

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.User

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.User

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.User

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasGuilds

func HasGuilds() predicate.User

HasGuilds applies the HasEdge predicate on the "guilds" edge.

func HasGuildsWith

func HasGuildsWith(preds ...predicate.Member) predicate.User

HasGuildsWith applies the HasEdge predicate on the "guilds" edge with a given conditions (other predicates).

func HasOwnGuilds

func HasOwnGuilds() predicate.User

HasOwnGuilds applies the HasEdge predicate on the "own_guilds" edge.

func HasOwnGuildsWith

func HasOwnGuildsWith(preds ...predicate.Guild) predicate.User

HasOwnGuildsWith applies the HasEdge predicate on the "own_guilds" edge with a given conditions (other predicates).

func HasWordSuffix

func HasWordSuffix() predicate.User

HasWordSuffix applies the HasEdge predicate on the "word_suffix" edge.

func HasWordSuffixWith

func HasWordSuffixWith(preds ...predicate.WordSuffix) predicate.User

HasWordSuffixWith applies the HasEdge predicate on the "word_suffix" edge with a given conditions (other predicates).

func ID

func ID(id snowflake.ID) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id snowflake.ID) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id snowflake.ID) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id snowflake.ID) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...snowflake.ID) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id snowflake.ID) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id snowflake.ID) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id snowflake.ID) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...snowflake.ID) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func Locale

func Locale(v discord.Locale) predicate.User

Locale applies equality check predicate on the "locale" field. It's identical to LocaleEQ.

func LocaleContains

func LocaleContains(v discord.Locale) predicate.User

LocaleContains applies the Contains predicate on the "locale" field.

func LocaleContainsFold

func LocaleContainsFold(v discord.Locale) predicate.User

LocaleContainsFold applies the ContainsFold predicate on the "locale" field.

func LocaleEQ

func LocaleEQ(v discord.Locale) predicate.User

LocaleEQ applies the EQ predicate on the "locale" field.

func LocaleEqualFold

func LocaleEqualFold(v discord.Locale) predicate.User

LocaleEqualFold applies the EqualFold predicate on the "locale" field.

func LocaleGT

func LocaleGT(v discord.Locale) predicate.User

LocaleGT applies the GT predicate on the "locale" field.

func LocaleGTE

func LocaleGTE(v discord.Locale) predicate.User

LocaleGTE applies the GTE predicate on the "locale" field.

func LocaleHasPrefix

func LocaleHasPrefix(v discord.Locale) predicate.User

LocaleHasPrefix applies the HasPrefix predicate on the "locale" field.

func LocaleHasSuffix

func LocaleHasSuffix(v discord.Locale) predicate.User

LocaleHasSuffix applies the HasSuffix predicate on the "locale" field.

func LocaleIn

func LocaleIn(vs ...discord.Locale) predicate.User

LocaleIn applies the In predicate on the "locale" field.

func LocaleLT

func LocaleLT(v discord.Locale) predicate.User

LocaleLT applies the LT predicate on the "locale" field.

func LocaleLTE

func LocaleLTE(v discord.Locale) predicate.User

LocaleLTE applies the LTE predicate on the "locale" field.

func LocaleNEQ

func LocaleNEQ(v discord.Locale) predicate.User

LocaleNEQ applies the NEQ predicate on the "locale" field.

func LocaleNotIn

func LocaleNotIn(vs ...discord.Locale) predicate.User

LocaleNotIn applies the NotIn predicate on the "locale" field.

func Name

func Name(v string) predicate.User

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.User

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.User

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.User

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.User

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.User

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.User

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.User

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.User

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.User

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.User

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.User

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.User

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.User

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Xp

func Xp(v xppoint.XP) predicate.User

Xp applies equality check predicate on the "xp" field. It's identical to XpEQ.

func XpEQ

func XpEQ(v xppoint.XP) predicate.User

XpEQ applies the EQ predicate on the "xp" field.

func XpGT

func XpGT(v xppoint.XP) predicate.User

XpGT applies the GT predicate on the "xp" field.

func XpGTE

func XpGTE(v xppoint.XP) predicate.User

XpGTE applies the GTE predicate on the "xp" field.

func XpIn

func XpIn(vs ...xppoint.XP) predicate.User

XpIn applies the In predicate on the "xp" field.

func XpLT

func XpLT(v xppoint.XP) predicate.User

XpLT applies the LT predicate on the "xp" field.

func XpLTE

func XpLTE(v xppoint.XP) predicate.User

XpLTE applies the LTE predicate on the "xp" field.

func XpNEQ

func XpNEQ(v xppoint.XP) predicate.User

XpNEQ applies the NEQ predicate on the "xp" field.

func XpNotIn

func XpNotIn(vs ...xppoint.XP) predicate.User

XpNotIn applies the NotIn predicate on the "xp" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the User queries.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByGuilds

func ByGuilds(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByGuilds orders the results by guilds terms.

func ByGuildsCount

func ByGuildsCount(opts ...sql.OrderTermOption) OrderOption

ByGuildsCount orders the results by guilds count.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByLocale

func ByLocale(opts ...sql.OrderTermOption) OrderOption

ByLocale orders the results by the locale field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByOwnGuilds

func ByOwnGuilds(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByOwnGuilds orders the results by own_guilds terms.

func ByOwnGuildsCount

func ByOwnGuildsCount(opts ...sql.OrderTermOption) OrderOption

ByOwnGuildsCount orders the results by own_guilds count.

func ByWordSuffix

func ByWordSuffix(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByWordSuffix orders the results by word_suffix terms.

func ByWordSuffixCount

func ByWordSuffixCount(opts ...sql.OrderTermOption) OrderOption

ByWordSuffixCount orders the results by word_suffix count.

func ByXp

func ByXp(opts ...sql.OrderTermOption) OrderOption

ByXp orders the results by the xp field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL