role

package
v0.0.0-...-490d541 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the role type in the database.
	Label = "role"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// EdgeBelongUser holds the string denoting the belong_user edge name in mutations.
	EdgeBelongUser = "belong_user"
	// Table holds the table name of the role in the database.
	Table = "roles"
	// BelongUserTable is the table that holds the belong_user relation/edge.
	BelongUserTable = "roles"
	// BelongUserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	BelongUserInverseTable = "users"
	// BelongUserColumn is the table column denoting the belong_user relation/edge.
	BelongUserColumn = "user_roles"
)

Variables

Columns holds all SQL columns for role fields.

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

ForeignKeys holds the SQL foreign-keys that are owned by the "roles" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Role) predicate.Role

And groups predicates with the AND operator between them.

func HasBelongUser

func HasBelongUser() predicate.Role

HasBelongUser applies the HasEdge predicate on the "belong_user" edge.

func HasBelongUserWith

func HasBelongUserWith(preds ...predicate.User) predicate.Role

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

func ID

func ID(id int) predicate.Role

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Role

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Role

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Role

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Role

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Role

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Role

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.Role) predicate.Role

Or groups predicates with the OR operator between them.

func Role

func Role(v string) predicate.Role

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

func RoleContains

func RoleContains(v string) predicate.Role

RoleContains applies the Contains predicate on the "role" field.

func RoleContainsFold

func RoleContainsFold(v string) predicate.Role

RoleContainsFold applies the ContainsFold predicate on the "role" field.

func RoleEQ

func RoleEQ(v string) predicate.Role

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

func RoleEqualFold

func RoleEqualFold(v string) predicate.Role

RoleEqualFold applies the EqualFold predicate on the "role" field.

func RoleGT

func RoleGT(v string) predicate.Role

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

func RoleGTE

func RoleGTE(v string) predicate.Role

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

func RoleHasPrefix

func RoleHasPrefix(v string) predicate.Role

RoleHasPrefix applies the HasPrefix predicate on the "role" field.

func RoleHasSuffix

func RoleHasSuffix(v string) predicate.Role

RoleHasSuffix applies the HasSuffix predicate on the "role" field.

func RoleIn

func RoleIn(vs ...string) predicate.Role

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

func RoleLT

func RoleLT(v string) predicate.Role

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

func RoleLTE

func RoleLTE(v string) predicate.Role

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

func RoleNEQ

func RoleNEQ(v string) predicate.Role

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

func RoleNotIn

func RoleNotIn(vs ...string) predicate.Role

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

func Username

func Username(v string) predicate.Role

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.Role

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.Role

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.Role

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.Role

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.Role

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.Role

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.Role

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.Role

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

func UsernameIn(vs ...string) predicate.Role

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.Role

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.Role

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.Role

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

func UsernameNotIn(vs ...string) predicate.Role

UsernameNotIn applies the NotIn predicate on the "username" 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 Role queries.

func ByBelongUserField

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

ByBelongUserField orders the results by belong_user field.

func ByID

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

ByID orders the results by the id field.

func ByRole

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

ByRole orders the results by the role field.

func ByUsername

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

ByUsername orders the results by the username field.

Jump to

Keyboard shortcuts

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