Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Rule) predicate.Rule
- func Desc(v string) predicate.Rule
- func DescContains(v string) predicate.Rule
- func DescContainsFold(v string) predicate.Rule
- func DescEQ(v string) predicate.Rule
- func DescEqualFold(v string) predicate.Rule
- func DescGT(v string) predicate.Rule
- func DescGTE(v string) predicate.Rule
- func DescHasPrefix(v string) predicate.Rule
- func DescHasSuffix(v string) predicate.Rule
- func DescIn(vs ...string) predicate.Rule
- func DescLT(v string) predicate.Rule
- func DescLTE(v string) predicate.Rule
- func DescNEQ(v string) predicate.Rule
- func DescNotIn(vs ...string) predicate.Rule
- func HasRuleSections() predicate.Rule
- func HasRuleSectionsWith(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
- func ByDesc(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIndx(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRuleSections(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRuleSectionsCount(opts ...sql.OrderTermOption) 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" // EdgeRuleSections holds the string denoting the rule_sections edge name in mutations. EdgeRuleSections = "rule_sections" // Table holds the table name of the rule in the database. Table = "rules" // RuleSectionsTable is the table that holds the rule_sections relation/edge. The primary key declared below. RuleSectionsTable = "rule_rule_sections" // RuleSectionsInverseTable is the table name for the RuleSection entity. // It exists in this package in order to avoid circular dependency with the "rulesection" package. RuleSectionsInverseTable = "rule_sections" )
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.
var ( // RuleSectionsPrimaryKey and RuleSectionsColumn2 are the table columns denoting the // primary key for the rule_sections relation (M2M). RuleSectionsPrimaryKey = []string{"rule_id", "rule_section_id"} )
Functions ¶
func DescContains ¶
DescContains applies the Contains predicate on the "desc" field.
func DescContainsFold ¶
DescContainsFold applies the ContainsFold predicate on the "desc" field.
func DescEqualFold ¶
DescEqualFold applies the EqualFold predicate on the "desc" field.
func DescHasPrefix ¶
DescHasPrefix applies the HasPrefix predicate on the "desc" field.
func DescHasSuffix ¶
DescHasSuffix applies the HasSuffix predicate on the "desc" field.
func HasRuleSections ¶
HasRuleSections applies the HasEdge predicate on the "rule_sections" edge.
func HasRuleSectionsWith ¶
func HasRuleSectionsWith(preds ...predicate.RuleSection) predicate.Rule
HasRuleSectionsWith applies the HasEdge predicate on the "rule_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 ByDesc ¶
func ByDesc(opts ...sql.OrderTermOption) OrderOption
ByDesc orders the results by the desc field.
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 ByRuleSections ¶
func ByRuleSections(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRuleSections orders the results by rule_sections terms.
func ByRuleSectionsCount ¶
func ByRuleSectionsCount(opts ...sql.OrderTermOption) OrderOption
ByRuleSectionsCount orders the results by rule_sections count.