operator

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the operator type in the database.
	Label = "operator"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldSurname holds the string denoting the surname field in the database.
	FieldSurname = "surname"
	// FieldFirstname holds the string denoting the firstname field in the database.
	FieldFirstname = "firstname"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// EdgeBusinesses holds the string denoting the businesses edge name in mutations.
	EdgeBusinesses = "businesses"
	// EdgeTimetable holds the string denoting the timetable edge name in mutations.
	EdgeTimetable = "timetable"
	// Table holds the table name of the operator in the database.
	Table = "operators"
	// BusinessesTable is the table that holds the businesses relation/edge. The primary key declared below.
	BusinessesTable = "business_operators"
	// BusinessesInverseTable is the table name for the Business entity.
	// It exists in this package in order to avoid circular dependency with the "business" package.
	BusinessesInverseTable = "businesses"
	// TimetableTable is the table that holds the timetable relation/edge. The primary key declared below.
	TimetableTable = "timetable_operators_on_duty"
	// TimetableInverseTable is the table name for the Timetable entity.
	// It exists in this package in order to avoid circular dependency with the "timetable" package.
	TimetableInverseTable = "timetables"
)

Variables

View Source
var (
	// BusinessesPrimaryKey and BusinessesColumn2 are the table columns denoting the
	// primary key for the businesses relation (M2M).
	BusinessesPrimaryKey = []string{"business_id", "operator_id"}
	// TimetablePrimaryKey and TimetableColumn2 are the table columns denoting the
	// primary key for the timetable relation (M2M).
	TimetablePrimaryKey = []string{"timetable_id", "operator_id"}
)
View Source
var (
	Hooks  [1]ent.Hook
	Policy ent.Policy
	// SurnameValidator is a validator for the "surname" field. It is called by the builders before save.
	SurnameValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

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/hkonitzer/ohmab/ent/runtime"

Columns holds all SQL columns for operator fields.

Functions

func And

func And(predicates ...predicate.Operator) predicate.Operator

And groups predicates with the AND operator between them.

func Email

func Email(v string) predicate.Operator

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.Operator

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.Operator

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.Operator

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.Operator

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.Operator

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.Operator

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.Operator

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.Operator

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

func EmailIn(vs ...string) predicate.Operator

EmailIn applies the In predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.Operator

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.Operator

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.Operator

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

func EmailNotIn(vs ...string) predicate.Operator

EmailNotIn applies the NotIn predicate on the "email" field.

func Firstname

func Firstname(v string) predicate.Operator

Firstname applies equality check predicate on the "firstname" field. It's identical to FirstnameEQ.

func FirstnameContains

func FirstnameContains(v string) predicate.Operator

FirstnameContains applies the Contains predicate on the "firstname" field.

func FirstnameContainsFold

func FirstnameContainsFold(v string) predicate.Operator

FirstnameContainsFold applies the ContainsFold predicate on the "firstname" field.

func FirstnameEQ

func FirstnameEQ(v string) predicate.Operator

FirstnameEQ applies the EQ predicate on the "firstname" field.

func FirstnameEqualFold

func FirstnameEqualFold(v string) predicate.Operator

FirstnameEqualFold applies the EqualFold predicate on the "firstname" field.

func FirstnameGT

func FirstnameGT(v string) predicate.Operator

FirstnameGT applies the GT predicate on the "firstname" field.

func FirstnameGTE

func FirstnameGTE(v string) predicate.Operator

FirstnameGTE applies the GTE predicate on the "firstname" field.

func FirstnameHasPrefix

func FirstnameHasPrefix(v string) predicate.Operator

FirstnameHasPrefix applies the HasPrefix predicate on the "firstname" field.

func FirstnameHasSuffix

func FirstnameHasSuffix(v string) predicate.Operator

FirstnameHasSuffix applies the HasSuffix predicate on the "firstname" field.

func FirstnameIn

func FirstnameIn(vs ...string) predicate.Operator

FirstnameIn applies the In predicate on the "firstname" field.

func FirstnameLT

func FirstnameLT(v string) predicate.Operator

FirstnameLT applies the LT predicate on the "firstname" field.

func FirstnameLTE

func FirstnameLTE(v string) predicate.Operator

FirstnameLTE applies the LTE predicate on the "firstname" field.

func FirstnameNEQ

func FirstnameNEQ(v string) predicate.Operator

FirstnameNEQ applies the NEQ predicate on the "firstname" field.

func FirstnameNotIn

func FirstnameNotIn(vs ...string) predicate.Operator

FirstnameNotIn applies the NotIn predicate on the "firstname" field.

func HasBusinesses

func HasBusinesses() predicate.Operator

HasBusinesses applies the HasEdge predicate on the "businesses" edge.

func HasBusinessesWith

func HasBusinessesWith(preds ...predicate.Business) predicate.Operator

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

func HasTimetable

func HasTimetable() predicate.Operator

HasTimetable applies the HasEdge predicate on the "timetable" edge.

func HasTimetableWith

func HasTimetableWith(preds ...predicate.Timetable) predicate.Operator

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

func ID

func ID(id uuid.UUID) predicate.Operator

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Operator

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Operator

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Operator

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Operator

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Operator

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Operator

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func Surname

func Surname(v string) predicate.Operator

Surname applies equality check predicate on the "surname" field. It's identical to SurnameEQ.

func SurnameContains

func SurnameContains(v string) predicate.Operator

SurnameContains applies the Contains predicate on the "surname" field.

func SurnameContainsFold

func SurnameContainsFold(v string) predicate.Operator

SurnameContainsFold applies the ContainsFold predicate on the "surname" field.

func SurnameEQ

func SurnameEQ(v string) predicate.Operator

SurnameEQ applies the EQ predicate on the "surname" field.

func SurnameEqualFold

func SurnameEqualFold(v string) predicate.Operator

SurnameEqualFold applies the EqualFold predicate on the "surname" field.

func SurnameGT

func SurnameGT(v string) predicate.Operator

SurnameGT applies the GT predicate on the "surname" field.

func SurnameGTE

func SurnameGTE(v string) predicate.Operator

SurnameGTE applies the GTE predicate on the "surname" field.

func SurnameHasPrefix

func SurnameHasPrefix(v string) predicate.Operator

SurnameHasPrefix applies the HasPrefix predicate on the "surname" field.

func SurnameHasSuffix

func SurnameHasSuffix(v string) predicate.Operator

SurnameHasSuffix applies the HasSuffix predicate on the "surname" field.

func SurnameIn

func SurnameIn(vs ...string) predicate.Operator

SurnameIn applies the In predicate on the "surname" field.

func SurnameLT

func SurnameLT(v string) predicate.Operator

SurnameLT applies the LT predicate on the "surname" field.

func SurnameLTE

func SurnameLTE(v string) predicate.Operator

SurnameLTE applies the LTE predicate on the "surname" field.

func SurnameNEQ

func SurnameNEQ(v string) predicate.Operator

SurnameNEQ applies the NEQ predicate on the "surname" field.

func SurnameNotIn

func SurnameNotIn(vs ...string) predicate.Operator

SurnameNotIn applies the NotIn predicate on the "surname" field.

func Title

func Title(v string) predicate.Operator

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Operator

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Operator

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Operator

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Operator

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Operator

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Operator

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Operator

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Operator

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Operator

TitleIn applies the In predicate on the "title" field.

func TitleIsNil

func TitleIsNil() predicate.Operator

TitleIsNil applies the IsNil predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Operator

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Operator

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Operator

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Operator

TitleNotIn applies the NotIn predicate on the "title" field.

func TitleNotNil

func TitleNotNil() predicate.Operator

TitleNotNil applies the NotNil predicate on the "title" 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 Operator queries.

func ByBusinesses

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

ByBusinesses orders the results by businesses terms.

func ByBusinessesCount

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

ByBusinessesCount orders the results by businesses count.

func ByEmail

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

ByEmail orders the results by the email field.

func ByFirstname

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

ByFirstname orders the results by the firstname field.

func ByID

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

ByID orders the results by the id field.

func BySurname

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

BySurname orders the results by the surname field.

func ByTimetable

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

ByTimetable orders the results by timetable terms.

func ByTimetableCount

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

ByTimetableCount orders the results by timetable count.

func ByTitle

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

ByTitle orders the results by the title field.

Jump to

Keyboard shortcuts

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