user

package
v0.0.0-...-e71670f Latest Latest
Warning

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

Go to latest
Published: Jul 18, 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldCreated holds the string denoting the created field in the database.
	FieldCreated = "created"
	// FieldAge holds the string denoting the age field in the database.
	FieldAge = "age"
	// EdgePets holds the string denoting the pets edge name in mutations.
	EdgePets = "pets"
	// EdgePosts holds the string denoting the posts edge name in mutations.
	EdgePosts = "posts"
	// EdgeParent holds the string denoting the parent edge name in mutations.
	EdgeParent = "parent"
	// EdgeCars holds the string denoting the cars edge name in mutations.
	EdgeCars = "cars"
	// Table holds the table name of the user in the database.
	Table = "users"
	// PetsTable is the table that holds the pets relation/edge.
	PetsTable = "pets"
	// PetsInverseTable is the table name for the Pet entity.
	// It exists in this package in order to avoid circular dependency with the "pet" package.
	PetsInverseTable = "pets"
	// PetsColumn is the table column denoting the pets relation/edge.
	PetsColumn = "user_pets"
	// PostsTable is the table that holds the posts relation/edge.
	PostsTable = "posts"
	// PostsInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	PostsInverseTable = "posts"
	// PostsColumn is the table column denoting the posts relation/edge.
	PostsColumn = "user_posts"
	// ParentTable is the table that holds the parent relation/edge.
	ParentTable = "users"
	// ParentColumn is the table column denoting the parent relation/edge.
	ParentColumn = "user_parent"
	// CarsTable is the table that holds the cars relation/edge.
	CarsTable = "cars"
	// CarsInverseTable is the table name for the Car entity.
	// It exists in this package in order to avoid circular dependency with the "car" package.
	CarsInverseTable = "cars"
	// CarsColumn is the table column denoting the cars relation/edge.
	CarsColumn = "user_cars"
)

Variables

View Source
var (
	// DefaultCreated holds the default value on creation for the "created" field.
	DefaultCreated func() time.Time
	// AgeValidator is a validator for the "age" field. It is called by the builders before save.
	AgeValidator func(int) error
)

Columns holds all SQL columns for user fields.

View Source
var ForeignKeys = []string{
	"user_parent",
}

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 Age

func Age(v int) predicate.User

Age applies equality check predicate on the "age" field. It's identical to AgeEQ.

func AgeEQ

func AgeEQ(v int) predicate.User

AgeEQ applies the EQ predicate on the "age" field.

func AgeGT

func AgeGT(v int) predicate.User

AgeGT applies the GT predicate on the "age" field.

func AgeGTE

func AgeGTE(v int) predicate.User

AgeGTE applies the GTE predicate on the "age" field.

func AgeIn

func AgeIn(vs ...int) predicate.User

AgeIn applies the In predicate on the "age" field.

func AgeIsNil

func AgeIsNil() predicate.User

AgeIsNil applies the IsNil predicate on the "age" field.

func AgeLT

func AgeLT(v int) predicate.User

AgeLT applies the LT predicate on the "age" field.

func AgeLTE

func AgeLTE(v int) predicate.User

AgeLTE applies the LTE predicate on the "age" field.

func AgeNEQ

func AgeNEQ(v int) predicate.User

AgeNEQ applies the NEQ predicate on the "age" field.

func AgeNotIn

func AgeNotIn(vs ...int) predicate.User

AgeNotIn applies the NotIn predicate on the "age" field.

func AgeNotNil

func AgeNotNil() predicate.User

AgeNotNil applies the NotNil predicate on the "age" field.

func And

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

And groups predicates with the AND operator between them.

func Created

func Created(v time.Time) predicate.User

Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.

func CreatedEQ

func CreatedEQ(v time.Time) predicate.User

CreatedEQ applies the EQ predicate on the "created" field.

func CreatedGT

func CreatedGT(v time.Time) predicate.User

CreatedGT applies the GT predicate on the "created" field.

func CreatedGTE

func CreatedGTE(v time.Time) predicate.User

CreatedGTE applies the GTE predicate on the "created" field.

func CreatedIn

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

CreatedIn applies the In predicate on the "created" field.

func CreatedLT

func CreatedLT(v time.Time) predicate.User

CreatedLT applies the LT predicate on the "created" field.

func CreatedLTE

func CreatedLTE(v time.Time) predicate.User

CreatedLTE applies the LTE predicate on the "created" field.

func CreatedNEQ

func CreatedNEQ(v time.Time) predicate.User

CreatedNEQ applies the NEQ predicate on the "created" field.

func CreatedNotIn

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

CreatedNotIn applies the NotIn predicate on the "created" field.

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

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

EmailIn applies the In predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

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

EmailNotIn applies the NotIn predicate on the "email" field.

func HasCars

func HasCars() predicate.User

HasCars applies the HasEdge predicate on the "cars" edge.

func HasCarsWith

func HasCarsWith(preds ...predicate.Car) predicate.User

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

func HasParent

func HasParent() predicate.User

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.User) predicate.User

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

func HasPets

func HasPets() predicate.User

HasPets applies the HasEdge predicate on the "pets" edge.

func HasPetsWith

func HasPetsWith(preds ...predicate.Pet) predicate.User

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

func HasPosts

func HasPosts() predicate.User

HasPosts applies the HasEdge predicate on the "posts" edge.

func HasPostsWith

func HasPostsWith(preds ...predicate.Post) predicate.User

HasPostsWith applies the HasEdge predicate on the "posts" 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 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 Role

func Role(v int8) predicate.User

Role applies equality check predicate on the "role" field. It's identical to RoleEQ.

func RoleEQ

func RoleEQ(v int8) predicate.User

RoleEQ applies the EQ predicate on the "role" field.

func RoleGT

func RoleGT(v int8) predicate.User

RoleGT applies the GT predicate on the "role" field.

func RoleGTE

func RoleGTE(v int8) predicate.User

RoleGTE applies the GTE predicate on the "role" field.

func RoleIn

func RoleIn(vs ...int8) predicate.User

RoleIn applies the In predicate on the "role" field.

func RoleLT

func RoleLT(v int8) predicate.User

RoleLT applies the LT predicate on the "role" field.

func RoleLTE

func RoleLTE(v int8) predicate.User

RoleLTE applies the LTE predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v int8) predicate.User

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...int8) predicate.User

RoleNotIn applies the NotIn predicate on the "role" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the User queries.

func ByAge

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

ByAge orders the results by the age field.

func ByCars

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

ByCars orders the results by cars terms.

func ByCarsCount

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

ByCarsCount orders the results by cars count.

func ByCreated

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

ByCreated orders the results by the created 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 ByName

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

ByName orders the results by the name field.

func ByParentField

func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption

ByParentField orders the results by parent field.

func ByPets

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

ByPets orders the results by pets terms.

func ByPetsCount

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

ByPetsCount orders the results by pets count.

func ByPosts

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

ByPosts orders the results by posts terms.

func ByPostsCount

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

ByPostsCount orders the results by posts count.

func ByRole

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

ByRole orders the results by the role field.

Jump to

Keyboard shortcuts

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