Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Node) predicate.Node
- func HasChildren() predicate.Node
- func HasChildrenWith(preds ...predicate.Node) predicate.Node
- func HasParent() predicate.Node
- func HasParentWith(preds ...predicate.Node) predicate.Node
- func ID(id uuid.UUID) predicate.Node
- func IDEQ(id uuid.UUID) predicate.Node
- func IDGT(id uuid.UUID) predicate.Node
- func IDGTE(id uuid.UUID) predicate.Node
- func IDIn(ids ...uuid.UUID) predicate.Node
- func IDLT(id uuid.UUID) predicate.Node
- func IDLTE(id uuid.UUID) predicate.Node
- func IDNEQ(id uuid.UUID) predicate.Node
- func IDNotIn(ids ...uuid.UUID) predicate.Node
- func LabelContains(v string) predicate.Node
- func LabelContainsFold(v string) predicate.Node
- func LabelEQ(v string) predicate.Node
- func LabelEqualFold(v string) predicate.Node
- func LabelGT(v string) predicate.Node
- func LabelGTE(v string) predicate.Node
- func LabelHasPrefix(v string) predicate.Node
- func LabelHasSuffix(v string) predicate.Node
- func LabelIn(vs ...string) predicate.Node
- func LabelLT(v string) predicate.Node
- func LabelLTE(v string) predicate.Node
- func LabelNEQ(v string) predicate.Node
- func LabelNotIn(vs ...string) predicate.Node
- func Not(p predicate.Node) predicate.Node
- func Or(predicates ...predicate.Node) predicate.Node
- func ParentID(v uuid.UUID) predicate.Node
- func ParentIDEQ(v uuid.UUID) predicate.Node
- func ParentIDIn(vs ...uuid.UUID) predicate.Node
- func ParentIDIsNil() predicate.Node
- func ParentIDNEQ(v uuid.UUID) predicate.Node
- func ParentIDNotIn(vs ...uuid.UUID) predicate.Node
- func ParentIDNotNil() predicate.Node
- 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 ByLabel(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByParentID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the node type in the database. Label = "node" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldLabel holds the string denoting the label field in the database. FieldLabel = "label" // FieldParentID holds the string denoting the parent_id field in the database. FieldParentID = "parent_id" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // Table holds the table name of the node in the database. Table = "nodes" // ChildrenTable is the table that holds the children relation/edge. ChildrenTable = "nodes" // ChildrenColumn is the table column denoting the children relation/edge. ChildrenColumn = "parent_id" // ParentTable is the table that holds the parent relation/edge. ParentTable = "nodes" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "parent_id" )
Variables ¶
var Columns = []string{ FieldID, FieldLabel, FieldParentID, }
Columns holds all SQL columns for node fields.
var ( // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
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 LabelContains ¶
LabelContains applies the Contains predicate on the "label" field.
func LabelContainsFold ¶
LabelContainsFold applies the ContainsFold predicate on the "label" field.
func LabelEqualFold ¶
LabelEqualFold applies the EqualFold predicate on the "label" field.
func LabelHasPrefix ¶
LabelHasPrefix applies the HasPrefix predicate on the "label" field.
func LabelHasSuffix ¶
LabelHasSuffix applies the HasSuffix predicate on the "label" field.
func LabelNotIn ¶
LabelNotIn applies the NotIn predicate on the "label" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Node 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 ByLabel ¶
func ByLabel(opts ...sql.OrderTermOption) OrderOption
ByLabel orders the results by the label 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.