projectassociation

package
v0.0.0-...-5435fe0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the projectassociation type in the database.
	Label = "project_association"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// EdgeParent holds the string denoting the parent edge name in mutations.
	EdgeParent = "parent"
	// EdgeChild holds the string denoting the child edge name in mutations.
	EdgeChild = "child"
	// Table holds the table name of the projectassociation in the database.
	Table = "project_associations"
	// ParentTable is the table that holds the parent relation/edge.
	ParentTable = "project_associations"
	// ParentInverseTable is the table name for the Project entity.
	// It exists in this package in order to avoid circular dependency with the "project" package.
	ParentInverseTable = "projects"
	// ParentColumn is the table column denoting the parent relation/edge.
	ParentColumn = "project_child_projects"
	// ChildTable is the table that holds the child relation/edge.
	ChildTable = "project_associations"
	// ChildInverseTable is the table name for the Project entity.
	// It exists in this package in order to avoid circular dependency with the "project" package.
	ChildInverseTable = "projects"
	// ChildColumn is the table column denoting the child relation/edge.
	ChildColumn = "project_parent_projects"
)

Variables

View Source
var (
	Hooks  [1]ent.Hook
	Policy ent.Policy
)

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 _ "github.com/fogo-sh/grackdb/ent/runtime"
View Source
var Columns = []string{
	FieldID,
	FieldType,
}

Columns holds all SQL columns for projectassociation fields.

View Source
var ForeignKeys = []string{
	"project_parent_projects",
	"project_child_projects",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "project_associations" table and are not defined as standalone fields in the schema.

Functions

func And

And groups predicates with the AND operator between them.

func HasChild

func HasChild() predicate.ProjectAssociation

HasChild applies the HasEdge predicate on the "child" edge.

func HasChildWith

func HasChildWith(preds ...predicate.Project) predicate.ProjectAssociation

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

func HasParent

func HasParent() predicate.ProjectAssociation

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

func HasParentWith

func HasParentWith(preds ...predicate.Project) predicate.ProjectAssociation

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

func ID

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func TypeEQ

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.ProjectAssociation

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.ProjectAssociation

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeBasedOff   Type = "BASED_OFF"
	TypeReplaces   Type = "REPLACES"
	TypeInspiredBy Type = "INSPIRED_BY"
	TypeRelated    Type = "RELATED"
)

Type values.

func (Type) MarshalGQL

func (e Type) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Type) String

func (_type Type) String() string

func (*Type) UnmarshalGQL

func (e *Type) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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