node

package
v0.0.0-...-b6261dd Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

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

Columns holds all SQL columns for node fields.

View Source
var (
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Functions

func And

func And(predicates ...predicate.Node) predicate.Node

And groups predicates with the AND operator between them.

func HasChildren

func HasChildren() predicate.Node

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

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Node) predicate.Node

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

func HasParent

func HasParent() predicate.Node

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

func HasParentWith

func HasParentWith(preds ...predicate.Node) predicate.Node

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

func ID

func ID(id uuid.UUID) predicate.Node

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Node

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Node

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Node

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Node

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Node

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Node

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Node

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Node

IDNotIn applies the NotIn predicate on the ID field.

func LabelContains

func LabelContains(v string) predicate.Node

LabelContains applies the Contains predicate on the "label" field.

func LabelContainsFold

func LabelContainsFold(v string) predicate.Node

LabelContainsFold applies the ContainsFold predicate on the "label" field.

func LabelEQ

func LabelEQ(v string) predicate.Node

LabelEQ applies the EQ predicate on the "label" field.

func LabelEqualFold

func LabelEqualFold(v string) predicate.Node

LabelEqualFold applies the EqualFold predicate on the "label" field.

func LabelGT

func LabelGT(v string) predicate.Node

LabelGT applies the GT predicate on the "label" field.

func LabelGTE

func LabelGTE(v string) predicate.Node

LabelGTE applies the GTE predicate on the "label" field.

func LabelHasPrefix

func LabelHasPrefix(v string) predicate.Node

LabelHasPrefix applies the HasPrefix predicate on the "label" field.

func LabelHasSuffix

func LabelHasSuffix(v string) predicate.Node

LabelHasSuffix applies the HasSuffix predicate on the "label" field.

func LabelIn

func LabelIn(vs ...string) predicate.Node

LabelIn applies the In predicate on the "label" field.

func LabelLT

func LabelLT(v string) predicate.Node

LabelLT applies the LT predicate on the "label" field.

func LabelLTE

func LabelLTE(v string) predicate.Node

LabelLTE applies the LTE predicate on the "label" field.

func LabelNEQ

func LabelNEQ(v string) predicate.Node

LabelNEQ applies the NEQ predicate on the "label" field.

func LabelNotIn

func LabelNotIn(vs ...string) predicate.Node

LabelNotIn applies the NotIn predicate on the "label" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Node) predicate.Node

Or groups predicates with the OR operator between them.

func ParentID

func ParentID(v uuid.UUID) predicate.Node

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

func ParentIDEQ

func ParentIDEQ(v uuid.UUID) predicate.Node

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

func ParentIDIn

func ParentIDIn(vs ...uuid.UUID) predicate.Node

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

func ParentIDIsNil

func ParentIDIsNil() predicate.Node

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

func ParentIDNEQ

func ParentIDNEQ(v uuid.UUID) predicate.Node

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

func ParentIDNotIn

func ParentIDNotIn(vs ...uuid.UUID) predicate.Node

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

func ParentIDNotNil

func ParentIDNotNil() predicate.Node

ParentIDNotNil applies the NotNil predicate on the "parent_id" 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 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.

Jump to

Keyboard shortcuts

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