user

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: Apache-2.0 Imports: 4 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"
	// 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

Columns holds all SQL columns for user fields.

View Source
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 And

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

And groups predicates with the AND operator between them.

func HasBlogPosts

func HasBlogPosts() predicate.User

HasBlogPosts applies the HasEdge predicate on the "blog_posts" edge.

func HasBlogPostsWith

func HasBlogPostsWith(preds ...predicate.BlogPost) predicate.User

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

func HasProfilePic

func HasProfilePic() predicate.User

HasProfilePic applies the HasEdge predicate on the "profile_pic" edge.

func HasProfilePicWith

func HasProfilePicWith(preds ...predicate.Image) predicate.User

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

func HasSkipEdge added in v0.3.0

func HasSkipEdge() predicate.User

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 ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.User

IDNotIn applies the NotIn predicate on the ID 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 StatusEQ

func StatusEQ(v Status) predicate.User

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.User

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.User

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.User

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

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

func Unnecessary(v string) predicate.User

Unnecessary applies equality check predicate on the "unnecessary" field. It's identical to UnnecessaryEQ.

func UnnecessaryContains added in v0.3.0

func UnnecessaryContains(v string) predicate.User

UnnecessaryContains applies the Contains predicate on the "unnecessary" field.

func UnnecessaryContainsFold added in v0.3.0

func UnnecessaryContainsFold(v string) predicate.User

UnnecessaryContainsFold applies the ContainsFold predicate on the "unnecessary" field.

func UnnecessaryEQ added in v0.3.0

func UnnecessaryEQ(v string) predicate.User

UnnecessaryEQ applies the EQ predicate on the "unnecessary" field.

func UnnecessaryEqualFold added in v0.3.0

func UnnecessaryEqualFold(v string) predicate.User

UnnecessaryEqualFold applies the EqualFold predicate on the "unnecessary" field.

func UnnecessaryGT added in v0.3.0

func UnnecessaryGT(v string) predicate.User

UnnecessaryGT applies the GT predicate on the "unnecessary" field.

func UnnecessaryGTE added in v0.3.0

func UnnecessaryGTE(v string) predicate.User

UnnecessaryGTE applies the GTE predicate on the "unnecessary" field.

func UnnecessaryHasPrefix added in v0.3.0

func UnnecessaryHasPrefix(v string) predicate.User

UnnecessaryHasPrefix applies the HasPrefix predicate on the "unnecessary" field.

func UnnecessaryHasSuffix added in v0.3.0

func UnnecessaryHasSuffix(v string) predicate.User

UnnecessaryHasSuffix applies the HasSuffix predicate on the "unnecessary" field.

func UnnecessaryIn added in v0.3.0

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

UnnecessaryIn applies the In predicate on the "unnecessary" field.

func UnnecessaryIsNil added in v0.3.0

func UnnecessaryIsNil() predicate.User

UnnecessaryIsNil applies the IsNil predicate on the "unnecessary" field.

func UnnecessaryLT added in v0.3.0

func UnnecessaryLT(v string) predicate.User

UnnecessaryLT applies the LT predicate on the "unnecessary" field.

func UnnecessaryLTE added in v0.3.0

func UnnecessaryLTE(v string) predicate.User

UnnecessaryLTE applies the LTE predicate on the "unnecessary" field.

func UnnecessaryNEQ added in v0.3.0

func UnnecessaryNEQ(v string) predicate.User

UnnecessaryNEQ applies the NEQ predicate on the "unnecessary" field.

func UnnecessaryNotIn added in v0.3.0

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

UnnecessaryNotIn applies the NotIn predicate on the "unnecessary" field.

func UnnecessaryNotNil added in v0.3.0

func UnnecessaryNotNil() predicate.User

UnnecessaryNotNil applies the NotNil predicate on the "unnecessary" field.

func UserName

func UserName(v string) predicate.User

UserName applies equality check predicate on the "user_name" field. It's identical to UserNameEQ.

func UserNameContains

func UserNameContains(v string) predicate.User

UserNameContains applies the Contains predicate on the "user_name" field.

func UserNameContainsFold

func UserNameContainsFold(v string) predicate.User

UserNameContainsFold applies the ContainsFold predicate on the "user_name" field.

func UserNameEQ

func UserNameEQ(v string) predicate.User

UserNameEQ applies the EQ predicate on the "user_name" field.

func UserNameEqualFold

func UserNameEqualFold(v string) predicate.User

UserNameEqualFold applies the EqualFold predicate on the "user_name" field.

func UserNameGT

func UserNameGT(v string) predicate.User

UserNameGT applies the GT predicate on the "user_name" field.

func UserNameGTE

func UserNameGTE(v string) predicate.User

UserNameGTE applies the GTE predicate on the "user_name" field.

func UserNameHasPrefix

func UserNameHasPrefix(v string) predicate.User

UserNameHasPrefix applies the HasPrefix predicate on the "user_name" field.

func UserNameHasSuffix

func UserNameHasSuffix(v string) predicate.User

UserNameHasSuffix applies the HasSuffix predicate on the "user_name" field.

func UserNameIn

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

UserNameIn applies the In predicate on the "user_name" field.

func UserNameLT

func UserNameLT(v string) predicate.User

UserNameLT applies the LT predicate on the "user_name" field.

func UserNameLTE

func UserNameLTE(v string) predicate.User

UserNameLTE applies the LTE predicate on the "user_name" field.

func UserNameNEQ

func UserNameNEQ(v string) predicate.User

UserNameNEQ applies the NEQ predicate on the "user_name" field.

func UserNameNotIn

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

UserNameNotIn applies the NotIn predicate on the "user_name" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption added in v0.4.1

type OrderOption func(*sql.Selector)

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.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusPending Status = "pending"
	StatusActive  Status = "active"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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