Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Role) predicate.Role
- func HasBelongUser() predicate.Role
- func HasBelongUserWith(preds ...predicate.User) predicate.Role
- func ID(id int) predicate.Role
- func IDEQ(id int) predicate.Role
- func IDGT(id int) predicate.Role
- func IDGTE(id int) predicate.Role
- func IDIn(ids ...int) predicate.Role
- func IDLT(id int) predicate.Role
- func IDLTE(id int) predicate.Role
- func IDNEQ(id int) predicate.Role
- func IDNotIn(ids ...int) predicate.Role
- func Not(p predicate.Role) predicate.Role
- func Or(predicates ...predicate.Role) predicate.Role
- func Role(v string) predicate.Role
- func RoleContains(v string) predicate.Role
- func RoleContainsFold(v string) predicate.Role
- func RoleEQ(v string) predicate.Role
- func RoleEqualFold(v string) predicate.Role
- func RoleGT(v string) predicate.Role
- func RoleGTE(v string) predicate.Role
- func RoleHasPrefix(v string) predicate.Role
- func RoleHasSuffix(v string) predicate.Role
- func RoleIn(vs ...string) predicate.Role
- func RoleLT(v string) predicate.Role
- func RoleLTE(v string) predicate.Role
- func RoleNEQ(v string) predicate.Role
- func RoleNotIn(vs ...string) predicate.Role
- func Username(v string) predicate.Role
- func UsernameContains(v string) predicate.Role
- func UsernameContainsFold(v string) predicate.Role
- func UsernameEQ(v string) predicate.Role
- func UsernameEqualFold(v string) predicate.Role
- func UsernameGT(v string) predicate.Role
- func UsernameGTE(v string) predicate.Role
- func UsernameHasPrefix(v string) predicate.Role
- func UsernameHasSuffix(v string) predicate.Role
- func UsernameIn(vs ...string) predicate.Role
- func UsernameLT(v string) predicate.Role
- func UsernameLTE(v string) predicate.Role
- func UsernameNEQ(v string) predicate.Role
- func UsernameNotIn(vs ...string) predicate.Role
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
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 ¶
var Columns = []string{ FieldID, FieldUsername, FieldRole, }
Columns holds all SQL columns for role fields.
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 HasBelongUser ¶
HasBelongUser applies the HasEdge predicate on the "belong_user" edge.
func HasBelongUserWith ¶
HasBelongUserWith applies the HasEdge predicate on the "belong_user" edge with a given conditions (other predicates).
func RoleContains ¶
RoleContains applies the Contains predicate on the "role" field.
func RoleContainsFold ¶
RoleContainsFold applies the ContainsFold predicate on the "role" field.
func RoleEqualFold ¶
RoleEqualFold applies the EqualFold predicate on the "role" field.
func RoleHasPrefix ¶
RoleHasPrefix applies the HasPrefix predicate on the "role" field.
func RoleHasSuffix ¶
RoleHasSuffix applies the HasSuffix predicate on the "role" field.
func Username ¶
Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
func UsernameContains ¶
UsernameContains applies the Contains predicate on the "username" field.
func UsernameContainsFold ¶
UsernameContainsFold applies the ContainsFold predicate on the "username" field.
func UsernameEQ ¶
UsernameEQ applies the EQ predicate on the "username" field.
func UsernameEqualFold ¶
UsernameEqualFold applies the EqualFold predicate on the "username" field.
func UsernameGT ¶
UsernameGT applies the GT predicate on the "username" field.
func UsernameGTE ¶
UsernameGTE applies the GTE predicate on the "username" field.
func UsernameHasPrefix ¶
UsernameHasPrefix applies the HasPrefix predicate on the "username" field.
func UsernameHasSuffix ¶
UsernameHasSuffix applies the HasSuffix predicate on the "username" field.
func UsernameIn ¶
UsernameIn applies the In predicate on the "username" field.
func UsernameLT ¶
UsernameLT applies the LT predicate on the "username" field.
func UsernameLTE ¶
UsernameLTE applies the LTE predicate on the "username" field.
func UsernameNEQ ¶
UsernameNEQ applies the NEQ predicate on the "username" field.
func UsernameNotIn ¶
UsernameNotIn applies the NotIn predicate on the "username" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.