planet

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the planet type in the database.
	Label = "planet"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldAge holds the string denoting the age field in the database.
	FieldAge = "age"

	// EdgeNeighbors holds the string denoting the neighbors edge name in mutations.
	EdgeNeighbors = "neighbors"

	// Table holds the table name of the planet in the database.
	Table = "planets"
	// NeighborsTable is the table the holds the neighbors relation/edge. The primary key declared below.
	NeighborsTable = "planet_neighbors"
)

Variables

View Source
var (
	Hooks  [2]ent.Hook
	Policy ent.Policy
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
)

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/facebook/ent/entc/integration/privacy/ent/runtime"
View Source
var Columns = []string{
	FieldID,
	FieldName,
	FieldAge,
}

Columns holds all SQL columns for planet fields.

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

ForeignKeys holds the SQL foreign-keys that are owned by the Planet type.

View Source
var (
	// NeighborsPrimaryKey and NeighborsColumn2 are the table columns denoting the
	// primary key for the neighbors relation (M2M).
	NeighborsPrimaryKey = []string{"planet_id", "neighbor_id"}
)

Functions

func Age

func Age(v uint) predicate.Planet

Age applies equality check predicate on the "age" field. It's identical to AgeEQ.

func AgeEQ

func AgeEQ(v uint) predicate.Planet

AgeEQ applies the EQ predicate on the "age" field.

func AgeGT

func AgeGT(v uint) predicate.Planet

AgeGT applies the GT predicate on the "age" field.

func AgeGTE

func AgeGTE(v uint) predicate.Planet

AgeGTE applies the GTE predicate on the "age" field.

func AgeIn

func AgeIn(vs ...uint) predicate.Planet

AgeIn applies the In predicate on the "age" field.

func AgeIsNil

func AgeIsNil() predicate.Planet

AgeIsNil applies the IsNil predicate on the "age" field.

func AgeLT

func AgeLT(v uint) predicate.Planet

AgeLT applies the LT predicate on the "age" field.

func AgeLTE

func AgeLTE(v uint) predicate.Planet

AgeLTE applies the LTE predicate on the "age" field.

func AgeNEQ

func AgeNEQ(v uint) predicate.Planet

AgeNEQ applies the NEQ predicate on the "age" field.

func AgeNotIn

func AgeNotIn(vs ...uint) predicate.Planet

AgeNotIn applies the NotIn predicate on the "age" field.

func AgeNotNil

func AgeNotNil() predicate.Planet

AgeNotNil applies the NotNil predicate on the "age" field.

func And

func And(predicates ...predicate.Planet) predicate.Planet

And groups list of predicates with the AND operator between them.

func HasNeighbors

func HasNeighbors() predicate.Planet

HasNeighbors applies the HasEdge predicate on the "neighbors" edge.

func HasNeighborsWith

func HasNeighborsWith(preds ...predicate.Planet) predicate.Planet

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

func ID

func ID(id int) predicate.Planet

ID filters vertices based on their identifier.

func IDEQ

func IDEQ(id int) predicate.Planet

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Planet

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Planet

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Planet

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Planet

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Planet

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Planet

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Planet

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Planet

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Planet

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Planet

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Planet

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Planet

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Planet

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Planet

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Planet

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Planet

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Planet

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Planet

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Planet

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Planet) predicate.Planet

Or groups list of predicates with the OR operator between them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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