Versions in this module Expand all Collapse all v0 v0.7.10 Dec 20, 2020 v0.7.9 Dec 20, 2020 Changes in this version + type AllUserEmployeesResult struct + Age null.Uint64 + Empl *Employee + User *User + type AllUserEmployeesResultSlice []*AllUserEmployeesResult + func AllUserEmployees(ctx context.Context, q Queryer) (AllUserEmployeesResultSlice, error) + func (slice *AllUserEmployeesResultSlice) DistinctEmpl() []*Employee + func (slice *AllUserEmployeesResultSlice) DistinctUser() []*User + func (slice *AllUserEmployeesResultSlice) GroupByEmpl() ([]*Employee, []AllUserEmployeesResultSlice) + func (slice *AllUserEmployeesResultSlice) GroupByUser() ([]*User, []AllUserEmployeesResultSlice) + func (slice *AllUserEmployeesResultSlice) One() *AllUserEmployeesResult + type ColumnScanner interface + type Employee struct + EmployeeSn string + Id int32 + SuperiorId null.Int32 + UserId int32 + func EmployeeByEmployeeSn(ctx context.Context, q Queryer, nxEmployeeSn string, lock bool) (*Employee, error) + func EmployeeByPrimary(ctx context.Context, q Queryer, nxId int32, lock bool) (*Employee, error) + func EmployeeByUserId(ctx context.Context, q Queryer, nxUserId int32, lock bool) (*Employee, error) + func (tr *Employee) ColumnPointer(i int) interface{} + func (tr *Employee) ColumnValue(i int) interface{} + func (tr *Employee) Copy() *Employee + func (tr *Employee) Delete(ctx context.Context, e Execer) error + func (tr *Employee) EmployeeByFkSuperior(ctx context.Context, q Queryer, lock bool) (*Employee, error) + func (tr *Employee) Insert(ctx context.Context, e Execer) error + func (tr *Employee) InsertEx(ctx context.Context, e Execer, modifier string) error + func (tr *Employee) PrimaryValue() interface{} + func (tr *Employee) Reload(ctx context.Context, q Queryer) error + func (tr *Employee) ReloadWithLock(ctx context.Context, q Queryer) error + func (tr *Employee) TableMeta() *TableMeta + func (tr *Employee) Update(ctx context.Context, e Execer, newTr *Employee) error + func (tr *Employee) UserByFkUser(ctx context.Context, q Queryer, lock bool) (*User, error) + func (tr *Employee) Valid() bool + type EmployeeSlice []*Employee + type ExecQueryer interface + type Execer interface + ExecContext func(ctx context.Context, query string, args ...interface{}) (sql.Result, error) + type Queryer interface + QueryContext func(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) + QueryRowContext func(ctx context.Context, query string, args ...interface{}) *sql.Row + type Slicer interface + type SubordinatesBySuperiorsResult struct + Subordinate *Employee + Superior *Employee + type SubordinatesBySuperiorsResultSlice []*SubordinatesBySuperiorsResult + func SubordinatesBySuperiors(ctx context.Context, q Queryer, id ...int) (SubordinatesBySuperiorsResultSlice, error) + func (slice *SubordinatesBySuperiorsResultSlice) DistinctSubordinate() []*Employee + func (slice *SubordinatesBySuperiorsResultSlice) DistinctSuperior() []*Employee + func (slice *SubordinatesBySuperiorsResultSlice) GroupBySubordinate() ([]*Employee, []SubordinatesBySuperiorsResultSlice) + func (slice *SubordinatesBySuperiorsResultSlice) GroupBySuperior() ([]*Employee, []SubordinatesBySuperiorsResultSlice) + func (slice *SubordinatesBySuperiorsResultSlice) One() *SubordinatesBySuperiorsResult + type TableMeta struct + func NewTableMeta(tableName string, columnNames []string, opts ...TableMetaOption) *TableMeta + func (meta *TableMeta) TableName() string + type TableMetaOption func(*TableMeta) + func OptAutoIncColumn(columnName string) TableMetaOption + func OptColumnsWithDefault(columnNames ...string) TableMetaOption + func OptPrimaryColumns(columnNames ...string) TableMetaOption + type TableRow interface + ColumnPointer func(i int) interface{} + ColumnValue func(i int) interface{} + TableMeta func() *TableMeta + Valid func() bool + type TableRowWithPrimary interface + PrimaryValue func() interface{} + type User struct + Birthday null.Time + Female null.Bool + Id int32 + Name string + func UserByPrimary(ctx context.Context, q Queryer, nxId int32, lock bool) (*User, error) + func (tr *User) ColumnPointer(i int) interface{} + func (tr *User) ColumnValue(i int) interface{} + func (tr *User) Copy() *User + func (tr *User) Delete(ctx context.Context, e Execer) error + func (tr *User) Insert(ctx context.Context, e Execer) error + func (tr *User) InsertEx(ctx context.Context, e Execer, modifier string) error + func (tr *User) PrimaryValue() interface{} + func (tr *User) Reload(ctx context.Context, q Queryer) error + func (tr *User) ReloadWithLock(ctx context.Context, q Queryer) error + func (tr *User) TableMeta() *TableMeta + func (tr *User) Update(ctx context.Context, e Execer, newTr *User) error + func (tr *User) Valid() bool + type UserSlice []*User + func UsersByCond(ctx context.Context, q Queryer, id int, name string, birthday time.Time, ...) (UserSlice, error)