relationship

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the relationship type in the database.
	Label = "relationship"
	// FieldWeight holds the string denoting the weight field in the database.
	FieldWeight = "weight"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldRelativeID holds the string denoting the relative_id field in the database.
	FieldRelativeID = "relative_id"
	// FieldInfoID holds the string denoting the info_id field in the database.
	FieldInfoID = "info_id"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeRelative holds the string denoting the relative edge name in mutations.
	EdgeRelative = "relative"
	// EdgeInfo holds the string denoting the info edge name in mutations.
	EdgeInfo = "info"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "id"
	// RelationshipInfoFieldID holds the string denoting the ID field of the RelationshipInfo.
	RelationshipInfoFieldID = "id"
	// Table holds the table name of the relationship in the database.
	Table = "relationships"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "relationships"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_id"
	// RelativeTable is the table that holds the relative relation/edge.
	RelativeTable = "relationships"
	// RelativeInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	RelativeInverseTable = "users"
	// RelativeColumn is the table column denoting the relative relation/edge.
	RelativeColumn = "relative_id"
	// InfoTable is the table that holds the info relation/edge.
	InfoTable = "relationships"
	// InfoInverseTable is the table name for the RelationshipInfo entity.
	// It exists in this package in order to avoid circular dependency with the "relationshipinfo" package.
	InfoInverseTable = "relationship_infos"
	// InfoColumn is the table column denoting the info relation/edge.
	InfoColumn = "info_id"
)

Variables

View Source
var (
	Hooks  [1]ent.Hook
	Policy ent.Policy
	// DefaultWeight holds the default value on creation for the "weight" field.
	DefaultWeight int
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "entgo.io/ent/entc/integration/edgeschema/ent/runtime"

Columns holds all SQL columns for relationship fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func HasInfo

func HasInfo() predicate.Relationship

HasInfo applies the HasEdge predicate on the "info" edge.

func HasInfoWith

func HasInfoWith(preds ...predicate.RelationshipInfo) predicate.Relationship

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

func HasRelative

func HasRelative() predicate.Relationship

HasRelative applies the HasEdge predicate on the "relative" edge.

func HasRelativeWith

func HasRelativeWith(preds ...predicate.User) predicate.Relationship

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

func HasUser

func HasUser() predicate.Relationship

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Relationship

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

func InfoID

func InfoID(v int) predicate.Relationship

InfoID applies equality check predicate on the "info_id" field. It's identical to InfoIDEQ.

func InfoIDEQ

func InfoIDEQ(v int) predicate.Relationship

InfoIDEQ applies the EQ predicate on the "info_id" field.

func InfoIDIn

func InfoIDIn(vs ...int) predicate.Relationship

InfoIDIn applies the In predicate on the "info_id" field.

func InfoIDIsNil

func InfoIDIsNil() predicate.Relationship

InfoIDIsNil applies the IsNil predicate on the "info_id" field.

func InfoIDNEQ

func InfoIDNEQ(v int) predicate.Relationship

InfoIDNEQ applies the NEQ predicate on the "info_id" field.

func InfoIDNotIn

func InfoIDNotIn(vs ...int) predicate.Relationship

InfoIDNotIn applies the NotIn predicate on the "info_id" field.

func InfoIDNotNil

func InfoIDNotNil() predicate.Relationship

InfoIDNotNil applies the NotNil predicate on the "info_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 RelativeID

func RelativeID(v int) predicate.Relationship

RelativeID applies equality check predicate on the "relative_id" field. It's identical to RelativeIDEQ.

func RelativeIDEQ

func RelativeIDEQ(v int) predicate.Relationship

RelativeIDEQ applies the EQ predicate on the "relative_id" field.

func RelativeIDIn

func RelativeIDIn(vs ...int) predicate.Relationship

RelativeIDIn applies the In predicate on the "relative_id" field.

func RelativeIDNEQ

func RelativeIDNEQ(v int) predicate.Relationship

RelativeIDNEQ applies the NEQ predicate on the "relative_id" field.

func RelativeIDNotIn

func RelativeIDNotIn(vs ...int) predicate.Relationship

RelativeIDNotIn applies the NotIn predicate on the "relative_id" field.

func UserID

func UserID(v int) predicate.Relationship

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.Relationship

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Relationship

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Relationship

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Relationship

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func ValidColumn

func ValidColumn(column string) bool

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

func Weight

func Weight(v int) predicate.Relationship

Weight applies equality check predicate on the "weight" field. It's identical to WeightEQ.

func WeightEQ

func WeightEQ(v int) predicate.Relationship

WeightEQ applies the EQ predicate on the "weight" field.

func WeightGT

func WeightGT(v int) predicate.Relationship

WeightGT applies the GT predicate on the "weight" field.

func WeightGTE

func WeightGTE(v int) predicate.Relationship

WeightGTE applies the GTE predicate on the "weight" field.

func WeightIn

func WeightIn(vs ...int) predicate.Relationship

WeightIn applies the In predicate on the "weight" field.

func WeightLT

func WeightLT(v int) predicate.Relationship

WeightLT applies the LT predicate on the "weight" field.

func WeightLTE

func WeightLTE(v int) predicate.Relationship

WeightLTE applies the LTE predicate on the "weight" field.

func WeightNEQ

func WeightNEQ(v int) predicate.Relationship

WeightNEQ applies the NEQ predicate on the "weight" field.

func WeightNotIn

func WeightNotIn(vs ...int) predicate.Relationship

WeightNotIn applies the NotIn predicate on the "weight" field.

Types

This section is empty.

Jump to

Keyboard shortcuts

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