Documentation ¶
Overview ¶
Package ent contains the schema for frontend entities.
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Admin
- type AdminClient
- func (c *AdminClient) Create() *AdminCreate
- func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk
- func (c *AdminClient) Delete() *AdminDelete
- func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne
- func (c *AdminClient) DeleteOneID(id uuid.UUID) *AdminDeleteOne
- func (c *AdminClient) Get(ctx context.Context, id uuid.UUID) (*Admin, error)
- func (c *AdminClient) GetX(ctx context.Context, id uuid.UUID) *Admin
- func (c *AdminClient) Hooks() []Hook
- func (c *AdminClient) Intercept(interceptors ...Interceptor)
- func (c *AdminClient) Interceptors() []Interceptor
- func (c *AdminClient) Query() *AdminQuery
- func (c *AdminClient) Update() *AdminUpdate
- func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne
- func (c *AdminClient) UpdateOneID(id uuid.UUID) *AdminUpdateOne
- func (c *AdminClient) Use(hooks ...Hook)
- type AdminCreate
- func (ac *AdminCreate) Exec(ctx context.Context) error
- func (ac *AdminCreate) ExecX(ctx context.Context)
- func (ac *AdminCreate) Mutation() *AdminMutation
- func (ac *AdminCreate) Save(ctx context.Context) (*Admin, error)
- func (ac *AdminCreate) SaveX(ctx context.Context) *Admin
- func (ac *AdminCreate) SetCreatedAt(t time.Time) *AdminCreate
- func (ac *AdminCreate) SetID(u uuid.UUID) *AdminCreate
- func (ac *AdminCreate) SetNillableCreatedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetNillableID(u *uuid.UUID) *AdminCreate
- func (ac *AdminCreate) SetNillableUpdatedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetPasswordHash(b []byte) *AdminCreate
- func (ac *AdminCreate) SetPseudo(s string) *AdminCreate
- func (ac *AdminCreate) SetUpdatedAt(t time.Time) *AdminCreate
- type AdminCreateBulk
- type AdminDelete
- type AdminDeleteOne
- type AdminDisplayFront
- type AdminFront
- type AdminGroupBy
- func (agb *AdminGroupBy) Aggregate(fns ...AggregateFunc) *AdminGroupBy
- func (s *AdminGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AdminGroupBy) BoolX(ctx context.Context) bool
- func (s *AdminGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AdminGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AdminGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AdminGroupBy) Float64X(ctx context.Context) float64
- func (s *AdminGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AdminGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AdminGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AdminGroupBy) IntX(ctx context.Context) int
- func (s *AdminGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AdminGroupBy) IntsX(ctx context.Context) []int
- func (agb *AdminGroupBy) Scan(ctx context.Context, v any) error
- func (s *AdminGroupBy) ScanX(ctx context.Context, v any)
- func (s *AdminGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AdminGroupBy) StringX(ctx context.Context) string
- func (s *AdminGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AdminGroupBy) StringsX(ctx context.Context) []string
- type AdminMutation
- func (m *AdminMutation) AddField(name string, value ent.Value) error
- func (m *AdminMutation) AddedEdges() []string
- func (m *AdminMutation) AddedField(name string) (ent.Value, bool)
- func (m *AdminMutation) AddedFields() []string
- func (m *AdminMutation) AddedIDs(name string) []ent.Value
- func (m *AdminMutation) ClearEdge(name string) error
- func (m *AdminMutation) ClearField(name string) error
- func (m *AdminMutation) ClearedEdges() []string
- func (m *AdminMutation) ClearedFields() []string
- func (m AdminMutation) Client() *Client
- func (m *AdminMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AdminMutation) EdgeCleared(name string) bool
- func (m *AdminMutation) Field(name string) (ent.Value, bool)
- func (m *AdminMutation) FieldCleared(name string) bool
- func (m *AdminMutation) Fields() []string
- func (m *AdminMutation) ID() (id uuid.UUID, exists bool)
- func (m *AdminMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AdminMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AdminMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AdminMutation) OldPasswordHash(ctx context.Context) (v []byte, err error)
- func (m *AdminMutation) OldPseudo(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AdminMutation) Op() Op
- func (m *AdminMutation) PasswordHash() (r []byte, exists bool)
- func (m *AdminMutation) Pseudo() (r string, exists bool)
- func (m *AdminMutation) RemovedEdges() []string
- func (m *AdminMutation) RemovedIDs(name string) []ent.Value
- func (m *AdminMutation) ResetCreatedAt()
- func (m *AdminMutation) ResetEdge(name string) error
- func (m *AdminMutation) ResetField(name string) error
- func (m *AdminMutation) ResetPasswordHash()
- func (m *AdminMutation) ResetPseudo()
- func (m *AdminMutation) ResetUpdatedAt()
- func (m *AdminMutation) SetCreatedAt(t time.Time)
- func (m *AdminMutation) SetField(name string, value ent.Value) error
- func (m *AdminMutation) SetID(id uuid.UUID)
- func (m *AdminMutation) SetOp(op Op)
- func (m *AdminMutation) SetPasswordHash(b []byte)
- func (m *AdminMutation) SetPseudo(s string)
- func (m *AdminMutation) SetUpdatedAt(t time.Time)
- func (m AdminMutation) Tx() (*Tx, error)
- func (m *AdminMutation) Type() string
- func (m *AdminMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AdminMutation) Where(ps ...predicate.Admin)
- func (m *AdminMutation) WhereP(ps ...func(*sql.Selector))
- type AdminQuery
- func (aq *AdminQuery) Aggregate(fns ...AggregateFunc) *AdminSelect
- func (aq *AdminQuery) All(ctx context.Context) ([]*Admin, error)
- func (aq *AdminQuery) AllX(ctx context.Context) []*Admin
- func (aq *AdminQuery) Clone() *AdminQuery
- func (aq *AdminQuery) Count(ctx context.Context) (int, error)
- func (aq *AdminQuery) CountX(ctx context.Context) int
- func (aq *AdminQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AdminQuery) ExistX(ctx context.Context) bool
- func (aq *AdminQuery) First(ctx context.Context) (*Admin, error)
- func (aq *AdminQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AdminQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (aq *AdminQuery) FirstX(ctx context.Context) *Admin
- func (aq *AdminQuery) GroupBy(field string, fields ...string) *AdminGroupBy
- func (aq *AdminQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (aq *AdminQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AdminQuery) Limit(limit int) *AdminQuery
- func (aq *AdminQuery) Offset(offset int) *AdminQuery
- func (aq *AdminQuery) Only(ctx context.Context) (*Admin, error)
- func (aq *AdminQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AdminQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (aq *AdminQuery) OnlyX(ctx context.Context) *Admin
- func (aq *AdminQuery) Order(o ...OrderFunc) *AdminQuery
- func (aq *AdminQuery) Select(fields ...string) *AdminSelect
- func (aq *AdminQuery) Unique(unique bool) *AdminQuery
- func (aq *AdminQuery) Where(ps ...predicate.Admin) *AdminQuery
- type AdminSelect
- func (as *AdminSelect) Aggregate(fns ...AggregateFunc) *AdminSelect
- func (s *AdminSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AdminSelect) BoolX(ctx context.Context) bool
- func (s *AdminSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AdminSelect) BoolsX(ctx context.Context) []bool
- func (s *AdminSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AdminSelect) Float64X(ctx context.Context) float64
- func (s *AdminSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AdminSelect) Float64sX(ctx context.Context) []float64
- func (s *AdminSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AdminSelect) IntX(ctx context.Context) int
- func (s *AdminSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AdminSelect) IntsX(ctx context.Context) []int
- func (as *AdminSelect) Scan(ctx context.Context, v any) error
- func (s *AdminSelect) ScanX(ctx context.Context, v any)
- func (s *AdminSelect) String(ctx context.Context) (_ string, err error)
- func (s *AdminSelect) StringX(ctx context.Context) string
- func (s *AdminSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AdminSelect) StringsX(ctx context.Context) []string
- type AdminUpdate
- func (au *AdminUpdate) Exec(ctx context.Context) error
- func (au *AdminUpdate) ExecX(ctx context.Context)
- func (au *AdminUpdate) Mutation() *AdminMutation
- func (au *AdminUpdate) Save(ctx context.Context) (int, error)
- func (au *AdminUpdate) SaveX(ctx context.Context) int
- func (au *AdminUpdate) SetPasswordHash(b []byte) *AdminUpdate
- func (au *AdminUpdate) SetPseudo(s string) *AdminUpdate
- func (au *AdminUpdate) SetUpdatedAt(t time.Time) *AdminUpdate
- func (au *AdminUpdate) Where(ps ...predicate.Admin) *AdminUpdate
- type AdminUpdateOne
- func (auo *AdminUpdateOne) Exec(ctx context.Context) error
- func (auo *AdminUpdateOne) ExecX(ctx context.Context)
- func (auo *AdminUpdateOne) Mutation() *AdminMutation
- func (auo *AdminUpdateOne) Save(ctx context.Context) (*Admin, error)
- func (auo *AdminUpdateOne) SaveX(ctx context.Context) *Admin
- func (auo *AdminUpdateOne) Select(field string, fields ...string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetPasswordHash(b []byte) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetPseudo(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetUpdatedAt(t time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) Where(ps ...predicate.Admin) *AdminUpdateOne
- type Admins
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Student
- type StudentClient
- func (c *StudentClient) Create() *StudentCreate
- func (c *StudentClient) CreateBulk(builders ...*StudentCreate) *StudentCreateBulk
- func (c *StudentClient) Delete() *StudentDelete
- func (c *StudentClient) DeleteOne(s *Student) *StudentDeleteOne
- func (c *StudentClient) DeleteOneID(id uuid.UUID) *StudentDeleteOne
- func (c *StudentClient) Get(ctx context.Context, id uuid.UUID) (*Student, error)
- func (c *StudentClient) GetX(ctx context.Context, id uuid.UUID) *Student
- func (c *StudentClient) Hooks() []Hook
- func (c *StudentClient) Intercept(interceptors ...Interceptor)
- func (c *StudentClient) Interceptors() []Interceptor
- func (c *StudentClient) Query() *StudentQuery
- func (c *StudentClient) Update() *StudentUpdate
- func (c *StudentClient) UpdateOne(s *Student) *StudentUpdateOne
- func (c *StudentClient) UpdateOneID(id uuid.UUID) *StudentUpdateOne
- func (c *StudentClient) Use(hooks ...Hook)
- type StudentCreate
- func (sc *StudentCreate) Exec(ctx context.Context) error
- func (sc *StudentCreate) ExecX(ctx context.Context)
- func (sc *StudentCreate) Mutation() *StudentMutation
- func (sc *StudentCreate) Save(ctx context.Context) (*Student, error)
- func (sc *StudentCreate) SaveX(ctx context.Context) *Student
- func (sc *StudentCreate) SetBirthday(t time.Time) *StudentCreate
- func (sc *StudentCreate) SetCreatedAt(t time.Time) *StudentCreate
- func (sc *StudentCreate) SetFirstName(s string) *StudentCreate
- func (sc *StudentCreate) SetGender(pr primitive.Gender) *StudentCreate
- func (sc *StudentCreate) SetID(u uuid.UUID) *StudentCreate
- func (sc *StudentCreate) SetLastName(s string) *StudentCreate
- func (sc *StudentCreate) SetNillableBirthday(t *time.Time) *StudentCreate
- func (sc *StudentCreate) SetNillableCreatedAt(t *time.Time) *StudentCreate
- func (sc *StudentCreate) SetNillableID(u *uuid.UUID) *StudentCreate
- func (sc *StudentCreate) SetNillableUpdatedAt(t *time.Time) *StudentCreate
- func (sc *StudentCreate) SetPasswordHash(b []byte) *StudentCreate
- func (sc *StudentCreate) SetPseudo(s string) *StudentCreate
- func (sc *StudentCreate) SetUpdatedAt(t time.Time) *StudentCreate
- type StudentCreateBulk
- type StudentDelete
- type StudentDeleteOne
- type StudentDisplayFront
- type StudentFront
- type StudentGroupBy
- func (sgb *StudentGroupBy) Aggregate(fns ...AggregateFunc) *StudentGroupBy
- func (s *StudentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StudentGroupBy) BoolX(ctx context.Context) bool
- func (s *StudentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StudentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StudentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StudentGroupBy) Float64X(ctx context.Context) float64
- func (s *StudentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StudentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StudentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StudentGroupBy) IntX(ctx context.Context) int
- func (s *StudentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StudentGroupBy) IntsX(ctx context.Context) []int
- func (sgb *StudentGroupBy) Scan(ctx context.Context, v any) error
- func (s *StudentGroupBy) ScanX(ctx context.Context, v any)
- func (s *StudentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StudentGroupBy) StringX(ctx context.Context) string
- func (s *StudentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StudentGroupBy) StringsX(ctx context.Context) []string
- type StudentMutation
- func (m *StudentMutation) AddField(name string, value ent.Value) error
- func (m *StudentMutation) AddedEdges() []string
- func (m *StudentMutation) AddedField(name string) (ent.Value, bool)
- func (m *StudentMutation) AddedFields() []string
- func (m *StudentMutation) AddedIDs(name string) []ent.Value
- func (m *StudentMutation) Birthday() (r time.Time, exists bool)
- func (m *StudentMutation) BirthdayCleared() bool
- func (m *StudentMutation) ClearBirthday()
- func (m *StudentMutation) ClearEdge(name string) error
- func (m *StudentMutation) ClearField(name string) error
- func (m *StudentMutation) ClearPasswordHash()
- func (m *StudentMutation) ClearedEdges() []string
- func (m *StudentMutation) ClearedFields() []string
- func (m StudentMutation) Client() *Client
- func (m *StudentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *StudentMutation) EdgeCleared(name string) bool
- func (m *StudentMutation) Field(name string) (ent.Value, bool)
- func (m *StudentMutation) FieldCleared(name string) bool
- func (m *StudentMutation) Fields() []string
- func (m *StudentMutation) FirstName() (r string, exists bool)
- func (m *StudentMutation) Gender() (r primitive.Gender, exists bool)
- func (m *StudentMutation) ID() (id uuid.UUID, exists bool)
- func (m *StudentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *StudentMutation) LastName() (r string, exists bool)
- func (m *StudentMutation) OldBirthday(ctx context.Context) (v time.Time, err error)
- func (m *StudentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StudentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StudentMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *StudentMutation) OldGender(ctx context.Context) (v primitive.Gender, err error)
- func (m *StudentMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *StudentMutation) OldPasswordHash(ctx context.Context) (v []byte, err error)
- func (m *StudentMutation) OldPseudo(ctx context.Context) (v string, err error)
- func (m *StudentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StudentMutation) Op() Op
- func (m *StudentMutation) PasswordHash() (r []byte, exists bool)
- func (m *StudentMutation) PasswordHashCleared() bool
- func (m *StudentMutation) Pseudo() (r string, exists bool)
- func (m *StudentMutation) RemovedEdges() []string
- func (m *StudentMutation) RemovedIDs(name string) []ent.Value
- func (m *StudentMutation) ResetBirthday()
- func (m *StudentMutation) ResetCreatedAt()
- func (m *StudentMutation) ResetEdge(name string) error
- func (m *StudentMutation) ResetField(name string) error
- func (m *StudentMutation) ResetFirstName()
- func (m *StudentMutation) ResetGender()
- func (m *StudentMutation) ResetLastName()
- func (m *StudentMutation) ResetPasswordHash()
- func (m *StudentMutation) ResetPseudo()
- func (m *StudentMutation) ResetUpdatedAt()
- func (m *StudentMutation) SetBirthday(t time.Time)
- func (m *StudentMutation) SetCreatedAt(t time.Time)
- func (m *StudentMutation) SetField(name string, value ent.Value) error
- func (m *StudentMutation) SetFirstName(s string)
- func (m *StudentMutation) SetGender(pr primitive.Gender)
- func (m *StudentMutation) SetID(id uuid.UUID)
- func (m *StudentMutation) SetLastName(s string)
- func (m *StudentMutation) SetOp(op Op)
- func (m *StudentMutation) SetPasswordHash(b []byte)
- func (m *StudentMutation) SetPseudo(s string)
- func (m *StudentMutation) SetUpdatedAt(t time.Time)
- func (m StudentMutation) Tx() (*Tx, error)
- func (m *StudentMutation) Type() string
- func (m *StudentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *StudentMutation) Where(ps ...predicate.Student)
- func (m *StudentMutation) WhereP(ps ...func(*sql.Selector))
- type StudentQuery
- func (sq *StudentQuery) Aggregate(fns ...AggregateFunc) *StudentSelect
- func (sq *StudentQuery) All(ctx context.Context) ([]*Student, error)
- func (sq *StudentQuery) AllX(ctx context.Context) []*Student
- func (sq *StudentQuery) Clone() *StudentQuery
- func (sq *StudentQuery) Count(ctx context.Context) (int, error)
- func (sq *StudentQuery) CountX(ctx context.Context) int
- func (sq *StudentQuery) Exist(ctx context.Context) (bool, error)
- func (sq *StudentQuery) ExistX(ctx context.Context) bool
- func (sq *StudentQuery) First(ctx context.Context) (*Student, error)
- func (sq *StudentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *StudentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *StudentQuery) FirstX(ctx context.Context) *Student
- func (sq *StudentQuery) GroupBy(field string, fields ...string) *StudentGroupBy
- func (sq *StudentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *StudentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *StudentQuery) Limit(limit int) *StudentQuery
- func (sq *StudentQuery) Offset(offset int) *StudentQuery
- func (sq *StudentQuery) Only(ctx context.Context) (*Student, error)
- func (sq *StudentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *StudentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *StudentQuery) OnlyX(ctx context.Context) *Student
- func (sq *StudentQuery) Order(o ...OrderFunc) *StudentQuery
- func (sq *StudentQuery) Select(fields ...string) *StudentSelect
- func (sq *StudentQuery) Unique(unique bool) *StudentQuery
- func (sq *StudentQuery) Where(ps ...predicate.Student) *StudentQuery
- type StudentSelect
- func (ss *StudentSelect) Aggregate(fns ...AggregateFunc) *StudentSelect
- func (s *StudentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StudentSelect) BoolX(ctx context.Context) bool
- func (s *StudentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StudentSelect) BoolsX(ctx context.Context) []bool
- func (s *StudentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StudentSelect) Float64X(ctx context.Context) float64
- func (s *StudentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StudentSelect) Float64sX(ctx context.Context) []float64
- func (s *StudentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StudentSelect) IntX(ctx context.Context) int
- func (s *StudentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StudentSelect) IntsX(ctx context.Context) []int
- func (ss *StudentSelect) Scan(ctx context.Context, v any) error
- func (s *StudentSelect) ScanX(ctx context.Context, v any)
- func (s *StudentSelect) String(ctx context.Context) (_ string, err error)
- func (s *StudentSelect) StringX(ctx context.Context) string
- func (s *StudentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StudentSelect) StringsX(ctx context.Context) []string
- type StudentUpdate
- func (su *StudentUpdate) ClearBirthday() *StudentUpdate
- func (su *StudentUpdate) ClearPasswordHash() *StudentUpdate
- func (su *StudentUpdate) Exec(ctx context.Context) error
- func (su *StudentUpdate) ExecX(ctx context.Context)
- func (su *StudentUpdate) Mutation() *StudentMutation
- func (su *StudentUpdate) Save(ctx context.Context) (int, error)
- func (su *StudentUpdate) SaveX(ctx context.Context) int
- func (su *StudentUpdate) SetBirthday(t time.Time) *StudentUpdate
- func (su *StudentUpdate) SetFirstName(s string) *StudentUpdate
- func (su *StudentUpdate) SetGender(pr primitive.Gender) *StudentUpdate
- func (su *StudentUpdate) SetLastName(s string) *StudentUpdate
- func (su *StudentUpdate) SetNillableBirthday(t *time.Time) *StudentUpdate
- func (su *StudentUpdate) SetPasswordHash(b []byte) *StudentUpdate
- func (su *StudentUpdate) SetPseudo(s string) *StudentUpdate
- func (su *StudentUpdate) SetUpdatedAt(t time.Time) *StudentUpdate
- func (su *StudentUpdate) Where(ps ...predicate.Student) *StudentUpdate
- type StudentUpdateOne
- func (suo *StudentUpdateOne) ClearBirthday() *StudentUpdateOne
- func (suo *StudentUpdateOne) ClearPasswordHash() *StudentUpdateOne
- func (suo *StudentUpdateOne) Exec(ctx context.Context) error
- func (suo *StudentUpdateOne) ExecX(ctx context.Context)
- func (suo *StudentUpdateOne) Mutation() *StudentMutation
- func (suo *StudentUpdateOne) Save(ctx context.Context) (*Student, error)
- func (suo *StudentUpdateOne) SaveX(ctx context.Context) *Student
- func (suo *StudentUpdateOne) Select(field string, fields ...string) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetBirthday(t time.Time) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetFirstName(s string) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetGender(pr primitive.Gender) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetLastName(s string) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetNillableBirthday(t *time.Time) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetPasswordHash(b []byte) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetPseudo(s string) *StudentUpdateOne
- func (suo *StudentUpdateOne) SetUpdatedAt(t time.Time) *StudentUpdateOne
- func (suo *StudentUpdateOne) Where(ps ...predicate.Student) *StudentUpdateOne
- type Students
- type StudentsFront
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAdmin = "Admin" TypeStudent = "Student" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Admin ¶
type Admin struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Pseudo holds the value of the "pseudo" field. Pseudo string `json:"pseudo,omitempty"` // PasswordHash holds the value of the "password_hash" field. PasswordHash []byte `json:"-"` // contains filtered or unexported fields }
Admin is the model entity for the Admin schema.
func (*Admin) ToFront ¶
func (a *Admin) ToFront() *AdminFront
ToFront is the structure returned to the frontend
func (*Admin) Unwrap ¶
Unwrap unwraps the Admin entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Admin) Update ¶
func (a *Admin) Update() *AdminUpdateOne
Update returns a builder for updating this Admin. Note that you need to call Admin.Unwrap() before calling this method if this Admin was returned from a transaction, and the transaction was committed or rolled back.
type AdminClient ¶
type AdminClient struct {
// contains filtered or unexported fields
}
AdminClient is a client for the Admin schema.
func NewAdminClient ¶
func NewAdminClient(c config) *AdminClient
NewAdminClient returns a client for the Admin from the given config.
func (*AdminClient) Create ¶
func (c *AdminClient) Create() *AdminCreate
Create returns a builder for creating a Admin entity.
func (*AdminClient) CreateBulk ¶
func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk
CreateBulk returns a builder for creating a bulk of Admin entities.
func (*AdminClient) Delete ¶
func (c *AdminClient) Delete() *AdminDelete
Delete returns a delete builder for Admin.
func (*AdminClient) DeleteOne ¶
func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AdminClient) DeleteOneID ¶
func (c *AdminClient) DeleteOneID(id uuid.UUID) *AdminDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AdminClient) Intercept ¶
func (c *AdminClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `admin.Intercept(f(g(h())))`.
func (*AdminClient) Interceptors ¶
func (c *AdminClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AdminClient) Query ¶
func (c *AdminClient) Query() *AdminQuery
Query returns a query builder for Admin.
func (*AdminClient) Update ¶
func (c *AdminClient) Update() *AdminUpdate
Update returns an update builder for Admin.
func (*AdminClient) UpdateOne ¶
func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AdminClient) UpdateOneID ¶
func (c *AdminClient) UpdateOneID(id uuid.UUID) *AdminUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AdminClient) Use ¶
func (c *AdminClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `admin.Hooks(f(g(h())))`.
type AdminCreate ¶
type AdminCreate struct {
// contains filtered or unexported fields
}
AdminCreate is the builder for creating a Admin entity.
func (*AdminCreate) Exec ¶
func (ac *AdminCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminCreate) ExecX ¶
func (ac *AdminCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminCreate) Mutation ¶
func (ac *AdminCreate) Mutation() *AdminMutation
Mutation returns the AdminMutation object of the builder.
func (*AdminCreate) Save ¶
func (ac *AdminCreate) Save(ctx context.Context) (*Admin, error)
Save creates the Admin in the database.
func (*AdminCreate) SaveX ¶
func (ac *AdminCreate) SaveX(ctx context.Context) *Admin
SaveX calls Save and panics if Save returns an error.
func (*AdminCreate) SetCreatedAt ¶
func (ac *AdminCreate) SetCreatedAt(t time.Time) *AdminCreate
SetCreatedAt sets the "created_at" field.
func (*AdminCreate) SetID ¶
func (ac *AdminCreate) SetID(u uuid.UUID) *AdminCreate
SetID sets the "id" field.
func (*AdminCreate) SetNillableCreatedAt ¶
func (ac *AdminCreate) SetNillableCreatedAt(t *time.Time) *AdminCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AdminCreate) SetNillableID ¶
func (ac *AdminCreate) SetNillableID(u *uuid.UUID) *AdminCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AdminCreate) SetNillableUpdatedAt ¶
func (ac *AdminCreate) SetNillableUpdatedAt(t *time.Time) *AdminCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AdminCreate) SetPasswordHash ¶
func (ac *AdminCreate) SetPasswordHash(b []byte) *AdminCreate
SetPasswordHash sets the "password_hash" field.
func (*AdminCreate) SetPseudo ¶
func (ac *AdminCreate) SetPseudo(s string) *AdminCreate
SetPseudo sets the "pseudo" field.
func (*AdminCreate) SetUpdatedAt ¶
func (ac *AdminCreate) SetUpdatedAt(t time.Time) *AdminCreate
SetUpdatedAt sets the "updated_at" field.
type AdminCreateBulk ¶
type AdminCreateBulk struct {
// contains filtered or unexported fields
}
AdminCreateBulk is the builder for creating many Admin entities in bulk.
func (*AdminCreateBulk) Exec ¶
func (acb *AdminCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminCreateBulk) ExecX ¶
func (acb *AdminCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AdminDelete ¶
type AdminDelete struct {
// contains filtered or unexported fields
}
AdminDelete is the builder for deleting a Admin entity.
func (*AdminDelete) Exec ¶
func (ad *AdminDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AdminDelete) ExecX ¶
func (ad *AdminDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AdminDelete) Where ¶
func (ad *AdminDelete) Where(ps ...predicate.Admin) *AdminDelete
Where appends a list predicates to the AdminDelete builder.
type AdminDeleteOne ¶
type AdminDeleteOne struct {
// contains filtered or unexported fields
}
AdminDeleteOne is the builder for deleting a single Admin entity.
func (*AdminDeleteOne) Exec ¶
func (ado *AdminDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AdminDeleteOne) ExecX ¶
func (ado *AdminDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminDeleteOne) Where ¶
func (ado *AdminDeleteOne) Where(ps ...predicate.Admin) *AdminDeleteOne
Where appends a list predicates to the AdminDelete builder.
type AdminDisplayFront ¶
type AdminDisplayFront struct { // Pseudo holds the value of the "pseudo" field. Pseudo string `json:"pseudo"` }
AdminDisplayFront is the model entity for the Admin schema.
type AdminFront ¶
type AdminFront struct { Display *AdminDisplayFront `json:"display,omitempty"` ID uuid.UUID `json:"id,omitempty"` }
AdminFront is the model entity returned to the frontend
type AdminGroupBy ¶
type AdminGroupBy struct {
// contains filtered or unexported fields
}
AdminGroupBy is the group-by builder for Admin entities.
func (*AdminGroupBy) Aggregate ¶
func (agb *AdminGroupBy) Aggregate(fns ...AggregateFunc) *AdminGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AdminGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Scan ¶
func (agb *AdminGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AdminGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AdminMutation ¶
type AdminMutation struct {
// contains filtered or unexported fields
}
AdminMutation represents an operation that mutates the Admin nodes in the graph.
func (*AdminMutation) AddField ¶
func (m *AdminMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AdminMutation) AddedEdges ¶
func (m *AdminMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AdminMutation) AddedField ¶
func (m *AdminMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AdminMutation) AddedFields ¶
func (m *AdminMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AdminMutation) AddedIDs ¶
func (m *AdminMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AdminMutation) ClearEdge ¶
func (m *AdminMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AdminMutation) ClearField ¶
func (m *AdminMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AdminMutation) ClearedEdges ¶
func (m *AdminMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AdminMutation) ClearedFields ¶
func (m *AdminMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AdminMutation) Client ¶
func (m AdminMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AdminMutation) CreatedAt ¶
func (m *AdminMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AdminMutation) EdgeCleared ¶
func (m *AdminMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AdminMutation) Field ¶
func (m *AdminMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AdminMutation) FieldCleared ¶
func (m *AdminMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AdminMutation) Fields ¶
func (m *AdminMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*AdminMutation) ID ¶
func (m *AdminMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AdminMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AdminMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AdminMutation) OldPasswordHash ¶
func (m *AdminMutation) OldPasswordHash(ctx context.Context) (v []byte, err error)
OldPasswordHash returns the old "password_hash" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldPseudo ¶
func (m *AdminMutation) OldPseudo(ctx context.Context) (v string, err error)
OldPseudo returns the old "pseudo" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) PasswordHash ¶
func (m *AdminMutation) PasswordHash() (r []byte, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*AdminMutation) Pseudo ¶
func (m *AdminMutation) Pseudo() (r string, exists bool)
Pseudo returns the value of the "pseudo" field in the mutation.
func (*AdminMutation) RemovedEdges ¶
func (m *AdminMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AdminMutation) RemovedIDs ¶
func (m *AdminMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AdminMutation) ResetCreatedAt ¶
func (m *AdminMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AdminMutation) ResetEdge ¶
func (m *AdminMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AdminMutation) ResetField ¶
func (m *AdminMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AdminMutation) ResetPasswordHash ¶
func (m *AdminMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*AdminMutation) ResetPseudo ¶
func (m *AdminMutation) ResetPseudo()
ResetPseudo resets all changes to the "pseudo" field.
func (*AdminMutation) ResetUpdatedAt ¶
func (m *AdminMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AdminMutation) SetCreatedAt ¶
func (m *AdminMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AdminMutation) SetField ¶
func (m *AdminMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AdminMutation) SetID ¶
func (m *AdminMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Admin entities.
func (*AdminMutation) SetOp ¶
func (m *AdminMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AdminMutation) SetPasswordHash ¶
func (m *AdminMutation) SetPasswordHash(b []byte)
SetPasswordHash sets the "password_hash" field.
func (*AdminMutation) SetPseudo ¶
func (m *AdminMutation) SetPseudo(s string)
SetPseudo sets the "pseudo" field.
func (*AdminMutation) SetUpdatedAt ¶
func (m *AdminMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (AdminMutation) Tx ¶
func (m AdminMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AdminMutation) Type ¶
func (m *AdminMutation) Type() string
Type returns the node type of this mutation (Admin).
func (*AdminMutation) UpdatedAt ¶
func (m *AdminMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AdminMutation) Where ¶
func (m *AdminMutation) Where(ps ...predicate.Admin)
Where appends a list predicates to the AdminMutation builder.
func (*AdminMutation) WhereP ¶
func (m *AdminMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AdminMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AdminQuery ¶
type AdminQuery struct {
// contains filtered or unexported fields
}
AdminQuery is the builder for querying Admin entities.
func (*AdminQuery) Aggregate ¶
func (aq *AdminQuery) Aggregate(fns ...AggregateFunc) *AdminSelect
Aggregate returns a AdminSelect configured with the given aggregations.
func (*AdminQuery) All ¶
func (aq *AdminQuery) All(ctx context.Context) ([]*Admin, error)
All executes the query and returns a list of Admins.
func (*AdminQuery) AllX ¶
func (aq *AdminQuery) AllX(ctx context.Context) []*Admin
AllX is like All, but panics if an error occurs.
func (*AdminQuery) Clone ¶
func (aq *AdminQuery) Clone() *AdminQuery
Clone returns a duplicate of the AdminQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AdminQuery) Count ¶
func (aq *AdminQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AdminQuery) CountX ¶
func (aq *AdminQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AdminQuery) Exist ¶
func (aq *AdminQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AdminQuery) ExistX ¶
func (aq *AdminQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AdminQuery) First ¶
func (aq *AdminQuery) First(ctx context.Context) (*Admin, error)
First returns the first Admin entity from the query. Returns a *NotFoundError when no Admin was found.
func (*AdminQuery) FirstID ¶
FirstID returns the first Admin ID from the query. Returns a *NotFoundError when no Admin ID was found.
func (*AdminQuery) FirstIDX ¶
func (aq *AdminQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AdminQuery) FirstX ¶
func (aq *AdminQuery) FirstX(ctx context.Context) *Admin
FirstX is like First, but panics if an error occurs.
func (*AdminQuery) GroupBy ¶
func (aq *AdminQuery) GroupBy(field string, fields ...string) *AdminGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Admin.Query(). GroupBy(admin.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AdminQuery) IDsX ¶
func (aq *AdminQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AdminQuery) Limit ¶
func (aq *AdminQuery) Limit(limit int) *AdminQuery
Limit the number of records to be returned by this query.
func (*AdminQuery) Offset ¶
func (aq *AdminQuery) Offset(offset int) *AdminQuery
Offset to start from.
func (*AdminQuery) Only ¶
func (aq *AdminQuery) Only(ctx context.Context) (*Admin, error)
Only returns a single Admin entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Admin entity is found. Returns a *NotFoundError when no Admin entities are found.
func (*AdminQuery) OnlyID ¶
OnlyID is like Only, but returns the only Admin ID in the query. Returns a *NotSingularError when more than one Admin ID is found. Returns a *NotFoundError when no entities are found.
func (*AdminQuery) OnlyIDX ¶
func (aq *AdminQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AdminQuery) OnlyX ¶
func (aq *AdminQuery) OnlyX(ctx context.Context) *Admin
OnlyX is like Only, but panics if an error occurs.
func (*AdminQuery) Order ¶
func (aq *AdminQuery) Order(o ...OrderFunc) *AdminQuery
Order specifies how the records should be ordered.
func (*AdminQuery) Select ¶
func (aq *AdminQuery) Select(fields ...string) *AdminSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Admin.Query(). Select(admin.FieldCreatedAt). Scan(ctx, &v)
func (*AdminQuery) Unique ¶
func (aq *AdminQuery) Unique(unique bool) *AdminQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*AdminQuery) Where ¶
func (aq *AdminQuery) Where(ps ...predicate.Admin) *AdminQuery
Where adds a new predicate for the AdminQuery builder.
type AdminSelect ¶
type AdminSelect struct { *AdminQuery // contains filtered or unexported fields }
AdminSelect is the builder for selecting fields of Admin entities.
func (*AdminSelect) Aggregate ¶
func (as *AdminSelect) Aggregate(fns ...AggregateFunc) *AdminSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AdminSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Scan ¶
func (as *AdminSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AdminSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AdminUpdate ¶
type AdminUpdate struct {
// contains filtered or unexported fields
}
AdminUpdate is the builder for updating Admin entities.
func (*AdminUpdate) Exec ¶
func (au *AdminUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminUpdate) ExecX ¶
func (au *AdminUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminUpdate) Mutation ¶
func (au *AdminUpdate) Mutation() *AdminMutation
Mutation returns the AdminMutation object of the builder.
func (*AdminUpdate) Save ¶
func (au *AdminUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AdminUpdate) SaveX ¶
func (au *AdminUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AdminUpdate) SetPasswordHash ¶
func (au *AdminUpdate) SetPasswordHash(b []byte) *AdminUpdate
SetPasswordHash sets the "password_hash" field.
func (*AdminUpdate) SetPseudo ¶
func (au *AdminUpdate) SetPseudo(s string) *AdminUpdate
SetPseudo sets the "pseudo" field.
func (*AdminUpdate) SetUpdatedAt ¶
func (au *AdminUpdate) SetUpdatedAt(t time.Time) *AdminUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AdminUpdate) Where ¶
func (au *AdminUpdate) Where(ps ...predicate.Admin) *AdminUpdate
Where appends a list predicates to the AdminUpdate builder.
type AdminUpdateOne ¶
type AdminUpdateOne struct {
// contains filtered or unexported fields
}
AdminUpdateOne is the builder for updating a single Admin entity.
func (*AdminUpdateOne) Exec ¶
func (auo *AdminUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AdminUpdateOne) ExecX ¶
func (auo *AdminUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminUpdateOne) Mutation ¶
func (auo *AdminUpdateOne) Mutation() *AdminMutation
Mutation returns the AdminMutation object of the builder.
func (*AdminUpdateOne) Save ¶
func (auo *AdminUpdateOne) Save(ctx context.Context) (*Admin, error)
Save executes the query and returns the updated Admin entity.
func (*AdminUpdateOne) SaveX ¶
func (auo *AdminUpdateOne) SaveX(ctx context.Context) *Admin
SaveX is like Save, but panics if an error occurs.
func (*AdminUpdateOne) Select ¶
func (auo *AdminUpdateOne) Select(field string, fields ...string) *AdminUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AdminUpdateOne) SetPasswordHash ¶
func (auo *AdminUpdateOne) SetPasswordHash(b []byte) *AdminUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*AdminUpdateOne) SetPseudo ¶
func (auo *AdminUpdateOne) SetPseudo(s string) *AdminUpdateOne
SetPseudo sets the "pseudo" field.
func (*AdminUpdateOne) SetUpdatedAt ¶
func (auo *AdminUpdateOne) SetUpdatedAt(t time.Time) *AdminUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*AdminUpdateOne) Where ¶
func (auo *AdminUpdateOne) Where(ps ...predicate.Admin) *AdminUpdateOne
Where appends a list predicates to the AdminUpdate builder.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Admin is the client for interacting with the Admin builders. Admin *AdminClient // Student is the client for interacting with the Student builders. Student *StudentClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Admin. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Student ¶
type Student struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // Pseudo holds the value of the "pseudo" field. Pseudo string `json:"pseudo,omitempty"` // Gender holds the value of the "gender" field. Gender primitive.Gender `json:"gender,omitempty"` // Birthday holds the value of the "birthday" field. Birthday time.Time `json:"birthday,omitempty"` // PasswordHash holds the value of the "password_hash" field. PasswordHash []byte `json:"-"` // contains filtered or unexported fields }
Student is the model entity for the Student schema.
func (*Student) ToFront ¶
func (s *Student) ToFront() *StudentFront
ToFront is the structure returned to the frontend
func (*Student) Unwrap ¶
Unwrap unwraps the Student entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Student) Update ¶
func (s *Student) Update() *StudentUpdateOne
Update returns a builder for updating this Student. Note that you need to call Student.Unwrap() before calling this method if this Student was returned from a transaction, and the transaction was committed or rolled back.
type StudentClient ¶
type StudentClient struct {
// contains filtered or unexported fields
}
StudentClient is a client for the Student schema.
func NewStudentClient ¶
func NewStudentClient(c config) *StudentClient
NewStudentClient returns a client for the Student from the given config.
func (*StudentClient) Create ¶
func (c *StudentClient) Create() *StudentCreate
Create returns a builder for creating a Student entity.
func (*StudentClient) CreateBulk ¶
func (c *StudentClient) CreateBulk(builders ...*StudentCreate) *StudentCreateBulk
CreateBulk returns a builder for creating a bulk of Student entities.
func (*StudentClient) Delete ¶
func (c *StudentClient) Delete() *StudentDelete
Delete returns a delete builder for Student.
func (*StudentClient) DeleteOne ¶
func (c *StudentClient) DeleteOne(s *Student) *StudentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StudentClient) DeleteOneID ¶
func (c *StudentClient) DeleteOneID(id uuid.UUID) *StudentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StudentClient) Hooks ¶
func (c *StudentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StudentClient) Intercept ¶
func (c *StudentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `student.Intercept(f(g(h())))`.
func (*StudentClient) Interceptors ¶
func (c *StudentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StudentClient) Query ¶
func (c *StudentClient) Query() *StudentQuery
Query returns a query builder for Student.
func (*StudentClient) Update ¶
func (c *StudentClient) Update() *StudentUpdate
Update returns an update builder for Student.
func (*StudentClient) UpdateOne ¶
func (c *StudentClient) UpdateOne(s *Student) *StudentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StudentClient) UpdateOneID ¶
func (c *StudentClient) UpdateOneID(id uuid.UUID) *StudentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StudentClient) Use ¶
func (c *StudentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `student.Hooks(f(g(h())))`.
type StudentCreate ¶
type StudentCreate struct {
// contains filtered or unexported fields
}
StudentCreate is the builder for creating a Student entity.
func (*StudentCreate) Exec ¶
func (sc *StudentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StudentCreate) ExecX ¶
func (sc *StudentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudentCreate) Mutation ¶
func (sc *StudentCreate) Mutation() *StudentMutation
Mutation returns the StudentMutation object of the builder.
func (*StudentCreate) Save ¶
func (sc *StudentCreate) Save(ctx context.Context) (*Student, error)
Save creates the Student in the database.
func (*StudentCreate) SaveX ¶
func (sc *StudentCreate) SaveX(ctx context.Context) *Student
SaveX calls Save and panics if Save returns an error.
func (*StudentCreate) SetBirthday ¶
func (sc *StudentCreate) SetBirthday(t time.Time) *StudentCreate
SetBirthday sets the "birthday" field.
func (*StudentCreate) SetCreatedAt ¶
func (sc *StudentCreate) SetCreatedAt(t time.Time) *StudentCreate
SetCreatedAt sets the "created_at" field.
func (*StudentCreate) SetFirstName ¶
func (sc *StudentCreate) SetFirstName(s string) *StudentCreate
SetFirstName sets the "first_name" field.
func (*StudentCreate) SetGender ¶
func (sc *StudentCreate) SetGender(pr primitive.Gender) *StudentCreate
SetGender sets the "gender" field.
func (*StudentCreate) SetID ¶
func (sc *StudentCreate) SetID(u uuid.UUID) *StudentCreate
SetID sets the "id" field.
func (*StudentCreate) SetLastName ¶
func (sc *StudentCreate) SetLastName(s string) *StudentCreate
SetLastName sets the "last_name" field.
func (*StudentCreate) SetNillableBirthday ¶
func (sc *StudentCreate) SetNillableBirthday(t *time.Time) *StudentCreate
SetNillableBirthday sets the "birthday" field if the given value is not nil.
func (*StudentCreate) SetNillableCreatedAt ¶
func (sc *StudentCreate) SetNillableCreatedAt(t *time.Time) *StudentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*StudentCreate) SetNillableID ¶
func (sc *StudentCreate) SetNillableID(u *uuid.UUID) *StudentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*StudentCreate) SetNillableUpdatedAt ¶
func (sc *StudentCreate) SetNillableUpdatedAt(t *time.Time) *StudentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*StudentCreate) SetPasswordHash ¶
func (sc *StudentCreate) SetPasswordHash(b []byte) *StudentCreate
SetPasswordHash sets the "password_hash" field.
func (*StudentCreate) SetPseudo ¶
func (sc *StudentCreate) SetPseudo(s string) *StudentCreate
SetPseudo sets the "pseudo" field.
func (*StudentCreate) SetUpdatedAt ¶
func (sc *StudentCreate) SetUpdatedAt(t time.Time) *StudentCreate
SetUpdatedAt sets the "updated_at" field.
type StudentCreateBulk ¶
type StudentCreateBulk struct {
// contains filtered or unexported fields
}
StudentCreateBulk is the builder for creating many Student entities in bulk.
func (*StudentCreateBulk) Exec ¶
func (scb *StudentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StudentCreateBulk) ExecX ¶
func (scb *StudentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type StudentDelete ¶
type StudentDelete struct {
// contains filtered or unexported fields
}
StudentDelete is the builder for deleting a Student entity.
func (*StudentDelete) Exec ¶
func (sd *StudentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StudentDelete) ExecX ¶
func (sd *StudentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StudentDelete) Where ¶
func (sd *StudentDelete) Where(ps ...predicate.Student) *StudentDelete
Where appends a list predicates to the StudentDelete builder.
type StudentDeleteOne ¶
type StudentDeleteOne struct {
// contains filtered or unexported fields
}
StudentDeleteOne is the builder for deleting a single Student entity.
func (*StudentDeleteOne) Exec ¶
func (sdo *StudentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StudentDeleteOne) ExecX ¶
func (sdo *StudentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudentDeleteOne) Where ¶
func (sdo *StudentDeleteOne) Where(ps ...predicate.Student) *StudentDeleteOne
Where appends a list predicates to the StudentDelete builder.
type StudentDisplayFront ¶
type StudentDisplayFront struct { FirstName string `json:"firstname,omitempty"` LastName string `json:"lastname,omitempty"` Pseudo string `json:"pseudo,omitempty"` Gender primitive.Gender `json:"gender,omitempty"` Birthday string `json:"birthday,omitempty"` }
StudentDisplayFront is the model entity for the Student schema.
type StudentFront ¶
type StudentFront struct { Display *StudentDisplayFront `json:"display,omitempty"` PasswordHash []byte `json:"-"` ID uuid.UUID `json:"id,omitempty"` }
StudentFront is the model entity returned to frontend
type StudentGroupBy ¶
type StudentGroupBy struct {
// contains filtered or unexported fields
}
StudentGroupBy is the group-by builder for Student entities.
func (*StudentGroupBy) Aggregate ¶
func (sgb *StudentGroupBy) Aggregate(fns ...AggregateFunc) *StudentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StudentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StudentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StudentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StudentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StudentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StudentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StudentGroupBy) Scan ¶
func (sgb *StudentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StudentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StudentMutation ¶
type StudentMutation struct {
// contains filtered or unexported fields
}
StudentMutation represents an operation that mutates the Student nodes in the graph.
func (*StudentMutation) AddField ¶
func (m *StudentMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*StudentMutation) AddedEdges ¶
func (m *StudentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StudentMutation) AddedField ¶
func (m *StudentMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*StudentMutation) AddedFields ¶
func (m *StudentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StudentMutation) AddedIDs ¶
func (m *StudentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StudentMutation) Birthday ¶
func (m *StudentMutation) Birthday() (r time.Time, exists bool)
Birthday returns the value of the "birthday" field in the mutation.
func (*StudentMutation) BirthdayCleared ¶
func (m *StudentMutation) BirthdayCleared() bool
BirthdayCleared returns if the "birthday" field was cleared in this mutation.
func (*StudentMutation) ClearBirthday ¶
func (m *StudentMutation) ClearBirthday()
ClearBirthday clears the value of the "birthday" field.
func (*StudentMutation) ClearEdge ¶
func (m *StudentMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*StudentMutation) ClearField ¶
func (m *StudentMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*StudentMutation) ClearPasswordHash ¶
func (m *StudentMutation) ClearPasswordHash()
ClearPasswordHash clears the value of the "password_hash" field.
func (*StudentMutation) ClearedEdges ¶
func (m *StudentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StudentMutation) ClearedFields ¶
func (m *StudentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StudentMutation) Client ¶
func (m StudentMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*StudentMutation) CreatedAt ¶
func (m *StudentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*StudentMutation) EdgeCleared ¶
func (m *StudentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StudentMutation) Field ¶
func (m *StudentMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*StudentMutation) FieldCleared ¶
func (m *StudentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StudentMutation) Fields ¶
func (m *StudentMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*StudentMutation) FirstName ¶
func (m *StudentMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*StudentMutation) Gender ¶
func (m *StudentMutation) Gender() (r primitive.Gender, exists bool)
Gender returns the value of the "gender" field in the mutation.
func (*StudentMutation) ID ¶
func (m *StudentMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*StudentMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*StudentMutation) LastName ¶
func (m *StudentMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*StudentMutation) OldBirthday ¶
OldBirthday returns the old "birthday" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*StudentMutation) OldFirstName ¶
func (m *StudentMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) OldGender ¶
OldGender returns the old "gender" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) OldLastName ¶
func (m *StudentMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) OldPasswordHash ¶
func (m *StudentMutation) OldPasswordHash(ctx context.Context) (v []byte, err error)
OldPasswordHash returns the old "password_hash" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) OldPseudo ¶
func (m *StudentMutation) OldPseudo(ctx context.Context) (v string, err error)
OldPseudo returns the old "pseudo" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Student entity. If the Student object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudentMutation) PasswordHash ¶
func (m *StudentMutation) PasswordHash() (r []byte, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*StudentMutation) PasswordHashCleared ¶
func (m *StudentMutation) PasswordHashCleared() bool
PasswordHashCleared returns if the "password_hash" field was cleared in this mutation.
func (*StudentMutation) Pseudo ¶
func (m *StudentMutation) Pseudo() (r string, exists bool)
Pseudo returns the value of the "pseudo" field in the mutation.
func (*StudentMutation) RemovedEdges ¶
func (m *StudentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StudentMutation) RemovedIDs ¶
func (m *StudentMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*StudentMutation) ResetBirthday ¶
func (m *StudentMutation) ResetBirthday()
ResetBirthday resets all changes to the "birthday" field.
func (*StudentMutation) ResetCreatedAt ¶
func (m *StudentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*StudentMutation) ResetEdge ¶
func (m *StudentMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*StudentMutation) ResetField ¶
func (m *StudentMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*StudentMutation) ResetFirstName ¶
func (m *StudentMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*StudentMutation) ResetGender ¶
func (m *StudentMutation) ResetGender()
ResetGender resets all changes to the "gender" field.
func (*StudentMutation) ResetLastName ¶
func (m *StudentMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*StudentMutation) ResetPasswordHash ¶
func (m *StudentMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*StudentMutation) ResetPseudo ¶
func (m *StudentMutation) ResetPseudo()
ResetPseudo resets all changes to the "pseudo" field.
func (*StudentMutation) ResetUpdatedAt ¶
func (m *StudentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*StudentMutation) SetBirthday ¶
func (m *StudentMutation) SetBirthday(t time.Time)
SetBirthday sets the "birthday" field.
func (*StudentMutation) SetCreatedAt ¶
func (m *StudentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*StudentMutation) SetField ¶
func (m *StudentMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*StudentMutation) SetFirstName ¶
func (m *StudentMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*StudentMutation) SetGender ¶
func (m *StudentMutation) SetGender(pr primitive.Gender)
SetGender sets the "gender" field.
func (*StudentMutation) SetID ¶
func (m *StudentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Student entities.
func (*StudentMutation) SetLastName ¶
func (m *StudentMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*StudentMutation) SetOp ¶
func (m *StudentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StudentMutation) SetPasswordHash ¶
func (m *StudentMutation) SetPasswordHash(b []byte)
SetPasswordHash sets the "password_hash" field.
func (*StudentMutation) SetPseudo ¶
func (m *StudentMutation) SetPseudo(s string)
SetPseudo sets the "pseudo" field.
func (*StudentMutation) SetUpdatedAt ¶
func (m *StudentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (StudentMutation) Tx ¶
func (m StudentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StudentMutation) Type ¶
func (m *StudentMutation) Type() string
Type returns the node type of this mutation (Student).
func (*StudentMutation) UpdatedAt ¶
func (m *StudentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*StudentMutation) Where ¶
func (m *StudentMutation) Where(ps ...predicate.Student)
Where appends a list predicates to the StudentMutation builder.
func (*StudentMutation) WhereP ¶
func (m *StudentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StudentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StudentQuery ¶
type StudentQuery struct {
// contains filtered or unexported fields
}
StudentQuery is the builder for querying Student entities.
func (*StudentQuery) Aggregate ¶
func (sq *StudentQuery) Aggregate(fns ...AggregateFunc) *StudentSelect
Aggregate returns a StudentSelect configured with the given aggregations.
func (*StudentQuery) All ¶
func (sq *StudentQuery) All(ctx context.Context) ([]*Student, error)
All executes the query and returns a list of Students.
func (*StudentQuery) AllX ¶
func (sq *StudentQuery) AllX(ctx context.Context) []*Student
AllX is like All, but panics if an error occurs.
func (*StudentQuery) Clone ¶
func (sq *StudentQuery) Clone() *StudentQuery
Clone returns a duplicate of the StudentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StudentQuery) Count ¶
func (sq *StudentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StudentQuery) CountX ¶
func (sq *StudentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StudentQuery) Exist ¶
func (sq *StudentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StudentQuery) ExistX ¶
func (sq *StudentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StudentQuery) First ¶
func (sq *StudentQuery) First(ctx context.Context) (*Student, error)
First returns the first Student entity from the query. Returns a *NotFoundError when no Student was found.
func (*StudentQuery) FirstID ¶
FirstID returns the first Student ID from the query. Returns a *NotFoundError when no Student ID was found.
func (*StudentQuery) FirstIDX ¶
func (sq *StudentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*StudentQuery) FirstX ¶
func (sq *StudentQuery) FirstX(ctx context.Context) *Student
FirstX is like First, but panics if an error occurs.
func (*StudentQuery) GroupBy ¶
func (sq *StudentQuery) GroupBy(field string, fields ...string) *StudentGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Student.Query(). GroupBy(student.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*StudentQuery) IDsX ¶
func (sq *StudentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*StudentQuery) Limit ¶
func (sq *StudentQuery) Limit(limit int) *StudentQuery
Limit the number of records to be returned by this query.
func (*StudentQuery) Offset ¶
func (sq *StudentQuery) Offset(offset int) *StudentQuery
Offset to start from.
func (*StudentQuery) Only ¶
func (sq *StudentQuery) Only(ctx context.Context) (*Student, error)
Only returns a single Student entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Student entity is found. Returns a *NotFoundError when no Student entities are found.
func (*StudentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Student ID in the query. Returns a *NotSingularError when more than one Student ID is found. Returns a *NotFoundError when no entities are found.
func (*StudentQuery) OnlyIDX ¶
func (sq *StudentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StudentQuery) OnlyX ¶
func (sq *StudentQuery) OnlyX(ctx context.Context) *Student
OnlyX is like Only, but panics if an error occurs.
func (*StudentQuery) Order ¶
func (sq *StudentQuery) Order(o ...OrderFunc) *StudentQuery
Order specifies how the records should be ordered.
func (*StudentQuery) Select ¶
func (sq *StudentQuery) Select(fields ...string) *StudentSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Student.Query(). Select(student.FieldCreatedAt). Scan(ctx, &v)
func (*StudentQuery) Unique ¶
func (sq *StudentQuery) Unique(unique bool) *StudentQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*StudentQuery) Where ¶
func (sq *StudentQuery) Where(ps ...predicate.Student) *StudentQuery
Where adds a new predicate for the StudentQuery builder.
type StudentSelect ¶
type StudentSelect struct { *StudentQuery // contains filtered or unexported fields }
StudentSelect is the builder for selecting fields of Student entities.
func (*StudentSelect) Aggregate ¶
func (ss *StudentSelect) Aggregate(fns ...AggregateFunc) *StudentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StudentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StudentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StudentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StudentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StudentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StudentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StudentSelect) Scan ¶
func (ss *StudentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StudentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StudentUpdate ¶
type StudentUpdate struct {
// contains filtered or unexported fields
}
StudentUpdate is the builder for updating Student entities.
func (*StudentUpdate) ClearBirthday ¶
func (su *StudentUpdate) ClearBirthday() *StudentUpdate
ClearBirthday clears the value of the "birthday" field.
func (*StudentUpdate) ClearPasswordHash ¶
func (su *StudentUpdate) ClearPasswordHash() *StudentUpdate
ClearPasswordHash clears the value of the "password_hash" field.
func (*StudentUpdate) Exec ¶
func (su *StudentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StudentUpdate) ExecX ¶
func (su *StudentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudentUpdate) Mutation ¶
func (su *StudentUpdate) Mutation() *StudentMutation
Mutation returns the StudentMutation object of the builder.
func (*StudentUpdate) Save ¶
func (su *StudentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StudentUpdate) SaveX ¶
func (su *StudentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StudentUpdate) SetBirthday ¶
func (su *StudentUpdate) SetBirthday(t time.Time) *StudentUpdate
SetBirthday sets the "birthday" field.
func (*StudentUpdate) SetFirstName ¶
func (su *StudentUpdate) SetFirstName(s string) *StudentUpdate
SetFirstName sets the "first_name" field.
func (*StudentUpdate) SetGender ¶
func (su *StudentUpdate) SetGender(pr primitive.Gender) *StudentUpdate
SetGender sets the "gender" field.
func (*StudentUpdate) SetLastName ¶
func (su *StudentUpdate) SetLastName(s string) *StudentUpdate
SetLastName sets the "last_name" field.
func (*StudentUpdate) SetNillableBirthday ¶
func (su *StudentUpdate) SetNillableBirthday(t *time.Time) *StudentUpdate
SetNillableBirthday sets the "birthday" field if the given value is not nil.
func (*StudentUpdate) SetPasswordHash ¶
func (su *StudentUpdate) SetPasswordHash(b []byte) *StudentUpdate
SetPasswordHash sets the "password_hash" field.
func (*StudentUpdate) SetPseudo ¶
func (su *StudentUpdate) SetPseudo(s string) *StudentUpdate
SetPseudo sets the "pseudo" field.
func (*StudentUpdate) SetUpdatedAt ¶
func (su *StudentUpdate) SetUpdatedAt(t time.Time) *StudentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*StudentUpdate) Where ¶
func (su *StudentUpdate) Where(ps ...predicate.Student) *StudentUpdate
Where appends a list predicates to the StudentUpdate builder.
type StudentUpdateOne ¶
type StudentUpdateOne struct {
// contains filtered or unexported fields
}
StudentUpdateOne is the builder for updating a single Student entity.
func (*StudentUpdateOne) ClearBirthday ¶
func (suo *StudentUpdateOne) ClearBirthday() *StudentUpdateOne
ClearBirthday clears the value of the "birthday" field.
func (*StudentUpdateOne) ClearPasswordHash ¶
func (suo *StudentUpdateOne) ClearPasswordHash() *StudentUpdateOne
ClearPasswordHash clears the value of the "password_hash" field.
func (*StudentUpdateOne) Exec ¶
func (suo *StudentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StudentUpdateOne) ExecX ¶
func (suo *StudentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudentUpdateOne) Mutation ¶
func (suo *StudentUpdateOne) Mutation() *StudentMutation
Mutation returns the StudentMutation object of the builder.
func (*StudentUpdateOne) Save ¶
func (suo *StudentUpdateOne) Save(ctx context.Context) (*Student, error)
Save executes the query and returns the updated Student entity.
func (*StudentUpdateOne) SaveX ¶
func (suo *StudentUpdateOne) SaveX(ctx context.Context) *Student
SaveX is like Save, but panics if an error occurs.
func (*StudentUpdateOne) Select ¶
func (suo *StudentUpdateOne) Select(field string, fields ...string) *StudentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StudentUpdateOne) SetBirthday ¶
func (suo *StudentUpdateOne) SetBirthday(t time.Time) *StudentUpdateOne
SetBirthday sets the "birthday" field.
func (*StudentUpdateOne) SetFirstName ¶
func (suo *StudentUpdateOne) SetFirstName(s string) *StudentUpdateOne
SetFirstName sets the "first_name" field.
func (*StudentUpdateOne) SetGender ¶
func (suo *StudentUpdateOne) SetGender(pr primitive.Gender) *StudentUpdateOne
SetGender sets the "gender" field.
func (*StudentUpdateOne) SetLastName ¶
func (suo *StudentUpdateOne) SetLastName(s string) *StudentUpdateOne
SetLastName sets the "last_name" field.
func (*StudentUpdateOne) SetNillableBirthday ¶
func (suo *StudentUpdateOne) SetNillableBirthday(t *time.Time) *StudentUpdateOne
SetNillableBirthday sets the "birthday" field if the given value is not nil.
func (*StudentUpdateOne) SetPasswordHash ¶
func (suo *StudentUpdateOne) SetPasswordHash(b []byte) *StudentUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*StudentUpdateOne) SetPseudo ¶
func (suo *StudentUpdateOne) SetPseudo(s string) *StudentUpdateOne
SetPseudo sets the "pseudo" field.
func (*StudentUpdateOne) SetUpdatedAt ¶
func (suo *StudentUpdateOne) SetUpdatedAt(t time.Time) *StudentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*StudentUpdateOne) Where ¶
func (suo *StudentUpdateOne) Where(ps ...predicate.Student) *StudentUpdateOne
Where appends a list predicates to the StudentUpdate builder.
type Students ¶
type Students []*Student
Students is a parsable slice of Student.
func (Students) ToFront ¶
func (s Students) ToFront() []*StudentFront
ToFront is the structure returned to the frontend
type StudentsFront ¶
type StudentsFront []*StudentFront
StudentsFront is a parsable slice of StudentFront.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Admin is the client for interacting with the Admin builders. Admin *AdminClient // Student is the client for interacting with the Student builders. Student *StudentClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package schema contains the schema definition for the ent package.
|
Package schema contains the schema definition for the ent package. |
mixin/timemixin
Package timemixin implements the ent.Mixin about time fields.
|
Package timemixin implements the ent.Mixin about time fields. |