Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Rule) predicate.Rule
- func DescIsNil() predicate.Rule
- func DescNotNil() predicate.Rule
- func HasSections() predicate.Rule
- func HasSectionsWith(preds ...predicate.RuleSection) predicate.Rule
- func ID(id int) predicate.Rule
- func IDEQ(id int) predicate.Rule
- func IDGT(id int) predicate.Rule
- func IDGTE(id int) predicate.Rule
- func IDIn(ids ...int) predicate.Rule
- func IDLT(id int) predicate.Rule
- func IDLTE(id int) predicate.Rule
- func IDNEQ(id int) predicate.Rule
- func IDNotIn(ids ...int) predicate.Rule
- func Indx(v string) predicate.Rule
- func IndxContains(v string) predicate.Rule
- func IndxContainsFold(v string) predicate.Rule
- func IndxEQ(v string) predicate.Rule
- func IndxEqualFold(v string) predicate.Rule
- func IndxGT(v string) predicate.Rule
- func IndxGTE(v string) predicate.Rule
- func IndxHasPrefix(v string) predicate.Rule
- func IndxHasSuffix(v string) predicate.Rule
- func IndxIn(vs ...string) predicate.Rule
- func IndxLT(v string) predicate.Rule
- func IndxLTE(v string) predicate.Rule
- func IndxNEQ(v string) predicate.Rule
- func IndxNotIn(vs ...string) predicate.Rule
- func Name(v string) predicate.Rule
- func NameContains(v string) predicate.Rule
- func NameContainsFold(v string) predicate.Rule
- func NameEQ(v string) predicate.Rule
- func NameEqualFold(v string) predicate.Rule
- func NameGT(v string) predicate.Rule
- func NameGTE(v string) predicate.Rule
- func NameHasPrefix(v string) predicate.Rule
- func NameHasSuffix(v string) predicate.Rule
- func NameIn(vs ...string) predicate.Rule
- func NameLT(v string) predicate.Rule
- func NameLTE(v string) predicate.Rule
- func NameNEQ(v string) predicate.Rule
- func NameNotIn(vs ...string) predicate.Rule
- func Not(p predicate.Rule) predicate.Rule
- func Or(predicates ...predicate.Rule) predicate.Rule
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the rule type in the database. Label = "rule" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldIndx holds the string denoting the indx field in the database. FieldIndx = "indx" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDesc holds the string denoting the desc field in the database. FieldDesc = "desc" // EdgeSections holds the string denoting the sections edge name in mutations. EdgeSections = "sections" // Table holds the table name of the rule in the database. Table = "rules" // SectionsTable is the table that holds the sections relation/edge. SectionsTable = "rule_sections" // SectionsInverseTable is the table name for the RuleSection entity. // It exists in this package in order to avoid circular dependency with the "rulesection" package. SectionsInverseTable = "rule_sections" // SectionsColumn is the table column denoting the sections relation/edge. SectionsColumn = "rule_id" )
Variables ¶
var ( // IndxValidator is a validator for the "indx" field. It is called by the builders before save. IndxValidator func(string) error // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error )
Columns holds all SQL columns for rule fields.
Functions ¶
func DescNotNil ¶
DescNotNil applies the NotNil predicate on the "desc" field.
func HasSections ¶
HasSections applies the HasEdge predicate on the "sections" edge.
func HasSectionsWith ¶
func HasSectionsWith(preds ...predicate.RuleSection) predicate.Rule
HasSectionsWith applies the HasEdge predicate on the "sections" edge with a given conditions (other predicates).
func IndxContains ¶
IndxContains applies the Contains predicate on the "indx" field.
func IndxContainsFold ¶
IndxContainsFold applies the ContainsFold predicate on the "indx" field.
func IndxEqualFold ¶
IndxEqualFold applies the EqualFold predicate on the "indx" field.
func IndxHasPrefix ¶
IndxHasPrefix applies the HasPrefix predicate on the "indx" field.
func IndxHasSuffix ¶
IndxHasSuffix applies the HasSuffix predicate on the "indx" field.
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 Rule queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIndx ¶
func ByIndx(opts ...sql.OrderTermOption) OrderOption
ByIndx orders the results by the indx field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func BySections ¶
func BySections(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySections orders the results by sections terms.
func BySectionsCount ¶
func BySectionsCount(opts ...sql.OrderTermOption) OrderOption
BySectionsCount orders the results by sections count.