user

package
v0.0.0-...-acd6729 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT 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 = "user_id"
	// FieldPhone holds the string denoting the phone field in the database.
	FieldPhone = "phone"
	// FieldRace holds the string denoting the race field in the database.
	FieldRace = "race"
	// EdgeCar holds the string denoting the car edge name in mutations.
	EdgeCar = "car"
	// EdgeDept holds the string denoting the dept edge name in mutations.
	EdgeDept = "dept"
	// CarFieldID holds the string denoting the ID field of the Car.
	CarFieldID = "car_id"
	// DeptFieldID holds the string denoting the ID field of the Dept.
	DeptFieldID = "dept_id"
	// Table holds the table name of the user in the database.
	Table = "users"
	// CarTable is the table that holds the car relation/edge.
	CarTable = "cars"
	// CarInverseTable is the table name for the Car entity.
	// It exists in this package in order to avoid circular dependency with the "car" package.
	CarInverseTable = "cars"
	// CarColumn is the table column denoting the car relation/edge.
	CarColumn = "user_id"
	// DeptTable is the table that holds the dept relation/edge. The primary key declared below.
	DeptTable = "dept_user"
	// DeptInverseTable is the table name for the Dept entity.
	// It exists in this package in order to avoid circular dependency with the "dept" package.
	DeptInverseTable = "depts"
)

Variables

View Source
var (
	// PhoneValidator is a validator for the "phone" field. It is called by the builders before save.
	PhoneValidator func(string) error
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

Columns holds all SQL columns for user fields.

View Source
var (
	// DeptPrimaryKey and DeptColumn2 are the table columns denoting the
	// primary key for the dept relation (M2M).
	DeptPrimaryKey = []string{"dept_id", "user_id"}
)

Functions

func And

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

And groups predicates with the AND operator between them.

func HasCar

func HasCar() predicate.User

HasCar applies the HasEdge predicate on the "car" edge.

func HasCarWith

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

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

func HasDept

func HasDept() predicate.User

HasDept applies the HasEdge predicate on the "dept" edge.

func HasDeptWith

func HasDeptWith(preds ...predicate.Dept) predicate.User

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

func ID

func ID(id string) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id string) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id string) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) 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 Phone

func Phone(v string) predicate.User

Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ.

func PhoneContains

func PhoneContains(v string) predicate.User

PhoneContains applies the Contains predicate on the "phone" field.

func PhoneContainsFold

func PhoneContainsFold(v string) predicate.User

PhoneContainsFold applies the ContainsFold predicate on the "phone" field.

func PhoneEQ

func PhoneEQ(v string) predicate.User

PhoneEQ applies the EQ predicate on the "phone" field.

func PhoneEqualFold

func PhoneEqualFold(v string) predicate.User

PhoneEqualFold applies the EqualFold predicate on the "phone" field.

func PhoneGT

func PhoneGT(v string) predicate.User

PhoneGT applies the GT predicate on the "phone" field.

func PhoneGTE

func PhoneGTE(v string) predicate.User

PhoneGTE applies the GTE predicate on the "phone" field.

func PhoneHasPrefix

func PhoneHasPrefix(v string) predicate.User

PhoneHasPrefix applies the HasPrefix predicate on the "phone" field.

func PhoneHasSuffix

func PhoneHasSuffix(v string) predicate.User

PhoneHasSuffix applies the HasSuffix predicate on the "phone" field.

func PhoneIn

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

PhoneIn applies the In predicate on the "phone" field.

func PhoneIsNil

func PhoneIsNil() predicate.User

PhoneIsNil applies the IsNil predicate on the "phone" field.

func PhoneLT

func PhoneLT(v string) predicate.User

PhoneLT applies the LT predicate on the "phone" field.

func PhoneLTE

func PhoneLTE(v string) predicate.User

PhoneLTE applies the LTE predicate on the "phone" field.

func PhoneNEQ

func PhoneNEQ(v string) predicate.User

PhoneNEQ applies the NEQ predicate on the "phone" field.

func PhoneNotIn

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

PhoneNotIn applies the NotIn predicate on the "phone" field.

func PhoneNotNil

func PhoneNotNil() predicate.User

PhoneNotNil applies the NotNil predicate on the "phone" field.

func RaceEQ

func RaceEQ(v Race) predicate.User

RaceEQ applies the EQ predicate on the "race" field.

func RaceIn

func RaceIn(vs ...Race) predicate.User

RaceIn applies the In predicate on the "race" field.

func RaceNEQ

func RaceNEQ(v Race) predicate.User

RaceNEQ applies the NEQ predicate on the "race" field.

func RaceNotIn

func RaceNotIn(vs ...Race) predicate.User

RaceNotIn applies the NotIn predicate on the "race" field.

func RaceValidator

func RaceValidator(r Race) error

RaceValidator is a validator for the "race" field enum values. It is called by the builders before save.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Race

type Race string

Race defines the type for the "race" enum field.

const (
	RaceYELLOW Race = "YELLOW"
	RaceWHITE  Race = "WHITE"
	RaceBLACK  Race = "BLACK"
)

Race values.

func (Race) String

func (r Race) String() string

Jump to

Keyboard shortcuts

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