employee

package
v0.0.0-...-4cf218f Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the employee type in the database.
	Label = "employee"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldBirthDate holds the string denoting the birth_date field in the database.
	FieldBirthDate = "birth_date"
	// FieldFirstName holds the string denoting the first_name field in the database.
	FieldFirstName = "first_name"
	// FieldLastName holds the string denoting the last_name field in the database.
	FieldLastName = "last_name"
	// FieldGender holds the string denoting the gender field in the database.
	FieldGender = "gender"
	// FieldHireDate holds the string denoting the hire_date field in the database.
	FieldHireDate = "hire_date"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// EdgeDeptManager holds the string denoting the dept_manager edge name in mutations.
	EdgeDeptManager = "dept_manager"
	// Table holds the table name of the employee in the database.
	Table = "employees"
	// DeptManagerTable is the table that holds the dept_manager relation/edge.
	DeptManagerTable = "dept_managers"
	// DeptManagerInverseTable is the table name for the DeptManager entity.
	// It exists in this package in order to avoid circular dependency with the "deptmanager" package.
	DeptManagerInverseTable = "dept_managers"
	// DeptManagerColumn is the table column denoting the dept_manager relation/edge.
	DeptManagerColumn = "employee_dept_manager"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
)

Columns holds all SQL columns for employee fields.

Functions

func And

func And(predicates ...predicate.Employee) predicate.Employee

And groups predicates with the AND operator between them.

func BirthDate

func BirthDate(v time.Time) predicate.Employee

BirthDate applies equality check predicate on the "birth_date" field. It's identical to BirthDateEQ.

func BirthDateEQ

func BirthDateEQ(v time.Time) predicate.Employee

BirthDateEQ applies the EQ predicate on the "birth_date" field.

func BirthDateGT

func BirthDateGT(v time.Time) predicate.Employee

BirthDateGT applies the GT predicate on the "birth_date" field.

func BirthDateGTE

func BirthDateGTE(v time.Time) predicate.Employee

BirthDateGTE applies the GTE predicate on the "birth_date" field.

func BirthDateIn

func BirthDateIn(vs ...time.Time) predicate.Employee

BirthDateIn applies the In predicate on the "birth_date" field.

func BirthDateLT

func BirthDateLT(v time.Time) predicate.Employee

BirthDateLT applies the LT predicate on the "birth_date" field.

func BirthDateLTE

func BirthDateLTE(v time.Time) predicate.Employee

BirthDateLTE applies the LTE predicate on the "birth_date" field.

func BirthDateNEQ

func BirthDateNEQ(v time.Time) predicate.Employee

BirthDateNEQ applies the NEQ predicate on the "birth_date" field.

func BirthDateNotIn

func BirthDateNotIn(vs ...time.Time) predicate.Employee

BirthDateNotIn applies the NotIn predicate on the "birth_date" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Employee

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Employee

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Employee

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Employee

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Employee

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Employee

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Employee

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Employee

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Employee

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Employee

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Employee

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Employee

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Employee

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Employee

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Employee

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Employee

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Employee

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Employee

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Employee

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Employee

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func FirstName

func FirstName(v string) predicate.Employee

FirstName applies equality check predicate on the "first_name" field. It's identical to FirstNameEQ.

func FirstNameContains

func FirstNameContains(v string) predicate.Employee

FirstNameContains applies the Contains predicate on the "first_name" field.

func FirstNameContainsFold

func FirstNameContainsFold(v string) predicate.Employee

FirstNameContainsFold applies the ContainsFold predicate on the "first_name" field.

func FirstNameEQ

func FirstNameEQ(v string) predicate.Employee

FirstNameEQ applies the EQ predicate on the "first_name" field.

func FirstNameEqualFold

func FirstNameEqualFold(v string) predicate.Employee

FirstNameEqualFold applies the EqualFold predicate on the "first_name" field.

func FirstNameGT

func FirstNameGT(v string) predicate.Employee

FirstNameGT applies the GT predicate on the "first_name" field.

func FirstNameGTE

func FirstNameGTE(v string) predicate.Employee

FirstNameGTE applies the GTE predicate on the "first_name" field.

func FirstNameHasPrefix

func FirstNameHasPrefix(v string) predicate.Employee

FirstNameHasPrefix applies the HasPrefix predicate on the "first_name" field.

func FirstNameHasSuffix

func FirstNameHasSuffix(v string) predicate.Employee

FirstNameHasSuffix applies the HasSuffix predicate on the "first_name" field.

func FirstNameIn

func FirstNameIn(vs ...string) predicate.Employee

FirstNameIn applies the In predicate on the "first_name" field.

func FirstNameLT

func FirstNameLT(v string) predicate.Employee

FirstNameLT applies the LT predicate on the "first_name" field.

func FirstNameLTE

func FirstNameLTE(v string) predicate.Employee

FirstNameLTE applies the LTE predicate on the "first_name" field.

func FirstNameNEQ

func FirstNameNEQ(v string) predicate.Employee

FirstNameNEQ applies the NEQ predicate on the "first_name" field.

func FirstNameNotIn

func FirstNameNotIn(vs ...string) predicate.Employee

FirstNameNotIn applies the NotIn predicate on the "first_name" field.

func GenderEQ

func GenderEQ(v Gender) predicate.Employee

GenderEQ applies the EQ predicate on the "gender" field.

func GenderIn

func GenderIn(vs ...Gender) predicate.Employee

GenderIn applies the In predicate on the "gender" field.

func GenderNEQ

func GenderNEQ(v Gender) predicate.Employee

GenderNEQ applies the NEQ predicate on the "gender" field.

func GenderNotIn

func GenderNotIn(vs ...Gender) predicate.Employee

GenderNotIn applies the NotIn predicate on the "gender" field.

func GenderValidator

func GenderValidator(ge Gender) error

GenderValidator is a validator for the "gender" field enum values. It is called by the builders before save.

func HasDeptManager

func HasDeptManager() predicate.Employee

HasDeptManager applies the HasEdge predicate on the "dept_manager" edge.

func HasDeptManagerWith

func HasDeptManagerWith(preds ...predicate.DeptManager) predicate.Employee

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

func HireDate

func HireDate(v time.Time) predicate.Employee

HireDate applies equality check predicate on the "hire_date" field. It's identical to HireDateEQ.

func HireDateEQ

func HireDateEQ(v time.Time) predicate.Employee

HireDateEQ applies the EQ predicate on the "hire_date" field.

func HireDateGT

func HireDateGT(v time.Time) predicate.Employee

HireDateGT applies the GT predicate on the "hire_date" field.

func HireDateGTE

func HireDateGTE(v time.Time) predicate.Employee

HireDateGTE applies the GTE predicate on the "hire_date" field.

func HireDateIn

func HireDateIn(vs ...time.Time) predicate.Employee

HireDateIn applies the In predicate on the "hire_date" field.

func HireDateLT

func HireDateLT(v time.Time) predicate.Employee

HireDateLT applies the LT predicate on the "hire_date" field.

func HireDateLTE

func HireDateLTE(v time.Time) predicate.Employee

HireDateLTE applies the LTE predicate on the "hire_date" field.

func HireDateNEQ

func HireDateNEQ(v time.Time) predicate.Employee

HireDateNEQ applies the NEQ predicate on the "hire_date" field.

func HireDateNotIn

func HireDateNotIn(vs ...time.Time) predicate.Employee

HireDateNotIn applies the NotIn predicate on the "hire_date" field.

func ID

func ID(id int) predicate.Employee

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Employee

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Employee

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Employee

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Employee

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Employee

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Employee

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func LastName

func LastName(v string) predicate.Employee

LastName applies equality check predicate on the "last_name" field. It's identical to LastNameEQ.

func LastNameContains

func LastNameContains(v string) predicate.Employee

LastNameContains applies the Contains predicate on the "last_name" field.

func LastNameContainsFold

func LastNameContainsFold(v string) predicate.Employee

LastNameContainsFold applies the ContainsFold predicate on the "last_name" field.

func LastNameEQ

func LastNameEQ(v string) predicate.Employee

LastNameEQ applies the EQ predicate on the "last_name" field.

func LastNameEqualFold

func LastNameEqualFold(v string) predicate.Employee

LastNameEqualFold applies the EqualFold predicate on the "last_name" field.

func LastNameGT

func LastNameGT(v string) predicate.Employee

LastNameGT applies the GT predicate on the "last_name" field.

func LastNameGTE

func LastNameGTE(v string) predicate.Employee

LastNameGTE applies the GTE predicate on the "last_name" field.

func LastNameHasPrefix

func LastNameHasPrefix(v string) predicate.Employee

LastNameHasPrefix applies the HasPrefix predicate on the "last_name" field.

func LastNameHasSuffix

func LastNameHasSuffix(v string) predicate.Employee

LastNameHasSuffix applies the HasSuffix predicate on the "last_name" field.

func LastNameIn

func LastNameIn(vs ...string) predicate.Employee

LastNameIn applies the In predicate on the "last_name" field.

func LastNameLT

func LastNameLT(v string) predicate.Employee

LastNameLT applies the LT predicate on the "last_name" field.

func LastNameLTE

func LastNameLTE(v string) predicate.Employee

LastNameLTE applies the LTE predicate on the "last_name" field.

func LastNameNEQ

func LastNameNEQ(v string) predicate.Employee

LastNameNEQ applies the NEQ predicate on the "last_name" field.

func LastNameNotIn

func LastNameNotIn(vs ...string) predicate.Employee

LastNameNotIn applies the NotIn predicate on the "last_name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Employee) predicate.Employee

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Employee

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Employee

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Employee

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Employee

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Employee

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Employee

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Employee

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Employee

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Employee

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Gender

type Gender string

Gender defines the type for the "gender" enum field.

const (
	GenderM Gender = "M"
	GenderF Gender = "F"
)

Gender values.

func (Gender) String

func (ge Gender) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Employee queries.

func ByBirthDate

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

ByBirthDate orders the results by the birth_date field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByDeptManager

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

ByDeptManager orders the results by dept_manager terms.

func ByDeptManagerCount

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

ByDeptManagerCount orders the results by dept_manager count.

func ByFirstName

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

ByFirstName orders the results by the first_name field.

func ByGender

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

ByGender orders the results by the gender field.

func ByHireDate

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

ByHireDate orders the results by the hire_date field.

func ByID

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

ByID orders the results by the id field.

func ByLastName

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

ByLastName orders the results by the last_name field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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