Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Menu) predicate.Menu
- func HasChildren() predicate.Menu
- func HasChildrenWith(preds ...predicate.Menu) predicate.Menu
- func HasParent() predicate.Menu
- func HasParentWith(preds ...predicate.Menu) predicate.Menu
- func ID(id uint32) predicate.Menu
- func IDEQ(id uint32) predicate.Menu
- func IDGT(id uint32) predicate.Menu
- func IDGTE(id uint32) predicate.Menu
- func IDIn(ids ...uint32) predicate.Menu
- func IDLT(id uint32) predicate.Menu
- func IDLTE(id uint32) predicate.Menu
- func IDNEQ(id uint32) predicate.Menu
- func IDNotIn(ids ...uint32) predicate.Menu
- func Name(v string) predicate.Menu
- func NameContains(v string) predicate.Menu
- func NameContainsFold(v string) predicate.Menu
- func NameEQ(v string) predicate.Menu
- func NameEqualFold(v string) predicate.Menu
- func NameGT(v string) predicate.Menu
- func NameGTE(v string) predicate.Menu
- func NameHasPrefix(v string) predicate.Menu
- func NameHasSuffix(v string) predicate.Menu
- func NameIn(vs ...string) predicate.Menu
- func NameLT(v string) predicate.Menu
- func NameLTE(v string) predicate.Menu
- func NameNEQ(v string) predicate.Menu
- func NameNotIn(vs ...string) predicate.Menu
- func Not(p predicate.Menu) predicate.Menu
- func Or(predicates ...predicate.Menu) predicate.Menu
- func ParentID(v uint32) predicate.Menu
- func ParentIDEQ(v uint32) predicate.Menu
- func ParentIDIn(vs ...uint32) predicate.Menu
- func ParentIDIsNil() predicate.Menu
- func ParentIDNEQ(v uint32) predicate.Menu
- func ParentIDNotIn(vs ...uint32) predicate.Menu
- func ParentIDNotNil() predicate.Menu
- func Path(v string) predicate.Menu
- func PathContains(v string) predicate.Menu
- func PathContainsFold(v string) predicate.Menu
- func PathEQ(v string) predicate.Menu
- func PathEqualFold(v string) predicate.Menu
- func PathGT(v string) predicate.Menu
- func PathGTE(v string) predicate.Menu
- func PathHasPrefix(v string) predicate.Menu
- func PathHasSuffix(v string) predicate.Menu
- func PathIn(vs ...string) predicate.Menu
- func PathIsNil() predicate.Menu
- func PathLT(v string) predicate.Menu
- func PathLTE(v string) predicate.Menu
- func PathNEQ(v string) predicate.Menu
- func PathNotIn(vs ...string) predicate.Menu
- func PathNotNil() predicate.Menu
- func ValidColumn(column string) bool
- type OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByParentID(opts ...sql.OrderTermOption) OrderOption
- func ByPath(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the menu type in the database. Label = "menu" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldParentID holds the string denoting the parent_id field in the database. FieldParentID = "parent_id" // FieldPath holds the string denoting the path field in the database. FieldPath = "path" // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // Table holds the table name of the menu in the database. Table = "menus" // ParentTable is the table that holds the parent relation/edge. ParentTable = "menus" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "parent_id" // ChildrenTable is the table that holds the children relation/edge. ChildrenTable = "menus" // ChildrenColumn is the table column denoting the children relation/edge. ChildrenColumn = "parent_id" )
Variables ¶
var ( // PathValidator is a validator for the "path" field. It is called by the builders before save. PathValidator func(string) error // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(uint32) error )
var Columns = []string{ FieldID, FieldParentID, FieldPath, FieldName, }
Columns holds all SQL columns for menu fields.
Functions ¶
func HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" 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 ParentID ¶
ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
func ParentIDEQ ¶
ParentIDEQ applies the EQ predicate on the "parent_id" field.
func ParentIDIn ¶
ParentIDIn applies the In predicate on the "parent_id" field.
func ParentIDIsNil ¶
ParentIDIsNil applies the IsNil predicate on the "parent_id" field.
func ParentIDNEQ ¶
ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
func ParentIDNotIn ¶
ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
func ParentIDNotNil ¶
ParentIDNotNil applies the NotNil predicate on the "parent_id" field.
func PathContains ¶
PathContains applies the Contains predicate on the "path" field.
func PathContainsFold ¶
PathContainsFold applies the ContainsFold predicate on the "path" field.
func PathEqualFold ¶
PathEqualFold applies the EqualFold predicate on the "path" field.
func PathHasPrefix ¶
PathHasPrefix applies the HasPrefix predicate on the "path" field.
func PathHasSuffix ¶
PathHasSuffix applies the HasSuffix predicate on the "path" field.
func PathNotNil ¶
PathNotNil applies the NotNil predicate on the "path" 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 Menu queries.
func ByChildren ¶
func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByChildren orders the results by children terms.
func ByChildrenCount ¶
func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
ByChildrenCount orders the results by children count.
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 ByParentField ¶
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
ByParentField orders the results by parent field.
func ByParentID ¶
func ByParentID(opts ...sql.OrderTermOption) OrderOption
ByParentID orders the results by the parent_id field.
func ByPath ¶
func ByPath(opts ...sql.OrderTermOption) OrderOption
ByPath orders the results by the path field.