user

package
v0.5.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldWorth holds the string denoting the worth field in the database.
	FieldWorth = "worth"

	// EdgeCards holds the string denoting the cards edge name in mutations.
	EdgeCards = "cards"
	// EdgeFriends holds the string denoting the friends edge name in mutations.
	EdgeFriends = "friends"
	// EdgeBestFriend holds the string denoting the best_friend edge name in mutations.
	EdgeBestFriend = "best_friend"

	// Table holds the table name of the user in the database.
	Table = "users"
	// CardsTable is the table the holds the cards relation/edge.
	CardsTable = "cards"
	// CardsInverseTable is the table name for the Card entity.
	// It exists in this package in order to avoid circular dependency with the "card" package.
	CardsInverseTable = "cards"
	// CardsColumn is the table column denoting the cards relation/edge.
	CardsColumn = "user_cards"
	// FriendsTable is the table the holds the friends relation/edge. The primary key declared below.
	FriendsTable = "user_friends"
	// BestFriendTable is the table the holds the best_friend relation/edge.
	BestFriendTable = "users"
	// BestFriendColumn is the table column denoting the best_friend relation/edge.
	BestFriendColumn = "user_best_friend"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// DefaultVersion holds the default value on creation for the "version" field.
	DefaultVersion 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 _ "github.com/facebook/ent/entc/integration/hooks/ent/runtime"

Columns holds all SQL columns for user fields.

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

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

View Source
var (
	// FriendsPrimaryKey and FriendsColumn2 are the table columns denoting the
	// primary key for the friends relation (M2M).
	FriendsPrimaryKey = []string{"user_id", "friend_id"}
)

Functions

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func HasBestFriend

func HasBestFriend() predicate.User

HasBestFriend applies the HasEdge predicate on the "best_friend" edge.

func HasBestFriendWith

func HasBestFriendWith(preds ...predicate.User) predicate.User

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

func HasCards

func HasCards() predicate.User

HasCards applies the HasEdge predicate on the "cards" edge.

func HasCardsWith

func HasCardsWith(preds ...predicate.Card) predicate.User

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

func HasFriends

func HasFriends() predicate.User

HasFriends applies the HasEdge predicate on the "friends" edge.

func HasFriendsWith

func HasFriendsWith(preds ...predicate.User) predicate.User

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

func ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.User

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

func NameContains

func NameContains(v string) predicate.User

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

func NameContainsFold

func NameContainsFold(v string) predicate.User

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

func NameEQ

func NameEQ(v string) predicate.User

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

func NameEqualFold

func NameEqualFold(v string) predicate.User

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

func NameGT

func NameGT(v string) predicate.User

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

func NameGTE

func NameGTE(v string) predicate.User

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.User

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.User

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.User

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

func NameLTE

func NameLTE(v string) predicate.User

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

func NameNEQ

func NameNEQ(v string) predicate.User

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

func NameNotIn

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

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.User) predicate.User

Or groups predicates with the OR operator between them.

func ValidColumn added in v0.4.3

func ValidColumn(column string) bool

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

func Version

func Version(v int) predicate.User

Version applies equality check predicate on the "version" field. It's identical to VersionEQ.

func VersionEQ

func VersionEQ(v int) predicate.User

VersionEQ applies the EQ predicate on the "version" field.

func VersionGT

func VersionGT(v int) predicate.User

VersionGT applies the GT predicate on the "version" field.

func VersionGTE

func VersionGTE(v int) predicate.User

VersionGTE applies the GTE predicate on the "version" field.

func VersionIn

func VersionIn(vs ...int) predicate.User

VersionIn applies the In predicate on the "version" field.

func VersionLT

func VersionLT(v int) predicate.User

VersionLT applies the LT predicate on the "version" field.

func VersionLTE

func VersionLTE(v int) predicate.User

VersionLTE applies the LTE predicate on the "version" field.

func VersionNEQ

func VersionNEQ(v int) predicate.User

VersionNEQ applies the NEQ predicate on the "version" field.

func VersionNotIn

func VersionNotIn(vs ...int) predicate.User

VersionNotIn applies the NotIn predicate on the "version" field.

func Worth

func Worth(v uint) predicate.User

Worth applies equality check predicate on the "worth" field. It's identical to WorthEQ.

func WorthEQ

func WorthEQ(v uint) predicate.User

WorthEQ applies the EQ predicate on the "worth" field.

func WorthGT

func WorthGT(v uint) predicate.User

WorthGT applies the GT predicate on the "worth" field.

func WorthGTE

func WorthGTE(v uint) predicate.User

WorthGTE applies the GTE predicate on the "worth" field.

func WorthIn

func WorthIn(vs ...uint) predicate.User

WorthIn applies the In predicate on the "worth" field.

func WorthIsNil

func WorthIsNil() predicate.User

WorthIsNil applies the IsNil predicate on the "worth" field.

func WorthLT

func WorthLT(v uint) predicate.User

WorthLT applies the LT predicate on the "worth" field.

func WorthLTE

func WorthLTE(v uint) predicate.User

WorthLTE applies the LTE predicate on the "worth" field.

func WorthNEQ

func WorthNEQ(v uint) predicate.User

WorthNEQ applies the NEQ predicate on the "worth" field.

func WorthNotIn

func WorthNotIn(vs ...uint) predicate.User

WorthNotIn applies the NotIn predicate on the "worth" field.

func WorthNotNil

func WorthNotNil() predicate.User

WorthNotNil applies the NotNil predicate on the "worth" field.

Types

This section is empty.

Jump to

Keyboard shortcuts

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