menu

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)

Columns holds all SQL columns for menu fields.

Functions

func And

func And(predicates ...predicate.Menu) predicate.Menu

And groups predicates with the AND operator between them.

func HasChildren

func HasChildren() predicate.Menu

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Menu) predicate.Menu

HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).

func HasParent

func HasParent() predicate.Menu

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.Menu) predicate.Menu

HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).

func ID

func ID(id uint32) predicate.Menu

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint32) predicate.Menu

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint32) predicate.Menu

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint32) predicate.Menu

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uint32) predicate.Menu

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint32) predicate.Menu

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint32) predicate.Menu

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint32) predicate.Menu

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uint32) predicate.Menu

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Menu

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Menu

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Menu

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Menu

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Menu

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Menu

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Menu

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Menu

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Menu

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Menu

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Menu

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Menu

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Menu

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Menu

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Menu) predicate.Menu

Or groups predicates with the OR operator between them.

func ParentID

func ParentID(v uint32) predicate.Menu

ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.

func ParentIDEQ

func ParentIDEQ(v uint32) predicate.Menu

ParentIDEQ applies the EQ predicate on the "parent_id" field.

func ParentIDIn

func ParentIDIn(vs ...uint32) predicate.Menu

ParentIDIn applies the In predicate on the "parent_id" field.

func ParentIDIsNil

func ParentIDIsNil() predicate.Menu

ParentIDIsNil applies the IsNil predicate on the "parent_id" field.

func ParentIDNEQ

func ParentIDNEQ(v uint32) predicate.Menu

ParentIDNEQ applies the NEQ predicate on the "parent_id" field.

func ParentIDNotIn

func ParentIDNotIn(vs ...uint32) predicate.Menu

ParentIDNotIn applies the NotIn predicate on the "parent_id" field.

func ParentIDNotNil

func ParentIDNotNil() predicate.Menu

ParentIDNotNil applies the NotNil predicate on the "parent_id" field.

func Path

func Path(v string) predicate.Menu

Path applies equality check predicate on the "path" field. It's identical to PathEQ.

func PathContains

func PathContains(v string) predicate.Menu

PathContains applies the Contains predicate on the "path" field.

func PathContainsFold

func PathContainsFold(v string) predicate.Menu

PathContainsFold applies the ContainsFold predicate on the "path" field.

func PathEQ

func PathEQ(v string) predicate.Menu

PathEQ applies the EQ predicate on the "path" field.

func PathEqualFold

func PathEqualFold(v string) predicate.Menu

PathEqualFold applies the EqualFold predicate on the "path" field.

func PathGT

func PathGT(v string) predicate.Menu

PathGT applies the GT predicate on the "path" field.

func PathGTE

func PathGTE(v string) predicate.Menu

PathGTE applies the GTE predicate on the "path" field.

func PathHasPrefix

func PathHasPrefix(v string) predicate.Menu

PathHasPrefix applies the HasPrefix predicate on the "path" field.

func PathHasSuffix

func PathHasSuffix(v string) predicate.Menu

PathHasSuffix applies the HasSuffix predicate on the "path" field.

func PathIn

func PathIn(vs ...string) predicate.Menu

PathIn applies the In predicate on the "path" field.

func PathIsNil

func PathIsNil() predicate.Menu

PathIsNil applies the IsNil predicate on the "path" field.

func PathLT

func PathLT(v string) predicate.Menu

PathLT applies the LT predicate on the "path" field.

func PathLTE

func PathLTE(v string) predicate.Menu

PathLTE applies the LTE predicate on the "path" field.

func PathNEQ

func PathNEQ(v string) predicate.Menu

PathNEQ applies the NEQ predicate on the "path" field.

func PathNotIn

func PathNotIn(vs ...string) predicate.Menu

PathNotIn applies the NotIn predicate on the "path" field.

func PathNotNil

func PathNotNil() predicate.Menu

PathNotNil applies the NotNil predicate on the "path" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL