Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.GroupUser) predicate.GroupUser
- func GroupID(v int) predicate.GroupUser
- func GroupIDEQ(v int) predicate.GroupUser
- func GroupIDIn(vs ...int) predicate.GroupUser
- func GroupIDNEQ(v int) predicate.GroupUser
- func GroupIDNotIn(vs ...int) predicate.GroupUser
- func HasGroup() predicate.GroupUser
- func HasGroupWith(preds ...predicate.Group) predicate.GroupUser
- func HasUser() predicate.GroupUser
- func HasUserWith(preds ...predicate.User) predicate.GroupUser
- func Not(p predicate.GroupUser) predicate.GroupUser
- func Or(predicates ...predicate.GroupUser) predicate.GroupUser
- func RoleEQ(v group.Role) predicate.GroupUser
- func RoleIn(vs ...group.Role) predicate.GroupUser
- func RoleNEQ(v group.Role) predicate.GroupUser
- func RoleNotIn(vs ...group.Role) predicate.GroupUser
- func RoleValidator(r group.Role) error
- func UserID(v int) predicate.GroupUser
- func UserIDEQ(v int) predicate.GroupUser
- func UserIDIn(vs ...int) predicate.GroupUser
- func UserIDNEQ(v int) predicate.GroupUser
- func UserIDNotIn(vs ...int) predicate.GroupUser
- func ValidColumn(column string) bool
- type OrderOption
- func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByGroupID(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUserID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the groupuser type in the database. Label = "group_user" // FieldGroupID holds the string denoting the group_id field in the database. FieldGroupID = "group_id" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // GroupFieldID holds the string denoting the ID field of the Group. GroupFieldID = "id" // UserFieldID holds the string denoting the ID field of the User. UserFieldID = "id" // Table holds the table name of the groupuser in the database. Table = "group_users" // GroupTable is the table that holds the group relation/edge. GroupTable = "group_users" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "entgroup" package. GroupInverseTable = "groups" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "group_id" // UserTable is the table that holds the user relation/edge. UserTable = "group_users" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "users" // UserColumn is the table column denoting the user relation/edge. UserColumn = "user_id" )
Variables ¶
var Columns = []string{ FieldGroupID, FieldUserID, FieldRole, }
Columns holds all SQL columns for groupuser fields.
Functions ¶
func GroupID ¶
GroupID applies equality check predicate on the "group_id" field. It's identical to GroupIDEQ.
func GroupIDNEQ ¶
GroupIDNEQ applies the NEQ predicate on the "group_id" field.
func GroupIDNotIn ¶
GroupIDNotIn applies the NotIn predicate on the "group_id" field.
func HasGroupWith ¶
HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func RoleValidator ¶
RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.
func UserID ¶
UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserIDNotIn ¶
UserIDNotIn applies the NotIn predicate on the "user_id" 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 GroupUser queries.
func ByGroupField ¶
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
ByGroupField orders the results by group field.
func ByGroupID ¶
func ByGroupID(opts ...sql.OrderTermOption) OrderOption
ByGroupID orders the results by the group_id field.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.
func ByUserID ¶
func ByUserID(opts ...sql.OrderTermOption) OrderOption
ByUserID orders the results by the user_id field.