Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Roles) predicate.Roles
- func CreatedAt(v time.Time) predicate.Roles
- func CreatedAtEQ(v time.Time) predicate.Roles
- func CreatedAtGT(v time.Time) predicate.Roles
- func CreatedAtGTE(v time.Time) predicate.Roles
- func CreatedAtIn(vs ...time.Time) predicate.Roles
- func CreatedAtLT(v time.Time) predicate.Roles
- func CreatedAtLTE(v time.Time) predicate.Roles
- func CreatedAtNEQ(v time.Time) predicate.Roles
- func CreatedAtNotIn(vs ...time.Time) predicate.Roles
- func Description(v string) predicate.Roles
- func DescriptionContains(v string) predicate.Roles
- func DescriptionContainsFold(v string) predicate.Roles
- func DescriptionEQ(v string) predicate.Roles
- func DescriptionEqualFold(v string) predicate.Roles
- func DescriptionGT(v string) predicate.Roles
- func DescriptionGTE(v string) predicate.Roles
- func DescriptionHasPrefix(v string) predicate.Roles
- func DescriptionHasSuffix(v string) predicate.Roles
- func DescriptionIn(vs ...string) predicate.Roles
- func DescriptionIsNil() predicate.Roles
- func DescriptionLT(v string) predicate.Roles
- func DescriptionLTE(v string) predicate.Roles
- func DescriptionNEQ(v string) predicate.Roles
- func DescriptionNotIn(vs ...string) predicate.Roles
- func DescriptionNotNil() predicate.Roles
- func HasPermissions() predicate.Roles
- func HasPermissionsWith(preds ...predicate.Permissions) predicate.Roles
- func HasUsers() predicate.Roles
- func HasUsersWith(preds ...predicate.Users) predicate.Roles
- func ID(id int) predicate.Roles
- func IDEQ(id int) predicate.Roles
- func IDGT(id int) predicate.Roles
- func IDGTE(id int) predicate.Roles
- func IDIn(ids ...int) predicate.Roles
- func IDLT(id int) predicate.Roles
- func IDLTE(id int) predicate.Roles
- func IDNEQ(id int) predicate.Roles
- func IDNotIn(ids ...int) predicate.Roles
- func Name(v string) predicate.Roles
- func NameContains(v string) predicate.Roles
- func NameContainsFold(v string) predicate.Roles
- func NameEQ(v string) predicate.Roles
- func NameEqualFold(v string) predicate.Roles
- func NameGT(v string) predicate.Roles
- func NameGTE(v string) predicate.Roles
- func NameHasPrefix(v string) predicate.Roles
- func NameHasSuffix(v string) predicate.Roles
- func NameIn(vs ...string) predicate.Roles
- func NameLT(v string) predicate.Roles
- func NameLTE(v string) predicate.Roles
- func NameNEQ(v string) predicate.Roles
- func NameNotIn(vs ...string) predicate.Roles
- func Not(p predicate.Roles) predicate.Roles
- func Or(predicates ...predicate.Roles) predicate.Roles
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByPermissions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPermissionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the roles type in the database. Label = "roles" // 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" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeUsers holds the string denoting the users edge name in mutations. EdgeUsers = "users" // EdgePermissions holds the string denoting the permissions edge name in mutations. EdgePermissions = "permissions" // Table holds the table name of the roles in the database. Table = "roles" // UsersTable is the table that holds the users relation/edge. The primary key declared below. UsersTable = "users_roles" // UsersInverseTable is the table name for the Users entity. // It exists in this package in order to avoid circular dependency with the "users" package. UsersInverseTable = "users" // PermissionsTable is the table that holds the permissions relation/edge. The primary key declared below. PermissionsTable = "roles_permissions" // PermissionsInverseTable is the table name for the Permissions entity. // It exists in this package in order to avoid circular dependency with the "permissions" package. PermissionsInverseTable = "permissions" )
Variables ¶
var ( // UsersPrimaryKey and UsersColumn2 are the table columns denoting the // primary key for the users relation (M2M). UsersPrimaryKey = []string{"users_id", "roles_id"} // PermissionsPrimaryKey and PermissionsColumn2 are the table columns denoting the // primary key for the permissions relation (M2M). PermissionsPrimaryKey = []string{"roles_id", "permissions_id"} )
var Columns = []string{ FieldID, FieldName, FieldDescription, FieldCreatedAt, }
Columns holds all SQL columns for roles fields.
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionIsNil ¶
DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotNil ¶
DescriptionNotNil applies the NotNil predicate on the "description" field.
func HasPermissions ¶
HasPermissions applies the HasEdge predicate on the "permissions" edge.
func HasPermissionsWith ¶
func HasPermissionsWith(preds ...predicate.Permissions) predicate.Roles
HasPermissionsWith applies the HasEdge predicate on the "permissions" edge with a given conditions (other predicates).
func HasUsersWith ¶
HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" 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 Roles queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDescription ¶
func ByDescription(opts ...sql.OrderTermOption) OrderOption
ByDescription orders the results by the description 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 ByPermissions ¶
func ByPermissions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByPermissions orders the results by permissions terms.
func ByPermissionsCount ¶
func ByPermissionsCount(opts ...sql.OrderTermOption) OrderOption
ByPermissionsCount orders the results by permissions count.
func ByUsers ¶
func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByUsers orders the results by users terms.
func ByUsersCount ¶
func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
ByUsersCount orders the results by users count.