entity

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmployeesGenderM string = "M"
	EmployeesGenderF string = "F"
)

Enum values for EmployeesGender

Variables

View Source
var DepartmentColumns = struct {
	DeptNo    string
	DeptName  string
	CreatedAt string
	UpdatedAt string
}{
	DeptNo:    "dept_no",
	DeptName:  "dept_name",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var DepartmentRels = struct {
	DeptNoDeptEmps     string
	DeptNoDeptManagers string
}{
	DeptNoDeptEmps:     "DeptNoDeptEmps",
	DeptNoDeptManagers: "DeptNoDeptManagers",
}

DepartmentRels is where relationship names are stored.

View Source
var DepartmentTableColumns = struct {
	DeptNo    string
	DeptName  string
	CreatedAt string
	UpdatedAt string
}{
	DeptNo:    "departments.dept_no",
	DeptName:  "departments.dept_name",
	CreatedAt: "departments.created_at",
	UpdatedAt: "departments.updated_at",
}
View Source
var DepartmentWhere = struct {
	DeptNo    whereHelperstring
	DeptName  whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	DeptNo:    whereHelperstring{/* contains filtered or unexported fields */},
	DeptName:  whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var DeptEmpColumns = struct {
	EmpNo     string
	DeptNo    string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "emp_no",
	DeptNo:    "dept_no",
	FromDate:  "from_date",
	ToDate:    "to_date",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var DeptEmpRels = struct {
	EmpNoEmployee    string
	DeptNoDepartment string
}{
	EmpNoEmployee:    "EmpNoEmployee",
	DeptNoDepartment: "DeptNoDepartment",
}

DeptEmpRels is where relationship names are stored.

View Source
var DeptEmpTableColumns = struct {
	EmpNo     string
	DeptNo    string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "dept_emp.emp_no",
	DeptNo:    "dept_emp.dept_no",
	FromDate:  "dept_emp.from_date",
	ToDate:    "dept_emp.to_date",
	CreatedAt: "dept_emp.created_at",
	UpdatedAt: "dept_emp.updated_at",
}
View Source
var DeptEmpWhere = struct {
	EmpNo     whereHelperint
	DeptNo    whereHelperstring
	FromDate  whereHelpertime_Time
	ToDate    whereHelpertime_Time
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	EmpNo:     whereHelperint{/* contains filtered or unexported fields */},
	DeptNo:    whereHelperstring{/* contains filtered or unexported fields */},
	FromDate:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	ToDate:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var DeptManagerColumns = struct {
	EmpNo     string
	DeptNo    string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "emp_no",
	DeptNo:    "dept_no",
	FromDate:  "from_date",
	ToDate:    "to_date",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var DeptManagerRels = struct {
	EmpNoEmployee    string
	DeptNoDepartment string
}{
	EmpNoEmployee:    "EmpNoEmployee",
	DeptNoDepartment: "DeptNoDepartment",
}

DeptManagerRels is where relationship names are stored.

View Source
var DeptManagerTableColumns = struct {
	EmpNo     string
	DeptNo    string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "dept_manager.emp_no",
	DeptNo:    "dept_manager.dept_no",
	FromDate:  "dept_manager.from_date",
	ToDate:    "dept_manager.to_date",
	CreatedAt: "dept_manager.created_at",
	UpdatedAt: "dept_manager.updated_at",
}
View Source
var DeptManagerWhere = struct {
	EmpNo     whereHelperint
	DeptNo    whereHelperstring
	FromDate  whereHelpertime_Time
	ToDate    whereHelpertime_Time
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	EmpNo:     whereHelperint{/* contains filtered or unexported fields */},
	DeptNo:    whereHelperstring{/* contains filtered or unexported fields */},
	FromDate:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	ToDate:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var EmployeeColumns = struct {
	EmpNo     string
	BirthDate string
	FirstName string
	LastName  string
	Gender    string
	HireDate  string
	CreatedAt string
	UpdatedAt string
	DeletedAt string
}{
	EmpNo:     "emp_no",
	BirthDate: "birth_date",
	FirstName: "first_name",
	LastName:  "last_name",
	Gender:    "gender",
	HireDate:  "hire_date",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
	DeletedAt: "deleted_at",
}
View Source
var EmployeeRels = struct {
	EmpNoDeptEmps     string
	EmpNoDeptManagers string
	EmpNoSalaries     string
	EmpNoTitles       string
}{
	EmpNoDeptEmps:     "EmpNoDeptEmps",
	EmpNoDeptManagers: "EmpNoDeptManagers",
	EmpNoSalaries:     "EmpNoSalaries",
	EmpNoTitles:       "EmpNoTitles",
}

EmployeeRels is where relationship names are stored.

View Source
var EmployeeTableColumns = struct {
	EmpNo     string
	BirthDate string
	FirstName string
	LastName  string
	Gender    string
	HireDate  string
	CreatedAt string
	UpdatedAt string
	DeletedAt string
}{
	EmpNo:     "employees.emp_no",
	BirthDate: "employees.birth_date",
	FirstName: "employees.first_name",
	LastName:  "employees.last_name",
	Gender:    "employees.gender",
	HireDate:  "employees.hire_date",
	CreatedAt: "employees.created_at",
	UpdatedAt: "employees.updated_at",
	DeletedAt: "employees.deleted_at",
}
View Source
var EmployeeWhere = struct {
	EmpNo     whereHelperint
	BirthDate whereHelpertime_Time
	FirstName whereHelperstring
	LastName  whereHelperstring
	Gender    whereHelperstring
	HireDate  whereHelpertime_Time
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
	DeletedAt whereHelpernull_Time
}{
	EmpNo:     whereHelperint{/* contains filtered or unexported fields */},
	BirthDate: whereHelpertime_Time{/* contains filtered or unexported fields */},
	FirstName: whereHelperstring{/* contains filtered or unexported fields */},
	LastName:  whereHelperstring{/* contains filtered or unexported fields */},
	Gender:    whereHelperstring{/* contains filtered or unexported fields */},
	HireDate:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("entity: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var SalaryColumns = struct {
	EmpNo     string
	Salary    string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "emp_no",
	Salary:    "salary",
	FromDate:  "from_date",
	ToDate:    "to_date",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var SalaryRels = struct {
	EmpNoEmployee string
}{
	EmpNoEmployee: "EmpNoEmployee",
}

SalaryRels is where relationship names are stored.

View Source
var SalaryTableColumns = struct {
	EmpNo     string
	Salary    string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "salaries.emp_no",
	Salary:    "salaries.salary",
	FromDate:  "salaries.from_date",
	ToDate:    "salaries.to_date",
	CreatedAt: "salaries.created_at",
	UpdatedAt: "salaries.updated_at",
}
View Source
var SalaryWhere = struct {
	EmpNo     whereHelperint
	Salary    whereHelperint
	FromDate  whereHelpertime_Time
	ToDate    whereHelpertime_Time
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	EmpNo:     whereHelperint{/* contains filtered or unexported fields */},
	Salary:    whereHelperint{/* contains filtered or unexported fields */},
	FromDate:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	ToDate:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Departments string
	DeptEmp     string
	DeptManager string
	Employees   string
	Salaries    string
	Titles      string
}{
	Departments: "departments",
	DeptEmp:     "dept_emp",
	DeptManager: "dept_manager",
	Employees:   "employees",
	Salaries:    "salaries",
	Titles:      "titles",
}
View Source
var TitleColumns = struct {
	EmpNo     string
	Title     string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "emp_no",
	Title:     "title",
	FromDate:  "from_date",
	ToDate:    "to_date",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var TitleRels = struct {
	EmpNoEmployee string
}{
	EmpNoEmployee: "EmpNoEmployee",
}

TitleRels is where relationship names are stored.

View Source
var TitleTableColumns = struct {
	EmpNo     string
	Title     string
	FromDate  string
	ToDate    string
	CreatedAt string
	UpdatedAt string
}{
	EmpNo:     "titles.emp_no",
	Title:     "titles.title",
	FromDate:  "titles.from_date",
	ToDate:    "titles.to_date",
	CreatedAt: "titles.created_at",
	UpdatedAt: "titles.updated_at",
}
View Source
var TitleWhere = struct {
	EmpNo     whereHelperint
	Title     whereHelperstring
	FromDate  whereHelpertime_Time
	ToDate    whereHelpernull_Time
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	EmpNo:     whereHelperint{/* contains filtered or unexported fields */},
	Title:     whereHelperstring{/* contains filtered or unexported fields */},
	FromDate:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	ToDate:    whereHelpernull_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddDepartmentHook

func AddDepartmentHook(hookPoint boil.HookPoint, departmentHook DepartmentHook)

AddDepartmentHook registers your hook function for all future operations.

func AddDeptEmpHook

func AddDeptEmpHook(hookPoint boil.HookPoint, deptEmpHook DeptEmpHook)

AddDeptEmpHook registers your hook function for all future operations.

func AddDeptManagerHook

func AddDeptManagerHook(hookPoint boil.HookPoint, deptManagerHook DeptManagerHook)

AddDeptManagerHook registers your hook function for all future operations.

func AddEmployeeHook

func AddEmployeeHook(hookPoint boil.HookPoint, employeeHook EmployeeHook)

AddEmployeeHook registers your hook function for all future operations.

func AddSalaryHook

func AddSalaryHook(hookPoint boil.HookPoint, salaryHook SalaryHook)

AddSalaryHook registers your hook function for all future operations.

func AddTitleHook

func AddTitleHook(hookPoint boil.HookPoint, titleHook TitleHook)

AddTitleHook registers your hook function for all future operations.

func AllEmployeesGender

func AllEmployeesGender() []string

func DepartmentExists

func DepartmentExists(ctx context.Context, exec boil.ContextExecutor, deptNo string) (bool, error)

DepartmentExists checks if the Department row exists.

func Departments

func Departments(mods ...qm.QueryMod) departmentQuery

Departments retrieves all the records using an executor.

func DeptEmpExists

func DeptEmpExists(ctx context.Context, exec boil.ContextExecutor, empNo int, deptNo string) (bool, error)

DeptEmpExists checks if the DeptEmp row exists.

func DeptEmps

func DeptEmps(mods ...qm.QueryMod) deptEmpQuery

DeptEmps retrieves all the records using an executor.

func DeptManagerExists

func DeptManagerExists(ctx context.Context, exec boil.ContextExecutor, empNo int, deptNo string) (bool, error)

DeptManagerExists checks if the DeptManager row exists.

func DeptManagers

func DeptManagers(mods ...qm.QueryMod) deptManagerQuery

DeptManagers retrieves all the records using an executor.

func EmployeeExists

func EmployeeExists(ctx context.Context, exec boil.ContextExecutor, empNo int) (bool, error)

EmployeeExists checks if the Employee row exists.

func Employees

func Employees(mods ...qm.QueryMod) employeeQuery

Employees retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func Salaries

func Salaries(mods ...qm.QueryMod) salaryQuery

Salaries retrieves all the records using an executor.

func SalaryExists

func SalaryExists(ctx context.Context, exec boil.ContextExecutor, empNo int, fromDate time.Time) (bool, error)

SalaryExists checks if the Salary row exists.

func TitleExists

func TitleExists(ctx context.Context, exec boil.ContextExecutor, empNo int, title string, fromDate time.Time) (bool, error)

TitleExists checks if the Title row exists.

func Titles

func Titles(mods ...qm.QueryMod) titleQuery

Titles retrieves all the records using an executor.

Types

type Department

type Department struct {
	DeptNo    string    `boil:"dept_no" json:"dept_no" toml:"dept_no" yaml:"dept_no"`
	DeptName  string    `boil:"dept_name" json:"dept_name" toml:"dept_name" yaml:"dept_name"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *departmentR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L departmentL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Department is an object representing the database table.

func FindDepartment

func FindDepartment(ctx context.Context, exec boil.ContextExecutor, deptNo string, selectCols ...string) (*Department, error)

FindDepartment retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Department) AddDeptNoDeptEmps

func (o *Department) AddDeptNoDeptEmps(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeptEmp) error

AddDeptNoDeptEmps adds the given related objects to the existing relationships of the department, optionally inserting them as new records. Appends related to o.R.DeptNoDeptEmps. Sets related.R.DeptNoDepartment appropriately.

func (*Department) AddDeptNoDeptManagers

func (o *Department) AddDeptNoDeptManagers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeptManager) error

AddDeptNoDeptManagers adds the given related objects to the existing relationships of the department, optionally inserting them as new records. Appends related to o.R.DeptNoDeptManagers. Sets related.R.DeptNoDepartment appropriately.

func (*Department) Delete

func (o *Department) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Department record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Department) DeptNoDeptEmps

func (o *Department) DeptNoDeptEmps(mods ...qm.QueryMod) deptEmpQuery

DeptNoDeptEmps retrieves all the dept_emp's DeptEmps with an executor via dept_no column.

func (*Department) DeptNoDeptManagers

func (o *Department) DeptNoDeptManagers(mods ...qm.QueryMod) deptManagerQuery

DeptNoDeptManagers retrieves all the dept_manager's DeptManagers with an executor via dept_no column.

func (*Department) Exists

func (o *Department) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Department row exists.

func (*Department) Insert

func (o *Department) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Department) Reload

func (o *Department) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Department) Update

func (o *Department) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Department. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Department) Upsert

func (o *Department) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type DepartmentHook

type DepartmentHook func(context.Context, boil.ContextExecutor, *Department) error

DepartmentHook is the signature for custom Department hook methods

type DepartmentSlice

type DepartmentSlice []*Department

DepartmentSlice is an alias for a slice of pointers to Department. This should almost always be used instead of []Department.

func (DepartmentSlice) DeleteAll

func (o DepartmentSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*DepartmentSlice) ReloadAll

func (o *DepartmentSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (DepartmentSlice) UpdateAll

func (o DepartmentSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type DeptEmp

type DeptEmp struct {
	EmpNo     int       `boil:"emp_no" json:"emp_no" toml:"emp_no" yaml:"emp_no"`
	DeptNo    string    `boil:"dept_no" json:"dept_no" toml:"dept_no" yaml:"dept_no"`
	FromDate  time.Time `boil:"from_date" json:"from_date" toml:"from_date" yaml:"from_date"`
	ToDate    time.Time `boil:"to_date" json:"to_date" toml:"to_date" yaml:"to_date"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *deptEmpR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L deptEmpL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DeptEmp is an object representing the database table.

func FindDeptEmp

func FindDeptEmp(ctx context.Context, exec boil.ContextExecutor, empNo int, deptNo string, selectCols ...string) (*DeptEmp, error)

FindDeptEmp retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*DeptEmp) Delete

func (o *DeptEmp) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single DeptEmp record with an executor. Delete will match against the primary key column to find the record to delete.

func (*DeptEmp) DeptNoDepartment

func (o *DeptEmp) DeptNoDepartment(mods ...qm.QueryMod) departmentQuery

DeptNoDepartment pointed to by the foreign key.

func (*DeptEmp) EmpNoEmployee

func (o *DeptEmp) EmpNoEmployee(mods ...qm.QueryMod) employeeQuery

EmpNoEmployee pointed to by the foreign key.

func (*DeptEmp) Exists

func (o *DeptEmp) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the DeptEmp row exists.

func (*DeptEmp) Insert

func (o *DeptEmp) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*DeptEmp) Reload

func (o *DeptEmp) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*DeptEmp) SetDeptNoDepartment

func (o *DeptEmp) SetDeptNoDepartment(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Department) error

SetDeptNoDepartment of the deptEmp to the related item. Sets o.R.DeptNoDepartment to related. Adds o to related.R.DeptNoDeptEmps.

func (*DeptEmp) SetEmpNoEmployee

func (o *DeptEmp) SetEmpNoEmployee(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Employee) error

SetEmpNoEmployee of the deptEmp to the related item. Sets o.R.EmpNoEmployee to related. Adds o to related.R.EmpNoDeptEmps.

func (*DeptEmp) Update

func (o *DeptEmp) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the DeptEmp. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*DeptEmp) Upsert

func (o *DeptEmp) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type DeptEmpHook

type DeptEmpHook func(context.Context, boil.ContextExecutor, *DeptEmp) error

DeptEmpHook is the signature for custom DeptEmp hook methods

type DeptEmpSlice

type DeptEmpSlice []*DeptEmp

DeptEmpSlice is an alias for a slice of pointers to DeptEmp. This should almost always be used instead of []DeptEmp.

func (DeptEmpSlice) DeleteAll

func (o DeptEmpSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*DeptEmpSlice) ReloadAll

func (o *DeptEmpSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (DeptEmpSlice) UpdateAll

func (o DeptEmpSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type DeptManager

type DeptManager struct {
	EmpNo     int       `boil:"emp_no" json:"emp_no" toml:"emp_no" yaml:"emp_no"`
	DeptNo    string    `boil:"dept_no" json:"dept_no" toml:"dept_no" yaml:"dept_no"`
	FromDate  time.Time `boil:"from_date" json:"from_date" toml:"from_date" yaml:"from_date"`
	ToDate    time.Time `boil:"to_date" json:"to_date" toml:"to_date" yaml:"to_date"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *deptManagerR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L deptManagerL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DeptManager is an object representing the database table.

func FindDeptManager

func FindDeptManager(ctx context.Context, exec boil.ContextExecutor, empNo int, deptNo string, selectCols ...string) (*DeptManager, error)

FindDeptManager retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*DeptManager) Delete

func (o *DeptManager) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single DeptManager record with an executor. Delete will match against the primary key column to find the record to delete.

func (*DeptManager) DeptNoDepartment

func (o *DeptManager) DeptNoDepartment(mods ...qm.QueryMod) departmentQuery

DeptNoDepartment pointed to by the foreign key.

func (*DeptManager) EmpNoEmployee

func (o *DeptManager) EmpNoEmployee(mods ...qm.QueryMod) employeeQuery

EmpNoEmployee pointed to by the foreign key.

func (*DeptManager) Exists

func (o *DeptManager) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the DeptManager row exists.

func (*DeptManager) Insert

func (o *DeptManager) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*DeptManager) Reload

func (o *DeptManager) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*DeptManager) SetDeptNoDepartment

func (o *DeptManager) SetDeptNoDepartment(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Department) error

SetDeptNoDepartment of the deptManager to the related item. Sets o.R.DeptNoDepartment to related. Adds o to related.R.DeptNoDeptManagers.

func (*DeptManager) SetEmpNoEmployee

func (o *DeptManager) SetEmpNoEmployee(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Employee) error

SetEmpNoEmployee of the deptManager to the related item. Sets o.R.EmpNoEmployee to related. Adds o to related.R.EmpNoDeptManagers.

func (*DeptManager) Update

func (o *DeptManager) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the DeptManager. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*DeptManager) Upsert

func (o *DeptManager) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type DeptManagerHook

type DeptManagerHook func(context.Context, boil.ContextExecutor, *DeptManager) error

DeptManagerHook is the signature for custom DeptManager hook methods

type DeptManagerSlice

type DeptManagerSlice []*DeptManager

DeptManagerSlice is an alias for a slice of pointers to DeptManager. This should almost always be used instead of []DeptManager.

func (DeptManagerSlice) DeleteAll

func (o DeptManagerSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*DeptManagerSlice) ReloadAll

func (o *DeptManagerSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (DeptManagerSlice) UpdateAll

func (o DeptManagerSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Employee

type Employee struct {
	EmpNo     int       `boil:"emp_no" json:"emp_no" toml:"emp_no" yaml:"emp_no"`
	BirthDate time.Time `boil:"birth_date" json:"birth_date" toml:"birth_date" yaml:"birth_date"`
	FirstName string    `boil:"first_name" json:"first_name" toml:"first_name" yaml:"first_name"`
	LastName  string    `boil:"last_name" json:"last_name" toml:"last_name" yaml:"last_name"`
	Gender    string    `boil:"gender" json:"gender" toml:"gender" yaml:"gender"`
	HireDate  time.Time `boil:"hire_date" json:"hire_date" toml:"hire_date" yaml:"hire_date"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"`

	R *employeeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L employeeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Employee is an object representing the database table.

func FindEmployee

func FindEmployee(ctx context.Context, exec boil.ContextExecutor, empNo int, selectCols ...string) (*Employee, error)

FindEmployee retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Employee) AddEmpNoDeptEmps

func (o *Employee) AddEmpNoDeptEmps(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeptEmp) error

AddEmpNoDeptEmps adds the given related objects to the existing relationships of the employee, optionally inserting them as new records. Appends related to o.R.EmpNoDeptEmps. Sets related.R.EmpNoEmployee appropriately.

func (*Employee) AddEmpNoDeptManagers

func (o *Employee) AddEmpNoDeptManagers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeptManager) error

AddEmpNoDeptManagers adds the given related objects to the existing relationships of the employee, optionally inserting them as new records. Appends related to o.R.EmpNoDeptManagers. Sets related.R.EmpNoEmployee appropriately.

func (*Employee) AddEmpNoSalaries

func (o *Employee) AddEmpNoSalaries(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Salary) error

AddEmpNoSalaries adds the given related objects to the existing relationships of the employee, optionally inserting them as new records. Appends related to o.R.EmpNoSalaries. Sets related.R.EmpNoEmployee appropriately.

func (*Employee) AddEmpNoTitles

func (o *Employee) AddEmpNoTitles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Title) error

AddEmpNoTitles adds the given related objects to the existing relationships of the employee, optionally inserting them as new records. Appends related to o.R.EmpNoTitles. Sets related.R.EmpNoEmployee appropriately.

func (*Employee) Delete

func (o *Employee) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)

Delete deletes a single Employee record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Employee) EmpNoDeptEmps

func (o *Employee) EmpNoDeptEmps(mods ...qm.QueryMod) deptEmpQuery

EmpNoDeptEmps retrieves all the dept_emp's DeptEmps with an executor via emp_no column.

func (*Employee) EmpNoDeptManagers

func (o *Employee) EmpNoDeptManagers(mods ...qm.QueryMod) deptManagerQuery

EmpNoDeptManagers retrieves all the dept_manager's DeptManagers with an executor via emp_no column.

func (*Employee) EmpNoSalaries

func (o *Employee) EmpNoSalaries(mods ...qm.QueryMod) salaryQuery

EmpNoSalaries retrieves all the salary's Salaries with an executor via emp_no column.

func (*Employee) EmpNoTitles

func (o *Employee) EmpNoTitles(mods ...qm.QueryMod) titleQuery

EmpNoTitles retrieves all the title's Titles with an executor via emp_no column.

func (*Employee) Exists

func (o *Employee) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Employee row exists.

func (*Employee) Insert

func (o *Employee) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Employee) Reload

func (o *Employee) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Employee) Update

func (o *Employee) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Employee. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Employee) Upsert

func (o *Employee) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type EmployeeHook

type EmployeeHook func(context.Context, boil.ContextExecutor, *Employee) error

EmployeeHook is the signature for custom Employee hook methods

type EmployeeSlice

type EmployeeSlice []*Employee

EmployeeSlice is an alias for a slice of pointers to Employee. This should almost always be used instead of []Employee.

func (EmployeeSlice) DeleteAll

func (o EmployeeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*EmployeeSlice) ReloadAll

func (o *EmployeeSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (EmployeeSlice) UpdateAll

func (o EmployeeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type Salary

type Salary struct {
	EmpNo     int       `boil:"emp_no" json:"emp_no" toml:"emp_no" yaml:"emp_no"`
	Salary    int       `boil:"salary" json:"salary" toml:"salary" yaml:"salary"`
	FromDate  time.Time `boil:"from_date" json:"from_date" toml:"from_date" yaml:"from_date"`
	ToDate    time.Time `boil:"to_date" json:"to_date" toml:"to_date" yaml:"to_date"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *salaryR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L salaryL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Salary is an object representing the database table.

func FindSalary

func FindSalary(ctx context.Context, exec boil.ContextExecutor, empNo int, fromDate time.Time, selectCols ...string) (*Salary, error)

FindSalary retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Salary) Delete

func (o *Salary) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Salary record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Salary) EmpNoEmployee

func (o *Salary) EmpNoEmployee(mods ...qm.QueryMod) employeeQuery

EmpNoEmployee pointed to by the foreign key.

func (*Salary) Exists

func (o *Salary) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Salary row exists.

func (*Salary) Insert

func (o *Salary) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Salary) Reload

func (o *Salary) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Salary) SetEmpNoEmployee

func (o *Salary) SetEmpNoEmployee(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Employee) error

SetEmpNoEmployee of the salary to the related item. Sets o.R.EmpNoEmployee to related. Adds o to related.R.EmpNoSalaries.

func (*Salary) Update

func (o *Salary) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Salary. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Salary) Upsert

func (o *Salary) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type SalaryHook

type SalaryHook func(context.Context, boil.ContextExecutor, *Salary) error

SalaryHook is the signature for custom Salary hook methods

type SalarySlice

type SalarySlice []*Salary

SalarySlice is an alias for a slice of pointers to Salary. This should almost always be used instead of []Salary.

func (SalarySlice) DeleteAll

func (o SalarySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*SalarySlice) ReloadAll

func (o *SalarySlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (SalarySlice) UpdateAll

func (o SalarySlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Title

type Title struct {
	EmpNo     int       `boil:"emp_no" json:"emp_no" toml:"emp_no" yaml:"emp_no"`
	Title     string    `boil:"title" json:"title" toml:"title" yaml:"title"`
	FromDate  time.Time `boil:"from_date" json:"from_date" toml:"from_date" yaml:"from_date"`
	ToDate    null.Time `boil:"to_date" json:"to_date,omitempty" toml:"to_date" yaml:"to_date,omitempty"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *titleR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L titleL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Title is an object representing the database table.

func FindTitle

func FindTitle(ctx context.Context, exec boil.ContextExecutor, empNo int, title string, fromDate time.Time, selectCols ...string) (*Title, error)

FindTitle retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Title) Delete

func (o *Title) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Title record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Title) EmpNoEmployee

func (o *Title) EmpNoEmployee(mods ...qm.QueryMod) employeeQuery

EmpNoEmployee pointed to by the foreign key.

func (*Title) Exists

func (o *Title) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Title row exists.

func (*Title) Insert

func (o *Title) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Title) Reload

func (o *Title) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Title) SetEmpNoEmployee

func (o *Title) SetEmpNoEmployee(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Employee) error

SetEmpNoEmployee of the title to the related item. Sets o.R.EmpNoEmployee to related. Adds o to related.R.EmpNoTitles.

func (*Title) Update

func (o *Title) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Title. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Title) Upsert

func (o *Title) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type TitleHook

type TitleHook func(context.Context, boil.ContextExecutor, *Title) error

TitleHook is the signature for custom Title hook methods

type TitleSlice

type TitleSlice []*Title

TitleSlice is an alias for a slice of pointers to Title. This should almost always be used instead of []Title.

func (TitleSlice) DeleteAll

func (o TitleSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*TitleSlice) ReloadAll

func (o *TitleSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (TitleSlice) UpdateAll

func (o TitleSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

Jump to

Keyboard shortcuts

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