relationship

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the relationship type in the database.
	Label = "relationship"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldFromType holds the string denoting the from_type field in the database.
	FieldFromType = "from_type"
	// FieldFromID holds the string denoting the from_id field in the database.
	FieldFromID = "from_id"
	// FieldRelType holds the string denoting the rel_type field in the database.
	FieldRelType = "rel_type"
	// FieldToType holds the string denoting the to_type field in the database.
	FieldToType = "to_type"
	// FieldToID holds the string denoting the to_id field in the database.
	FieldToID = "to_id"
	// FieldProduct holds the string denoting the product field in the database.
	FieldProduct = "product"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// Table holds the table name of the relationship in the database.
	Table = "relationships"
)

Variables

Columns holds all SQL columns for relationship fields.

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Functions

func And

func And(predicates ...predicate.Relationship) predicate.Relationship

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Relationship

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Relationship

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Relationship

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Relationship

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Relationship

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Relationship

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Relationship

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Relationship

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Relationship

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func FromID

func FromID(v string) predicate.Relationship

FromID applies equality check predicate on the "from_id" field. It's identical to FromIDEQ.

func FromIDContains

func FromIDContains(v string) predicate.Relationship

FromIDContains applies the Contains predicate on the "from_id" field.

func FromIDContainsFold

func FromIDContainsFold(v string) predicate.Relationship

FromIDContainsFold applies the ContainsFold predicate on the "from_id" field.

func FromIDEQ

func FromIDEQ(v string) predicate.Relationship

FromIDEQ applies the EQ predicate on the "from_id" field.

func FromIDEqualFold

func FromIDEqualFold(v string) predicate.Relationship

FromIDEqualFold applies the EqualFold predicate on the "from_id" field.

func FromIDGT

func FromIDGT(v string) predicate.Relationship

FromIDGT applies the GT predicate on the "from_id" field.

func FromIDGTE

func FromIDGTE(v string) predicate.Relationship

FromIDGTE applies the GTE predicate on the "from_id" field.

func FromIDHasPrefix

func FromIDHasPrefix(v string) predicate.Relationship

FromIDHasPrefix applies the HasPrefix predicate on the "from_id" field.

func FromIDHasSuffix

func FromIDHasSuffix(v string) predicate.Relationship

FromIDHasSuffix applies the HasSuffix predicate on the "from_id" field.

func FromIDIn

func FromIDIn(vs ...string) predicate.Relationship

FromIDIn applies the In predicate on the "from_id" field.

func FromIDLT

func FromIDLT(v string) predicate.Relationship

FromIDLT applies the LT predicate on the "from_id" field.

func FromIDLTE

func FromIDLTE(v string) predicate.Relationship

FromIDLTE applies the LTE predicate on the "from_id" field.

func FromIDNEQ

func FromIDNEQ(v string) predicate.Relationship

FromIDNEQ applies the NEQ predicate on the "from_id" field.

func FromIDNotIn

func FromIDNotIn(vs ...string) predicate.Relationship

FromIDNotIn applies the NotIn predicate on the "from_id" field.

func FromType

func FromType(v string) predicate.Relationship

FromType applies equality check predicate on the "from_type" field. It's identical to FromTypeEQ.

func FromTypeContains

func FromTypeContains(v string) predicate.Relationship

FromTypeContains applies the Contains predicate on the "from_type" field.

func FromTypeContainsFold

func FromTypeContainsFold(v string) predicate.Relationship

FromTypeContainsFold applies the ContainsFold predicate on the "from_type" field.

func FromTypeEQ

func FromTypeEQ(v string) predicate.Relationship

FromTypeEQ applies the EQ predicate on the "from_type" field.

func FromTypeEqualFold

func FromTypeEqualFold(v string) predicate.Relationship

FromTypeEqualFold applies the EqualFold predicate on the "from_type" field.

func FromTypeGT

func FromTypeGT(v string) predicate.Relationship

FromTypeGT applies the GT predicate on the "from_type" field.

func FromTypeGTE

func FromTypeGTE(v string) predicate.Relationship

FromTypeGTE applies the GTE predicate on the "from_type" field.

func FromTypeHasPrefix

func FromTypeHasPrefix(v string) predicate.Relationship

FromTypeHasPrefix applies the HasPrefix predicate on the "from_type" field.

func FromTypeHasSuffix

func FromTypeHasSuffix(v string) predicate.Relationship

FromTypeHasSuffix applies the HasSuffix predicate on the "from_type" field.

func FromTypeIn

func FromTypeIn(vs ...string) predicate.Relationship

FromTypeIn applies the In predicate on the "from_type" field.

func FromTypeLT

func FromTypeLT(v string) predicate.Relationship

FromTypeLT applies the LT predicate on the "from_type" field.

func FromTypeLTE

func FromTypeLTE(v string) predicate.Relationship

FromTypeLTE applies the LTE predicate on the "from_type" field.

func FromTypeNEQ

func FromTypeNEQ(v string) predicate.Relationship

FromTypeNEQ applies the NEQ predicate on the "from_type" field.

func FromTypeNotIn

func FromTypeNotIn(vs ...string) predicate.Relationship

FromTypeNotIn applies the NotIn predicate on the "from_type" field.

func ID

func ID(id int) predicate.Relationship

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Relationship

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Relationship

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Relationship

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Relationship

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Relationship

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Relationship

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Relationship

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Relationship

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Relationship) predicate.Relationship

Or groups predicates with the OR operator between them.

func Product

func Product(v string) predicate.Relationship

Product applies equality check predicate on the "product" field. It's identical to ProductEQ.

func ProductContains

func ProductContains(v string) predicate.Relationship

ProductContains applies the Contains predicate on the "product" field.

func ProductContainsFold

func ProductContainsFold(v string) predicate.Relationship

ProductContainsFold applies the ContainsFold predicate on the "product" field.

func ProductEQ

func ProductEQ(v string) predicate.Relationship

ProductEQ applies the EQ predicate on the "product" field.

func ProductEqualFold

func ProductEqualFold(v string) predicate.Relationship

ProductEqualFold applies the EqualFold predicate on the "product" field.

func ProductGT

func ProductGT(v string) predicate.Relationship

ProductGT applies the GT predicate on the "product" field.

func ProductGTE

func ProductGTE(v string) predicate.Relationship

ProductGTE applies the GTE predicate on the "product" field.

func ProductHasPrefix

func ProductHasPrefix(v string) predicate.Relationship

ProductHasPrefix applies the HasPrefix predicate on the "product" field.

func ProductHasSuffix

func ProductHasSuffix(v string) predicate.Relationship

ProductHasSuffix applies the HasSuffix predicate on the "product" field.

func ProductIn

func ProductIn(vs ...string) predicate.Relationship

ProductIn applies the In predicate on the "product" field.

func ProductIsNil

func ProductIsNil() predicate.Relationship

ProductIsNil applies the IsNil predicate on the "product" field.

func ProductLT

func ProductLT(v string) predicate.Relationship

ProductLT applies the LT predicate on the "product" field.

func ProductLTE

func ProductLTE(v string) predicate.Relationship

ProductLTE applies the LTE predicate on the "product" field.

func ProductNEQ

func ProductNEQ(v string) predicate.Relationship

ProductNEQ applies the NEQ predicate on the "product" field.

func ProductNotIn

func ProductNotIn(vs ...string) predicate.Relationship

ProductNotIn applies the NotIn predicate on the "product" field.

func ProductNotNil

func ProductNotNil() predicate.Relationship

ProductNotNil applies the NotNil predicate on the "product" field.

func RelType

func RelType(v string) predicate.Relationship

RelType applies equality check predicate on the "rel_type" field. It's identical to RelTypeEQ.

func RelTypeContains

func RelTypeContains(v string) predicate.Relationship

RelTypeContains applies the Contains predicate on the "rel_type" field.

func RelTypeContainsFold

func RelTypeContainsFold(v string) predicate.Relationship

RelTypeContainsFold applies the ContainsFold predicate on the "rel_type" field.

func RelTypeEQ

func RelTypeEQ(v string) predicate.Relationship

RelTypeEQ applies the EQ predicate on the "rel_type" field.

func RelTypeEqualFold

func RelTypeEqualFold(v string) predicate.Relationship

RelTypeEqualFold applies the EqualFold predicate on the "rel_type" field.

func RelTypeGT

func RelTypeGT(v string) predicate.Relationship

RelTypeGT applies the GT predicate on the "rel_type" field.

func RelTypeGTE

func RelTypeGTE(v string) predicate.Relationship

RelTypeGTE applies the GTE predicate on the "rel_type" field.

func RelTypeHasPrefix

func RelTypeHasPrefix(v string) predicate.Relationship

RelTypeHasPrefix applies the HasPrefix predicate on the "rel_type" field.

func RelTypeHasSuffix

func RelTypeHasSuffix(v string) predicate.Relationship

RelTypeHasSuffix applies the HasSuffix predicate on the "rel_type" field.

func RelTypeIn

func RelTypeIn(vs ...string) predicate.Relationship

RelTypeIn applies the In predicate on the "rel_type" field.

func RelTypeLT

func RelTypeLT(v string) predicate.Relationship

RelTypeLT applies the LT predicate on the "rel_type" field.

func RelTypeLTE

func RelTypeLTE(v string) predicate.Relationship

RelTypeLTE applies the LTE predicate on the "rel_type" field.

func RelTypeNEQ

func RelTypeNEQ(v string) predicate.Relationship

RelTypeNEQ applies the NEQ predicate on the "rel_type" field.

func RelTypeNotIn

func RelTypeNotIn(vs ...string) predicate.Relationship

RelTypeNotIn applies the NotIn predicate on the "rel_type" field.

func ToID

ToID applies equality check predicate on the "to_id" field. It's identical to ToIDEQ.

func ToIDContains

func ToIDContains(v string) predicate.Relationship

ToIDContains applies the Contains predicate on the "to_id" field.

func ToIDContainsFold

func ToIDContainsFold(v string) predicate.Relationship

ToIDContainsFold applies the ContainsFold predicate on the "to_id" field.

func ToIDEQ

func ToIDEQ(v string) predicate.Relationship

ToIDEQ applies the EQ predicate on the "to_id" field.

func ToIDEqualFold

func ToIDEqualFold(v string) predicate.Relationship

ToIDEqualFold applies the EqualFold predicate on the "to_id" field.

func ToIDGT

func ToIDGT(v string) predicate.Relationship

ToIDGT applies the GT predicate on the "to_id" field.

func ToIDGTE

func ToIDGTE(v string) predicate.Relationship

ToIDGTE applies the GTE predicate on the "to_id" field.

func ToIDHasPrefix

func ToIDHasPrefix(v string) predicate.Relationship

ToIDHasPrefix applies the HasPrefix predicate on the "to_id" field.

func ToIDHasSuffix

func ToIDHasSuffix(v string) predicate.Relationship

ToIDHasSuffix applies the HasSuffix predicate on the "to_id" field.

func ToIDIn

func ToIDIn(vs ...string) predicate.Relationship

ToIDIn applies the In predicate on the "to_id" field.

func ToIDLT

func ToIDLT(v string) predicate.Relationship

ToIDLT applies the LT predicate on the "to_id" field.

func ToIDLTE

func ToIDLTE(v string) predicate.Relationship

ToIDLTE applies the LTE predicate on the "to_id" field.

func ToIDNEQ

func ToIDNEQ(v string) predicate.Relationship

ToIDNEQ applies the NEQ predicate on the "to_id" field.

func ToIDNotIn

func ToIDNotIn(vs ...string) predicate.Relationship

ToIDNotIn applies the NotIn predicate on the "to_id" field.

func ToType

func ToType(v string) predicate.Relationship

ToType applies equality check predicate on the "to_type" field. It's identical to ToTypeEQ.

func ToTypeContains

func ToTypeContains(v string) predicate.Relationship

ToTypeContains applies the Contains predicate on the "to_type" field.

func ToTypeContainsFold

func ToTypeContainsFold(v string) predicate.Relationship

ToTypeContainsFold applies the ContainsFold predicate on the "to_type" field.

func ToTypeEQ

func ToTypeEQ(v string) predicate.Relationship

ToTypeEQ applies the EQ predicate on the "to_type" field.

func ToTypeEqualFold

func ToTypeEqualFold(v string) predicate.Relationship

ToTypeEqualFold applies the EqualFold predicate on the "to_type" field.

func ToTypeGT

func ToTypeGT(v string) predicate.Relationship

ToTypeGT applies the GT predicate on the "to_type" field.

func ToTypeGTE

func ToTypeGTE(v string) predicate.Relationship

ToTypeGTE applies the GTE predicate on the "to_type" field.

func ToTypeHasPrefix

func ToTypeHasPrefix(v string) predicate.Relationship

ToTypeHasPrefix applies the HasPrefix predicate on the "to_type" field.

func ToTypeHasSuffix

func ToTypeHasSuffix(v string) predicate.Relationship

ToTypeHasSuffix applies the HasSuffix predicate on the "to_type" field.

func ToTypeIn

func ToTypeIn(vs ...string) predicate.Relationship

ToTypeIn applies the In predicate on the "to_type" field.

func ToTypeLT

func ToTypeLT(v string) predicate.Relationship

ToTypeLT applies the LT predicate on the "to_type" field.

func ToTypeLTE

func ToTypeLTE(v string) predicate.Relationship

ToTypeLTE applies the LTE predicate on the "to_type" field.

func ToTypeNEQ

func ToTypeNEQ(v string) predicate.Relationship

ToTypeNEQ applies the NEQ predicate on the "to_type" field.

func ToTypeNotIn

func ToTypeNotIn(vs ...string) predicate.Relationship

ToTypeNotIn applies the NotIn predicate on the "to_type" 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 Relationship queries.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByFromID

func ByFromID(opts ...sql.OrderTermOption) OrderOption

ByFromID orders the results by the from_id field.

func ByFromType

func ByFromType(opts ...sql.OrderTermOption) OrderOption

ByFromType orders the results by the from_type field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByProduct

func ByProduct(opts ...sql.OrderTermOption) OrderOption

ByProduct orders the results by the product field.

func ByRelType

func ByRelType(opts ...sql.OrderTermOption) OrderOption

ByRelType orders the results by the rel_type field.

func ByToID

func ByToID(opts ...sql.OrderTermOption) OrderOption

ByToID orders the results by the to_id field.

func ByToType

func ByToType(opts ...sql.OrderTermOption) OrderOption

ByToType orders the results by the to_type field.

Jump to

Keyboard shortcuts

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