usertoken

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the usertoken type in the database.
	Label = "user_token"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTokenID holds the string denoting the token_id field in the database.
	FieldTokenID = "token_id"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the usertoken in the database.
	Table = "user_tokens"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "user_tokens"
	// 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_token"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldTokenID,
}

Columns holds all SQL columns for usertoken fields.

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

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

Functions

func And

func And(predicates ...predicate.UserToken) predicate.UserToken

And groups predicates with the AND operator between them.

func HasUser

func HasUser() predicate.UserToken

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.UserToken

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.UserToken

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.UserToken

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.UserToken

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.UserToken

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.UserToken

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.UserToken

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func TokenID

func TokenID(v uint64) predicate.UserToken

TokenID applies equality check predicate on the "token_id" field. It's identical to TokenIDEQ.

func TokenIDEQ

func TokenIDEQ(v uint64) predicate.UserToken

TokenIDEQ applies the EQ predicate on the "token_id" field.

func TokenIDGT

func TokenIDGT(v uint64) predicate.UserToken

TokenIDGT applies the GT predicate on the "token_id" field.

func TokenIDGTE

func TokenIDGTE(v uint64) predicate.UserToken

TokenIDGTE applies the GTE predicate on the "token_id" field.

func TokenIDIn

func TokenIDIn(vs ...uint64) predicate.UserToken

TokenIDIn applies the In predicate on the "token_id" field.

func TokenIDLT

func TokenIDLT(v uint64) predicate.UserToken

TokenIDLT applies the LT predicate on the "token_id" field.

func TokenIDLTE

func TokenIDLTE(v uint64) predicate.UserToken

TokenIDLTE applies the LTE predicate on the "token_id" field.

func TokenIDNEQ

func TokenIDNEQ(v uint64) predicate.UserToken

TokenIDNEQ applies the NEQ predicate on the "token_id" field.

func TokenIDNotIn

func TokenIDNotIn(vs ...uint64) predicate.UserToken

TokenIDNotIn applies the NotIn predicate on the "token_id" 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 UserToken queries.

func ByID

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

ByID orders the results by the id field.

func ByTokenID

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

ByTokenID orders the results by the token_id field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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