user

package
v0.0.0-...-fc33bc3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: GPL-3.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"
	// FieldIPAddress holds the string denoting the ip_address field in the database.
	FieldIPAddress = "ip_address"
	// EdgeSentences holds the string denoting the sentences edge name in mutations.
	EdgeSentences = "sentences"
	// Table holds the table name of the user in the database.
	Table = "users"
	// SentencesTable is the table that holds the sentences relation/edge. The primary key declared below.
	SentencesTable = "user_sentences"
	// SentencesInverseTable is the table name for the Sentence entity.
	// It exists in this package in order to avoid circular dependency with the "sentence" package.
	SentencesInverseTable = "sentences"
)

Variables

View Source
var (
	// IPAddressValidator is a validator for the "ip_address" field. It is called by the builders before save.
	IPAddressValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var Columns = []string{
	FieldID,
	FieldIPAddress,
}

Columns holds all SQL columns for user fields.

View Source
var (
	// SentencesPrimaryKey and SentencesColumn2 are the table columns denoting the
	// primary key for the sentences relation (M2M).
	SentencesPrimaryKey = []string{"user_id", "sentence_id"}
)

Functions

func And

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

And groups predicates with the AND operator between them.

func HasSentences

func HasSentences() predicate.User

HasSentences applies the HasEdge predicate on the "sentences" edge.

func HasSentencesWith

func HasSentencesWith(preds ...predicate.Sentence) predicate.User

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

func ID

func ID(id uuid.UUID) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func IPAddress

func IPAddress(v string) predicate.User

IPAddress applies equality check predicate on the "ip_address" field. It's identical to IPAddressEQ.

func IPAddressContains

func IPAddressContains(v string) predicate.User

IPAddressContains applies the Contains predicate on the "ip_address" field.

func IPAddressContainsFold

func IPAddressContainsFold(v string) predicate.User

IPAddressContainsFold applies the ContainsFold predicate on the "ip_address" field.

func IPAddressEQ

func IPAddressEQ(v string) predicate.User

IPAddressEQ applies the EQ predicate on the "ip_address" field.

func IPAddressEqualFold

func IPAddressEqualFold(v string) predicate.User

IPAddressEqualFold applies the EqualFold predicate on the "ip_address" field.

func IPAddressGT

func IPAddressGT(v string) predicate.User

IPAddressGT applies the GT predicate on the "ip_address" field.

func IPAddressGTE

func IPAddressGTE(v string) predicate.User

IPAddressGTE applies the GTE predicate on the "ip_address" field.

func IPAddressHasPrefix

func IPAddressHasPrefix(v string) predicate.User

IPAddressHasPrefix applies the HasPrefix predicate on the "ip_address" field.

func IPAddressHasSuffix

func IPAddressHasSuffix(v string) predicate.User

IPAddressHasSuffix applies the HasSuffix predicate on the "ip_address" field.

func IPAddressIn

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

IPAddressIn applies the In predicate on the "ip_address" field.

func IPAddressLT

func IPAddressLT(v string) predicate.User

IPAddressLT applies the LT predicate on the "ip_address" field.

func IPAddressLTE

func IPAddressLTE(v string) predicate.User

IPAddressLTE applies the LTE predicate on the "ip_address" field.

func IPAddressNEQ

func IPAddressNEQ(v string) predicate.User

IPAddressNEQ applies the NEQ predicate on the "ip_address" field.

func IPAddressNotIn

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

IPAddressNotIn applies the NotIn predicate on the "ip_address" 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

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 User queries.

func ByID

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

ByID orders the results by the id field.

func ByIPAddress

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

ByIPAddress orders the results by the ip_address field.

func BySentences

func BySentences(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySentences orders the results by sentences terms.

func BySentencesCount

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

BySentencesCount orders the results by sentences count.

Jump to

Keyboard shortcuts

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