Documentation
¶
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 int) *AdminDeleteOne
- func (c *AdminClient) Get(ctx context.Context, id int) (*Admin, error)
- func (c *AdminClient) GetX(ctx context.Context, id int) *Admin
- func (c *AdminClient) Hooks() []Hook
- func (c *AdminClient) Query() *AdminQuery
- func (c *AdminClient) QueryLoginLogs(a *Admin) *AdminLoginLogQuery
- func (c *AdminClient) Update() *AdminUpdate
- func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne
- func (c *AdminClient) UpdateOneID(id int) *AdminUpdateOne
- func (c *AdminClient) Use(hooks ...Hook)
- type AdminCreate
- func (ac *AdminCreate) AddLoginLogIDs(ids ...int) *AdminCreate
- func (ac *AdminCreate) AddLoginLogs(a ...*AdminLoginLog) *AdminCreate
- 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) SetGender(i int) *AdminCreate
- func (ac *AdminCreate) SetID(i int) *AdminCreate
- func (ac *AdminCreate) SetNickname(s string) *AdminCreate
- func (ac *AdminCreate) SetNillableCreatedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetNillableGender(i *int) *AdminCreate
- func (ac *AdminCreate) SetNillableNickname(s *string) *AdminCreate
- func (ac *AdminCreate) SetNillableUpdatedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetPassword(s string) *AdminCreate
- func (ac *AdminCreate) SetSignature(s string) *AdminCreate
- func (ac *AdminCreate) SetUpdatedAt(t time.Time) *AdminCreate
- func (ac *AdminCreate) SetUsername(s string) *AdminCreate
- type AdminCreateBulk
- type AdminDelete
- type AdminDeleteOne
- type AdminEdges
- type AdminGroupBy
- func (agb *AdminGroupBy) Aggregate(fns ...AggregateFunc) *AdminGroupBy
- func (agb *AdminGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (agb *AdminGroupBy) BoolX(ctx context.Context) bool
- func (agb *AdminGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AdminGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AdminGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (agb *AdminGroupBy) Float64X(ctx context.Context) float64
- func (agb *AdminGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AdminGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AdminGroupBy) Int(ctx context.Context) (_ int, err error)
- func (agb *AdminGroupBy) IntX(ctx context.Context) int
- func (agb *AdminGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *AdminGroupBy) IntsX(ctx context.Context) []int
- func (agb *AdminGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *AdminGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *AdminGroupBy) String(ctx context.Context) (_ string, err error)
- func (agb *AdminGroupBy) StringX(ctx context.Context) string
- func (agb *AdminGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *AdminGroupBy) StringsX(ctx context.Context) []string
- type AdminLoginLog
- type AdminLoginLogClient
- func (c *AdminLoginLogClient) Create() *AdminLoginLogCreate
- func (c *AdminLoginLogClient) CreateBulk(builders ...*AdminLoginLogCreate) *AdminLoginLogCreateBulk
- func (c *AdminLoginLogClient) Delete() *AdminLoginLogDelete
- func (c *AdminLoginLogClient) DeleteOne(all *AdminLoginLog) *AdminLoginLogDeleteOne
- func (c *AdminLoginLogClient) DeleteOneID(id int) *AdminLoginLogDeleteOne
- func (c *AdminLoginLogClient) Get(ctx context.Context, id int) (*AdminLoginLog, error)
- func (c *AdminLoginLogClient) GetX(ctx context.Context, id int) *AdminLoginLog
- func (c *AdminLoginLogClient) Hooks() []Hook
- func (c *AdminLoginLogClient) Query() *AdminLoginLogQuery
- func (c *AdminLoginLogClient) QueryOwner(all *AdminLoginLog) *AdminQuery
- func (c *AdminLoginLogClient) Update() *AdminLoginLogUpdate
- func (c *AdminLoginLogClient) UpdateOne(all *AdminLoginLog) *AdminLoginLogUpdateOne
- func (c *AdminLoginLogClient) UpdateOneID(id int) *AdminLoginLogUpdateOne
- func (c *AdminLoginLogClient) Use(hooks ...Hook)
- type AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) Mutation() *AdminLoginLogMutation
- func (allc *AdminLoginLogCreate) Save(ctx context.Context) (*AdminLoginLog, error)
- func (allc *AdminLoginLogCreate) SaveX(ctx context.Context) *AdminLoginLog
- func (allc *AdminLoginLogCreate) SetAdminID(i int) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetCreateTime(t time.Time) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetID(i int) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetIP(s string) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetNillableCreateTime(t *time.Time) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetNillableIP(s *string) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetNillableOwnerID(id *int) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetNillableUserAgent(s *string) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetOwner(a *Admin) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetOwnerID(id int) *AdminLoginLogCreate
- func (allc *AdminLoginLogCreate) SetUserAgent(s string) *AdminLoginLogCreate
- type AdminLoginLogCreateBulk
- type AdminLoginLogDelete
- type AdminLoginLogDeleteOne
- type AdminLoginLogEdges
- type AdminLoginLogGroupBy
- func (allgb *AdminLoginLogGroupBy) Aggregate(fns ...AggregateFunc) *AdminLoginLogGroupBy
- func (allgb *AdminLoginLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (allgb *AdminLoginLogGroupBy) BoolX(ctx context.Context) bool
- func (allgb *AdminLoginLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (allgb *AdminLoginLogGroupBy) BoolsX(ctx context.Context) []bool
- func (allgb *AdminLoginLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (allgb *AdminLoginLogGroupBy) Float64X(ctx context.Context) float64
- func (allgb *AdminLoginLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (allgb *AdminLoginLogGroupBy) Float64sX(ctx context.Context) []float64
- func (allgb *AdminLoginLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (allgb *AdminLoginLogGroupBy) IntX(ctx context.Context) int
- func (allgb *AdminLoginLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (allgb *AdminLoginLogGroupBy) IntsX(ctx context.Context) []int
- func (allgb *AdminLoginLogGroupBy) Scan(ctx context.Context, v interface{}) error
- func (allgb *AdminLoginLogGroupBy) ScanX(ctx context.Context, v interface{})
- func (allgb *AdminLoginLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (allgb *AdminLoginLogGroupBy) StringX(ctx context.Context) string
- func (allgb *AdminLoginLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (allgb *AdminLoginLogGroupBy) StringsX(ctx context.Context) []string
- type AdminLoginLogMutation
- func (m *AdminLoginLogMutation) AddAdminID(i int)
- func (m *AdminLoginLogMutation) AddField(name string, value ent.Value) error
- func (m *AdminLoginLogMutation) AddedAdminID() (r int, exists bool)
- func (m *AdminLoginLogMutation) AddedEdges() []string
- func (m *AdminLoginLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *AdminLoginLogMutation) AddedFields() []string
- func (m *AdminLoginLogMutation) AddedIDs(name string) []ent.Value
- func (m *AdminLoginLogMutation) AdminID() (r int, exists bool)
- func (m *AdminLoginLogMutation) ClearEdge(name string) error
- func (m *AdminLoginLogMutation) ClearField(name string) error
- func (m *AdminLoginLogMutation) ClearIP()
- func (m *AdminLoginLogMutation) ClearOwner()
- func (m *AdminLoginLogMutation) ClearUserAgent()
- func (m *AdminLoginLogMutation) ClearedEdges() []string
- func (m *AdminLoginLogMutation) ClearedFields() []string
- func (m AdminLoginLogMutation) Client() *Client
- func (m *AdminLoginLogMutation) CreateTime() (r time.Time, exists bool)
- func (m *AdminLoginLogMutation) EdgeCleared(name string) bool
- func (m *AdminLoginLogMutation) Field(name string) (ent.Value, bool)
- func (m *AdminLoginLogMutation) FieldCleared(name string) bool
- func (m *AdminLoginLogMutation) Fields() []string
- func (m *AdminLoginLogMutation) ID() (id int, exists bool)
- func (m *AdminLoginLogMutation) IP() (r string, exists bool)
- func (m *AdminLoginLogMutation) IPCleared() bool
- func (m *AdminLoginLogMutation) OldAdminID(ctx context.Context) (v int, err error)
- func (m *AdminLoginLogMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *AdminLoginLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AdminLoginLogMutation) OldIP(ctx context.Context) (v *string, err error)
- func (m *AdminLoginLogMutation) OldUserAgent(ctx context.Context) (v *string, err error)
- func (m *AdminLoginLogMutation) Op() Op
- func (m *AdminLoginLogMutation) OwnerCleared() bool
- func (m *AdminLoginLogMutation) OwnerID() (id int, exists bool)
- func (m *AdminLoginLogMutation) OwnerIDs() (ids []int)
- func (m *AdminLoginLogMutation) RemovedEdges() []string
- func (m *AdminLoginLogMutation) RemovedIDs(name string) []ent.Value
- func (m *AdminLoginLogMutation) ResetAdminID()
- func (m *AdminLoginLogMutation) ResetCreateTime()
- func (m *AdminLoginLogMutation) ResetEdge(name string) error
- func (m *AdminLoginLogMutation) ResetField(name string) error
- func (m *AdminLoginLogMutation) ResetIP()
- func (m *AdminLoginLogMutation) ResetOwner()
- func (m *AdminLoginLogMutation) ResetUserAgent()
- func (m *AdminLoginLogMutation) SetAdminID(i int)
- func (m *AdminLoginLogMutation) SetCreateTime(t time.Time)
- func (m *AdminLoginLogMutation) SetField(name string, value ent.Value) error
- func (m *AdminLoginLogMutation) SetID(id int)
- func (m *AdminLoginLogMutation) SetIP(s string)
- func (m *AdminLoginLogMutation) SetOwnerID(id int)
- func (m *AdminLoginLogMutation) SetUserAgent(s string)
- func (m AdminLoginLogMutation) Tx() (*Tx, error)
- func (m *AdminLoginLogMutation) Type() string
- func (m *AdminLoginLogMutation) UserAgent() (r string, exists bool)
- func (m *AdminLoginLogMutation) UserAgentCleared() bool
- type AdminLoginLogQuery
- func (allq *AdminLoginLogQuery) All(ctx context.Context) ([]*AdminLoginLog, error)
- func (allq *AdminLoginLogQuery) AllX(ctx context.Context) []*AdminLoginLog
- func (allq *AdminLoginLogQuery) Clone() *AdminLoginLogQuery
- func (allq *AdminLoginLogQuery) Count(ctx context.Context) (int, error)
- func (allq *AdminLoginLogQuery) CountX(ctx context.Context) int
- func (allq *AdminLoginLogQuery) Exist(ctx context.Context) (bool, error)
- func (allq *AdminLoginLogQuery) ExistX(ctx context.Context) bool
- func (allq *AdminLoginLogQuery) First(ctx context.Context) (*AdminLoginLog, error)
- func (allq *AdminLoginLogQuery) FirstID(ctx context.Context) (id int, err error)
- func (allq *AdminLoginLogQuery) FirstX(ctx context.Context) *AdminLoginLog
- func (allq *AdminLoginLogQuery) FirstXID(ctx context.Context) int
- func (allq *AdminLoginLogQuery) GroupBy(field string, fields ...string) *AdminLoginLogGroupBy
- func (allq *AdminLoginLogQuery) IDs(ctx context.Context) ([]int, error)
- func (allq *AdminLoginLogQuery) IDsX(ctx context.Context) []int
- func (allq *AdminLoginLogQuery) Limit(limit int) *AdminLoginLogQuery
- func (allq *AdminLoginLogQuery) Offset(offset int) *AdminLoginLogQuery
- func (allq *AdminLoginLogQuery) Only(ctx context.Context) (*AdminLoginLog, error)
- func (allq *AdminLoginLogQuery) OnlyID(ctx context.Context) (id int, err error)
- func (allq *AdminLoginLogQuery) OnlyIDX(ctx context.Context) int
- func (allq *AdminLoginLogQuery) OnlyX(ctx context.Context) *AdminLoginLog
- func (allq *AdminLoginLogQuery) Order(o ...OrderFunc) *AdminLoginLogQuery
- func (allq *AdminLoginLogQuery) QueryOwner() *AdminQuery
- func (allq *AdminLoginLogQuery) Select(field string, fields ...string) *AdminLoginLogSelect
- func (allq *AdminLoginLogQuery) Where(ps ...predicate.AdminLoginLog) *AdminLoginLogQuery
- func (allq *AdminLoginLogQuery) WithOwner(opts ...func(*AdminQuery)) *AdminLoginLogQuery
- type AdminLoginLogSelect
- func (alls *AdminLoginLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (alls *AdminLoginLogSelect) BoolX(ctx context.Context) bool
- func (alls *AdminLoginLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (alls *AdminLoginLogSelect) BoolsX(ctx context.Context) []bool
- func (alls *AdminLoginLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (alls *AdminLoginLogSelect) Float64X(ctx context.Context) float64
- func (alls *AdminLoginLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (alls *AdminLoginLogSelect) Float64sX(ctx context.Context) []float64
- func (alls *AdminLoginLogSelect) Int(ctx context.Context) (_ int, err error)
- func (alls *AdminLoginLogSelect) IntX(ctx context.Context) int
- func (alls *AdminLoginLogSelect) Ints(ctx context.Context) ([]int, error)
- func (alls *AdminLoginLogSelect) IntsX(ctx context.Context) []int
- func (alls *AdminLoginLogSelect) Scan(ctx context.Context, v interface{}) error
- func (alls *AdminLoginLogSelect) ScanX(ctx context.Context, v interface{})
- func (alls *AdminLoginLogSelect) String(ctx context.Context) (_ string, err error)
- func (alls *AdminLoginLogSelect) StringX(ctx context.Context) string
- func (alls *AdminLoginLogSelect) Strings(ctx context.Context) ([]string, error)
- func (alls *AdminLoginLogSelect) StringsX(ctx context.Context) []string
- type AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) AddAdminID(i int) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) ClearIP() *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) ClearOwner() *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) ClearUserAgent() *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) Exec(ctx context.Context) error
- func (allu *AdminLoginLogUpdate) ExecX(ctx context.Context)
- func (allu *AdminLoginLogUpdate) Mutation() *AdminLoginLogMutation
- func (allu *AdminLoginLogUpdate) Save(ctx context.Context) (int, error)
- func (allu *AdminLoginLogUpdate) SaveX(ctx context.Context) int
- func (allu *AdminLoginLogUpdate) SetAdminID(i int) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) SetIP(s string) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) SetNillableIP(s *string) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) SetNillableOwnerID(id *int) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) SetNillableUserAgent(s *string) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) SetOwner(a *Admin) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) SetOwnerID(id int) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) SetUserAgent(s string) *AdminLoginLogUpdate
- func (allu *AdminLoginLogUpdate) Where(ps ...predicate.AdminLoginLog) *AdminLoginLogUpdate
- type AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) AddAdminID(i int) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) ClearIP() *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) ClearOwner() *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) ClearUserAgent() *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) Exec(ctx context.Context) error
- func (alluo *AdminLoginLogUpdateOne) ExecX(ctx context.Context)
- func (alluo *AdminLoginLogUpdateOne) Mutation() *AdminLoginLogMutation
- func (alluo *AdminLoginLogUpdateOne) Save(ctx context.Context) (*AdminLoginLog, error)
- func (alluo *AdminLoginLogUpdateOne) SaveX(ctx context.Context) *AdminLoginLog
- func (alluo *AdminLoginLogUpdateOne) SetAdminID(i int) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) SetIP(s string) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) SetNillableIP(s *string) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) SetNillableOwnerID(id *int) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) SetNillableUserAgent(s *string) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) SetOwner(a *Admin) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) SetOwnerID(id int) *AdminLoginLogUpdateOne
- func (alluo *AdminLoginLogUpdateOne) SetUserAgent(s string) *AdminLoginLogUpdateOne
- type AdminLoginLogs
- type AdminMutation
- func (m *AdminMutation) AddField(name string, value ent.Value) error
- func (m *AdminMutation) AddGender(i int)
- func (m *AdminMutation) AddLoginLogIDs(ids ...int)
- func (m *AdminMutation) AddedEdges() []string
- func (m *AdminMutation) AddedField(name string) (ent.Value, bool)
- func (m *AdminMutation) AddedFields() []string
- func (m *AdminMutation) AddedGender() (r int, exists bool)
- 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) ClearGender()
- func (m *AdminMutation) ClearLoginLogs()
- func (m *AdminMutation) ClearNickname()
- 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) Gender() (r int, exists bool)
- func (m *AdminMutation) GenderCleared() bool
- func (m *AdminMutation) ID() (id int, exists bool)
- func (m *AdminMutation) LoginLogsCleared() bool
- func (m *AdminMutation) LoginLogsIDs() (ids []int)
- func (m *AdminMutation) Nickname() (r string, exists bool)
- func (m *AdminMutation) NicknameCleared() bool
- 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) OldGender(ctx context.Context) (v int, err error)
- func (m *AdminMutation) OldNickname(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldSignature(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AdminMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *AdminMutation) Op() Op
- func (m *AdminMutation) Password() (r string, exists bool)
- func (m *AdminMutation) RemoveLoginLogIDs(ids ...int)
- func (m *AdminMutation) RemovedEdges() []string
- func (m *AdminMutation) RemovedIDs(name string) []ent.Value
- func (m *AdminMutation) RemovedLoginLogsIDs() (ids []int)
- func (m *AdminMutation) ResetCreatedAt()
- func (m *AdminMutation) ResetEdge(name string) error
- func (m *AdminMutation) ResetField(name string) error
- func (m *AdminMutation) ResetGender()
- func (m *AdminMutation) ResetLoginLogs()
- func (m *AdminMutation) ResetNickname()
- func (m *AdminMutation) ResetPassword()
- func (m *AdminMutation) ResetSignature()
- func (m *AdminMutation) ResetUpdatedAt()
- func (m *AdminMutation) ResetUsername()
- func (m *AdminMutation) SetCreatedAt(t time.Time)
- func (m *AdminMutation) SetField(name string, value ent.Value) error
- func (m *AdminMutation) SetGender(i int)
- func (m *AdminMutation) SetID(id int)
- func (m *AdminMutation) SetNickname(s string)
- func (m *AdminMutation) SetPassword(s string)
- func (m *AdminMutation) SetSignature(s string)
- func (m *AdminMutation) SetUpdatedAt(t time.Time)
- func (m *AdminMutation) SetUsername(s string)
- func (m *AdminMutation) Signature() (r string, exists bool)
- func (m AdminMutation) Tx() (*Tx, error)
- func (m *AdminMutation) Type() string
- func (m *AdminMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AdminMutation) Username() (r string, exists bool)
- type AdminQuery
- 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 int, err error)
- func (aq *AdminQuery) FirstX(ctx context.Context) *Admin
- func (aq *AdminQuery) FirstXID(ctx context.Context) int
- func (aq *AdminQuery) GroupBy(field string, fields ...string) *AdminGroupBy
- func (aq *AdminQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AdminQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (aq *AdminQuery) OnlyIDX(ctx context.Context) int
- func (aq *AdminQuery) OnlyX(ctx context.Context) *Admin
- func (aq *AdminQuery) Order(o ...OrderFunc) *AdminQuery
- func (aq *AdminQuery) QueryLoginLogs() *AdminLoginLogQuery
- func (aq *AdminQuery) Select(field string, fields ...string) *AdminSelect
- func (aq *AdminQuery) Where(ps ...predicate.Admin) *AdminQuery
- func (aq *AdminQuery) WithLoginLogs(opts ...func(*AdminLoginLogQuery)) *AdminQuery
- type AdminSelect
- func (as *AdminSelect) Bool(ctx context.Context) (_ bool, err error)
- func (as *AdminSelect) BoolX(ctx context.Context) bool
- func (as *AdminSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AdminSelect) BoolsX(ctx context.Context) []bool
- func (as *AdminSelect) Float64(ctx context.Context) (_ float64, err error)
- func (as *AdminSelect) Float64X(ctx context.Context) float64
- func (as *AdminSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AdminSelect) Float64sX(ctx context.Context) []float64
- func (as *AdminSelect) Int(ctx context.Context) (_ int, err error)
- func (as *AdminSelect) IntX(ctx context.Context) int
- func (as *AdminSelect) Ints(ctx context.Context) ([]int, error)
- func (as *AdminSelect) IntsX(ctx context.Context) []int
- func (as *AdminSelect) Scan(ctx context.Context, v interface{}) error
- func (as *AdminSelect) ScanX(ctx context.Context, v interface{})
- func (as *AdminSelect) String(ctx context.Context) (_ string, err error)
- func (as *AdminSelect) StringX(ctx context.Context) string
- func (as *AdminSelect) Strings(ctx context.Context) ([]string, error)
- func (as *AdminSelect) StringsX(ctx context.Context) []string
- type AdminUpdate
- func (au *AdminUpdate) AddGender(i int) *AdminUpdate
- func (au *AdminUpdate) AddLoginLogIDs(ids ...int) *AdminUpdate
- func (au *AdminUpdate) AddLoginLogs(a ...*AdminLoginLog) *AdminUpdate
- func (au *AdminUpdate) ClearGender() *AdminUpdate
- func (au *AdminUpdate) ClearLoginLogs() *AdminUpdate
- func (au *AdminUpdate) ClearNickname() *AdminUpdate
- func (au *AdminUpdate) Exec(ctx context.Context) error
- func (au *AdminUpdate) ExecX(ctx context.Context)
- func (au *AdminUpdate) Mutation() *AdminMutation
- func (au *AdminUpdate) RemoveLoginLogIDs(ids ...int) *AdminUpdate
- func (au *AdminUpdate) RemoveLoginLogs(a ...*AdminLoginLog) *AdminUpdate
- func (au *AdminUpdate) Save(ctx context.Context) (int, error)
- func (au *AdminUpdate) SaveX(ctx context.Context) int
- func (au *AdminUpdate) SetGender(i int) *AdminUpdate
- func (au *AdminUpdate) SetNickname(s string) *AdminUpdate
- func (au *AdminUpdate) SetNillableGender(i *int) *AdminUpdate
- func (au *AdminUpdate) SetNillableNickname(s *string) *AdminUpdate
- func (au *AdminUpdate) SetPassword(s string) *AdminUpdate
- func (au *AdminUpdate) SetSignature(s string) *AdminUpdate
- func (au *AdminUpdate) SetUpdatedAt(t time.Time) *AdminUpdate
- func (au *AdminUpdate) SetUsername(s string) *AdminUpdate
- func (au *AdminUpdate) Where(ps ...predicate.Admin) *AdminUpdate
- type AdminUpdateOne
- func (auo *AdminUpdateOne) AddGender(i int) *AdminUpdateOne
- func (auo *AdminUpdateOne) AddLoginLogIDs(ids ...int) *AdminUpdateOne
- func (auo *AdminUpdateOne) AddLoginLogs(a ...*AdminLoginLog) *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearGender() *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearLoginLogs() *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearNickname() *AdminUpdateOne
- func (auo *AdminUpdateOne) Exec(ctx context.Context) error
- func (auo *AdminUpdateOne) ExecX(ctx context.Context)
- func (auo *AdminUpdateOne) Mutation() *AdminMutation
- func (auo *AdminUpdateOne) RemoveLoginLogIDs(ids ...int) *AdminUpdateOne
- func (auo *AdminUpdateOne) RemoveLoginLogs(a ...*AdminLoginLog) *AdminUpdateOne
- func (auo *AdminUpdateOne) Save(ctx context.Context) (*Admin, error)
- func (auo *AdminUpdateOne) SaveX(ctx context.Context) *Admin
- func (auo *AdminUpdateOne) SetGender(i int) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNickname(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableGender(i *int) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableNickname(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetPassword(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetSignature(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetUpdatedAt(t time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetUsername(s string) *AdminUpdateOne
- type Admins
- type AggregateFunc
- type CasbinRule
- type CasbinRuleClient
- func (c *CasbinRuleClient) Create() *CasbinRuleCreate
- func (c *CasbinRuleClient) CreateBulk(builders ...*CasbinRuleCreate) *CasbinRuleCreateBulk
- func (c *CasbinRuleClient) Delete() *CasbinRuleDelete
- func (c *CasbinRuleClient) DeleteOne(cr *CasbinRule) *CasbinRuleDeleteOne
- func (c *CasbinRuleClient) DeleteOneID(id int) *CasbinRuleDeleteOne
- func (c *CasbinRuleClient) Get(ctx context.Context, id int) (*CasbinRule, error)
- func (c *CasbinRuleClient) GetX(ctx context.Context, id int) *CasbinRule
- func (c *CasbinRuleClient) Hooks() []Hook
- func (c *CasbinRuleClient) Query() *CasbinRuleQuery
- func (c *CasbinRuleClient) Update() *CasbinRuleUpdate
- func (c *CasbinRuleClient) UpdateOne(cr *CasbinRule) *CasbinRuleUpdateOne
- func (c *CasbinRuleClient) UpdateOneID(id int) *CasbinRuleUpdateOne
- func (c *CasbinRuleClient) Use(hooks ...Hook)
- type CasbinRuleCreate
- func (crc *CasbinRuleCreate) Mutation() *CasbinRuleMutation
- func (crc *CasbinRuleCreate) Save(ctx context.Context) (*CasbinRule, error)
- func (crc *CasbinRuleCreate) SaveX(ctx context.Context) *CasbinRule
- func (crc *CasbinRuleCreate) SetPType(s string) *CasbinRuleCreate
- func (crc *CasbinRuleCreate) SetV0(s string) *CasbinRuleCreate
- func (crc *CasbinRuleCreate) SetV1(s string) *CasbinRuleCreate
- func (crc *CasbinRuleCreate) SetV2(s string) *CasbinRuleCreate
- func (crc *CasbinRuleCreate) SetV3(s string) *CasbinRuleCreate
- func (crc *CasbinRuleCreate) SetV4(s string) *CasbinRuleCreate
- func (crc *CasbinRuleCreate) SetV5(s string) *CasbinRuleCreate
- type CasbinRuleCreateBulk
- type CasbinRuleDelete
- type CasbinRuleDeleteOne
- type CasbinRuleGroupBy
- func (crgb *CasbinRuleGroupBy) Aggregate(fns ...AggregateFunc) *CasbinRuleGroupBy
- func (crgb *CasbinRuleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (crgb *CasbinRuleGroupBy) BoolX(ctx context.Context) bool
- func (crgb *CasbinRuleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (crgb *CasbinRuleGroupBy) BoolsX(ctx context.Context) []bool
- func (crgb *CasbinRuleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (crgb *CasbinRuleGroupBy) Float64X(ctx context.Context) float64
- func (crgb *CasbinRuleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (crgb *CasbinRuleGroupBy) Float64sX(ctx context.Context) []float64
- func (crgb *CasbinRuleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (crgb *CasbinRuleGroupBy) IntX(ctx context.Context) int
- func (crgb *CasbinRuleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (crgb *CasbinRuleGroupBy) IntsX(ctx context.Context) []int
- func (crgb *CasbinRuleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (crgb *CasbinRuleGroupBy) ScanX(ctx context.Context, v interface{})
- func (crgb *CasbinRuleGroupBy) String(ctx context.Context) (_ string, err error)
- func (crgb *CasbinRuleGroupBy) StringX(ctx context.Context) string
- func (crgb *CasbinRuleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (crgb *CasbinRuleGroupBy) StringsX(ctx context.Context) []string
- type CasbinRuleMutation
- func (m *CasbinRuleMutation) AddField(name string, value ent.Value) error
- func (m *CasbinRuleMutation) AddedEdges() []string
- func (m *CasbinRuleMutation) AddedField(name string) (ent.Value, bool)
- func (m *CasbinRuleMutation) AddedFields() []string
- func (m *CasbinRuleMutation) AddedIDs(name string) []ent.Value
- func (m *CasbinRuleMutation) ClearEdge(name string) error
- func (m *CasbinRuleMutation) ClearField(name string) error
- func (m *CasbinRuleMutation) ClearedEdges() []string
- func (m *CasbinRuleMutation) ClearedFields() []string
- func (m CasbinRuleMutation) Client() *Client
- func (m *CasbinRuleMutation) EdgeCleared(name string) bool
- func (m *CasbinRuleMutation) Field(name string) (ent.Value, bool)
- func (m *CasbinRuleMutation) FieldCleared(name string) bool
- func (m *CasbinRuleMutation) Fields() []string
- func (m *CasbinRuleMutation) ID() (id int, exists bool)
- func (m *CasbinRuleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CasbinRuleMutation) OldPType(ctx context.Context) (v string, err error)
- func (m *CasbinRuleMutation) OldV0(ctx context.Context) (v string, err error)
- func (m *CasbinRuleMutation) OldV1(ctx context.Context) (v string, err error)
- func (m *CasbinRuleMutation) OldV2(ctx context.Context) (v string, err error)
- func (m *CasbinRuleMutation) OldV3(ctx context.Context) (v string, err error)
- func (m *CasbinRuleMutation) OldV4(ctx context.Context) (v string, err error)
- func (m *CasbinRuleMutation) OldV5(ctx context.Context) (v string, err error)
- func (m *CasbinRuleMutation) Op() Op
- func (m *CasbinRuleMutation) PType() (r string, exists bool)
- func (m *CasbinRuleMutation) RemovedEdges() []string
- func (m *CasbinRuleMutation) RemovedIDs(name string) []ent.Value
- func (m *CasbinRuleMutation) ResetEdge(name string) error
- func (m *CasbinRuleMutation) ResetField(name string) error
- func (m *CasbinRuleMutation) ResetPType()
- func (m *CasbinRuleMutation) ResetV0()
- func (m *CasbinRuleMutation) ResetV1()
- func (m *CasbinRuleMutation) ResetV2()
- func (m *CasbinRuleMutation) ResetV3()
- func (m *CasbinRuleMutation) ResetV4()
- func (m *CasbinRuleMutation) ResetV5()
- func (m *CasbinRuleMutation) SetField(name string, value ent.Value) error
- func (m *CasbinRuleMutation) SetPType(s string)
- func (m *CasbinRuleMutation) SetV0(s string)
- func (m *CasbinRuleMutation) SetV1(s string)
- func (m *CasbinRuleMutation) SetV2(s string)
- func (m *CasbinRuleMutation) SetV3(s string)
- func (m *CasbinRuleMutation) SetV4(s string)
- func (m *CasbinRuleMutation) SetV5(s string)
- func (m CasbinRuleMutation) Tx() (*Tx, error)
- func (m *CasbinRuleMutation) Type() string
- func (m *CasbinRuleMutation) V0() (r string, exists bool)
- func (m *CasbinRuleMutation) V1() (r string, exists bool)
- func (m *CasbinRuleMutation) V2() (r string, exists bool)
- func (m *CasbinRuleMutation) V3() (r string, exists bool)
- func (m *CasbinRuleMutation) V4() (r string, exists bool)
- func (m *CasbinRuleMutation) V5() (r string, exists bool)
- type CasbinRuleQuery
- func (crq *CasbinRuleQuery) All(ctx context.Context) ([]*CasbinRule, error)
- func (crq *CasbinRuleQuery) AllX(ctx context.Context) []*CasbinRule
- func (crq *CasbinRuleQuery) Clone() *CasbinRuleQuery
- func (crq *CasbinRuleQuery) Count(ctx context.Context) (int, error)
- func (crq *CasbinRuleQuery) CountX(ctx context.Context) int
- func (crq *CasbinRuleQuery) Exist(ctx context.Context) (bool, error)
- func (crq *CasbinRuleQuery) ExistX(ctx context.Context) bool
- func (crq *CasbinRuleQuery) First(ctx context.Context) (*CasbinRule, error)
- func (crq *CasbinRuleQuery) FirstID(ctx context.Context) (id int, err error)
- func (crq *CasbinRuleQuery) FirstX(ctx context.Context) *CasbinRule
- func (crq *CasbinRuleQuery) FirstXID(ctx context.Context) int
- func (crq *CasbinRuleQuery) GroupBy(field string, fields ...string) *CasbinRuleGroupBy
- func (crq *CasbinRuleQuery) IDs(ctx context.Context) ([]int, error)
- func (crq *CasbinRuleQuery) IDsX(ctx context.Context) []int
- func (crq *CasbinRuleQuery) Limit(limit int) *CasbinRuleQuery
- func (crq *CasbinRuleQuery) Offset(offset int) *CasbinRuleQuery
- func (crq *CasbinRuleQuery) Only(ctx context.Context) (*CasbinRule, error)
- func (crq *CasbinRuleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (crq *CasbinRuleQuery) OnlyIDX(ctx context.Context) int
- func (crq *CasbinRuleQuery) OnlyX(ctx context.Context) *CasbinRule
- func (crq *CasbinRuleQuery) Order(o ...OrderFunc) *CasbinRuleQuery
- func (crq *CasbinRuleQuery) Select(field string, fields ...string) *CasbinRuleSelect
- func (crq *CasbinRuleQuery) Where(ps ...predicate.CasbinRule) *CasbinRuleQuery
- type CasbinRuleSelect
- func (crs *CasbinRuleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (crs *CasbinRuleSelect) BoolX(ctx context.Context) bool
- func (crs *CasbinRuleSelect) Bools(ctx context.Context) ([]bool, error)
- func (crs *CasbinRuleSelect) BoolsX(ctx context.Context) []bool
- func (crs *CasbinRuleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (crs *CasbinRuleSelect) Float64X(ctx context.Context) float64
- func (crs *CasbinRuleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (crs *CasbinRuleSelect) Float64sX(ctx context.Context) []float64
- func (crs *CasbinRuleSelect) Int(ctx context.Context) (_ int, err error)
- func (crs *CasbinRuleSelect) IntX(ctx context.Context) int
- func (crs *CasbinRuleSelect) Ints(ctx context.Context) ([]int, error)
- func (crs *CasbinRuleSelect) IntsX(ctx context.Context) []int
- func (crs *CasbinRuleSelect) Scan(ctx context.Context, v interface{}) error
- func (crs *CasbinRuleSelect) ScanX(ctx context.Context, v interface{})
- func (crs *CasbinRuleSelect) String(ctx context.Context) (_ string, err error)
- func (crs *CasbinRuleSelect) StringX(ctx context.Context) string
- func (crs *CasbinRuleSelect) Strings(ctx context.Context) ([]string, error)
- func (crs *CasbinRuleSelect) StringsX(ctx context.Context) []string
- type CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) Exec(ctx context.Context) error
- func (cru *CasbinRuleUpdate) ExecX(ctx context.Context)
- func (cru *CasbinRuleUpdate) Mutation() *CasbinRuleMutation
- func (cru *CasbinRuleUpdate) Save(ctx context.Context) (int, error)
- func (cru *CasbinRuleUpdate) SaveX(ctx context.Context) int
- func (cru *CasbinRuleUpdate) SetPType(s string) *CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) SetV0(s string) *CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) SetV1(s string) *CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) SetV2(s string) *CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) SetV3(s string) *CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) SetV4(s string) *CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) SetV5(s string) *CasbinRuleUpdate
- func (cru *CasbinRuleUpdate) Where(ps ...predicate.CasbinRule) *CasbinRuleUpdate
- type CasbinRuleUpdateOne
- func (cruo *CasbinRuleUpdateOne) Exec(ctx context.Context) error
- func (cruo *CasbinRuleUpdateOne) ExecX(ctx context.Context)
- func (cruo *CasbinRuleUpdateOne) Mutation() *CasbinRuleMutation
- func (cruo *CasbinRuleUpdateOne) Save(ctx context.Context) (*CasbinRule, error)
- func (cruo *CasbinRuleUpdateOne) SaveX(ctx context.Context) *CasbinRule
- func (cruo *CasbinRuleUpdateOne) SetPType(s string) *CasbinRuleUpdateOne
- func (cruo *CasbinRuleUpdateOne) SetV0(s string) *CasbinRuleUpdateOne
- func (cruo *CasbinRuleUpdateOne) SetV1(s string) *CasbinRuleUpdateOne
- func (cruo *CasbinRuleUpdateOne) SetV2(s string) *CasbinRuleUpdateOne
- func (cruo *CasbinRuleUpdateOne) SetV3(s string) *CasbinRuleUpdateOne
- func (cruo *CasbinRuleUpdateOne) SetV4(s string) *CasbinRuleUpdateOne
- func (cruo *CasbinRuleUpdateOne) SetV5(s string) *CasbinRuleUpdateOne
- type CasbinRules
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type Member
- type MemberClient
- func (c *MemberClient) Create() *MemberCreate
- func (c *MemberClient) CreateBulk(builders ...*MemberCreate) *MemberCreateBulk
- func (c *MemberClient) Delete() *MemberDelete
- func (c *MemberClient) DeleteOne(m *Member) *MemberDeleteOne
- func (c *MemberClient) DeleteOneID(id int) *MemberDeleteOne
- func (c *MemberClient) Get(ctx context.Context, id int) (*Member, error)
- func (c *MemberClient) GetX(ctx context.Context, id int) *Member
- func (c *MemberClient) Hooks() []Hook
- func (c *MemberClient) Query() *MemberQuery
- func (c *MemberClient) QueryLoginLogs(m *Member) *MemberLoginLogQuery
- func (c *MemberClient) QueryNoteArticles(m *Member) *NoteArticleQuery
- func (c *MemberClient) QueryNoteFilesystem(m *Member) *NoteFilesystemQuery
- func (c *MemberClient) Update() *MemberUpdate
- func (c *MemberClient) UpdateOne(m *Member) *MemberUpdateOne
- func (c *MemberClient) UpdateOneID(id int) *MemberUpdateOne
- func (c *MemberClient) Use(hooks ...Hook)
- type MemberCreate
- func (mc *MemberCreate) AddLoginLogIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddLoginLogs(m ...*MemberLoginLog) *MemberCreate
- func (mc *MemberCreate) AddNoteArticleIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddNoteArticles(n ...*NoteArticle) *MemberCreate
- func (mc *MemberCreate) AddNoteFilesystem(n ...*NoteFilesystem) *MemberCreate
- func (mc *MemberCreate) AddNoteFilesystemIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) Mutation() *MemberMutation
- func (mc *MemberCreate) Save(ctx context.Context) (*Member, error)
- func (mc *MemberCreate) SaveX(ctx context.Context) *Member
- func (mc *MemberCreate) SetCreatedAt(t time.Time) *MemberCreate
- func (mc *MemberCreate) SetEmail(s string) *MemberCreate
- func (mc *MemberCreate) SetGender(i int) *MemberCreate
- func (mc *MemberCreate) SetGid(u uuid.UUID) *MemberCreate
- func (mc *MemberCreate) SetID(i int) *MemberCreate
- func (mc *MemberCreate) SetNickname(s string) *MemberCreate
- func (mc *MemberCreate) SetNillableCreatedAt(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetNillableGender(i *int) *MemberCreate
- func (mc *MemberCreate) SetNillableUpdatedAt(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetPassword(s string) *MemberCreate
- func (mc *MemberCreate) SetSignature(s string) *MemberCreate
- func (mc *MemberCreate) SetUpdatedAt(t time.Time) *MemberCreate
- type MemberCreateBulk
- type MemberDelete
- type MemberDeleteOne
- type MemberEdges
- type MemberGroupBy
- func (mgb *MemberGroupBy) Aggregate(fns ...AggregateFunc) *MemberGroupBy
- func (mgb *MemberGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mgb *MemberGroupBy) BoolX(ctx context.Context) bool
- func (mgb *MemberGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mgb *MemberGroupBy) BoolsX(ctx context.Context) []bool
- func (mgb *MemberGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mgb *MemberGroupBy) Float64X(ctx context.Context) float64
- func (mgb *MemberGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mgb *MemberGroupBy) Float64sX(ctx context.Context) []float64
- func (mgb *MemberGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mgb *MemberGroupBy) IntX(ctx context.Context) int
- func (mgb *MemberGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mgb *MemberGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MemberGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mgb *MemberGroupBy) ScanX(ctx context.Context, v interface{})
- func (mgb *MemberGroupBy) String(ctx context.Context) (_ string, err error)
- func (mgb *MemberGroupBy) StringX(ctx context.Context) string
- func (mgb *MemberGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mgb *MemberGroupBy) StringsX(ctx context.Context) []string
- type MemberLoginLog
- type MemberLoginLogClient
- func (c *MemberLoginLogClient) Create() *MemberLoginLogCreate
- func (c *MemberLoginLogClient) CreateBulk(builders ...*MemberLoginLogCreate) *MemberLoginLogCreateBulk
- func (c *MemberLoginLogClient) Delete() *MemberLoginLogDelete
- func (c *MemberLoginLogClient) DeleteOne(mll *MemberLoginLog) *MemberLoginLogDeleteOne
- func (c *MemberLoginLogClient) DeleteOneID(id int) *MemberLoginLogDeleteOne
- func (c *MemberLoginLogClient) Get(ctx context.Context, id int) (*MemberLoginLog, error)
- func (c *MemberLoginLogClient) GetX(ctx context.Context, id int) *MemberLoginLog
- func (c *MemberLoginLogClient) Hooks() []Hook
- func (c *MemberLoginLogClient) Query() *MemberLoginLogQuery
- func (c *MemberLoginLogClient) QueryOwner(mll *MemberLoginLog) *MemberQuery
- func (c *MemberLoginLogClient) Update() *MemberLoginLogUpdate
- func (c *MemberLoginLogClient) UpdateOne(mll *MemberLoginLog) *MemberLoginLogUpdateOne
- func (c *MemberLoginLogClient) UpdateOneID(id int) *MemberLoginLogUpdateOne
- func (c *MemberLoginLogClient) Use(hooks ...Hook)
- type MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) Mutation() *MemberLoginLogMutation
- func (mllc *MemberLoginLogCreate) Save(ctx context.Context) (*MemberLoginLog, error)
- func (mllc *MemberLoginLogCreate) SaveX(ctx context.Context) *MemberLoginLog
- func (mllc *MemberLoginLogCreate) SetCreateTime(t time.Time) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetID(i int) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetIP(s string) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetMemberGid(u uuid.UUID) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetNillableCreateTime(t *time.Time) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetNillableIP(s *string) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetNillableOwnerID(id *int) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetNillableUserAgent(s *string) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetOwner(m *Member) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetOwnerID(id int) *MemberLoginLogCreate
- func (mllc *MemberLoginLogCreate) SetUserAgent(s string) *MemberLoginLogCreate
- type MemberLoginLogCreateBulk
- type MemberLoginLogDelete
- type MemberLoginLogDeleteOne
- type MemberLoginLogEdges
- type MemberLoginLogGroupBy
- func (mllgb *MemberLoginLogGroupBy) Aggregate(fns ...AggregateFunc) *MemberLoginLogGroupBy
- func (mllgb *MemberLoginLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mllgb *MemberLoginLogGroupBy) BoolX(ctx context.Context) bool
- func (mllgb *MemberLoginLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mllgb *MemberLoginLogGroupBy) BoolsX(ctx context.Context) []bool
- func (mllgb *MemberLoginLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mllgb *MemberLoginLogGroupBy) Float64X(ctx context.Context) float64
- func (mllgb *MemberLoginLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mllgb *MemberLoginLogGroupBy) Float64sX(ctx context.Context) []float64
- func (mllgb *MemberLoginLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mllgb *MemberLoginLogGroupBy) IntX(ctx context.Context) int
- func (mllgb *MemberLoginLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mllgb *MemberLoginLogGroupBy) IntsX(ctx context.Context) []int
- func (mllgb *MemberLoginLogGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mllgb *MemberLoginLogGroupBy) ScanX(ctx context.Context, v interface{})
- func (mllgb *MemberLoginLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (mllgb *MemberLoginLogGroupBy) StringX(ctx context.Context) string
- func (mllgb *MemberLoginLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mllgb *MemberLoginLogGroupBy) StringsX(ctx context.Context) []string
- type MemberLoginLogMutation
- func (m *MemberLoginLogMutation) AddField(name string, value ent.Value) error
- func (m *MemberLoginLogMutation) AddedEdges() []string
- func (m *MemberLoginLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemberLoginLogMutation) AddedFields() []string
- func (m *MemberLoginLogMutation) AddedIDs(name string) []ent.Value
- func (m *MemberLoginLogMutation) ClearEdge(name string) error
- func (m *MemberLoginLogMutation) ClearField(name string) error
- func (m *MemberLoginLogMutation) ClearIP()
- func (m *MemberLoginLogMutation) ClearOwner()
- func (m *MemberLoginLogMutation) ClearUserAgent()
- func (m *MemberLoginLogMutation) ClearedEdges() []string
- func (m *MemberLoginLogMutation) ClearedFields() []string
- func (m MemberLoginLogMutation) Client() *Client
- func (m *MemberLoginLogMutation) CreateTime() (r time.Time, exists bool)
- func (m *MemberLoginLogMutation) EdgeCleared(name string) bool
- func (m *MemberLoginLogMutation) Field(name string) (ent.Value, bool)
- func (m *MemberLoginLogMutation) FieldCleared(name string) bool
- func (m *MemberLoginLogMutation) Fields() []string
- func (m *MemberLoginLogMutation) ID() (id int, exists bool)
- func (m *MemberLoginLogMutation) IP() (r string, exists bool)
- func (m *MemberLoginLogMutation) IPCleared() bool
- func (m *MemberLoginLogMutation) MemberGid() (r uuid.UUID, exists bool)
- func (m *MemberLoginLogMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemberLoginLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemberLoginLogMutation) OldIP(ctx context.Context) (v *string, err error)
- func (m *MemberLoginLogMutation) OldMemberGid(ctx context.Context) (v uuid.UUID, err error)
- func (m *MemberLoginLogMutation) OldUserAgent(ctx context.Context) (v *string, err error)
- func (m *MemberLoginLogMutation) Op() Op
- func (m *MemberLoginLogMutation) OwnerCleared() bool
- func (m *MemberLoginLogMutation) OwnerID() (id int, exists bool)
- func (m *MemberLoginLogMutation) OwnerIDs() (ids []int)
- func (m *MemberLoginLogMutation) RemovedEdges() []string
- func (m *MemberLoginLogMutation) RemovedIDs(name string) []ent.Value
- func (m *MemberLoginLogMutation) ResetCreateTime()
- func (m *MemberLoginLogMutation) ResetEdge(name string) error
- func (m *MemberLoginLogMutation) ResetField(name string) error
- func (m *MemberLoginLogMutation) ResetIP()
- func (m *MemberLoginLogMutation) ResetMemberGid()
- func (m *MemberLoginLogMutation) ResetOwner()
- func (m *MemberLoginLogMutation) ResetUserAgent()
- func (m *MemberLoginLogMutation) SetCreateTime(t time.Time)
- func (m *MemberLoginLogMutation) SetField(name string, value ent.Value) error
- func (m *MemberLoginLogMutation) SetID(id int)
- func (m *MemberLoginLogMutation) SetIP(s string)
- func (m *MemberLoginLogMutation) SetMemberGid(u uuid.UUID)
- func (m *MemberLoginLogMutation) SetOwnerID(id int)
- func (m *MemberLoginLogMutation) SetUserAgent(s string)
- func (m MemberLoginLogMutation) Tx() (*Tx, error)
- func (m *MemberLoginLogMutation) Type() string
- func (m *MemberLoginLogMutation) UserAgent() (r string, exists bool)
- func (m *MemberLoginLogMutation) UserAgentCleared() bool
- type MemberLoginLogQuery
- func (mllq *MemberLoginLogQuery) All(ctx context.Context) ([]*MemberLoginLog, error)
- func (mllq *MemberLoginLogQuery) AllX(ctx context.Context) []*MemberLoginLog
- func (mllq *MemberLoginLogQuery) Clone() *MemberLoginLogQuery
- func (mllq *MemberLoginLogQuery) Count(ctx context.Context) (int, error)
- func (mllq *MemberLoginLogQuery) CountX(ctx context.Context) int
- func (mllq *MemberLoginLogQuery) Exist(ctx context.Context) (bool, error)
- func (mllq *MemberLoginLogQuery) ExistX(ctx context.Context) bool
- func (mllq *MemberLoginLogQuery) First(ctx context.Context) (*MemberLoginLog, error)
- func (mllq *MemberLoginLogQuery) FirstID(ctx context.Context) (id int, err error)
- func (mllq *MemberLoginLogQuery) FirstX(ctx context.Context) *MemberLoginLog
- func (mllq *MemberLoginLogQuery) FirstXID(ctx context.Context) int
- func (mllq *MemberLoginLogQuery) GroupBy(field string, fields ...string) *MemberLoginLogGroupBy
- func (mllq *MemberLoginLogQuery) IDs(ctx context.Context) ([]int, error)
- func (mllq *MemberLoginLogQuery) IDsX(ctx context.Context) []int
- func (mllq *MemberLoginLogQuery) Limit(limit int) *MemberLoginLogQuery
- func (mllq *MemberLoginLogQuery) Offset(offset int) *MemberLoginLogQuery
- func (mllq *MemberLoginLogQuery) Only(ctx context.Context) (*MemberLoginLog, error)
- func (mllq *MemberLoginLogQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mllq *MemberLoginLogQuery) OnlyIDX(ctx context.Context) int
- func (mllq *MemberLoginLogQuery) OnlyX(ctx context.Context) *MemberLoginLog
- func (mllq *MemberLoginLogQuery) Order(o ...OrderFunc) *MemberLoginLogQuery
- func (mllq *MemberLoginLogQuery) QueryOwner() *MemberQuery
- func (mllq *MemberLoginLogQuery) Select(field string, fields ...string) *MemberLoginLogSelect
- func (mllq *MemberLoginLogQuery) Where(ps ...predicate.MemberLoginLog) *MemberLoginLogQuery
- func (mllq *MemberLoginLogQuery) WithOwner(opts ...func(*MemberQuery)) *MemberLoginLogQuery
- type MemberLoginLogSelect
- func (mlls *MemberLoginLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (mlls *MemberLoginLogSelect) BoolX(ctx context.Context) bool
- func (mlls *MemberLoginLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (mlls *MemberLoginLogSelect) BoolsX(ctx context.Context) []bool
- func (mlls *MemberLoginLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (mlls *MemberLoginLogSelect) Float64X(ctx context.Context) float64
- func (mlls *MemberLoginLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (mlls *MemberLoginLogSelect) Float64sX(ctx context.Context) []float64
- func (mlls *MemberLoginLogSelect) Int(ctx context.Context) (_ int, err error)
- func (mlls *MemberLoginLogSelect) IntX(ctx context.Context) int
- func (mlls *MemberLoginLogSelect) Ints(ctx context.Context) ([]int, error)
- func (mlls *MemberLoginLogSelect) IntsX(ctx context.Context) []int
- func (mlls *MemberLoginLogSelect) Scan(ctx context.Context, v interface{}) error
- func (mlls *MemberLoginLogSelect) ScanX(ctx context.Context, v interface{})
- func (mlls *MemberLoginLogSelect) String(ctx context.Context) (_ string, err error)
- func (mlls *MemberLoginLogSelect) StringX(ctx context.Context) string
- func (mlls *MemberLoginLogSelect) Strings(ctx context.Context) ([]string, error)
- func (mlls *MemberLoginLogSelect) StringsX(ctx context.Context) []string
- type MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) ClearIP() *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) ClearOwner() *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) ClearUserAgent() *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) Exec(ctx context.Context) error
- func (mllu *MemberLoginLogUpdate) ExecX(ctx context.Context)
- func (mllu *MemberLoginLogUpdate) Mutation() *MemberLoginLogMutation
- func (mllu *MemberLoginLogUpdate) Save(ctx context.Context) (int, error)
- func (mllu *MemberLoginLogUpdate) SaveX(ctx context.Context) int
- func (mllu *MemberLoginLogUpdate) SetIP(s string) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) SetMemberGid(u uuid.UUID) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) SetNillableIP(s *string) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) SetNillableOwnerID(id *int) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) SetNillableUserAgent(s *string) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) SetOwner(m *Member) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) SetOwnerID(id int) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) SetUserAgent(s string) *MemberLoginLogUpdate
- func (mllu *MemberLoginLogUpdate) Where(ps ...predicate.MemberLoginLog) *MemberLoginLogUpdate
- type MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) ClearIP() *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) ClearOwner() *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) ClearUserAgent() *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) Exec(ctx context.Context) error
- func (mlluo *MemberLoginLogUpdateOne) ExecX(ctx context.Context)
- func (mlluo *MemberLoginLogUpdateOne) Mutation() *MemberLoginLogMutation
- func (mlluo *MemberLoginLogUpdateOne) Save(ctx context.Context) (*MemberLoginLog, error)
- func (mlluo *MemberLoginLogUpdateOne) SaveX(ctx context.Context) *MemberLoginLog
- func (mlluo *MemberLoginLogUpdateOne) SetIP(s string) *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) SetMemberGid(u uuid.UUID) *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) SetNillableIP(s *string) *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) SetNillableOwnerID(id *int) *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) SetNillableUserAgent(s *string) *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) SetOwner(m *Member) *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) SetOwnerID(id int) *MemberLoginLogUpdateOne
- func (mlluo *MemberLoginLogUpdateOne) SetUserAgent(s string) *MemberLoginLogUpdateOne
- type MemberLoginLogs
- type MemberMutation
- func (m *MemberMutation) AddField(name string, value ent.Value) error
- func (m *MemberMutation) AddGender(i int)
- func (m *MemberMutation) AddLoginLogIDs(ids ...int)
- func (m *MemberMutation) AddNoteArticleIDs(ids ...int)
- func (m *MemberMutation) AddNoteFilesystemIDs(ids ...int)
- func (m *MemberMutation) AddedEdges() []string
- func (m *MemberMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemberMutation) AddedFields() []string
- func (m *MemberMutation) AddedGender() (r int, exists bool)
- func (m *MemberMutation) AddedIDs(name string) []ent.Value
- func (m *MemberMutation) ClearEdge(name string) error
- func (m *MemberMutation) ClearField(name string) error
- func (m *MemberMutation) ClearGender()
- func (m *MemberMutation) ClearLoginLogs()
- func (m *MemberMutation) ClearNoteArticles()
- func (m *MemberMutation) ClearNoteFilesystem()
- func (m *MemberMutation) ClearedEdges() []string
- func (m *MemberMutation) ClearedFields() []string
- func (m MemberMutation) Client() *Client
- func (m *MemberMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MemberMutation) EdgeCleared(name string) bool
- func (m *MemberMutation) Email() (r string, exists bool)
- func (m *MemberMutation) Field(name string) (ent.Value, bool)
- func (m *MemberMutation) FieldCleared(name string) bool
- func (m *MemberMutation) Fields() []string
- func (m *MemberMutation) Gender() (r int, exists bool)
- func (m *MemberMutation) GenderCleared() bool
- func (m *MemberMutation) Gid() (r uuid.UUID, exists bool)
- func (m *MemberMutation) ID() (id int, exists bool)
- func (m *MemberMutation) LoginLogsCleared() bool
- func (m *MemberMutation) LoginLogsIDs() (ids []int)
- func (m *MemberMutation) Nickname() (r string, exists bool)
- func (m *MemberMutation) NoteArticlesCleared() bool
- func (m *MemberMutation) NoteArticlesIDs() (ids []int)
- func (m *MemberMutation) NoteFilesystemCleared() bool
- func (m *MemberMutation) NoteFilesystemIDs() (ids []int)
- func (m *MemberMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MemberMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemberMutation) OldGender(ctx context.Context) (v int, err error)
- func (m *MemberMutation) OldGid(ctx context.Context) (v uuid.UUID, err error)
- func (m *MemberMutation) OldNickname(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldSignature(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MemberMutation) Op() Op
- func (m *MemberMutation) Password() (r string, exists bool)
- func (m *MemberMutation) RemoveLoginLogIDs(ids ...int)
- func (m *MemberMutation) RemoveNoteArticleIDs(ids ...int)
- func (m *MemberMutation) RemoveNoteFilesystemIDs(ids ...int)
- func (m *MemberMutation) RemovedEdges() []string
- func (m *MemberMutation) RemovedIDs(name string) []ent.Value
- func (m *MemberMutation) RemovedLoginLogsIDs() (ids []int)
- func (m *MemberMutation) RemovedNoteArticlesIDs() (ids []int)
- func (m *MemberMutation) RemovedNoteFilesystemIDs() (ids []int)
- func (m *MemberMutation) ResetCreatedAt()
- func (m *MemberMutation) ResetEdge(name string) error
- func (m *MemberMutation) ResetEmail()
- func (m *MemberMutation) ResetField(name string) error
- func (m *MemberMutation) ResetGender()
- func (m *MemberMutation) ResetGid()
- func (m *MemberMutation) ResetLoginLogs()
- func (m *MemberMutation) ResetNickname()
- func (m *MemberMutation) ResetNoteArticles()
- func (m *MemberMutation) ResetNoteFilesystem()
- func (m *MemberMutation) ResetPassword()
- func (m *MemberMutation) ResetSignature()
- func (m *MemberMutation) ResetUpdatedAt()
- func (m *MemberMutation) SetCreatedAt(t time.Time)
- func (m *MemberMutation) SetEmail(s string)
- func (m *MemberMutation) SetField(name string, value ent.Value) error
- func (m *MemberMutation) SetGender(i int)
- func (m *MemberMutation) SetGid(u uuid.UUID)
- func (m *MemberMutation) SetID(id int)
- func (m *MemberMutation) SetNickname(s string)
- func (m *MemberMutation) SetPassword(s string)
- func (m *MemberMutation) SetSignature(s string)
- func (m *MemberMutation) SetUpdatedAt(t time.Time)
- func (m *MemberMutation) Signature() (r string, exists bool)
- func (m MemberMutation) Tx() (*Tx, error)
- func (m *MemberMutation) Type() string
- func (m *MemberMutation) UpdatedAt() (r time.Time, exists bool)
- type MemberQuery
- func (mq *MemberQuery) All(ctx context.Context) ([]*Member, error)
- func (mq *MemberQuery) AllX(ctx context.Context) []*Member
- func (mq *MemberQuery) Clone() *MemberQuery
- func (mq *MemberQuery) Count(ctx context.Context) (int, error)
- func (mq *MemberQuery) CountX(ctx context.Context) int
- func (mq *MemberQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MemberQuery) ExistX(ctx context.Context) bool
- func (mq *MemberQuery) First(ctx context.Context) (*Member, error)
- func (mq *MemberQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MemberQuery) FirstX(ctx context.Context) *Member
- func (mq *MemberQuery) FirstXID(ctx context.Context) int
- func (mq *MemberQuery) GroupBy(field string, fields ...string) *MemberGroupBy
- func (mq *MemberQuery) IDs(ctx context.Context) ([]int, error)
- func (mq *MemberQuery) IDsX(ctx context.Context) []int
- func (mq *MemberQuery) Limit(limit int) *MemberQuery
- func (mq *MemberQuery) Offset(offset int) *MemberQuery
- func (mq *MemberQuery) Only(ctx context.Context) (*Member, error)
- func (mq *MemberQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MemberQuery) OnlyIDX(ctx context.Context) int
- func (mq *MemberQuery) OnlyX(ctx context.Context) *Member
- func (mq *MemberQuery) Order(o ...OrderFunc) *MemberQuery
- func (mq *MemberQuery) QueryLoginLogs() *MemberLoginLogQuery
- func (mq *MemberQuery) QueryNoteArticles() *NoteArticleQuery
- func (mq *MemberQuery) QueryNoteFilesystem() *NoteFilesystemQuery
- func (mq *MemberQuery) Select(field string, fields ...string) *MemberSelect
- func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery
- func (mq *MemberQuery) WithLoginLogs(opts ...func(*MemberLoginLogQuery)) *MemberQuery
- func (mq *MemberQuery) WithNoteArticles(opts ...func(*NoteArticleQuery)) *MemberQuery
- func (mq *MemberQuery) WithNoteFilesystem(opts ...func(*NoteFilesystemQuery)) *MemberQuery
- type MemberSelect
- func (ms *MemberSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ms *MemberSelect) BoolX(ctx context.Context) bool
- func (ms *MemberSelect) Bools(ctx context.Context) ([]bool, error)
- func (ms *MemberSelect) BoolsX(ctx context.Context) []bool
- func (ms *MemberSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ms *MemberSelect) Float64X(ctx context.Context) float64
- func (ms *MemberSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ms *MemberSelect) Float64sX(ctx context.Context) []float64
- func (ms *MemberSelect) Int(ctx context.Context) (_ int, err error)
- func (ms *MemberSelect) IntX(ctx context.Context) int
- func (ms *MemberSelect) Ints(ctx context.Context) ([]int, error)
- func (ms *MemberSelect) IntsX(ctx context.Context) []int
- func (ms *MemberSelect) Scan(ctx context.Context, v interface{}) error
- func (ms *MemberSelect) ScanX(ctx context.Context, v interface{})
- func (ms *MemberSelect) String(ctx context.Context) (_ string, err error)
- func (ms *MemberSelect) StringX(ctx context.Context) string
- func (ms *MemberSelect) Strings(ctx context.Context) ([]string, error)
- func (ms *MemberSelect) StringsX(ctx context.Context) []string
- type MemberUpdate
- func (mu *MemberUpdate) AddGender(i int) *MemberUpdate
- func (mu *MemberUpdate) AddLoginLogIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddLoginLogs(m ...*MemberLoginLog) *MemberUpdate
- func (mu *MemberUpdate) AddNoteArticleIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddNoteArticles(n ...*NoteArticle) *MemberUpdate
- func (mu *MemberUpdate) AddNoteFilesystem(n ...*NoteFilesystem) *MemberUpdate
- func (mu *MemberUpdate) AddNoteFilesystemIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) ClearGender() *MemberUpdate
- func (mu *MemberUpdate) ClearLoginLogs() *MemberUpdate
- func (mu *MemberUpdate) ClearNoteArticles() *MemberUpdate
- func (mu *MemberUpdate) ClearNoteFilesystem() *MemberUpdate
- func (mu *MemberUpdate) Exec(ctx context.Context) error
- func (mu *MemberUpdate) ExecX(ctx context.Context)
- func (mu *MemberUpdate) Mutation() *MemberMutation
- func (mu *MemberUpdate) RemoveLoginLogIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveLoginLogs(m ...*MemberLoginLog) *MemberUpdate
- func (mu *MemberUpdate) RemoveNoteArticleIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveNoteArticles(n ...*NoteArticle) *MemberUpdate
- func (mu *MemberUpdate) RemoveNoteFilesystem(n ...*NoteFilesystem) *MemberUpdate
- func (mu *MemberUpdate) RemoveNoteFilesystemIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) Save(ctx context.Context) (int, error)
- func (mu *MemberUpdate) SaveX(ctx context.Context) int
- func (mu *MemberUpdate) SetEmail(s string) *MemberUpdate
- func (mu *MemberUpdate) SetGender(i int) *MemberUpdate
- func (mu *MemberUpdate) SetNickname(s string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableGender(i *int) *MemberUpdate
- func (mu *MemberUpdate) SetPassword(s string) *MemberUpdate
- func (mu *MemberUpdate) SetSignature(s string) *MemberUpdate
- func (mu *MemberUpdate) SetUpdatedAt(t time.Time) *MemberUpdate
- func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate
- type MemberUpdateOne
- func (muo *MemberUpdateOne) AddGender(i int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddLoginLogIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddLoginLogs(m ...*MemberLoginLog) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddNoteArticleIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddNoteArticles(n ...*NoteArticle) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddNoteFilesystem(n ...*NoteFilesystem) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddNoteFilesystemIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearGender() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearLoginLogs() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearNoteArticles() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearNoteFilesystem() *MemberUpdateOne
- func (muo *MemberUpdateOne) Exec(ctx context.Context) error
- func (muo *MemberUpdateOne) ExecX(ctx context.Context)
- func (muo *MemberUpdateOne) Mutation() *MemberMutation
- func (muo *MemberUpdateOne) RemoveLoginLogIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveLoginLogs(m ...*MemberLoginLog) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveNoteArticleIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveNoteArticles(n ...*NoteArticle) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveNoteFilesystem(n ...*NoteFilesystem) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveNoteFilesystemIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)
- func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member
- func (muo *MemberUpdateOne) SetEmail(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetGender(i int) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNickname(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableGender(i *int) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetPassword(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetSignature(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetUpdatedAt(t time.Time) *MemberUpdateOne
- type Members
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type NoteArticle
- type NoteArticleClient
- func (c *NoteArticleClient) Create() *NoteArticleCreate
- func (c *NoteArticleClient) CreateBulk(builders ...*NoteArticleCreate) *NoteArticleCreateBulk
- func (c *NoteArticleClient) Delete() *NoteArticleDelete
- func (c *NoteArticleClient) DeleteOne(na *NoteArticle) *NoteArticleDeleteOne
- func (c *NoteArticleClient) DeleteOneID(id int) *NoteArticleDeleteOne
- func (c *NoteArticleClient) Get(ctx context.Context, id int) (*NoteArticle, error)
- func (c *NoteArticleClient) GetX(ctx context.Context, id int) *NoteArticle
- func (c *NoteArticleClient) Hooks() []Hook
- func (c *NoteArticleClient) Query() *NoteArticleQuery
- func (c *NoteArticleClient) QueryOwner(na *NoteArticle) *MemberQuery
- func (c *NoteArticleClient) Update() *NoteArticleUpdate
- func (c *NoteArticleClient) UpdateOne(na *NoteArticle) *NoteArticleUpdateOne
- func (c *NoteArticleClient) UpdateOneID(id int) *NoteArticleUpdateOne
- func (c *NoteArticleClient) Use(hooks ...Hook)
- type NoteArticleCreate
- func (nac *NoteArticleCreate) Mutation() *NoteArticleMutation
- func (nac *NoteArticleCreate) Save(ctx context.Context) (*NoteArticle, error)
- func (nac *NoteArticleCreate) SaveX(ctx context.Context) *NoteArticle
- func (nac *NoteArticleCreate) SetContent(s string) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetCreatedAt(t time.Time) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetGid(u uuid.UUID) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetID(i int) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetMemberGid(u uuid.UUID) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetMime(n notearticle.Mime) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetNillableCreatedAt(t *time.Time) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetNillableOwnerID(id *int) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetNillableUpdatedAt(t *time.Time) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetOwner(m *Member) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetOwnerID(id int) *NoteArticleCreate
- func (nac *NoteArticleCreate) SetUpdatedAt(t time.Time) *NoteArticleCreate
- type NoteArticleCreateBulk
- type NoteArticleDelete
- type NoteArticleDeleteOne
- type NoteArticleEdges
- type NoteArticleGroupBy
- func (nagb *NoteArticleGroupBy) Aggregate(fns ...AggregateFunc) *NoteArticleGroupBy
- func (nagb *NoteArticleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (nagb *NoteArticleGroupBy) BoolX(ctx context.Context) bool
- func (nagb *NoteArticleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (nagb *NoteArticleGroupBy) BoolsX(ctx context.Context) []bool
- func (nagb *NoteArticleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (nagb *NoteArticleGroupBy) Float64X(ctx context.Context) float64
- func (nagb *NoteArticleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (nagb *NoteArticleGroupBy) Float64sX(ctx context.Context) []float64
- func (nagb *NoteArticleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (nagb *NoteArticleGroupBy) IntX(ctx context.Context) int
- func (nagb *NoteArticleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (nagb *NoteArticleGroupBy) IntsX(ctx context.Context) []int
- func (nagb *NoteArticleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (nagb *NoteArticleGroupBy) ScanX(ctx context.Context, v interface{})
- func (nagb *NoteArticleGroupBy) String(ctx context.Context) (_ string, err error)
- func (nagb *NoteArticleGroupBy) StringX(ctx context.Context) string
- func (nagb *NoteArticleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (nagb *NoteArticleGroupBy) StringsX(ctx context.Context) []string
- type NoteArticleMutation
- func (m *NoteArticleMutation) AddField(name string, value ent.Value) error
- func (m *NoteArticleMutation) AddedEdges() []string
- func (m *NoteArticleMutation) AddedField(name string) (ent.Value, bool)
- func (m *NoteArticleMutation) AddedFields() []string
- func (m *NoteArticleMutation) AddedIDs(name string) []ent.Value
- func (m *NoteArticleMutation) ClearEdge(name string) error
- func (m *NoteArticleMutation) ClearField(name string) error
- func (m *NoteArticleMutation) ClearOwner()
- func (m *NoteArticleMutation) ClearedEdges() []string
- func (m *NoteArticleMutation) ClearedFields() []string
- func (m NoteArticleMutation) Client() *Client
- func (m *NoteArticleMutation) Content() (r string, exists bool)
- func (m *NoteArticleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NoteArticleMutation) EdgeCleared(name string) bool
- func (m *NoteArticleMutation) Field(name string) (ent.Value, bool)
- func (m *NoteArticleMutation) FieldCleared(name string) bool
- func (m *NoteArticleMutation) Fields() []string
- func (m *NoteArticleMutation) Gid() (r uuid.UUID, exists bool)
- func (m *NoteArticleMutation) ID() (id int, exists bool)
- func (m *NoteArticleMutation) MemberGid() (r uuid.UUID, exists bool)
- func (m *NoteArticleMutation) Mime() (r notearticle.Mime, exists bool)
- func (m *NoteArticleMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *NoteArticleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NoteArticleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NoteArticleMutation) OldGid(ctx context.Context) (v uuid.UUID, err error)
- func (m *NoteArticleMutation) OldMemberGid(ctx context.Context) (v uuid.UUID, err error)
- func (m *NoteArticleMutation) OldMime(ctx context.Context) (v notearticle.Mime, err error)
- func (m *NoteArticleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NoteArticleMutation) Op() Op
- func (m *NoteArticleMutation) OwnerCleared() bool
- func (m *NoteArticleMutation) OwnerID() (id int, exists bool)
- func (m *NoteArticleMutation) OwnerIDs() (ids []int)
- func (m *NoteArticleMutation) RemovedEdges() []string
- func (m *NoteArticleMutation) RemovedIDs(name string) []ent.Value
- func (m *NoteArticleMutation) ResetContent()
- func (m *NoteArticleMutation) ResetCreatedAt()
- func (m *NoteArticleMutation) ResetEdge(name string) error
- func (m *NoteArticleMutation) ResetField(name string) error
- func (m *NoteArticleMutation) ResetGid()
- func (m *NoteArticleMutation) ResetMemberGid()
- func (m *NoteArticleMutation) ResetMime()
- func (m *NoteArticleMutation) ResetOwner()
- func (m *NoteArticleMutation) ResetUpdatedAt()
- func (m *NoteArticleMutation) SetContent(s string)
- func (m *NoteArticleMutation) SetCreatedAt(t time.Time)
- func (m *NoteArticleMutation) SetField(name string, value ent.Value) error
- func (m *NoteArticleMutation) SetGid(u uuid.UUID)
- func (m *NoteArticleMutation) SetID(id int)
- func (m *NoteArticleMutation) SetMemberGid(u uuid.UUID)
- func (m *NoteArticleMutation) SetMime(n notearticle.Mime)
- func (m *NoteArticleMutation) SetOwnerID(id int)
- func (m *NoteArticleMutation) SetUpdatedAt(t time.Time)
- func (m NoteArticleMutation) Tx() (*Tx, error)
- func (m *NoteArticleMutation) Type() string
- func (m *NoteArticleMutation) UpdatedAt() (r time.Time, exists bool)
- type NoteArticleQuery
- func (naq *NoteArticleQuery) All(ctx context.Context) ([]*NoteArticle, error)
- func (naq *NoteArticleQuery) AllX(ctx context.Context) []*NoteArticle
- func (naq *NoteArticleQuery) Clone() *NoteArticleQuery
- func (naq *NoteArticleQuery) Count(ctx context.Context) (int, error)
- func (naq *NoteArticleQuery) CountX(ctx context.Context) int
- func (naq *NoteArticleQuery) Exist(ctx context.Context) (bool, error)
- func (naq *NoteArticleQuery) ExistX(ctx context.Context) bool
- func (naq *NoteArticleQuery) First(ctx context.Context) (*NoteArticle, error)
- func (naq *NoteArticleQuery) FirstID(ctx context.Context) (id int, err error)
- func (naq *NoteArticleQuery) FirstX(ctx context.Context) *NoteArticle
- func (naq *NoteArticleQuery) FirstXID(ctx context.Context) int
- func (naq *NoteArticleQuery) GroupBy(field string, fields ...string) *NoteArticleGroupBy
- func (naq *NoteArticleQuery) IDs(ctx context.Context) ([]int, error)
- func (naq *NoteArticleQuery) IDsX(ctx context.Context) []int
- func (naq *NoteArticleQuery) Limit(limit int) *NoteArticleQuery
- func (naq *NoteArticleQuery) Offset(offset int) *NoteArticleQuery
- func (naq *NoteArticleQuery) Only(ctx context.Context) (*NoteArticle, error)
- func (naq *NoteArticleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (naq *NoteArticleQuery) OnlyIDX(ctx context.Context) int
- func (naq *NoteArticleQuery) OnlyX(ctx context.Context) *NoteArticle
- func (naq *NoteArticleQuery) Order(o ...OrderFunc) *NoteArticleQuery
- func (naq *NoteArticleQuery) QueryOwner() *MemberQuery
- func (naq *NoteArticleQuery) Select(field string, fields ...string) *NoteArticleSelect
- func (naq *NoteArticleQuery) Where(ps ...predicate.NoteArticle) *NoteArticleQuery
- func (naq *NoteArticleQuery) WithOwner(opts ...func(*MemberQuery)) *NoteArticleQuery
- type NoteArticleSelect
- func (nas *NoteArticleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (nas *NoteArticleSelect) BoolX(ctx context.Context) bool
- func (nas *NoteArticleSelect) Bools(ctx context.Context) ([]bool, error)
- func (nas *NoteArticleSelect) BoolsX(ctx context.Context) []bool
- func (nas *NoteArticleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (nas *NoteArticleSelect) Float64X(ctx context.Context) float64
- func (nas *NoteArticleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (nas *NoteArticleSelect) Float64sX(ctx context.Context) []float64
- func (nas *NoteArticleSelect) Int(ctx context.Context) (_ int, err error)
- func (nas *NoteArticleSelect) IntX(ctx context.Context) int
- func (nas *NoteArticleSelect) Ints(ctx context.Context) ([]int, error)
- func (nas *NoteArticleSelect) IntsX(ctx context.Context) []int
- func (nas *NoteArticleSelect) Scan(ctx context.Context, v interface{}) error
- func (nas *NoteArticleSelect) ScanX(ctx context.Context, v interface{})
- func (nas *NoteArticleSelect) String(ctx context.Context) (_ string, err error)
- func (nas *NoteArticleSelect) StringX(ctx context.Context) string
- func (nas *NoteArticleSelect) Strings(ctx context.Context) ([]string, error)
- func (nas *NoteArticleSelect) StringsX(ctx context.Context) []string
- type NoteArticleUpdate
- func (nau *NoteArticleUpdate) ClearOwner() *NoteArticleUpdate
- func (nau *NoteArticleUpdate) Exec(ctx context.Context) error
- func (nau *NoteArticleUpdate) ExecX(ctx context.Context)
- func (nau *NoteArticleUpdate) Mutation() *NoteArticleMutation
- func (nau *NoteArticleUpdate) Save(ctx context.Context) (int, error)
- func (nau *NoteArticleUpdate) SaveX(ctx context.Context) int
- func (nau *NoteArticleUpdate) SetContent(s string) *NoteArticleUpdate
- func (nau *NoteArticleUpdate) SetGid(u uuid.UUID) *NoteArticleUpdate
- func (nau *NoteArticleUpdate) SetMemberGid(u uuid.UUID) *NoteArticleUpdate
- func (nau *NoteArticleUpdate) SetNillableOwnerID(id *int) *NoteArticleUpdate
- func (nau *NoteArticleUpdate) SetOwner(m *Member) *NoteArticleUpdate
- func (nau *NoteArticleUpdate) SetOwnerID(id int) *NoteArticleUpdate
- func (nau *NoteArticleUpdate) SetUpdatedAt(t time.Time) *NoteArticleUpdate
- func (nau *NoteArticleUpdate) Where(ps ...predicate.NoteArticle) *NoteArticleUpdate
- type NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) ClearOwner() *NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) Exec(ctx context.Context) error
- func (nauo *NoteArticleUpdateOne) ExecX(ctx context.Context)
- func (nauo *NoteArticleUpdateOne) Mutation() *NoteArticleMutation
- func (nauo *NoteArticleUpdateOne) Save(ctx context.Context) (*NoteArticle, error)
- func (nauo *NoteArticleUpdateOne) SaveX(ctx context.Context) *NoteArticle
- func (nauo *NoteArticleUpdateOne) SetContent(s string) *NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) SetGid(u uuid.UUID) *NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) SetMemberGid(u uuid.UUID) *NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) SetNillableOwnerID(id *int) *NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) SetOwner(m *Member) *NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) SetOwnerID(id int) *NoteArticleUpdateOne
- func (nauo *NoteArticleUpdateOne) SetUpdatedAt(t time.Time) *NoteArticleUpdateOne
- type NoteArticles
- type NoteFilesystem
- type NoteFilesystemClient
- func (c *NoteFilesystemClient) Create() *NoteFilesystemCreate
- func (c *NoteFilesystemClient) CreateBulk(builders ...*NoteFilesystemCreate) *NoteFilesystemCreateBulk
- func (c *NoteFilesystemClient) Delete() *NoteFilesystemDelete
- func (c *NoteFilesystemClient) DeleteOne(nf *NoteFilesystem) *NoteFilesystemDeleteOne
- func (c *NoteFilesystemClient) DeleteOneID(id int) *NoteFilesystemDeleteOne
- func (c *NoteFilesystemClient) Get(ctx context.Context, id int) (*NoteFilesystem, error)
- func (c *NoteFilesystemClient) GetX(ctx context.Context, id int) *NoteFilesystem
- func (c *NoteFilesystemClient) Hooks() []Hook
- func (c *NoteFilesystemClient) Query() *NoteFilesystemQuery
- func (c *NoteFilesystemClient) QueryOwner(nf *NoteFilesystem) *MemberQuery
- func (c *NoteFilesystemClient) Update() *NoteFilesystemUpdate
- func (c *NoteFilesystemClient) UpdateOne(nf *NoteFilesystem) *NoteFilesystemUpdateOne
- func (c *NoteFilesystemClient) UpdateOneID(id int) *NoteFilesystemUpdateOne
- func (c *NoteFilesystemClient) Use(hooks ...Hook)
- type NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) Mutation() *NoteFilesystemMutation
- func (nfc *NoteFilesystemCreate) Save(ctx context.Context) (*NoteFilesystem, error)
- func (nfc *NoteFilesystemCreate) SaveX(ctx context.Context) *NoteFilesystem
- func (nfc *NoteFilesystemCreate) SetCreatedAt(t time.Time) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetDeleted(b bool) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetID(i int) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetIsDir(b bool) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetMemberGid(u uuid.UUID) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetName(s string) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetNillableCreatedAt(t *time.Time) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetNillableDeleted(b *bool) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetNillableIsDir(b *bool) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetNillableOwnerID(id *int) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetNillableUpdatedAt(t *time.Time) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetOwner(m *Member) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetOwnerID(id int) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetParentID(i int) *NoteFilesystemCreate
- func (nfc *NoteFilesystemCreate) SetUpdatedAt(t time.Time) *NoteFilesystemCreate
- type NoteFilesystemCreateBulk
- type NoteFilesystemDelete
- type NoteFilesystemDeleteOne
- type NoteFilesystemEdges
- type NoteFilesystemGroupBy
- func (nfgb *NoteFilesystemGroupBy) Aggregate(fns ...AggregateFunc) *NoteFilesystemGroupBy
- func (nfgb *NoteFilesystemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (nfgb *NoteFilesystemGroupBy) BoolX(ctx context.Context) bool
- func (nfgb *NoteFilesystemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (nfgb *NoteFilesystemGroupBy) BoolsX(ctx context.Context) []bool
- func (nfgb *NoteFilesystemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (nfgb *NoteFilesystemGroupBy) Float64X(ctx context.Context) float64
- func (nfgb *NoteFilesystemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (nfgb *NoteFilesystemGroupBy) Float64sX(ctx context.Context) []float64
- func (nfgb *NoteFilesystemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (nfgb *NoteFilesystemGroupBy) IntX(ctx context.Context) int
- func (nfgb *NoteFilesystemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (nfgb *NoteFilesystemGroupBy) IntsX(ctx context.Context) []int
- func (nfgb *NoteFilesystemGroupBy) Scan(ctx context.Context, v interface{}) error
- func (nfgb *NoteFilesystemGroupBy) ScanX(ctx context.Context, v interface{})
- func (nfgb *NoteFilesystemGroupBy) String(ctx context.Context) (_ string, err error)
- func (nfgb *NoteFilesystemGroupBy) StringX(ctx context.Context) string
- func (nfgb *NoteFilesystemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (nfgb *NoteFilesystemGroupBy) StringsX(ctx context.Context) []string
- type NoteFilesystemMutation
- func (m *NoteFilesystemMutation) AddField(name string, value ent.Value) error
- func (m *NoteFilesystemMutation) AddParentID(i int)
- func (m *NoteFilesystemMutation) AddedEdges() []string
- func (m *NoteFilesystemMutation) AddedField(name string) (ent.Value, bool)
- func (m *NoteFilesystemMutation) AddedFields() []string
- func (m *NoteFilesystemMutation) AddedIDs(name string) []ent.Value
- func (m *NoteFilesystemMutation) AddedParentID() (r int, exists bool)
- func (m *NoteFilesystemMutation) ClearEdge(name string) error
- func (m *NoteFilesystemMutation) ClearField(name string) error
- func (m *NoteFilesystemMutation) ClearOwner()
- func (m *NoteFilesystemMutation) ClearedEdges() []string
- func (m *NoteFilesystemMutation) ClearedFields() []string
- func (m NoteFilesystemMutation) Client() *Client
- func (m *NoteFilesystemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NoteFilesystemMutation) Deleted() (r bool, exists bool)
- func (m *NoteFilesystemMutation) EdgeCleared(name string) bool
- func (m *NoteFilesystemMutation) Field(name string) (ent.Value, bool)
- func (m *NoteFilesystemMutation) FieldCleared(name string) bool
- func (m *NoteFilesystemMutation) Fields() []string
- func (m *NoteFilesystemMutation) ID() (id int, exists bool)
- func (m *NoteFilesystemMutation) IsDir() (r bool, exists bool)
- func (m *NoteFilesystemMutation) MemberGid() (r uuid.UUID, exists bool)
- func (m *NoteFilesystemMutation) Name() (r string, exists bool)
- func (m *NoteFilesystemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NoteFilesystemMutation) OldDeleted(ctx context.Context) (v bool, err error)
- func (m *NoteFilesystemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NoteFilesystemMutation) OldIsDir(ctx context.Context) (v bool, err error)
- func (m *NoteFilesystemMutation) OldMemberGid(ctx context.Context) (v uuid.UUID, err error)
- func (m *NoteFilesystemMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NoteFilesystemMutation) OldParentID(ctx context.Context) (v int, err error)
- func (m *NoteFilesystemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NoteFilesystemMutation) Op() Op
- func (m *NoteFilesystemMutation) OwnerCleared() bool
- func (m *NoteFilesystemMutation) OwnerID() (id int, exists bool)
- func (m *NoteFilesystemMutation) OwnerIDs() (ids []int)
- func (m *NoteFilesystemMutation) ParentID() (r int, exists bool)
- func (m *NoteFilesystemMutation) RemovedEdges() []string
- func (m *NoteFilesystemMutation) RemovedIDs(name string) []ent.Value
- func (m *NoteFilesystemMutation) ResetCreatedAt()
- func (m *NoteFilesystemMutation) ResetDeleted()
- func (m *NoteFilesystemMutation) ResetEdge(name string) error
- func (m *NoteFilesystemMutation) ResetField(name string) error
- func (m *NoteFilesystemMutation) ResetIsDir()
- func (m *NoteFilesystemMutation) ResetMemberGid()
- func (m *NoteFilesystemMutation) ResetName()
- func (m *NoteFilesystemMutation) ResetOwner()
- func (m *NoteFilesystemMutation) ResetParentID()
- func (m *NoteFilesystemMutation) ResetUpdatedAt()
- func (m *NoteFilesystemMutation) SetCreatedAt(t time.Time)
- func (m *NoteFilesystemMutation) SetDeleted(b bool)
- func (m *NoteFilesystemMutation) SetField(name string, value ent.Value) error
- func (m *NoteFilesystemMutation) SetID(id int)
- func (m *NoteFilesystemMutation) SetIsDir(b bool)
- func (m *NoteFilesystemMutation) SetMemberGid(u uuid.UUID)
- func (m *NoteFilesystemMutation) SetName(s string)
- func (m *NoteFilesystemMutation) SetOwnerID(id int)
- func (m *NoteFilesystemMutation) SetParentID(i int)
- func (m *NoteFilesystemMutation) SetUpdatedAt(t time.Time)
- func (m NoteFilesystemMutation) Tx() (*Tx, error)
- func (m *NoteFilesystemMutation) Type() string
- func (m *NoteFilesystemMutation) UpdatedAt() (r time.Time, exists bool)
- type NoteFilesystemQuery
- func (nfq *NoteFilesystemQuery) All(ctx context.Context) ([]*NoteFilesystem, error)
- func (nfq *NoteFilesystemQuery) AllX(ctx context.Context) []*NoteFilesystem
- func (nfq *NoteFilesystemQuery) Clone() *NoteFilesystemQuery
- func (nfq *NoteFilesystemQuery) Count(ctx context.Context) (int, error)
- func (nfq *NoteFilesystemQuery) CountX(ctx context.Context) int
- func (nfq *NoteFilesystemQuery) Exist(ctx context.Context) (bool, error)
- func (nfq *NoteFilesystemQuery) ExistX(ctx context.Context) bool
- func (nfq *NoteFilesystemQuery) First(ctx context.Context) (*NoteFilesystem, error)
- func (nfq *NoteFilesystemQuery) FirstID(ctx context.Context) (id int, err error)
- func (nfq *NoteFilesystemQuery) FirstX(ctx context.Context) *NoteFilesystem
- func (nfq *NoteFilesystemQuery) FirstXID(ctx context.Context) int
- func (nfq *NoteFilesystemQuery) GroupBy(field string, fields ...string) *NoteFilesystemGroupBy
- func (nfq *NoteFilesystemQuery) IDs(ctx context.Context) ([]int, error)
- func (nfq *NoteFilesystemQuery) IDsX(ctx context.Context) []int
- func (nfq *NoteFilesystemQuery) Limit(limit int) *NoteFilesystemQuery
- func (nfq *NoteFilesystemQuery) Offset(offset int) *NoteFilesystemQuery
- func (nfq *NoteFilesystemQuery) Only(ctx context.Context) (*NoteFilesystem, error)
- func (nfq *NoteFilesystemQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nfq *NoteFilesystemQuery) OnlyIDX(ctx context.Context) int
- func (nfq *NoteFilesystemQuery) OnlyX(ctx context.Context) *NoteFilesystem
- func (nfq *NoteFilesystemQuery) Order(o ...OrderFunc) *NoteFilesystemQuery
- func (nfq *NoteFilesystemQuery) QueryOwner() *MemberQuery
- func (nfq *NoteFilesystemQuery) Select(field string, fields ...string) *NoteFilesystemSelect
- func (nfq *NoteFilesystemQuery) Where(ps ...predicate.NoteFilesystem) *NoteFilesystemQuery
- func (nfq *NoteFilesystemQuery) WithOwner(opts ...func(*MemberQuery)) *NoteFilesystemQuery
- type NoteFilesystemSelect
- func (nfs *NoteFilesystemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (nfs *NoteFilesystemSelect) BoolX(ctx context.Context) bool
- func (nfs *NoteFilesystemSelect) Bools(ctx context.Context) ([]bool, error)
- func (nfs *NoteFilesystemSelect) BoolsX(ctx context.Context) []bool
- func (nfs *NoteFilesystemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (nfs *NoteFilesystemSelect) Float64X(ctx context.Context) float64
- func (nfs *NoteFilesystemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (nfs *NoteFilesystemSelect) Float64sX(ctx context.Context) []float64
- func (nfs *NoteFilesystemSelect) Int(ctx context.Context) (_ int, err error)
- func (nfs *NoteFilesystemSelect) IntX(ctx context.Context) int
- func (nfs *NoteFilesystemSelect) Ints(ctx context.Context) ([]int, error)
- func (nfs *NoteFilesystemSelect) IntsX(ctx context.Context) []int
- func (nfs *NoteFilesystemSelect) Scan(ctx context.Context, v interface{}) error
- func (nfs *NoteFilesystemSelect) ScanX(ctx context.Context, v interface{})
- func (nfs *NoteFilesystemSelect) String(ctx context.Context) (_ string, err error)
- func (nfs *NoteFilesystemSelect) StringX(ctx context.Context) string
- func (nfs *NoteFilesystemSelect) Strings(ctx context.Context) ([]string, error)
- func (nfs *NoteFilesystemSelect) StringsX(ctx context.Context) []string
- type NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) AddParentID(i int) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) ClearOwner() *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) Exec(ctx context.Context) error
- func (nfu *NoteFilesystemUpdate) ExecX(ctx context.Context)
- func (nfu *NoteFilesystemUpdate) Mutation() *NoteFilesystemMutation
- func (nfu *NoteFilesystemUpdate) Save(ctx context.Context) (int, error)
- func (nfu *NoteFilesystemUpdate) SaveX(ctx context.Context) int
- func (nfu *NoteFilesystemUpdate) SetDeleted(b bool) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) SetName(s string) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) SetNillableDeleted(b *bool) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) SetNillableOwnerID(id *int) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) SetOwner(m *Member) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) SetOwnerID(id int) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) SetParentID(i int) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) SetUpdatedAt(t time.Time) *NoteFilesystemUpdate
- func (nfu *NoteFilesystemUpdate) Where(ps ...predicate.NoteFilesystem) *NoteFilesystemUpdate
- type NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) AddParentID(i int) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) ClearOwner() *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) Exec(ctx context.Context) error
- func (nfuo *NoteFilesystemUpdateOne) ExecX(ctx context.Context)
- func (nfuo *NoteFilesystemUpdateOne) Mutation() *NoteFilesystemMutation
- func (nfuo *NoteFilesystemUpdateOne) Save(ctx context.Context) (*NoteFilesystem, error)
- func (nfuo *NoteFilesystemUpdateOne) SaveX(ctx context.Context) *NoteFilesystem
- func (nfuo *NoteFilesystemUpdateOne) SetDeleted(b bool) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) SetName(s string) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) SetNillableDeleted(b *bool) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) SetNillableOwnerID(id *int) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) SetOwner(m *Member) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) SetOwnerID(id int) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) SetParentID(i int) *NoteFilesystemUpdateOne
- func (nfuo *NoteFilesystemUpdateOne) SetUpdatedAt(t time.Time) *NoteFilesystemUpdateOne
- type NoteFilesystems
- type Op
- type Option
- type Options
- type OptionsClient
- func (c *OptionsClient) Create() *OptionsCreate
- func (c *OptionsClient) CreateBulk(builders ...*OptionsCreate) *OptionsCreateBulk
- func (c *OptionsClient) Delete() *OptionsDelete
- func (c *OptionsClient) DeleteOne(o *Options) *OptionsDeleteOne
- func (c *OptionsClient) DeleteOneID(id int) *OptionsDeleteOne
- func (c *OptionsClient) Get(ctx context.Context, id int) (*Options, error)
- func (c *OptionsClient) GetX(ctx context.Context, id int) *Options
- func (c *OptionsClient) Hooks() []Hook
- func (c *OptionsClient) Query() *OptionsQuery
- func (c *OptionsClient) Update() *OptionsUpdate
- func (c *OptionsClient) UpdateOne(o *Options) *OptionsUpdateOne
- func (c *OptionsClient) UpdateOneID(id int) *OptionsUpdateOne
- func (c *OptionsClient) Use(hooks ...Hook)
- type OptionsCreate
- func (oc *OptionsCreate) Mutation() *OptionsMutation
- func (oc *OptionsCreate) Save(ctx context.Context) (*Options, error)
- func (oc *OptionsCreate) SaveX(ctx context.Context) *Options
- func (oc *OptionsCreate) SetCreatedAt(t time.Time) *OptionsCreate
- func (oc *OptionsCreate) SetID(i int) *OptionsCreate
- func (oc *OptionsCreate) SetKey(s string) *OptionsCreate
- func (oc *OptionsCreate) SetNillableCreatedAt(t *time.Time) *OptionsCreate
- func (oc *OptionsCreate) SetNillableUpdatedAt(t *time.Time) *OptionsCreate
- func (oc *OptionsCreate) SetUpdatedAt(t time.Time) *OptionsCreate
- func (oc *OptionsCreate) SetValue(s string) *OptionsCreate
- type OptionsCreateBulk
- type OptionsDelete
- type OptionsDeleteOne
- type OptionsGroupBy
- func (ogb *OptionsGroupBy) Aggregate(fns ...AggregateFunc) *OptionsGroupBy
- func (ogb *OptionsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ogb *OptionsGroupBy) BoolX(ctx context.Context) bool
- func (ogb *OptionsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ogb *OptionsGroupBy) BoolsX(ctx context.Context) []bool
- func (ogb *OptionsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ogb *OptionsGroupBy) Float64X(ctx context.Context) float64
- func (ogb *OptionsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ogb *OptionsGroupBy) Float64sX(ctx context.Context) []float64
- func (ogb *OptionsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ogb *OptionsGroupBy) IntX(ctx context.Context) int
- func (ogb *OptionsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ogb *OptionsGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OptionsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ogb *OptionsGroupBy) ScanX(ctx context.Context, v interface{})
- func (ogb *OptionsGroupBy) String(ctx context.Context) (_ string, err error)
- func (ogb *OptionsGroupBy) StringX(ctx context.Context) string
- func (ogb *OptionsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ogb *OptionsGroupBy) StringsX(ctx context.Context) []string
- type OptionsMutation
- func (m *OptionsMutation) AddField(name string, value ent.Value) error
- func (m *OptionsMutation) AddedEdges() []string
- func (m *OptionsMutation) AddedField(name string) (ent.Value, bool)
- func (m *OptionsMutation) AddedFields() []string
- func (m *OptionsMutation) AddedIDs(name string) []ent.Value
- func (m *OptionsMutation) ClearEdge(name string) error
- func (m *OptionsMutation) ClearField(name string) error
- func (m *OptionsMutation) ClearedEdges() []string
- func (m *OptionsMutation) ClearedFields() []string
- func (m OptionsMutation) Client() *Client
- func (m *OptionsMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OptionsMutation) EdgeCleared(name string) bool
- func (m *OptionsMutation) Field(name string) (ent.Value, bool)
- func (m *OptionsMutation) FieldCleared(name string) bool
- func (m *OptionsMutation) Fields() []string
- func (m *OptionsMutation) ID() (id int, exists bool)
- func (m *OptionsMutation) Key() (r string, exists bool)
- func (m *OptionsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OptionsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OptionsMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *OptionsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OptionsMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *OptionsMutation) Op() Op
- func (m *OptionsMutation) RemovedEdges() []string
- func (m *OptionsMutation) RemovedIDs(name string) []ent.Value
- func (m *OptionsMutation) ResetCreatedAt()
- func (m *OptionsMutation) ResetEdge(name string) error
- func (m *OptionsMutation) ResetField(name string) error
- func (m *OptionsMutation) ResetKey()
- func (m *OptionsMutation) ResetUpdatedAt()
- func (m *OptionsMutation) ResetValue()
- func (m *OptionsMutation) SetCreatedAt(t time.Time)
- func (m *OptionsMutation) SetField(name string, value ent.Value) error
- func (m *OptionsMutation) SetID(id int)
- func (m *OptionsMutation) SetKey(s string)
- func (m *OptionsMutation) SetUpdatedAt(t time.Time)
- func (m *OptionsMutation) SetValue(s string)
- func (m OptionsMutation) Tx() (*Tx, error)
- func (m *OptionsMutation) Type() string
- func (m *OptionsMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OptionsMutation) Value() (r string, exists bool)
- type OptionsQuery
- func (oq *OptionsQuery) All(ctx context.Context) ([]*Options, error)
- func (oq *OptionsQuery) AllX(ctx context.Context) []*Options
- func (oq *OptionsQuery) Clone() *OptionsQuery
- func (oq *OptionsQuery) Count(ctx context.Context) (int, error)
- func (oq *OptionsQuery) CountX(ctx context.Context) int
- func (oq *OptionsQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OptionsQuery) ExistX(ctx context.Context) bool
- func (oq *OptionsQuery) First(ctx context.Context) (*Options, error)
- func (oq *OptionsQuery) FirstID(ctx context.Context) (id int, err error)
- func (oq *OptionsQuery) FirstX(ctx context.Context) *Options
- func (oq *OptionsQuery) FirstXID(ctx context.Context) int
- func (oq *OptionsQuery) GroupBy(field string, fields ...string) *OptionsGroupBy
- func (oq *OptionsQuery) IDs(ctx context.Context) ([]int, error)
- func (oq *OptionsQuery) IDsX(ctx context.Context) []int
- func (oq *OptionsQuery) Limit(limit int) *OptionsQuery
- func (oq *OptionsQuery) Offset(offset int) *OptionsQuery
- func (oq *OptionsQuery) Only(ctx context.Context) (*Options, error)
- func (oq *OptionsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (oq *OptionsQuery) OnlyIDX(ctx context.Context) int
- func (oq *OptionsQuery) OnlyX(ctx context.Context) *Options
- func (oq *OptionsQuery) Order(o ...OrderFunc) *OptionsQuery
- func (oq *OptionsQuery) Select(field string, fields ...string) *OptionsSelect
- func (oq *OptionsQuery) Where(ps ...predicate.Options) *OptionsQuery
- type OptionsSelect
- func (os *OptionsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (os *OptionsSelect) BoolX(ctx context.Context) bool
- func (os *OptionsSelect) Bools(ctx context.Context) ([]bool, error)
- func (os *OptionsSelect) BoolsX(ctx context.Context) []bool
- func (os *OptionsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (os *OptionsSelect) Float64X(ctx context.Context) float64
- func (os *OptionsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (os *OptionsSelect) Float64sX(ctx context.Context) []float64
- func (os *OptionsSelect) Int(ctx context.Context) (_ int, err error)
- func (os *OptionsSelect) IntX(ctx context.Context) int
- func (os *OptionsSelect) Ints(ctx context.Context) ([]int, error)
- func (os *OptionsSelect) IntsX(ctx context.Context) []int
- func (os *OptionsSelect) Scan(ctx context.Context, v interface{}) error
- func (os *OptionsSelect) ScanX(ctx context.Context, v interface{})
- func (os *OptionsSelect) String(ctx context.Context) (_ string, err error)
- func (os *OptionsSelect) StringX(ctx context.Context) string
- func (os *OptionsSelect) Strings(ctx context.Context) ([]string, error)
- func (os *OptionsSelect) StringsX(ctx context.Context) []string
- type OptionsSlice
- type OptionsUpdate
- func (ou *OptionsUpdate) Exec(ctx context.Context) error
- func (ou *OptionsUpdate) ExecX(ctx context.Context)
- func (ou *OptionsUpdate) Mutation() *OptionsMutation
- func (ou *OptionsUpdate) Save(ctx context.Context) (int, error)
- func (ou *OptionsUpdate) SaveX(ctx context.Context) int
- func (ou *OptionsUpdate) SetKey(s string) *OptionsUpdate
- func (ou *OptionsUpdate) SetUpdatedAt(t time.Time) *OptionsUpdate
- func (ou *OptionsUpdate) SetValue(s string) *OptionsUpdate
- func (ou *OptionsUpdate) Where(ps ...predicate.Options) *OptionsUpdate
- type OptionsUpdateOne
- func (ouo *OptionsUpdateOne) Exec(ctx context.Context) error
- func (ouo *OptionsUpdateOne) ExecX(ctx context.Context)
- func (ouo *OptionsUpdateOne) Mutation() *OptionsMutation
- func (ouo *OptionsUpdateOne) Save(ctx context.Context) (*Options, error)
- func (ouo *OptionsUpdateOne) SaveX(ctx context.Context) *Options
- func (ouo *OptionsUpdateOne) SetKey(s string) *OptionsUpdateOne
- func (ouo *OptionsUpdateOne) SetUpdatedAt(t time.Time) *OptionsUpdateOne
- func (ouo *OptionsUpdateOne) SetValue(s string) *OptionsUpdateOne
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- 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" TypeAdminLoginLog = "AdminLoginLog" TypeCasbinRule = "CasbinRule" TypeMember = "Member" TypeMemberLoginLog = "MemberLoginLog" TypeNoteArticle = "NoteArticle" TypeNoteFilesystem = "NoteFilesystem" TypeOptions = "Options" )
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 validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Admin ¶
type Admin struct { // ID of the ent. ID int `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"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Nickname holds the value of the "nickname" field. Nickname string `json:"nickname,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // Gender holds the value of the "gender" field. Gender int `json:"gender,omitempty"` // Signature holds the value of the "signature" field. Signature string `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AdminQuery when eager-loading is set. Edges AdminEdges `json:"edges"` // contains filtered or unexported fields }
Admin is the model entity for the Admin schema.
func (*Admin) QueryLoginLogs ¶
func (a *Admin) QueryLoginLogs() *AdminLoginLogQuery
QueryLoginLogs queries the loginLogs edge of the Admin.
func (*Admin) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next 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 create builder for Admin.
func (*AdminClient) CreateBulk ¶
func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk
BulkCreate 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 delete builder for the given entity.
func (*AdminClient) DeleteOneID ¶
func (c *AdminClient) DeleteOneID(id int) *AdminDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AdminClient) GetX ¶
func (c *AdminClient) GetX(ctx context.Context, id int) *Admin
GetX is like Get, but panics if an error occurs.
func (*AdminClient) Query ¶
func (c *AdminClient) Query() *AdminQuery
Query returns a query builder for Admin.
func (*AdminClient) QueryLoginLogs ¶
func (c *AdminClient) QueryLoginLogs(a *Admin) *AdminLoginLogQuery
QueryLoginLogs queries the loginLogs edge of a 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 int) *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) AddLoginLogIDs ¶
func (ac *AdminCreate) AddLoginLogIDs(ids ...int) *AdminCreate
AddLoginLogIDs adds the loginLogs edge to AdminLoginLog by ids.
func (*AdminCreate) AddLoginLogs ¶
func (ac *AdminCreate) AddLoginLogs(a ...*AdminLoginLog) *AdminCreate
AddLoginLogs adds the loginLogs edges to AdminLoginLog.
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) SetGender ¶
func (ac *AdminCreate) SetGender(i int) *AdminCreate
SetGender sets the gender field.
func (*AdminCreate) SetID ¶
func (ac *AdminCreate) SetID(i int) *AdminCreate
SetID sets the id field.
func (*AdminCreate) SetNickname ¶
func (ac *AdminCreate) SetNickname(s string) *AdminCreate
SetNickname sets the nickname 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) SetNillableGender ¶
func (ac *AdminCreate) SetNillableGender(i *int) *AdminCreate
SetNillableGender sets the gender field if the given value is not nil.
func (*AdminCreate) SetNillableNickname ¶
func (ac *AdminCreate) SetNillableNickname(s *string) *AdminCreate
SetNillableNickname sets the nickname 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) SetPassword ¶
func (ac *AdminCreate) SetPassword(s string) *AdminCreate
SetPassword sets the password field.
func (*AdminCreate) SetSignature ¶
func (ac *AdminCreate) SetSignature(s string) *AdminCreate
SetSignature sets the signature field.
func (*AdminCreate) SetUpdatedAt ¶
func (ac *AdminCreate) SetUpdatedAt(t time.Time) *AdminCreate
SetUpdatedAt sets the updated_at field.
func (*AdminCreate) SetUsername ¶
func (ac *AdminCreate) SetUsername(s string) *AdminCreate
SetUsername sets the username field.
type AdminCreateBulk ¶
type AdminCreateBulk struct {
// contains filtered or unexported fields
}
AdminCreateBulk is the builder for creating a bulk of Admin entities.
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 adds a new predicate to the delete 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.
type AdminEdges ¶
type AdminEdges struct { // LoginLogs holds the value of the loginLogs edge. LoginLogs []*AdminLoginLog // contains filtered or unexported fields }
AdminEdges holds the relations/edges for other nodes in the graph.
func (AdminEdges) LoginLogsOrErr ¶
func (e AdminEdges) LoginLogsOrErr() ([]*AdminLoginLog, error)
LoginLogsOrErr returns the LoginLogs value or an error if the edge was not loaded in eager-loading.
type AdminGroupBy ¶
type AdminGroupBy struct {
// contains filtered or unexported fields
}
AdminGroupBy is the builder for group-by 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 ¶
func (agb *AdminGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*AdminGroupBy) BoolX ¶
func (agb *AdminGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AdminGroupBy) Bools ¶
func (agb *AdminGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*AdminGroupBy) BoolsX ¶
func (agb *AdminGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AdminGroupBy) Float64 ¶
func (agb *AdminGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*AdminGroupBy) Float64X ¶
func (agb *AdminGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AdminGroupBy) Float64s ¶
func (agb *AdminGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*AdminGroupBy) Float64sX ¶
func (agb *AdminGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AdminGroupBy) Int ¶
func (agb *AdminGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*AdminGroupBy) IntX ¶
func (agb *AdminGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AdminGroupBy) Ints ¶
func (agb *AdminGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*AdminGroupBy) IntsX ¶
func (agb *AdminGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AdminGroupBy) Scan ¶
func (agb *AdminGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*AdminGroupBy) ScanX ¶
func (agb *AdminGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AdminGroupBy) String ¶
func (agb *AdminGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*AdminGroupBy) StringX ¶
func (agb *AdminGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AdminLoginLog ¶
type AdminLoginLog struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // AdminID holds the value of the "admin_id" field. AdminID int `json:"admin_id,omitempty"` // IP holds the value of the "ip" field. IP *string `json:"ip,omitempty"` // UserAgent holds the value of the "user_agent" field. UserAgent *string `json:"user_agent,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AdminLoginLogQuery when eager-loading is set. Edges AdminLoginLogEdges `json:"edges"` // contains filtered or unexported fields }
AdminLoginLog is the model entity for the AdminLoginLog schema.
func (*AdminLoginLog) QueryOwner ¶
func (all *AdminLoginLog) QueryOwner() *AdminQuery
QueryOwner queries the owner edge of the AdminLoginLog.
func (*AdminLoginLog) String ¶
func (all *AdminLoginLog) String() string
String implements the fmt.Stringer.
func (*AdminLoginLog) Unwrap ¶
func (all *AdminLoginLog) Unwrap() *AdminLoginLog
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*AdminLoginLog) Update ¶
func (all *AdminLoginLog) Update() *AdminLoginLogUpdateOne
Update returns a builder for updating this AdminLoginLog. Note that, you need to call AdminLoginLog.Unwrap() before calling this method, if this AdminLoginLog was returned from a transaction, and the transaction was committed or rolled back.
type AdminLoginLogClient ¶
type AdminLoginLogClient struct {
// contains filtered or unexported fields
}
AdminLoginLogClient is a client for the AdminLoginLog schema.
func NewAdminLoginLogClient ¶
func NewAdminLoginLogClient(c config) *AdminLoginLogClient
NewAdminLoginLogClient returns a client for the AdminLoginLog from the given config.
func (*AdminLoginLogClient) Create ¶
func (c *AdminLoginLogClient) Create() *AdminLoginLogCreate
Create returns a create builder for AdminLoginLog.
func (*AdminLoginLogClient) CreateBulk ¶
func (c *AdminLoginLogClient) CreateBulk(builders ...*AdminLoginLogCreate) *AdminLoginLogCreateBulk
BulkCreate returns a builder for creating a bulk of AdminLoginLog entities.
func (*AdminLoginLogClient) Delete ¶
func (c *AdminLoginLogClient) Delete() *AdminLoginLogDelete
Delete returns a delete builder for AdminLoginLog.
func (*AdminLoginLogClient) DeleteOne ¶
func (c *AdminLoginLogClient) DeleteOne(all *AdminLoginLog) *AdminLoginLogDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AdminLoginLogClient) DeleteOneID ¶
func (c *AdminLoginLogClient) DeleteOneID(id int) *AdminLoginLogDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AdminLoginLogClient) Get ¶
func (c *AdminLoginLogClient) Get(ctx context.Context, id int) (*AdminLoginLog, error)
Get returns a AdminLoginLog entity by its id.
func (*AdminLoginLogClient) GetX ¶
func (c *AdminLoginLogClient) GetX(ctx context.Context, id int) *AdminLoginLog
GetX is like Get, but panics if an error occurs.
func (*AdminLoginLogClient) Hooks ¶
func (c *AdminLoginLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AdminLoginLogClient) Query ¶
func (c *AdminLoginLogClient) Query() *AdminLoginLogQuery
Query returns a query builder for AdminLoginLog.
func (*AdminLoginLogClient) QueryOwner ¶
func (c *AdminLoginLogClient) QueryOwner(all *AdminLoginLog) *AdminQuery
QueryOwner queries the owner edge of a AdminLoginLog.
func (*AdminLoginLogClient) Update ¶
func (c *AdminLoginLogClient) Update() *AdminLoginLogUpdate
Update returns an update builder for AdminLoginLog.
func (*AdminLoginLogClient) UpdateOne ¶
func (c *AdminLoginLogClient) UpdateOne(all *AdminLoginLog) *AdminLoginLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AdminLoginLogClient) UpdateOneID ¶
func (c *AdminLoginLogClient) UpdateOneID(id int) *AdminLoginLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AdminLoginLogClient) Use ¶
func (c *AdminLoginLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `adminloginlog.Hooks(f(g(h())))`.
type AdminLoginLogCreate ¶
type AdminLoginLogCreate struct {
// contains filtered or unexported fields
}
AdminLoginLogCreate is the builder for creating a AdminLoginLog entity.
func (*AdminLoginLogCreate) Mutation ¶
func (allc *AdminLoginLogCreate) Mutation() *AdminLoginLogMutation
Mutation returns the AdminLoginLogMutation object of the builder.
func (*AdminLoginLogCreate) Save ¶
func (allc *AdminLoginLogCreate) Save(ctx context.Context) (*AdminLoginLog, error)
Save creates the AdminLoginLog in the database.
func (*AdminLoginLogCreate) SaveX ¶
func (allc *AdminLoginLogCreate) SaveX(ctx context.Context) *AdminLoginLog
SaveX calls Save and panics if Save returns an error.
func (*AdminLoginLogCreate) SetAdminID ¶
func (allc *AdminLoginLogCreate) SetAdminID(i int) *AdminLoginLogCreate
SetAdminID sets the admin_id field.
func (*AdminLoginLogCreate) SetCreateTime ¶
func (allc *AdminLoginLogCreate) SetCreateTime(t time.Time) *AdminLoginLogCreate
SetCreateTime sets the create_time field.
func (*AdminLoginLogCreate) SetID ¶
func (allc *AdminLoginLogCreate) SetID(i int) *AdminLoginLogCreate
SetID sets the id field.
func (*AdminLoginLogCreate) SetIP ¶
func (allc *AdminLoginLogCreate) SetIP(s string) *AdminLoginLogCreate
SetIP sets the ip field.
func (*AdminLoginLogCreate) SetNillableCreateTime ¶
func (allc *AdminLoginLogCreate) SetNillableCreateTime(t *time.Time) *AdminLoginLogCreate
SetNillableCreateTime sets the create_time field if the given value is not nil.
func (*AdminLoginLogCreate) SetNillableIP ¶
func (allc *AdminLoginLogCreate) SetNillableIP(s *string) *AdminLoginLogCreate
SetNillableIP sets the ip field if the given value is not nil.
func (*AdminLoginLogCreate) SetNillableOwnerID ¶
func (allc *AdminLoginLogCreate) SetNillableOwnerID(id *int) *AdminLoginLogCreate
SetNillableOwnerID sets the owner edge to Admin by id if the given value is not nil.
func (*AdminLoginLogCreate) SetNillableUserAgent ¶
func (allc *AdminLoginLogCreate) SetNillableUserAgent(s *string) *AdminLoginLogCreate
SetNillableUserAgent sets the user_agent field if the given value is not nil.
func (*AdminLoginLogCreate) SetOwner ¶
func (allc *AdminLoginLogCreate) SetOwner(a *Admin) *AdminLoginLogCreate
SetOwner sets the owner edge to Admin.
func (*AdminLoginLogCreate) SetOwnerID ¶
func (allc *AdminLoginLogCreate) SetOwnerID(id int) *AdminLoginLogCreate
SetOwnerID sets the owner edge to Admin by id.
func (*AdminLoginLogCreate) SetUserAgent ¶
func (allc *AdminLoginLogCreate) SetUserAgent(s string) *AdminLoginLogCreate
SetUserAgent sets the user_agent field.
type AdminLoginLogCreateBulk ¶
type AdminLoginLogCreateBulk struct {
// contains filtered or unexported fields
}
AdminLoginLogCreateBulk is the builder for creating a bulk of AdminLoginLog entities.
func (*AdminLoginLogCreateBulk) Save ¶
func (allcb *AdminLoginLogCreateBulk) Save(ctx context.Context) ([]*AdminLoginLog, error)
Save creates the AdminLoginLog entities in the database.
func (*AdminLoginLogCreateBulk) SaveX ¶
func (allcb *AdminLoginLogCreateBulk) SaveX(ctx context.Context) []*AdminLoginLog
SaveX calls Save and panics if Save returns an error.
type AdminLoginLogDelete ¶
type AdminLoginLogDelete struct {
// contains filtered or unexported fields
}
AdminLoginLogDelete is the builder for deleting a AdminLoginLog entity.
func (*AdminLoginLogDelete) Exec ¶
func (alld *AdminLoginLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AdminLoginLogDelete) ExecX ¶
func (alld *AdminLoginLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AdminLoginLogDelete) Where ¶
func (alld *AdminLoginLogDelete) Where(ps ...predicate.AdminLoginLog) *AdminLoginLogDelete
Where adds a new predicate to the delete builder.
type AdminLoginLogDeleteOne ¶
type AdminLoginLogDeleteOne struct {
// contains filtered or unexported fields
}
AdminLoginLogDeleteOne is the builder for deleting a single AdminLoginLog entity.
func (*AdminLoginLogDeleteOne) Exec ¶
func (alldo *AdminLoginLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AdminLoginLogDeleteOne) ExecX ¶
func (alldo *AdminLoginLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AdminLoginLogEdges ¶
type AdminLoginLogEdges struct { // Owner holds the value of the owner edge. Owner *Admin // contains filtered or unexported fields }
AdminLoginLogEdges holds the relations/edges for other nodes in the graph.
func (AdminLoginLogEdges) OwnerOrErr ¶
func (e AdminLoginLogEdges) OwnerOrErr() (*Admin, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AdminLoginLogGroupBy ¶
type AdminLoginLogGroupBy struct {
// contains filtered or unexported fields
}
AdminLoginLogGroupBy is the builder for group-by AdminLoginLog entities.
func (*AdminLoginLogGroupBy) Aggregate ¶
func (allgb *AdminLoginLogGroupBy) Aggregate(fns ...AggregateFunc) *AdminLoginLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AdminLoginLogGroupBy) Bool ¶
func (allgb *AdminLoginLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*AdminLoginLogGroupBy) BoolX ¶
func (allgb *AdminLoginLogGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AdminLoginLogGroupBy) Bools ¶
func (allgb *AdminLoginLogGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*AdminLoginLogGroupBy) BoolsX ¶
func (allgb *AdminLoginLogGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AdminLoginLogGroupBy) Float64 ¶
func (allgb *AdminLoginLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*AdminLoginLogGroupBy) Float64X ¶
func (allgb *AdminLoginLogGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AdminLoginLogGroupBy) Float64s ¶
func (allgb *AdminLoginLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*AdminLoginLogGroupBy) Float64sX ¶
func (allgb *AdminLoginLogGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AdminLoginLogGroupBy) Int ¶
func (allgb *AdminLoginLogGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*AdminLoginLogGroupBy) IntX ¶
func (allgb *AdminLoginLogGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AdminLoginLogGroupBy) Ints ¶
func (allgb *AdminLoginLogGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*AdminLoginLogGroupBy) IntsX ¶
func (allgb *AdminLoginLogGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AdminLoginLogGroupBy) Scan ¶
func (allgb *AdminLoginLogGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*AdminLoginLogGroupBy) ScanX ¶
func (allgb *AdminLoginLogGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AdminLoginLogGroupBy) String ¶
func (allgb *AdminLoginLogGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*AdminLoginLogGroupBy) StringX ¶
func (allgb *AdminLoginLogGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AdminLoginLogMutation ¶
type AdminLoginLogMutation struct {
// contains filtered or unexported fields
}
AdminLoginLogMutation represents an operation that mutate the AdminLoginLogs nodes in the graph.
func (*AdminLoginLogMutation) AddAdminID ¶
func (m *AdminLoginLogMutation) AddAdminID(i int)
AddAdminID adds i to admin_id.
func (*AdminLoginLogMutation) AddField ¶
func (m *AdminLoginLogMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AdminLoginLogMutation) AddedAdminID ¶
func (m *AdminLoginLogMutation) AddedAdminID() (r int, exists bool)
AddedAdminID returns the value that was added to the admin_id field in this mutation.
func (*AdminLoginLogMutation) AddedEdges ¶
func (m *AdminLoginLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AdminLoginLogMutation) AddedField ¶
func (m *AdminLoginLogMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*AdminLoginLogMutation) AddedFields ¶
func (m *AdminLoginLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*AdminLoginLogMutation) AddedIDs ¶
func (m *AdminLoginLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*AdminLoginLogMutation) AdminID ¶
func (m *AdminLoginLogMutation) AdminID() (r int, exists bool)
AdminID returns the admin_id value in the mutation.
func (*AdminLoginLogMutation) ClearEdge ¶
func (m *AdminLoginLogMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*AdminLoginLogMutation) ClearField ¶
func (m *AdminLoginLogMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*AdminLoginLogMutation) ClearIP ¶
func (m *AdminLoginLogMutation) ClearIP()
ClearIP clears the value of ip.
func (*AdminLoginLogMutation) ClearOwner ¶
func (m *AdminLoginLogMutation) ClearOwner()
ClearOwner clears the owner edge to Admin.
func (*AdminLoginLogMutation) ClearUserAgent ¶
func (m *AdminLoginLogMutation) ClearUserAgent()
ClearUserAgent clears the value of user_agent.
func (*AdminLoginLogMutation) ClearedEdges ¶
func (m *AdminLoginLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AdminLoginLogMutation) ClearedFields ¶
func (m *AdminLoginLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AdminLoginLogMutation) Client ¶
func (m AdminLoginLogMutation) 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 (*AdminLoginLogMutation) CreateTime ¶
func (m *AdminLoginLogMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the create_time value in the mutation.
func (*AdminLoginLogMutation) EdgeCleared ¶
func (m *AdminLoginLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*AdminLoginLogMutation) Field ¶
func (m *AdminLoginLogMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*AdminLoginLogMutation) FieldCleared ¶
func (m *AdminLoginLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*AdminLoginLogMutation) Fields ¶
func (m *AdminLoginLogMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*AdminLoginLogMutation) ID ¶
func (m *AdminLoginLogMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*AdminLoginLogMutation) IP ¶
func (m *AdminLoginLogMutation) IP() (r string, exists bool)
IP returns the ip value in the mutation.
func (*AdminLoginLogMutation) IPCleared ¶
func (m *AdminLoginLogMutation) IPCleared() bool
IPCleared returns if the field ip was cleared in this mutation.
func (*AdminLoginLogMutation) OldAdminID ¶
func (m *AdminLoginLogMutation) OldAdminID(ctx context.Context) (v int, err error)
OldAdminID returns the old admin_id value of the AdminLoginLog. If the AdminLoginLog 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 database query fails.
func (*AdminLoginLogMutation) OldCreateTime ¶
OldCreateTime returns the old create_time value of the AdminLoginLog. If the AdminLoginLog 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 database query fails.
func (*AdminLoginLogMutation) 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 was failed.
func (*AdminLoginLogMutation) OldIP ¶
func (m *AdminLoginLogMutation) OldIP(ctx context.Context) (v *string, err error)
OldIP returns the old ip value of the AdminLoginLog. If the AdminLoginLog 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 database query fails.
func (*AdminLoginLogMutation) OldUserAgent ¶
func (m *AdminLoginLogMutation) OldUserAgent(ctx context.Context) (v *string, err error)
OldUserAgent returns the old user_agent value of the AdminLoginLog. If the AdminLoginLog 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 database query fails.
func (*AdminLoginLogMutation) Op ¶
func (m *AdminLoginLogMutation) Op() Op
Op returns the operation name.
func (*AdminLoginLogMutation) OwnerCleared ¶
func (m *AdminLoginLogMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*AdminLoginLogMutation) OwnerID ¶
func (m *AdminLoginLogMutation) OwnerID() (id int, exists bool)
OwnerID returns the owner id in the mutation.
func (*AdminLoginLogMutation) OwnerIDs ¶
func (m *AdminLoginLogMutation) OwnerIDs() (ids []int)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*AdminLoginLogMutation) RemovedEdges ¶
func (m *AdminLoginLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AdminLoginLogMutation) RemovedIDs ¶
func (m *AdminLoginLogMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*AdminLoginLogMutation) ResetAdminID ¶
func (m *AdminLoginLogMutation) ResetAdminID()
ResetAdminID reset all changes of the "admin_id" field.
func (*AdminLoginLogMutation) ResetCreateTime ¶
func (m *AdminLoginLogMutation) ResetCreateTime()
ResetCreateTime reset all changes of the "create_time" field.
func (*AdminLoginLogMutation) ResetEdge ¶
func (m *AdminLoginLogMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*AdminLoginLogMutation) ResetField ¶
func (m *AdminLoginLogMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*AdminLoginLogMutation) ResetIP ¶
func (m *AdminLoginLogMutation) ResetIP()
ResetIP reset all changes of the "ip" field.
func (*AdminLoginLogMutation) ResetOwner ¶
func (m *AdminLoginLogMutation) ResetOwner()
ResetOwner reset all changes of the "owner" edge.
func (*AdminLoginLogMutation) ResetUserAgent ¶
func (m *AdminLoginLogMutation) ResetUserAgent()
ResetUserAgent reset all changes of the "user_agent" field.
func (*AdminLoginLogMutation) SetAdminID ¶
func (m *AdminLoginLogMutation) SetAdminID(i int)
SetAdminID sets the admin_id field.
func (*AdminLoginLogMutation) SetCreateTime ¶
func (m *AdminLoginLogMutation) SetCreateTime(t time.Time)
SetCreateTime sets the create_time field.
func (*AdminLoginLogMutation) SetField ¶
func (m *AdminLoginLogMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AdminLoginLogMutation) SetID ¶
func (m *AdminLoginLogMutation) SetID(id int)
SetID sets the value of the id field. Note that, this operation is accepted only on AdminLoginLog creation.
func (*AdminLoginLogMutation) SetIP ¶
func (m *AdminLoginLogMutation) SetIP(s string)
SetIP sets the ip field.
func (*AdminLoginLogMutation) SetOwnerID ¶
func (m *AdminLoginLogMutation) SetOwnerID(id int)
SetOwnerID sets the owner edge to Admin by id.
func (*AdminLoginLogMutation) SetUserAgent ¶
func (m *AdminLoginLogMutation) SetUserAgent(s string)
SetUserAgent sets the user_agent field.
func (AdminLoginLogMutation) Tx ¶
func (m AdminLoginLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AdminLoginLogMutation) Type ¶
func (m *AdminLoginLogMutation) Type() string
Type returns the node type of this mutation (AdminLoginLog).
func (*AdminLoginLogMutation) UserAgent ¶
func (m *AdminLoginLogMutation) UserAgent() (r string, exists bool)
UserAgent returns the user_agent value in the mutation.
func (*AdminLoginLogMutation) UserAgentCleared ¶
func (m *AdminLoginLogMutation) UserAgentCleared() bool
UserAgentCleared returns if the field user_agent was cleared in this mutation.
type AdminLoginLogQuery ¶
type AdminLoginLogQuery struct {
// contains filtered or unexported fields
}
AdminLoginLogQuery is the builder for querying AdminLoginLog entities.
func (*AdminLoginLogQuery) All ¶
func (allq *AdminLoginLogQuery) All(ctx context.Context) ([]*AdminLoginLog, error)
All executes the query and returns a list of AdminLoginLogs.
func (*AdminLoginLogQuery) AllX ¶
func (allq *AdminLoginLogQuery) AllX(ctx context.Context) []*AdminLoginLog
AllX is like All, but panics if an error occurs.
func (*AdminLoginLogQuery) Clone ¶
func (allq *AdminLoginLogQuery) Clone() *AdminLoginLogQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AdminLoginLogQuery) Count ¶
func (allq *AdminLoginLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AdminLoginLogQuery) CountX ¶
func (allq *AdminLoginLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AdminLoginLogQuery) Exist ¶
func (allq *AdminLoginLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AdminLoginLogQuery) ExistX ¶
func (allq *AdminLoginLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AdminLoginLogQuery) First ¶
func (allq *AdminLoginLogQuery) First(ctx context.Context) (*AdminLoginLog, error)
First returns the first AdminLoginLog entity in the query. Returns *NotFoundError when no adminloginlog was found.
func (*AdminLoginLogQuery) FirstID ¶
func (allq *AdminLoginLogQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AdminLoginLog id in the query. Returns *NotFoundError when no id was found.
func (*AdminLoginLogQuery) FirstX ¶
func (allq *AdminLoginLogQuery) FirstX(ctx context.Context) *AdminLoginLog
FirstX is like First, but panics if an error occurs.
func (*AdminLoginLogQuery) FirstXID ¶
func (allq *AdminLoginLogQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*AdminLoginLogQuery) GroupBy ¶
func (allq *AdminLoginLogQuery) GroupBy(field string, fields ...string) *AdminLoginLogGroupBy
GroupBy 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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.AdminLoginLog.Query(). GroupBy(adminloginlog.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AdminLoginLogQuery) IDs ¶
func (allq *AdminLoginLogQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of AdminLoginLog ids.
func (*AdminLoginLogQuery) IDsX ¶
func (allq *AdminLoginLogQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AdminLoginLogQuery) Limit ¶
func (allq *AdminLoginLogQuery) Limit(limit int) *AdminLoginLogQuery
Limit adds a limit step to the query.
func (*AdminLoginLogQuery) Offset ¶
func (allq *AdminLoginLogQuery) Offset(offset int) *AdminLoginLogQuery
Offset adds an offset step to the query.
func (*AdminLoginLogQuery) Only ¶
func (allq *AdminLoginLogQuery) Only(ctx context.Context) (*AdminLoginLog, error)
Only returns the only AdminLoginLog entity in the query, returns an error if not exactly one entity was returned.
func (*AdminLoginLogQuery) OnlyID ¶
func (allq *AdminLoginLogQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only AdminLoginLog id in the query, returns an error if not exactly one id was returned.
func (*AdminLoginLogQuery) OnlyIDX ¶
func (allq *AdminLoginLogQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AdminLoginLogQuery) OnlyX ¶
func (allq *AdminLoginLogQuery) OnlyX(ctx context.Context) *AdminLoginLog
OnlyX is like Only, but panics if an error occurs.
func (*AdminLoginLogQuery) Order ¶
func (allq *AdminLoginLogQuery) Order(o ...OrderFunc) *AdminLoginLogQuery
Order adds an order step to the query.
func (*AdminLoginLogQuery) QueryOwner ¶
func (allq *AdminLoginLogQuery) QueryOwner() *AdminQuery
QueryOwner chains the current query on the owner edge.
func (*AdminLoginLogQuery) Select ¶
func (allq *AdminLoginLogQuery) Select(field string, fields ...string) *AdminLoginLogSelect
Select one or more fields from the given query.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.AdminLoginLog.Query(). Select(adminloginlog.FieldCreateTime). Scan(ctx, &v)
func (*AdminLoginLogQuery) Where ¶
func (allq *AdminLoginLogQuery) Where(ps ...predicate.AdminLoginLog) *AdminLoginLogQuery
Where adds a new predicate for the builder.
func (*AdminLoginLogQuery) WithOwner ¶
func (allq *AdminLoginLogQuery) WithOwner(opts ...func(*AdminQuery)) *AdminLoginLogQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
type AdminLoginLogSelect ¶
type AdminLoginLogSelect struct {
// contains filtered or unexported fields
}
AdminLoginLogSelect is the builder for select fields of AdminLoginLog entities.
func (*AdminLoginLogSelect) Bool ¶
func (alls *AdminLoginLogSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*AdminLoginLogSelect) BoolX ¶
func (alls *AdminLoginLogSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AdminLoginLogSelect) Bools ¶
func (alls *AdminLoginLogSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*AdminLoginLogSelect) BoolsX ¶
func (alls *AdminLoginLogSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AdminLoginLogSelect) Float64 ¶
func (alls *AdminLoginLogSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*AdminLoginLogSelect) Float64X ¶
func (alls *AdminLoginLogSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AdminLoginLogSelect) Float64s ¶
func (alls *AdminLoginLogSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*AdminLoginLogSelect) Float64sX ¶
func (alls *AdminLoginLogSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AdminLoginLogSelect) Int ¶
func (alls *AdminLoginLogSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*AdminLoginLogSelect) IntX ¶
func (alls *AdminLoginLogSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AdminLoginLogSelect) Ints ¶
func (alls *AdminLoginLogSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*AdminLoginLogSelect) IntsX ¶
func (alls *AdminLoginLogSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AdminLoginLogSelect) Scan ¶
func (alls *AdminLoginLogSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*AdminLoginLogSelect) ScanX ¶
func (alls *AdminLoginLogSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AdminLoginLogSelect) String ¶
func (alls *AdminLoginLogSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*AdminLoginLogSelect) StringX ¶
func (alls *AdminLoginLogSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AdminLoginLogUpdate ¶
type AdminLoginLogUpdate struct {
// contains filtered or unexported fields
}
AdminLoginLogUpdate is the builder for updating AdminLoginLog entities.
func (*AdminLoginLogUpdate) AddAdminID ¶
func (allu *AdminLoginLogUpdate) AddAdminID(i int) *AdminLoginLogUpdate
AddAdminID adds i to admin_id.
func (*AdminLoginLogUpdate) ClearIP ¶
func (allu *AdminLoginLogUpdate) ClearIP() *AdminLoginLogUpdate
ClearIP clears the value of ip.
func (*AdminLoginLogUpdate) ClearOwner ¶
func (allu *AdminLoginLogUpdate) ClearOwner() *AdminLoginLogUpdate
ClearOwner clears the "owner" edge to type Admin.
func (*AdminLoginLogUpdate) ClearUserAgent ¶
func (allu *AdminLoginLogUpdate) ClearUserAgent() *AdminLoginLogUpdate
ClearUserAgent clears the value of user_agent.
func (*AdminLoginLogUpdate) Exec ¶
func (allu *AdminLoginLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminLoginLogUpdate) ExecX ¶
func (allu *AdminLoginLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminLoginLogUpdate) Mutation ¶
func (allu *AdminLoginLogUpdate) Mutation() *AdminLoginLogMutation
Mutation returns the AdminLoginLogMutation object of the builder.
func (*AdminLoginLogUpdate) Save ¶
func (allu *AdminLoginLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*AdminLoginLogUpdate) SaveX ¶
func (allu *AdminLoginLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AdminLoginLogUpdate) SetAdminID ¶
func (allu *AdminLoginLogUpdate) SetAdminID(i int) *AdminLoginLogUpdate
SetAdminID sets the admin_id field.
func (*AdminLoginLogUpdate) SetIP ¶
func (allu *AdminLoginLogUpdate) SetIP(s string) *AdminLoginLogUpdate
SetIP sets the ip field.
func (*AdminLoginLogUpdate) SetNillableIP ¶
func (allu *AdminLoginLogUpdate) SetNillableIP(s *string) *AdminLoginLogUpdate
SetNillableIP sets the ip field if the given value is not nil.
func (*AdminLoginLogUpdate) SetNillableOwnerID ¶
func (allu *AdminLoginLogUpdate) SetNillableOwnerID(id *int) *AdminLoginLogUpdate
SetNillableOwnerID sets the owner edge to Admin by id if the given value is not nil.
func (*AdminLoginLogUpdate) SetNillableUserAgent ¶
func (allu *AdminLoginLogUpdate) SetNillableUserAgent(s *string) *AdminLoginLogUpdate
SetNillableUserAgent sets the user_agent field if the given value is not nil.
func (*AdminLoginLogUpdate) SetOwner ¶
func (allu *AdminLoginLogUpdate) SetOwner(a *Admin) *AdminLoginLogUpdate
SetOwner sets the owner edge to Admin.
func (*AdminLoginLogUpdate) SetOwnerID ¶
func (allu *AdminLoginLogUpdate) SetOwnerID(id int) *AdminLoginLogUpdate
SetOwnerID sets the owner edge to Admin by id.
func (*AdminLoginLogUpdate) SetUserAgent ¶
func (allu *AdminLoginLogUpdate) SetUserAgent(s string) *AdminLoginLogUpdate
SetUserAgent sets the user_agent field.
func (*AdminLoginLogUpdate) Where ¶
func (allu *AdminLoginLogUpdate) Where(ps ...predicate.AdminLoginLog) *AdminLoginLogUpdate
Where adds a new predicate for the builder.
type AdminLoginLogUpdateOne ¶
type AdminLoginLogUpdateOne struct {
// contains filtered or unexported fields
}
AdminLoginLogUpdateOne is the builder for updating a single AdminLoginLog entity.
func (*AdminLoginLogUpdateOne) AddAdminID ¶
func (alluo *AdminLoginLogUpdateOne) AddAdminID(i int) *AdminLoginLogUpdateOne
AddAdminID adds i to admin_id.
func (*AdminLoginLogUpdateOne) ClearIP ¶
func (alluo *AdminLoginLogUpdateOne) ClearIP() *AdminLoginLogUpdateOne
ClearIP clears the value of ip.
func (*AdminLoginLogUpdateOne) ClearOwner ¶
func (alluo *AdminLoginLogUpdateOne) ClearOwner() *AdminLoginLogUpdateOne
ClearOwner clears the "owner" edge to type Admin.
func (*AdminLoginLogUpdateOne) ClearUserAgent ¶
func (alluo *AdminLoginLogUpdateOne) ClearUserAgent() *AdminLoginLogUpdateOne
ClearUserAgent clears the value of user_agent.
func (*AdminLoginLogUpdateOne) Exec ¶
func (alluo *AdminLoginLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AdminLoginLogUpdateOne) ExecX ¶
func (alluo *AdminLoginLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminLoginLogUpdateOne) Mutation ¶
func (alluo *AdminLoginLogUpdateOne) Mutation() *AdminLoginLogMutation
Mutation returns the AdminLoginLogMutation object of the builder.
func (*AdminLoginLogUpdateOne) Save ¶
func (alluo *AdminLoginLogUpdateOne) Save(ctx context.Context) (*AdminLoginLog, error)
Save executes the query and returns the updated entity.
func (*AdminLoginLogUpdateOne) SaveX ¶
func (alluo *AdminLoginLogUpdateOne) SaveX(ctx context.Context) *AdminLoginLog
SaveX is like Save, but panics if an error occurs.
func (*AdminLoginLogUpdateOne) SetAdminID ¶
func (alluo *AdminLoginLogUpdateOne) SetAdminID(i int) *AdminLoginLogUpdateOne
SetAdminID sets the admin_id field.
func (*AdminLoginLogUpdateOne) SetIP ¶
func (alluo *AdminLoginLogUpdateOne) SetIP(s string) *AdminLoginLogUpdateOne
SetIP sets the ip field.
func (*AdminLoginLogUpdateOne) SetNillableIP ¶
func (alluo *AdminLoginLogUpdateOne) SetNillableIP(s *string) *AdminLoginLogUpdateOne
SetNillableIP sets the ip field if the given value is not nil.
func (*AdminLoginLogUpdateOne) SetNillableOwnerID ¶
func (alluo *AdminLoginLogUpdateOne) SetNillableOwnerID(id *int) *AdminLoginLogUpdateOne
SetNillableOwnerID sets the owner edge to Admin by id if the given value is not nil.
func (*AdminLoginLogUpdateOne) SetNillableUserAgent ¶
func (alluo *AdminLoginLogUpdateOne) SetNillableUserAgent(s *string) *AdminLoginLogUpdateOne
SetNillableUserAgent sets the user_agent field if the given value is not nil.
func (*AdminLoginLogUpdateOne) SetOwner ¶
func (alluo *AdminLoginLogUpdateOne) SetOwner(a *Admin) *AdminLoginLogUpdateOne
SetOwner sets the owner edge to Admin.
func (*AdminLoginLogUpdateOne) SetOwnerID ¶
func (alluo *AdminLoginLogUpdateOne) SetOwnerID(id int) *AdminLoginLogUpdateOne
SetOwnerID sets the owner edge to Admin by id.
func (*AdminLoginLogUpdateOne) SetUserAgent ¶
func (alluo *AdminLoginLogUpdateOne) SetUserAgent(s string) *AdminLoginLogUpdateOne
SetUserAgent sets the user_agent field.
type AdminLoginLogs ¶
type AdminLoginLogs []*AdminLoginLog
AdminLoginLogs is a parsable slice of AdminLoginLog.
type AdminMutation ¶
type AdminMutation struct {
// contains filtered or unexported fields
}
AdminMutation represents an operation that mutate the Admins nodes in the graph.
func (*AdminMutation) AddField ¶
func (m *AdminMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AdminMutation) AddGender ¶
func (m *AdminMutation) AddGender(i int)
AddGender adds i to gender.
func (*AdminMutation) AddLoginLogIDs ¶
func (m *AdminMutation) AddLoginLogIDs(ids ...int)
AddLoginLogIDs adds the loginLogs edge to AdminLoginLog by ids.
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 in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*AdminMutation) AddedFields ¶
func (m *AdminMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*AdminMutation) AddedGender ¶
func (m *AdminMutation) AddedGender() (r int, exists bool)
AddedGender returns the value that was added to the gender field in 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.
func (*AdminMutation) ClearEdge ¶
func (m *AdminMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*AdminMutation) ClearField ¶
func (m *AdminMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*AdminMutation) ClearGender ¶
func (m *AdminMutation) ClearGender()
ClearGender clears the value of gender.
func (*AdminMutation) ClearLoginLogs ¶
func (m *AdminMutation) ClearLoginLogs()
ClearLoginLogs clears the loginLogs edge to AdminLoginLog.
func (*AdminMutation) ClearNickname ¶
func (m *AdminMutation) ClearNickname()
ClearNickname clears the value of nickname.
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 created_at value in the mutation.
func (*AdminMutation) EdgeCleared ¶
func (m *AdminMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge 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 value indicates that this field was not set, or was not define in the schema.
func (*AdminMutation) FieldCleared ¶
func (m *AdminMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field 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 in/decremented, call AddedFields().
func (*AdminMutation) Gender ¶
func (m *AdminMutation) Gender() (r int, exists bool)
Gender returns the gender value in the mutation.
func (*AdminMutation) GenderCleared ¶
func (m *AdminMutation) GenderCleared() bool
GenderCleared returns if the field gender was cleared in this mutation.
func (*AdminMutation) ID ¶
func (m *AdminMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*AdminMutation) LoginLogsCleared ¶
func (m *AdminMutation) LoginLogsCleared() bool
LoginLogsCleared returns if the edge loginLogs was cleared.
func (*AdminMutation) LoginLogsIDs ¶
func (m *AdminMutation) LoginLogsIDs() (ids []int)
LoginLogsIDs returns the loginLogs ids in the mutation.
func (*AdminMutation) Nickname ¶
func (m *AdminMutation) Nickname() (r string, exists bool)
Nickname returns the nickname value in the mutation.
func (*AdminMutation) NicknameCleared ¶
func (m *AdminMutation) NicknameCleared() bool
NicknameCleared returns if the field nickname was cleared in this mutation.
func (*AdminMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Admin. 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 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 was failed.
func (*AdminMutation) OldGender ¶
func (m *AdminMutation) OldGender(ctx context.Context) (v int, err error)
OldGender returns the old gender value of the Admin. 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 database query fails.
func (*AdminMutation) OldNickname ¶
func (m *AdminMutation) OldNickname(ctx context.Context) (v string, err error)
OldNickname returns the old nickname value of the Admin. 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 database query fails.
func (*AdminMutation) OldPassword ¶
func (m *AdminMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old password value of the Admin. 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 database query fails.
func (*AdminMutation) OldSignature ¶
func (m *AdminMutation) OldSignature(ctx context.Context) (v string, err error)
OldSignature returns the old signature value of the Admin. 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 database query fails.
func (*AdminMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Admin. 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 database query fails.
func (*AdminMutation) OldUsername ¶
func (m *AdminMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old username value of the Admin. 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 database query fails.
func (*AdminMutation) Password ¶
func (m *AdminMutation) Password() (r string, exists bool)
Password returns the password value in the mutation.
func (*AdminMutation) RemoveLoginLogIDs ¶
func (m *AdminMutation) RemoveLoginLogIDs(ids ...int)
RemoveLoginLogIDs removes the loginLogs edge to AdminLoginLog by ids.
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 given edge name.
func (*AdminMutation) RemovedLoginLogsIDs ¶
func (m *AdminMutation) RemovedLoginLogsIDs() (ids []int)
RemovedLoginLogs returns the removed ids of loginLogs.
func (*AdminMutation) ResetCreatedAt ¶
func (m *AdminMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*AdminMutation) ResetEdge ¶
func (m *AdminMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. 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 regarding the given field name. It returns an error if the field is not defined in the schema.
func (*AdminMutation) ResetGender ¶
func (m *AdminMutation) ResetGender()
ResetGender reset all changes of the "gender" field.
func (*AdminMutation) ResetLoginLogs ¶
func (m *AdminMutation) ResetLoginLogs()
ResetLoginLogs reset all changes of the "loginLogs" edge.
func (*AdminMutation) ResetNickname ¶
func (m *AdminMutation) ResetNickname()
ResetNickname reset all changes of the "nickname" field.
func (*AdminMutation) ResetPassword ¶
func (m *AdminMutation) ResetPassword()
ResetPassword reset all changes of the "password" field.
func (*AdminMutation) ResetSignature ¶
func (m *AdminMutation) ResetSignature()
ResetSignature reset all changes of the "signature" field.
func (*AdminMutation) ResetUpdatedAt ¶
func (m *AdminMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*AdminMutation) ResetUsername ¶
func (m *AdminMutation) ResetUsername()
ResetUsername reset all changes of the "username" 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 for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AdminMutation) SetGender ¶
func (m *AdminMutation) SetGender(i int)
SetGender sets the gender field.
func (*AdminMutation) SetID ¶
func (m *AdminMutation) SetID(id int)
SetID sets the value of the id field. Note that, this operation is accepted only on Admin creation.
func (*AdminMutation) SetNickname ¶
func (m *AdminMutation) SetNickname(s string)
SetNickname sets the nickname field.
func (*AdminMutation) SetPassword ¶
func (m *AdminMutation) SetPassword(s string)
SetPassword sets the password field.
func (*AdminMutation) SetSignature ¶
func (m *AdminMutation) SetSignature(s string)
SetSignature sets the signature field.
func (*AdminMutation) SetUpdatedAt ¶
func (m *AdminMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*AdminMutation) SetUsername ¶
func (m *AdminMutation) SetUsername(s string)
SetUsername sets the username field.
func (*AdminMutation) Signature ¶
func (m *AdminMutation) Signature() (r string, exists bool)
Signature returns the signature value in the mutation.
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 updated_at value in the mutation.
func (*AdminMutation) Username ¶
func (m *AdminMutation) Username() (r string, exists bool)
Username returns the username value in the mutation.
type AdminQuery ¶
type AdminQuery struct {
// contains filtered or unexported fields
}
AdminQuery is the builder for querying Admin entities.
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 query 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 in the query. Returns *NotFoundError when no admin was found.
func (*AdminQuery) FirstID ¶
func (aq *AdminQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Admin id in the query. Returns *NotFoundError when no id was found.
func (*AdminQuery) FirstX ¶
func (aq *AdminQuery) FirstX(ctx context.Context) *Admin
FirstX is like First, but panics if an error occurs.
func (*AdminQuery) FirstXID ¶
func (aq *AdminQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*AdminQuery) GroupBy ¶
func (aq *AdminQuery) GroupBy(field string, fields ...string) *AdminGroupBy
GroupBy 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) IDs ¶
func (aq *AdminQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Admin ids.
func (*AdminQuery) IDsX ¶
func (aq *AdminQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AdminQuery) Limit ¶
func (aq *AdminQuery) Limit(limit int) *AdminQuery
Limit adds a limit step to the query.
func (*AdminQuery) Offset ¶
func (aq *AdminQuery) Offset(offset int) *AdminQuery
Offset adds an offset step to the query.
func (*AdminQuery) Only ¶
func (aq *AdminQuery) Only(ctx context.Context) (*Admin, error)
Only returns the only Admin entity in the query, returns an error if not exactly one entity was returned.
func (*AdminQuery) OnlyID ¶
func (aq *AdminQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Admin id in the query, returns an error if not exactly one id was returned.
func (*AdminQuery) OnlyIDX ¶
func (aq *AdminQuery) OnlyIDX(ctx context.Context) int
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 adds an order step to the query.
func (*AdminQuery) QueryLoginLogs ¶
func (aq *AdminQuery) QueryLoginLogs() *AdminLoginLogQuery
QueryLoginLogs chains the current query on the loginLogs edge.
func (*AdminQuery) Select ¶
func (aq *AdminQuery) Select(field string, fields ...string) *AdminSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Admin.Query(). Select(admin.FieldCreatedAt). Scan(ctx, &v)
func (*AdminQuery) Where ¶
func (aq *AdminQuery) Where(ps ...predicate.Admin) *AdminQuery
Where adds a new predicate for the builder.
func (*AdminQuery) WithLoginLogs ¶
func (aq *AdminQuery) WithLoginLogs(opts ...func(*AdminLoginLogQuery)) *AdminQuery
WithLoginLogs tells the query-builder to eager-loads the nodes that are connected to
the "loginLogs" edge. The optional arguments used to configure the query builder of the edge.
type AdminSelect ¶
type AdminSelect struct {
// contains filtered or unexported fields
}
AdminSelect is the builder for select fields of Admin entities.
func (*AdminSelect) Bool ¶
func (as *AdminSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*AdminSelect) BoolX ¶
func (as *AdminSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AdminSelect) Bools ¶
func (as *AdminSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*AdminSelect) BoolsX ¶
func (as *AdminSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AdminSelect) Float64 ¶
func (as *AdminSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*AdminSelect) Float64X ¶
func (as *AdminSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AdminSelect) Float64s ¶
func (as *AdminSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*AdminSelect) Float64sX ¶
func (as *AdminSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AdminSelect) Int ¶
func (as *AdminSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*AdminSelect) IntX ¶
func (as *AdminSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AdminSelect) Ints ¶
func (as *AdminSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*AdminSelect) IntsX ¶
func (as *AdminSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AdminSelect) Scan ¶
func (as *AdminSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*AdminSelect) ScanX ¶
func (as *AdminSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AdminSelect) String ¶
func (as *AdminSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*AdminSelect) StringX ¶
func (as *AdminSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AdminUpdate ¶
type AdminUpdate struct {
// contains filtered or unexported fields
}
AdminUpdate is the builder for updating Admin entities.
func (*AdminUpdate) AddGender ¶
func (au *AdminUpdate) AddGender(i int) *AdminUpdate
AddGender adds i to gender.
func (*AdminUpdate) AddLoginLogIDs ¶
func (au *AdminUpdate) AddLoginLogIDs(ids ...int) *AdminUpdate
AddLoginLogIDs adds the loginLogs edge to AdminLoginLog by ids.
func (*AdminUpdate) AddLoginLogs ¶
func (au *AdminUpdate) AddLoginLogs(a ...*AdminLoginLog) *AdminUpdate
AddLoginLogs adds the loginLogs edges to AdminLoginLog.
func (*AdminUpdate) ClearGender ¶
func (au *AdminUpdate) ClearGender() *AdminUpdate
ClearGender clears the value of gender.
func (*AdminUpdate) ClearLoginLogs ¶
func (au *AdminUpdate) ClearLoginLogs() *AdminUpdate
ClearLoginLogs clears all "loginLogs" edges to type AdminLoginLog.
func (*AdminUpdate) ClearNickname ¶
func (au *AdminUpdate) ClearNickname() *AdminUpdate
ClearNickname clears the value of nickname.
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) RemoveLoginLogIDs ¶
func (au *AdminUpdate) RemoveLoginLogIDs(ids ...int) *AdminUpdate
RemoveLoginLogIDs removes the loginLogs edge to AdminLoginLog by ids.
func (*AdminUpdate) RemoveLoginLogs ¶
func (au *AdminUpdate) RemoveLoginLogs(a ...*AdminLoginLog) *AdminUpdate
RemoveLoginLogs removes loginLogs edges to AdminLoginLog.
func (*AdminUpdate) Save ¶
func (au *AdminUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*AdminUpdate) SaveX ¶
func (au *AdminUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AdminUpdate) SetGender ¶
func (au *AdminUpdate) SetGender(i int) *AdminUpdate
SetGender sets the gender field.
func (*AdminUpdate) SetNickname ¶
func (au *AdminUpdate) SetNickname(s string) *AdminUpdate
SetNickname sets the nickname field.
func (*AdminUpdate) SetNillableGender ¶
func (au *AdminUpdate) SetNillableGender(i *int) *AdminUpdate
SetNillableGender sets the gender field if the given value is not nil.
func (*AdminUpdate) SetNillableNickname ¶
func (au *AdminUpdate) SetNillableNickname(s *string) *AdminUpdate
SetNillableNickname sets the nickname field if the given value is not nil.
func (*AdminUpdate) SetPassword ¶
func (au *AdminUpdate) SetPassword(s string) *AdminUpdate
SetPassword sets the password field.
func (*AdminUpdate) SetSignature ¶
func (au *AdminUpdate) SetSignature(s string) *AdminUpdate
SetSignature sets the signature field.
func (*AdminUpdate) SetUpdatedAt ¶
func (au *AdminUpdate) SetUpdatedAt(t time.Time) *AdminUpdate
SetUpdatedAt sets the updated_at field.
func (*AdminUpdate) SetUsername ¶
func (au *AdminUpdate) SetUsername(s string) *AdminUpdate
SetUsername sets the username field.
func (*AdminUpdate) Where ¶
func (au *AdminUpdate) Where(ps ...predicate.Admin) *AdminUpdate
Where adds a new predicate for the builder.
type AdminUpdateOne ¶
type AdminUpdateOne struct {
// contains filtered or unexported fields
}
AdminUpdateOne is the builder for updating a single Admin entity.
func (*AdminUpdateOne) AddGender ¶
func (auo *AdminUpdateOne) AddGender(i int) *AdminUpdateOne
AddGender adds i to gender.
func (*AdminUpdateOne) AddLoginLogIDs ¶
func (auo *AdminUpdateOne) AddLoginLogIDs(ids ...int) *AdminUpdateOne
AddLoginLogIDs adds the loginLogs edge to AdminLoginLog by ids.
func (*AdminUpdateOne) AddLoginLogs ¶
func (auo *AdminUpdateOne) AddLoginLogs(a ...*AdminLoginLog) *AdminUpdateOne
AddLoginLogs adds the loginLogs edges to AdminLoginLog.
func (*AdminUpdateOne) ClearGender ¶
func (auo *AdminUpdateOne) ClearGender() *AdminUpdateOne
ClearGender clears the value of gender.
func (*AdminUpdateOne) ClearLoginLogs ¶
func (auo *AdminUpdateOne) ClearLoginLogs() *AdminUpdateOne
ClearLoginLogs clears all "loginLogs" edges to type AdminLoginLog.
func (*AdminUpdateOne) ClearNickname ¶
func (auo *AdminUpdateOne) ClearNickname() *AdminUpdateOne
ClearNickname clears the value of nickname.
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) RemoveLoginLogIDs ¶
func (auo *AdminUpdateOne) RemoveLoginLogIDs(ids ...int) *AdminUpdateOne
RemoveLoginLogIDs removes the loginLogs edge to AdminLoginLog by ids.
func (*AdminUpdateOne) RemoveLoginLogs ¶
func (auo *AdminUpdateOne) RemoveLoginLogs(a ...*AdminLoginLog) *AdminUpdateOne
RemoveLoginLogs removes loginLogs edges to AdminLoginLog.
func (*AdminUpdateOne) Save ¶
func (auo *AdminUpdateOne) Save(ctx context.Context) (*Admin, error)
Save executes the query and returns the updated entity.
func (*AdminUpdateOne) SaveX ¶
func (auo *AdminUpdateOne) SaveX(ctx context.Context) *Admin
SaveX is like Save, but panics if an error occurs.
func (*AdminUpdateOne) SetGender ¶
func (auo *AdminUpdateOne) SetGender(i int) *AdminUpdateOne
SetGender sets the gender field.
func (*AdminUpdateOne) SetNickname ¶
func (auo *AdminUpdateOne) SetNickname(s string) *AdminUpdateOne
SetNickname sets the nickname field.
func (*AdminUpdateOne) SetNillableGender ¶
func (auo *AdminUpdateOne) SetNillableGender(i *int) *AdminUpdateOne
SetNillableGender sets the gender field if the given value is not nil.
func (*AdminUpdateOne) SetNillableNickname ¶
func (auo *AdminUpdateOne) SetNillableNickname(s *string) *AdminUpdateOne
SetNillableNickname sets the nickname field if the given value is not nil.
func (*AdminUpdateOne) SetPassword ¶
func (auo *AdminUpdateOne) SetPassword(s string) *AdminUpdateOne
SetPassword sets the password field.
func (*AdminUpdateOne) SetSignature ¶
func (auo *AdminUpdateOne) SetSignature(s string) *AdminUpdateOne
SetSignature sets the signature field.
func (*AdminUpdateOne) SetUpdatedAt ¶
func (auo *AdminUpdateOne) SetUpdatedAt(t time.Time) *AdminUpdateOne
SetUpdatedAt sets the updated_at field.
func (*AdminUpdateOne) SetUsername ¶
func (auo *AdminUpdateOne) SetUsername(s string) *AdminUpdateOne
SetUsername sets the username field.
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 CasbinRule ¶
type CasbinRule struct { // ID of the ent. ID int `json:"id,omitempty"` // PType holds the value of the "p_type" field. PType string `json:"-"` // V0 holds the value of the "v0" field. V0 string `json:"-"` // V1 holds the value of the "v1" field. V1 string `json:"-"` // V2 holds the value of the "v2" field. V2 string `json:"-"` // V3 holds the value of the "v3" field. V3 string `json:"-"` // V4 holds the value of the "v4" field. V4 string `json:"-"` // V5 holds the value of the "v5" field. V5 string `json:"-"` // contains filtered or unexported fields }
CasbinRule is the model entity for the CasbinRule schema.
func (*CasbinRule) String ¶
func (cr *CasbinRule) String() string
String implements the fmt.Stringer.
func (*CasbinRule) Unwrap ¶
func (cr *CasbinRule) Unwrap() *CasbinRule
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*CasbinRule) Update ¶
func (cr *CasbinRule) Update() *CasbinRuleUpdateOne
Update returns a builder for updating this CasbinRule. Note that, you need to call CasbinRule.Unwrap() before calling this method, if this CasbinRule was returned from a transaction, and the transaction was committed or rolled back.
type CasbinRuleClient ¶
type CasbinRuleClient struct {
// contains filtered or unexported fields
}
CasbinRuleClient is a client for the CasbinRule schema.
func NewCasbinRuleClient ¶
func NewCasbinRuleClient(c config) *CasbinRuleClient
NewCasbinRuleClient returns a client for the CasbinRule from the given config.
func (*CasbinRuleClient) Create ¶
func (c *CasbinRuleClient) Create() *CasbinRuleCreate
Create returns a create builder for CasbinRule.
func (*CasbinRuleClient) CreateBulk ¶
func (c *CasbinRuleClient) CreateBulk(builders ...*CasbinRuleCreate) *CasbinRuleCreateBulk
BulkCreate returns a builder for creating a bulk of CasbinRule entities.
func (*CasbinRuleClient) Delete ¶
func (c *CasbinRuleClient) Delete() *CasbinRuleDelete
Delete returns a delete builder for CasbinRule.
func (*CasbinRuleClient) DeleteOne ¶
func (c *CasbinRuleClient) DeleteOne(cr *CasbinRule) *CasbinRuleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*CasbinRuleClient) DeleteOneID ¶
func (c *CasbinRuleClient) DeleteOneID(id int) *CasbinRuleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*CasbinRuleClient) Get ¶
func (c *CasbinRuleClient) Get(ctx context.Context, id int) (*CasbinRule, error)
Get returns a CasbinRule entity by its id.
func (*CasbinRuleClient) GetX ¶
func (c *CasbinRuleClient) GetX(ctx context.Context, id int) *CasbinRule
GetX is like Get, but panics if an error occurs.
func (*CasbinRuleClient) Hooks ¶
func (c *CasbinRuleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CasbinRuleClient) Query ¶
func (c *CasbinRuleClient) Query() *CasbinRuleQuery
Query returns a query builder for CasbinRule.
func (*CasbinRuleClient) Update ¶
func (c *CasbinRuleClient) Update() *CasbinRuleUpdate
Update returns an update builder for CasbinRule.
func (*CasbinRuleClient) UpdateOne ¶
func (c *CasbinRuleClient) UpdateOne(cr *CasbinRule) *CasbinRuleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CasbinRuleClient) UpdateOneID ¶
func (c *CasbinRuleClient) UpdateOneID(id int) *CasbinRuleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CasbinRuleClient) Use ¶
func (c *CasbinRuleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `casbinrule.Hooks(f(g(h())))`.
type CasbinRuleCreate ¶
type CasbinRuleCreate struct {
// contains filtered or unexported fields
}
CasbinRuleCreate is the builder for creating a CasbinRule entity.
func (*CasbinRuleCreate) Mutation ¶
func (crc *CasbinRuleCreate) Mutation() *CasbinRuleMutation
Mutation returns the CasbinRuleMutation object of the builder.
func (*CasbinRuleCreate) Save ¶
func (crc *CasbinRuleCreate) Save(ctx context.Context) (*CasbinRule, error)
Save creates the CasbinRule in the database.
func (*CasbinRuleCreate) SaveX ¶
func (crc *CasbinRuleCreate) SaveX(ctx context.Context) *CasbinRule
SaveX calls Save and panics if Save returns an error.
func (*CasbinRuleCreate) SetPType ¶
func (crc *CasbinRuleCreate) SetPType(s string) *CasbinRuleCreate
SetPType sets the p_type field.
func (*CasbinRuleCreate) SetV0 ¶
func (crc *CasbinRuleCreate) SetV0(s string) *CasbinRuleCreate
SetV0 sets the v0 field.
func (*CasbinRuleCreate) SetV1 ¶
func (crc *CasbinRuleCreate) SetV1(s string) *CasbinRuleCreate
SetV1 sets the v1 field.
func (*CasbinRuleCreate) SetV2 ¶
func (crc *CasbinRuleCreate) SetV2(s string) *CasbinRuleCreate
SetV2 sets the v2 field.
func (*CasbinRuleCreate) SetV3 ¶
func (crc *CasbinRuleCreate) SetV3(s string) *CasbinRuleCreate
SetV3 sets the v3 field.
func (*CasbinRuleCreate) SetV4 ¶
func (crc *CasbinRuleCreate) SetV4(s string) *CasbinRuleCreate
SetV4 sets the v4 field.
func (*CasbinRuleCreate) SetV5 ¶
func (crc *CasbinRuleCreate) SetV5(s string) *CasbinRuleCreate
SetV5 sets the v5 field.
type CasbinRuleCreateBulk ¶
type CasbinRuleCreateBulk struct {
// contains filtered or unexported fields
}
CasbinRuleCreateBulk is the builder for creating a bulk of CasbinRule entities.
func (*CasbinRuleCreateBulk) Save ¶
func (crcb *CasbinRuleCreateBulk) Save(ctx context.Context) ([]*CasbinRule, error)
Save creates the CasbinRule entities in the database.
func (*CasbinRuleCreateBulk) SaveX ¶
func (crcb *CasbinRuleCreateBulk) SaveX(ctx context.Context) []*CasbinRule
SaveX calls Save and panics if Save returns an error.
type CasbinRuleDelete ¶
type CasbinRuleDelete struct {
// contains filtered or unexported fields
}
CasbinRuleDelete is the builder for deleting a CasbinRule entity.
func (*CasbinRuleDelete) Exec ¶
func (crd *CasbinRuleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CasbinRuleDelete) ExecX ¶
func (crd *CasbinRuleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CasbinRuleDelete) Where ¶
func (crd *CasbinRuleDelete) Where(ps ...predicate.CasbinRule) *CasbinRuleDelete
Where adds a new predicate to the delete builder.
type CasbinRuleDeleteOne ¶
type CasbinRuleDeleteOne struct {
// contains filtered or unexported fields
}
CasbinRuleDeleteOne is the builder for deleting a single CasbinRule entity.
func (*CasbinRuleDeleteOne) Exec ¶
func (crdo *CasbinRuleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CasbinRuleDeleteOne) ExecX ¶
func (crdo *CasbinRuleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CasbinRuleGroupBy ¶
type CasbinRuleGroupBy struct {
// contains filtered or unexported fields
}
CasbinRuleGroupBy is the builder for group-by CasbinRule entities.
func (*CasbinRuleGroupBy) Aggregate ¶
func (crgb *CasbinRuleGroupBy) Aggregate(fns ...AggregateFunc) *CasbinRuleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CasbinRuleGroupBy) Bool ¶
func (crgb *CasbinRuleGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*CasbinRuleGroupBy) BoolX ¶
func (crgb *CasbinRuleGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*CasbinRuleGroupBy) Bools ¶
func (crgb *CasbinRuleGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*CasbinRuleGroupBy) BoolsX ¶
func (crgb *CasbinRuleGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CasbinRuleGroupBy) Float64 ¶
func (crgb *CasbinRuleGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*CasbinRuleGroupBy) Float64X ¶
func (crgb *CasbinRuleGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*CasbinRuleGroupBy) Float64s ¶
func (crgb *CasbinRuleGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*CasbinRuleGroupBy) Float64sX ¶
func (crgb *CasbinRuleGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CasbinRuleGroupBy) Int ¶
func (crgb *CasbinRuleGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*CasbinRuleGroupBy) IntX ¶
func (crgb *CasbinRuleGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*CasbinRuleGroupBy) Ints ¶
func (crgb *CasbinRuleGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*CasbinRuleGroupBy) IntsX ¶
func (crgb *CasbinRuleGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CasbinRuleGroupBy) Scan ¶
func (crgb *CasbinRuleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*CasbinRuleGroupBy) ScanX ¶
func (crgb *CasbinRuleGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*CasbinRuleGroupBy) String ¶
func (crgb *CasbinRuleGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*CasbinRuleGroupBy) StringX ¶
func (crgb *CasbinRuleGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type CasbinRuleMutation ¶
type CasbinRuleMutation struct {
// contains filtered or unexported fields
}
CasbinRuleMutation represents an operation that mutate the CasbinRules nodes in the graph.
func (*CasbinRuleMutation) AddField ¶
func (m *CasbinRuleMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*CasbinRuleMutation) AddedEdges ¶
func (m *CasbinRuleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CasbinRuleMutation) AddedField ¶
func (m *CasbinRuleMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*CasbinRuleMutation) AddedFields ¶
func (m *CasbinRuleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*CasbinRuleMutation) AddedIDs ¶
func (m *CasbinRuleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*CasbinRuleMutation) ClearEdge ¶
func (m *CasbinRuleMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*CasbinRuleMutation) ClearField ¶
func (m *CasbinRuleMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*CasbinRuleMutation) ClearedEdges ¶
func (m *CasbinRuleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CasbinRuleMutation) ClearedFields ¶
func (m *CasbinRuleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CasbinRuleMutation) Client ¶
func (m CasbinRuleMutation) 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 (*CasbinRuleMutation) EdgeCleared ¶
func (m *CasbinRuleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*CasbinRuleMutation) Field ¶
func (m *CasbinRuleMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*CasbinRuleMutation) FieldCleared ¶
func (m *CasbinRuleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*CasbinRuleMutation) Fields ¶
func (m *CasbinRuleMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*CasbinRuleMutation) ID ¶
func (m *CasbinRuleMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*CasbinRuleMutation) 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 was failed.
func (*CasbinRuleMutation) OldPType ¶
func (m *CasbinRuleMutation) OldPType(ctx context.Context) (v string, err error)
OldPType returns the old p_type value of the CasbinRule. If the CasbinRule 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 database query fails.
func (*CasbinRuleMutation) OldV0 ¶
func (m *CasbinRuleMutation) OldV0(ctx context.Context) (v string, err error)
OldV0 returns the old v0 value of the CasbinRule. If the CasbinRule 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 database query fails.
func (*CasbinRuleMutation) OldV1 ¶
func (m *CasbinRuleMutation) OldV1(ctx context.Context) (v string, err error)
OldV1 returns the old v1 value of the CasbinRule. If the CasbinRule 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 database query fails.
func (*CasbinRuleMutation) OldV2 ¶
func (m *CasbinRuleMutation) OldV2(ctx context.Context) (v string, err error)
OldV2 returns the old v2 value of the CasbinRule. If the CasbinRule 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 database query fails.
func (*CasbinRuleMutation) OldV3 ¶
func (m *CasbinRuleMutation) OldV3(ctx context.Context) (v string, err error)
OldV3 returns the old v3 value of the CasbinRule. If the CasbinRule 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 database query fails.
func (*CasbinRuleMutation) OldV4 ¶
func (m *CasbinRuleMutation) OldV4(ctx context.Context) (v string, err error)
OldV4 returns the old v4 value of the CasbinRule. If the CasbinRule 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 database query fails.
func (*CasbinRuleMutation) OldV5 ¶
func (m *CasbinRuleMutation) OldV5(ctx context.Context) (v string, err error)
OldV5 returns the old v5 value of the CasbinRule. If the CasbinRule 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 database query fails.
func (*CasbinRuleMutation) PType ¶
func (m *CasbinRuleMutation) PType() (r string, exists bool)
PType returns the p_type value in the mutation.
func (*CasbinRuleMutation) RemovedEdges ¶
func (m *CasbinRuleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CasbinRuleMutation) RemovedIDs ¶
func (m *CasbinRuleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*CasbinRuleMutation) ResetEdge ¶
func (m *CasbinRuleMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*CasbinRuleMutation) ResetField ¶
func (m *CasbinRuleMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*CasbinRuleMutation) ResetPType ¶
func (m *CasbinRuleMutation) ResetPType()
ResetPType reset all changes of the "p_type" field.
func (*CasbinRuleMutation) ResetV0 ¶
func (m *CasbinRuleMutation) ResetV0()
ResetV0 reset all changes of the "v0" field.
func (*CasbinRuleMutation) ResetV1 ¶
func (m *CasbinRuleMutation) ResetV1()
ResetV1 reset all changes of the "v1" field.
func (*CasbinRuleMutation) ResetV2 ¶
func (m *CasbinRuleMutation) ResetV2()
ResetV2 reset all changes of the "v2" field.
func (*CasbinRuleMutation) ResetV3 ¶
func (m *CasbinRuleMutation) ResetV3()
ResetV3 reset all changes of the "v3" field.
func (*CasbinRuleMutation) ResetV4 ¶
func (m *CasbinRuleMutation) ResetV4()
ResetV4 reset all changes of the "v4" field.
func (*CasbinRuleMutation) ResetV5 ¶
func (m *CasbinRuleMutation) ResetV5()
ResetV5 reset all changes of the "v5" field.
func (*CasbinRuleMutation) SetField ¶
func (m *CasbinRuleMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*CasbinRuleMutation) SetPType ¶
func (m *CasbinRuleMutation) SetPType(s string)
SetPType sets the p_type field.
func (*CasbinRuleMutation) SetV0 ¶
func (m *CasbinRuleMutation) SetV0(s string)
SetV0 sets the v0 field.
func (*CasbinRuleMutation) SetV1 ¶
func (m *CasbinRuleMutation) SetV1(s string)
SetV1 sets the v1 field.
func (*CasbinRuleMutation) SetV2 ¶
func (m *CasbinRuleMutation) SetV2(s string)
SetV2 sets the v2 field.
func (*CasbinRuleMutation) SetV3 ¶
func (m *CasbinRuleMutation) SetV3(s string)
SetV3 sets the v3 field.
func (*CasbinRuleMutation) SetV4 ¶
func (m *CasbinRuleMutation) SetV4(s string)
SetV4 sets the v4 field.
func (*CasbinRuleMutation) SetV5 ¶
func (m *CasbinRuleMutation) SetV5(s string)
SetV5 sets the v5 field.
func (CasbinRuleMutation) Tx ¶
func (m CasbinRuleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CasbinRuleMutation) Type ¶
func (m *CasbinRuleMutation) Type() string
Type returns the node type of this mutation (CasbinRule).
func (*CasbinRuleMutation) V0 ¶
func (m *CasbinRuleMutation) V0() (r string, exists bool)
V0 returns the v0 value in the mutation.
func (*CasbinRuleMutation) V1 ¶
func (m *CasbinRuleMutation) V1() (r string, exists bool)
V1 returns the v1 value in the mutation.
func (*CasbinRuleMutation) V2 ¶
func (m *CasbinRuleMutation) V2() (r string, exists bool)
V2 returns the v2 value in the mutation.
func (*CasbinRuleMutation) V3 ¶
func (m *CasbinRuleMutation) V3() (r string, exists bool)
V3 returns the v3 value in the mutation.
func (*CasbinRuleMutation) V4 ¶
func (m *CasbinRuleMutation) V4() (r string, exists bool)
V4 returns the v4 value in the mutation.
func (*CasbinRuleMutation) V5 ¶
func (m *CasbinRuleMutation) V5() (r string, exists bool)
V5 returns the v5 value in the mutation.
type CasbinRuleQuery ¶
type CasbinRuleQuery struct {
// contains filtered or unexported fields
}
CasbinRuleQuery is the builder for querying CasbinRule entities.
func (*CasbinRuleQuery) All ¶
func (crq *CasbinRuleQuery) All(ctx context.Context) ([]*CasbinRule, error)
All executes the query and returns a list of CasbinRules.
func (*CasbinRuleQuery) AllX ¶
func (crq *CasbinRuleQuery) AllX(ctx context.Context) []*CasbinRule
AllX is like All, but panics if an error occurs.
func (*CasbinRuleQuery) Clone ¶
func (crq *CasbinRuleQuery) Clone() *CasbinRuleQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CasbinRuleQuery) Count ¶
func (crq *CasbinRuleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CasbinRuleQuery) CountX ¶
func (crq *CasbinRuleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CasbinRuleQuery) Exist ¶
func (crq *CasbinRuleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CasbinRuleQuery) ExistX ¶
func (crq *CasbinRuleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CasbinRuleQuery) First ¶
func (crq *CasbinRuleQuery) First(ctx context.Context) (*CasbinRule, error)
First returns the first CasbinRule entity in the query. Returns *NotFoundError when no casbinrule was found.
func (*CasbinRuleQuery) FirstID ¶
func (crq *CasbinRuleQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first CasbinRule id in the query. Returns *NotFoundError when no id was found.
func (*CasbinRuleQuery) FirstX ¶
func (crq *CasbinRuleQuery) FirstX(ctx context.Context) *CasbinRule
FirstX is like First, but panics if an error occurs.
func (*CasbinRuleQuery) FirstXID ¶
func (crq *CasbinRuleQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*CasbinRuleQuery) GroupBy ¶
func (crq *CasbinRuleQuery) GroupBy(field string, fields ...string) *CasbinRuleGroupBy
GroupBy 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 { PType string `json:"-"` Count int `json:"count,omitempty"` } client.CasbinRule.Query(). GroupBy(casbinrule.FieldPType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CasbinRuleQuery) IDs ¶
func (crq *CasbinRuleQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of CasbinRule ids.
func (*CasbinRuleQuery) IDsX ¶
func (crq *CasbinRuleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CasbinRuleQuery) Limit ¶
func (crq *CasbinRuleQuery) Limit(limit int) *CasbinRuleQuery
Limit adds a limit step to the query.
func (*CasbinRuleQuery) Offset ¶
func (crq *CasbinRuleQuery) Offset(offset int) *CasbinRuleQuery
Offset adds an offset step to the query.
func (*CasbinRuleQuery) Only ¶
func (crq *CasbinRuleQuery) Only(ctx context.Context) (*CasbinRule, error)
Only returns the only CasbinRule entity in the query, returns an error if not exactly one entity was returned.
func (*CasbinRuleQuery) OnlyID ¶
func (crq *CasbinRuleQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only CasbinRule id in the query, returns an error if not exactly one id was returned.
func (*CasbinRuleQuery) OnlyIDX ¶
func (crq *CasbinRuleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CasbinRuleQuery) OnlyX ¶
func (crq *CasbinRuleQuery) OnlyX(ctx context.Context) *CasbinRule
OnlyX is like Only, but panics if an error occurs.
func (*CasbinRuleQuery) Order ¶
func (crq *CasbinRuleQuery) Order(o ...OrderFunc) *CasbinRuleQuery
Order adds an order step to the query.
func (*CasbinRuleQuery) Select ¶
func (crq *CasbinRuleQuery) Select(field string, fields ...string) *CasbinRuleSelect
Select one or more fields from the given query.
Example:
var v []struct { PType string `json:"-"` } client.CasbinRule.Query(). Select(casbinrule.FieldPType). Scan(ctx, &v)
func (*CasbinRuleQuery) Where ¶
func (crq *CasbinRuleQuery) Where(ps ...predicate.CasbinRule) *CasbinRuleQuery
Where adds a new predicate for the builder.
type CasbinRuleSelect ¶
type CasbinRuleSelect struct {
// contains filtered or unexported fields
}
CasbinRuleSelect is the builder for select fields of CasbinRule entities.
func (*CasbinRuleSelect) Bool ¶
func (crs *CasbinRuleSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*CasbinRuleSelect) BoolX ¶
func (crs *CasbinRuleSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*CasbinRuleSelect) Bools ¶
func (crs *CasbinRuleSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*CasbinRuleSelect) BoolsX ¶
func (crs *CasbinRuleSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CasbinRuleSelect) Float64 ¶
func (crs *CasbinRuleSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*CasbinRuleSelect) Float64X ¶
func (crs *CasbinRuleSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*CasbinRuleSelect) Float64s ¶
func (crs *CasbinRuleSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*CasbinRuleSelect) Float64sX ¶
func (crs *CasbinRuleSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CasbinRuleSelect) Int ¶
func (crs *CasbinRuleSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*CasbinRuleSelect) IntX ¶
func (crs *CasbinRuleSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*CasbinRuleSelect) Ints ¶
func (crs *CasbinRuleSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*CasbinRuleSelect) IntsX ¶
func (crs *CasbinRuleSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CasbinRuleSelect) Scan ¶
func (crs *CasbinRuleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*CasbinRuleSelect) ScanX ¶
func (crs *CasbinRuleSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*CasbinRuleSelect) String ¶
func (crs *CasbinRuleSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*CasbinRuleSelect) StringX ¶
func (crs *CasbinRuleSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type CasbinRuleUpdate ¶
type CasbinRuleUpdate struct {
// contains filtered or unexported fields
}
CasbinRuleUpdate is the builder for updating CasbinRule entities.
func (*CasbinRuleUpdate) Exec ¶
func (cru *CasbinRuleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CasbinRuleUpdate) ExecX ¶
func (cru *CasbinRuleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CasbinRuleUpdate) Mutation ¶
func (cru *CasbinRuleUpdate) Mutation() *CasbinRuleMutation
Mutation returns the CasbinRuleMutation object of the builder.
func (*CasbinRuleUpdate) Save ¶
func (cru *CasbinRuleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*CasbinRuleUpdate) SaveX ¶
func (cru *CasbinRuleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CasbinRuleUpdate) SetPType ¶
func (cru *CasbinRuleUpdate) SetPType(s string) *CasbinRuleUpdate
SetPType sets the p_type field.
func (*CasbinRuleUpdate) SetV0 ¶
func (cru *CasbinRuleUpdate) SetV0(s string) *CasbinRuleUpdate
SetV0 sets the v0 field.
func (*CasbinRuleUpdate) SetV1 ¶
func (cru *CasbinRuleUpdate) SetV1(s string) *CasbinRuleUpdate
SetV1 sets the v1 field.
func (*CasbinRuleUpdate) SetV2 ¶
func (cru *CasbinRuleUpdate) SetV2(s string) *CasbinRuleUpdate
SetV2 sets the v2 field.
func (*CasbinRuleUpdate) SetV3 ¶
func (cru *CasbinRuleUpdate) SetV3(s string) *CasbinRuleUpdate
SetV3 sets the v3 field.
func (*CasbinRuleUpdate) SetV4 ¶
func (cru *CasbinRuleUpdate) SetV4(s string) *CasbinRuleUpdate
SetV4 sets the v4 field.
func (*CasbinRuleUpdate) SetV5 ¶
func (cru *CasbinRuleUpdate) SetV5(s string) *CasbinRuleUpdate
SetV5 sets the v5 field.
func (*CasbinRuleUpdate) Where ¶
func (cru *CasbinRuleUpdate) Where(ps ...predicate.CasbinRule) *CasbinRuleUpdate
Where adds a new predicate for the builder.
type CasbinRuleUpdateOne ¶
type CasbinRuleUpdateOne struct {
// contains filtered or unexported fields
}
CasbinRuleUpdateOne is the builder for updating a single CasbinRule entity.
func (*CasbinRuleUpdateOne) Exec ¶
func (cruo *CasbinRuleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CasbinRuleUpdateOne) ExecX ¶
func (cruo *CasbinRuleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CasbinRuleUpdateOne) Mutation ¶
func (cruo *CasbinRuleUpdateOne) Mutation() *CasbinRuleMutation
Mutation returns the CasbinRuleMutation object of the builder.
func (*CasbinRuleUpdateOne) Save ¶
func (cruo *CasbinRuleUpdateOne) Save(ctx context.Context) (*CasbinRule, error)
Save executes the query and returns the updated entity.
func (*CasbinRuleUpdateOne) SaveX ¶
func (cruo *CasbinRuleUpdateOne) SaveX(ctx context.Context) *CasbinRule
SaveX is like Save, but panics if an error occurs.
func (*CasbinRuleUpdateOne) SetPType ¶
func (cruo *CasbinRuleUpdateOne) SetPType(s string) *CasbinRuleUpdateOne
SetPType sets the p_type field.
func (*CasbinRuleUpdateOne) SetV0 ¶
func (cruo *CasbinRuleUpdateOne) SetV0(s string) *CasbinRuleUpdateOne
SetV0 sets the v0 field.
func (*CasbinRuleUpdateOne) SetV1 ¶
func (cruo *CasbinRuleUpdateOne) SetV1(s string) *CasbinRuleUpdateOne
SetV1 sets the v1 field.
func (*CasbinRuleUpdateOne) SetV2 ¶
func (cruo *CasbinRuleUpdateOne) SetV2(s string) *CasbinRuleUpdateOne
SetV2 sets the v2 field.
func (*CasbinRuleUpdateOne) SetV3 ¶
func (cruo *CasbinRuleUpdateOne) SetV3(s string) *CasbinRuleUpdateOne
SetV3 sets the v3 field.
func (*CasbinRuleUpdateOne) SetV4 ¶
func (cruo *CasbinRuleUpdateOne) SetV4(s string) *CasbinRuleUpdateOne
SetV4 sets the v4 field.
func (*CasbinRuleUpdateOne) SetV5 ¶
func (cruo *CasbinRuleUpdateOne) SetV5(s string) *CasbinRuleUpdateOne
SetV5 sets the v5 field.
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 // AdminLoginLog is the client for interacting with the AdminLoginLog builders. AdminLoginLog *AdminLoginLogClient // CasbinRule is the client for interacting with the CasbinRule builders. CasbinRule *CasbinRuleClient // Member is the client for interacting with the Member builders. Member *MemberClient // MemberLoginLog is the client for interacting with the MemberLoginLog builders. MemberLoginLog *MemberLoginLogClient // NoteArticle is the client for interacting with the NoteArticle builders. NoteArticle *NoteArticleClient // NoteFilesystem is the client for interacting with the NoteFilesystem builders. NoteFilesystem *NoteFilesystemClient // Options is the client for interacting with the Options builders. Options *OptionsClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns the Client stored in 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)
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(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 Member ¶
type Member struct { // ID of the ent. ID int `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"` // Gid holds the value of the "gid" field. Gid uuid.UUID `json:"gid,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Nickname holds the value of the "nickname" field. Nickname string `json:"nickname,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // Gender holds the value of the "gender" field. Gender int `json:"gender,omitempty"` // Signature holds the value of the "signature" field. Signature string `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MemberQuery when eager-loading is set. Edges MemberEdges `json:"edges"` // contains filtered or unexported fields }
Member is the model entity for the Member schema.
func (*Member) QueryLoginLogs ¶
func (m *Member) QueryLoginLogs() *MemberLoginLogQuery
QueryLoginLogs queries the loginLogs edge of the Member.
func (*Member) QueryNoteArticles ¶
func (m *Member) QueryNoteArticles() *NoteArticleQuery
QueryNoteArticles queries the noteArticles edge of the Member.
func (*Member) QueryNoteFilesystem ¶
func (m *Member) QueryNoteFilesystem() *NoteFilesystemQuery
QueryNoteFilesystem queries the noteFilesystem edge of the Member.
func (*Member) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Member) Update ¶
func (m *Member) Update() *MemberUpdateOne
Update returns a builder for updating this Member. Note that, you need to call Member.Unwrap() before calling this method, if this Member was returned from a transaction, and the transaction was committed or rolled back.
type MemberClient ¶
type MemberClient struct {
// contains filtered or unexported fields
}
MemberClient is a client for the Member schema.
func NewMemberClient ¶
func NewMemberClient(c config) *MemberClient
NewMemberClient returns a client for the Member from the given config.
func (*MemberClient) Create ¶
func (c *MemberClient) Create() *MemberCreate
Create returns a create builder for Member.
func (*MemberClient) CreateBulk ¶
func (c *MemberClient) CreateBulk(builders ...*MemberCreate) *MemberCreateBulk
BulkCreate returns a builder for creating a bulk of Member entities.
func (*MemberClient) Delete ¶
func (c *MemberClient) Delete() *MemberDelete
Delete returns a delete builder for Member.
func (*MemberClient) DeleteOne ¶
func (c *MemberClient) DeleteOne(m *Member) *MemberDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MemberClient) DeleteOneID ¶
func (c *MemberClient) DeleteOneID(id int) *MemberDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MemberClient) GetX ¶
func (c *MemberClient) GetX(ctx context.Context, id int) *Member
GetX is like Get, but panics if an error occurs.
func (*MemberClient) Query ¶
func (c *MemberClient) Query() *MemberQuery
Query returns a query builder for Member.
func (*MemberClient) QueryLoginLogs ¶
func (c *MemberClient) QueryLoginLogs(m *Member) *MemberLoginLogQuery
QueryLoginLogs queries the loginLogs edge of a Member.
func (*MemberClient) QueryNoteArticles ¶
func (c *MemberClient) QueryNoteArticles(m *Member) *NoteArticleQuery
QueryNoteArticles queries the noteArticles edge of a Member.
func (*MemberClient) QueryNoteFilesystem ¶
func (c *MemberClient) QueryNoteFilesystem(m *Member) *NoteFilesystemQuery
QueryNoteFilesystem queries the noteFilesystem edge of a Member.
func (*MemberClient) Update ¶
func (c *MemberClient) Update() *MemberUpdate
Update returns an update builder for Member.
func (*MemberClient) UpdateOne ¶
func (c *MemberClient) UpdateOne(m *Member) *MemberUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MemberClient) UpdateOneID ¶
func (c *MemberClient) UpdateOneID(id int) *MemberUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MemberClient) Use ¶
func (c *MemberClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `member.Hooks(f(g(h())))`.
type MemberCreate ¶
type MemberCreate struct {
// contains filtered or unexported fields
}
MemberCreate is the builder for creating a Member entity.
func (*MemberCreate) AddLoginLogIDs ¶
func (mc *MemberCreate) AddLoginLogIDs(ids ...int) *MemberCreate
AddLoginLogIDs adds the loginLogs edge to MemberLoginLog by ids.
func (*MemberCreate) AddLoginLogs ¶
func (mc *MemberCreate) AddLoginLogs(m ...*MemberLoginLog) *MemberCreate
AddLoginLogs adds the loginLogs edges to MemberLoginLog.
func (*MemberCreate) AddNoteArticleIDs ¶
func (mc *MemberCreate) AddNoteArticleIDs(ids ...int) *MemberCreate
AddNoteArticleIDs adds the noteArticles edge to NoteArticle by ids.
func (*MemberCreate) AddNoteArticles ¶
func (mc *MemberCreate) AddNoteArticles(n ...*NoteArticle) *MemberCreate
AddNoteArticles adds the noteArticles edges to NoteArticle.
func (*MemberCreate) AddNoteFilesystem ¶
func (mc *MemberCreate) AddNoteFilesystem(n ...*NoteFilesystem) *MemberCreate
AddNoteFilesystem adds the noteFilesystem edges to NoteFilesystem.
func (*MemberCreate) AddNoteFilesystemIDs ¶
func (mc *MemberCreate) AddNoteFilesystemIDs(ids ...int) *MemberCreate
AddNoteFilesystemIDs adds the noteFilesystem edge to NoteFilesystem by ids.
func (*MemberCreate) Mutation ¶
func (mc *MemberCreate) Mutation() *MemberMutation
Mutation returns the MemberMutation object of the builder.
func (*MemberCreate) Save ¶
func (mc *MemberCreate) Save(ctx context.Context) (*Member, error)
Save creates the Member in the database.
func (*MemberCreate) SaveX ¶
func (mc *MemberCreate) SaveX(ctx context.Context) *Member
SaveX calls Save and panics if Save returns an error.
func (*MemberCreate) SetCreatedAt ¶
func (mc *MemberCreate) SetCreatedAt(t time.Time) *MemberCreate
SetCreatedAt sets the created_at field.
func (*MemberCreate) SetEmail ¶
func (mc *MemberCreate) SetEmail(s string) *MemberCreate
SetEmail sets the email field.
func (*MemberCreate) SetGender ¶
func (mc *MemberCreate) SetGender(i int) *MemberCreate
SetGender sets the gender field.
func (*MemberCreate) SetGid ¶
func (mc *MemberCreate) SetGid(u uuid.UUID) *MemberCreate
SetGid sets the gid field.
func (*MemberCreate) SetID ¶
func (mc *MemberCreate) SetID(i int) *MemberCreate
SetID sets the id field.
func (*MemberCreate) SetNickname ¶
func (mc *MemberCreate) SetNickname(s string) *MemberCreate
SetNickname sets the nickname field.
func (*MemberCreate) SetNillableCreatedAt ¶
func (mc *MemberCreate) SetNillableCreatedAt(t *time.Time) *MemberCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*MemberCreate) SetNillableGender ¶
func (mc *MemberCreate) SetNillableGender(i *int) *MemberCreate
SetNillableGender sets the gender field if the given value is not nil.
func (*MemberCreate) SetNillableUpdatedAt ¶
func (mc *MemberCreate) SetNillableUpdatedAt(t *time.Time) *MemberCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*MemberCreate) SetPassword ¶
func (mc *MemberCreate) SetPassword(s string) *MemberCreate
SetPassword sets the password field.
func (*MemberCreate) SetSignature ¶
func (mc *MemberCreate) SetSignature(s string) *MemberCreate
SetSignature sets the signature field.
func (*MemberCreate) SetUpdatedAt ¶
func (mc *MemberCreate) SetUpdatedAt(t time.Time) *MemberCreate
SetUpdatedAt sets the updated_at field.
type MemberCreateBulk ¶
type MemberCreateBulk struct {
// contains filtered or unexported fields
}
MemberCreateBulk is the builder for creating a bulk of Member entities.
type MemberDelete ¶
type MemberDelete struct {
// contains filtered or unexported fields
}
MemberDelete is the builder for deleting a Member entity.
func (*MemberDelete) Exec ¶
func (md *MemberDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MemberDelete) ExecX ¶
func (md *MemberDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MemberDelete) Where ¶
func (md *MemberDelete) Where(ps ...predicate.Member) *MemberDelete
Where adds a new predicate to the delete builder.
type MemberDeleteOne ¶
type MemberDeleteOne struct {
// contains filtered or unexported fields
}
MemberDeleteOne is the builder for deleting a single Member entity.
func (*MemberDeleteOne) Exec ¶
func (mdo *MemberDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MemberDeleteOne) ExecX ¶
func (mdo *MemberDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MemberEdges ¶
type MemberEdges struct { // LoginLogs holds the value of the loginLogs edge. LoginLogs []*MemberLoginLog // NoteArticles holds the value of the noteArticles edge. NoteArticles []*NoteArticle // NoteFilesystem holds the value of the noteFilesystem edge. NoteFilesystem []*NoteFilesystem // contains filtered or unexported fields }
MemberEdges holds the relations/edges for other nodes in the graph.
func (MemberEdges) LoginLogsOrErr ¶
func (e MemberEdges) LoginLogsOrErr() ([]*MemberLoginLog, error)
LoginLogsOrErr returns the LoginLogs value or an error if the edge was not loaded in eager-loading.
func (MemberEdges) NoteArticlesOrErr ¶
func (e MemberEdges) NoteArticlesOrErr() ([]*NoteArticle, error)
NoteArticlesOrErr returns the NoteArticles value or an error if the edge was not loaded in eager-loading.
func (MemberEdges) NoteFilesystemOrErr ¶
func (e MemberEdges) NoteFilesystemOrErr() ([]*NoteFilesystem, error)
NoteFilesystemOrErr returns the NoteFilesystem value or an error if the edge was not loaded in eager-loading.
type MemberGroupBy ¶
type MemberGroupBy struct {
// contains filtered or unexported fields
}
MemberGroupBy is the builder for group-by Member entities.
func (*MemberGroupBy) Aggregate ¶
func (mgb *MemberGroupBy) Aggregate(fns ...AggregateFunc) *MemberGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MemberGroupBy) Bool ¶
func (mgb *MemberGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*MemberGroupBy) BoolX ¶
func (mgb *MemberGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberGroupBy) Bools ¶
func (mgb *MemberGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*MemberGroupBy) BoolsX ¶
func (mgb *MemberGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberGroupBy) Float64 ¶
func (mgb *MemberGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*MemberGroupBy) Float64X ¶
func (mgb *MemberGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberGroupBy) Float64s ¶
func (mgb *MemberGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*MemberGroupBy) Float64sX ¶
func (mgb *MemberGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberGroupBy) Int ¶
func (mgb *MemberGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*MemberGroupBy) IntX ¶
func (mgb *MemberGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberGroupBy) Ints ¶
func (mgb *MemberGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*MemberGroupBy) IntsX ¶
func (mgb *MemberGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberGroupBy) Scan ¶
func (mgb *MemberGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*MemberGroupBy) ScanX ¶
func (mgb *MemberGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberGroupBy) String ¶
func (mgb *MemberGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*MemberGroupBy) StringX ¶
func (mgb *MemberGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberLoginLog ¶
type MemberLoginLog struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // MemberGid holds the value of the "member_gid" field. MemberGid uuid.UUID `json:"member_gid,omitempty"` // IP holds the value of the "ip" field. IP *string `json:"ip,omitempty"` // UserAgent holds the value of the "user_agent" field. UserAgent *string `json:"user_agent,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MemberLoginLogQuery when eager-loading is set. Edges MemberLoginLogEdges `json:"edges"` // contains filtered or unexported fields }
MemberLoginLog is the model entity for the MemberLoginLog schema.
func (*MemberLoginLog) QueryOwner ¶
func (mll *MemberLoginLog) QueryOwner() *MemberQuery
QueryOwner queries the owner edge of the MemberLoginLog.
func (*MemberLoginLog) String ¶
func (mll *MemberLoginLog) String() string
String implements the fmt.Stringer.
func (*MemberLoginLog) Unwrap ¶
func (mll *MemberLoginLog) Unwrap() *MemberLoginLog
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*MemberLoginLog) Update ¶
func (mll *MemberLoginLog) Update() *MemberLoginLogUpdateOne
Update returns a builder for updating this MemberLoginLog. Note that, you need to call MemberLoginLog.Unwrap() before calling this method, if this MemberLoginLog was returned from a transaction, and the transaction was committed or rolled back.
type MemberLoginLogClient ¶
type MemberLoginLogClient struct {
// contains filtered or unexported fields
}
MemberLoginLogClient is a client for the MemberLoginLog schema.
func NewMemberLoginLogClient ¶
func NewMemberLoginLogClient(c config) *MemberLoginLogClient
NewMemberLoginLogClient returns a client for the MemberLoginLog from the given config.
func (*MemberLoginLogClient) Create ¶
func (c *MemberLoginLogClient) Create() *MemberLoginLogCreate
Create returns a create builder for MemberLoginLog.
func (*MemberLoginLogClient) CreateBulk ¶
func (c *MemberLoginLogClient) CreateBulk(builders ...*MemberLoginLogCreate) *MemberLoginLogCreateBulk
BulkCreate returns a builder for creating a bulk of MemberLoginLog entities.
func (*MemberLoginLogClient) Delete ¶
func (c *MemberLoginLogClient) Delete() *MemberLoginLogDelete
Delete returns a delete builder for MemberLoginLog.
func (*MemberLoginLogClient) DeleteOne ¶
func (c *MemberLoginLogClient) DeleteOne(mll *MemberLoginLog) *MemberLoginLogDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MemberLoginLogClient) DeleteOneID ¶
func (c *MemberLoginLogClient) DeleteOneID(id int) *MemberLoginLogDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MemberLoginLogClient) Get ¶
func (c *MemberLoginLogClient) Get(ctx context.Context, id int) (*MemberLoginLog, error)
Get returns a MemberLoginLog entity by its id.
func (*MemberLoginLogClient) GetX ¶
func (c *MemberLoginLogClient) GetX(ctx context.Context, id int) *MemberLoginLog
GetX is like Get, but panics if an error occurs.
func (*MemberLoginLogClient) Hooks ¶
func (c *MemberLoginLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MemberLoginLogClient) Query ¶
func (c *MemberLoginLogClient) Query() *MemberLoginLogQuery
Query returns a query builder for MemberLoginLog.
func (*MemberLoginLogClient) QueryOwner ¶
func (c *MemberLoginLogClient) QueryOwner(mll *MemberLoginLog) *MemberQuery
QueryOwner queries the owner edge of a MemberLoginLog.
func (*MemberLoginLogClient) Update ¶
func (c *MemberLoginLogClient) Update() *MemberLoginLogUpdate
Update returns an update builder for MemberLoginLog.
func (*MemberLoginLogClient) UpdateOne ¶
func (c *MemberLoginLogClient) UpdateOne(mll *MemberLoginLog) *MemberLoginLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MemberLoginLogClient) UpdateOneID ¶
func (c *MemberLoginLogClient) UpdateOneID(id int) *MemberLoginLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MemberLoginLogClient) Use ¶
func (c *MemberLoginLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `memberloginlog.Hooks(f(g(h())))`.
type MemberLoginLogCreate ¶
type MemberLoginLogCreate struct {
// contains filtered or unexported fields
}
MemberLoginLogCreate is the builder for creating a MemberLoginLog entity.
func (*MemberLoginLogCreate) Mutation ¶
func (mllc *MemberLoginLogCreate) Mutation() *MemberLoginLogMutation
Mutation returns the MemberLoginLogMutation object of the builder.
func (*MemberLoginLogCreate) Save ¶
func (mllc *MemberLoginLogCreate) Save(ctx context.Context) (*MemberLoginLog, error)
Save creates the MemberLoginLog in the database.
func (*MemberLoginLogCreate) SaveX ¶
func (mllc *MemberLoginLogCreate) SaveX(ctx context.Context) *MemberLoginLog
SaveX calls Save and panics if Save returns an error.
func (*MemberLoginLogCreate) SetCreateTime ¶
func (mllc *MemberLoginLogCreate) SetCreateTime(t time.Time) *MemberLoginLogCreate
SetCreateTime sets the create_time field.
func (*MemberLoginLogCreate) SetID ¶
func (mllc *MemberLoginLogCreate) SetID(i int) *MemberLoginLogCreate
SetID sets the id field.
func (*MemberLoginLogCreate) SetIP ¶
func (mllc *MemberLoginLogCreate) SetIP(s string) *MemberLoginLogCreate
SetIP sets the ip field.
func (*MemberLoginLogCreate) SetMemberGid ¶
func (mllc *MemberLoginLogCreate) SetMemberGid(u uuid.UUID) *MemberLoginLogCreate
SetMemberGid sets the member_gid field.
func (*MemberLoginLogCreate) SetNillableCreateTime ¶
func (mllc *MemberLoginLogCreate) SetNillableCreateTime(t *time.Time) *MemberLoginLogCreate
SetNillableCreateTime sets the create_time field if the given value is not nil.
func (*MemberLoginLogCreate) SetNillableIP ¶
func (mllc *MemberLoginLogCreate) SetNillableIP(s *string) *MemberLoginLogCreate
SetNillableIP sets the ip field if the given value is not nil.
func (*MemberLoginLogCreate) SetNillableOwnerID ¶
func (mllc *MemberLoginLogCreate) SetNillableOwnerID(id *int) *MemberLoginLogCreate
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*MemberLoginLogCreate) SetNillableUserAgent ¶
func (mllc *MemberLoginLogCreate) SetNillableUserAgent(s *string) *MemberLoginLogCreate
SetNillableUserAgent sets the user_agent field if the given value is not nil.
func (*MemberLoginLogCreate) SetOwner ¶
func (mllc *MemberLoginLogCreate) SetOwner(m *Member) *MemberLoginLogCreate
SetOwner sets the owner edge to Member.
func (*MemberLoginLogCreate) SetOwnerID ¶
func (mllc *MemberLoginLogCreate) SetOwnerID(id int) *MemberLoginLogCreate
SetOwnerID sets the owner edge to Member by id.
func (*MemberLoginLogCreate) SetUserAgent ¶
func (mllc *MemberLoginLogCreate) SetUserAgent(s string) *MemberLoginLogCreate
SetUserAgent sets the user_agent field.
type MemberLoginLogCreateBulk ¶
type MemberLoginLogCreateBulk struct {
// contains filtered or unexported fields
}
MemberLoginLogCreateBulk is the builder for creating a bulk of MemberLoginLog entities.
func (*MemberLoginLogCreateBulk) Save ¶
func (mllcb *MemberLoginLogCreateBulk) Save(ctx context.Context) ([]*MemberLoginLog, error)
Save creates the MemberLoginLog entities in the database.
func (*MemberLoginLogCreateBulk) SaveX ¶
func (mllcb *MemberLoginLogCreateBulk) SaveX(ctx context.Context) []*MemberLoginLog
SaveX calls Save and panics if Save returns an error.
type MemberLoginLogDelete ¶
type MemberLoginLogDelete struct {
// contains filtered or unexported fields
}
MemberLoginLogDelete is the builder for deleting a MemberLoginLog entity.
func (*MemberLoginLogDelete) Exec ¶
func (mlld *MemberLoginLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MemberLoginLogDelete) ExecX ¶
func (mlld *MemberLoginLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MemberLoginLogDelete) Where ¶
func (mlld *MemberLoginLogDelete) Where(ps ...predicate.MemberLoginLog) *MemberLoginLogDelete
Where adds a new predicate to the delete builder.
type MemberLoginLogDeleteOne ¶
type MemberLoginLogDeleteOne struct {
// contains filtered or unexported fields
}
MemberLoginLogDeleteOne is the builder for deleting a single MemberLoginLog entity.
func (*MemberLoginLogDeleteOne) Exec ¶
func (mlldo *MemberLoginLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MemberLoginLogDeleteOne) ExecX ¶
func (mlldo *MemberLoginLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MemberLoginLogEdges ¶
type MemberLoginLogEdges struct { // Owner holds the value of the owner edge. Owner *Member // contains filtered or unexported fields }
MemberLoginLogEdges holds the relations/edges for other nodes in the graph.
func (MemberLoginLogEdges) OwnerOrErr ¶
func (e MemberLoginLogEdges) OwnerOrErr() (*Member, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MemberLoginLogGroupBy ¶
type MemberLoginLogGroupBy struct {
// contains filtered or unexported fields
}
MemberLoginLogGroupBy is the builder for group-by MemberLoginLog entities.
func (*MemberLoginLogGroupBy) Aggregate ¶
func (mllgb *MemberLoginLogGroupBy) Aggregate(fns ...AggregateFunc) *MemberLoginLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MemberLoginLogGroupBy) Bool ¶
func (mllgb *MemberLoginLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*MemberLoginLogGroupBy) BoolX ¶
func (mllgb *MemberLoginLogGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberLoginLogGroupBy) Bools ¶
func (mllgb *MemberLoginLogGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*MemberLoginLogGroupBy) BoolsX ¶
func (mllgb *MemberLoginLogGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberLoginLogGroupBy) Float64 ¶
func (mllgb *MemberLoginLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*MemberLoginLogGroupBy) Float64X ¶
func (mllgb *MemberLoginLogGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberLoginLogGroupBy) Float64s ¶
func (mllgb *MemberLoginLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*MemberLoginLogGroupBy) Float64sX ¶
func (mllgb *MemberLoginLogGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberLoginLogGroupBy) Int ¶
func (mllgb *MemberLoginLogGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*MemberLoginLogGroupBy) IntX ¶
func (mllgb *MemberLoginLogGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberLoginLogGroupBy) Ints ¶
func (mllgb *MemberLoginLogGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*MemberLoginLogGroupBy) IntsX ¶
func (mllgb *MemberLoginLogGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberLoginLogGroupBy) Scan ¶
func (mllgb *MemberLoginLogGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*MemberLoginLogGroupBy) ScanX ¶
func (mllgb *MemberLoginLogGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberLoginLogGroupBy) String ¶
func (mllgb *MemberLoginLogGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*MemberLoginLogGroupBy) StringX ¶
func (mllgb *MemberLoginLogGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberLoginLogMutation ¶
type MemberLoginLogMutation struct {
// contains filtered or unexported fields
}
MemberLoginLogMutation represents an operation that mutate the MemberLoginLogs nodes in the graph.
func (*MemberLoginLogMutation) AddField ¶
func (m *MemberLoginLogMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*MemberLoginLogMutation) AddedEdges ¶
func (m *MemberLoginLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MemberLoginLogMutation) AddedField ¶
func (m *MemberLoginLogMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*MemberLoginLogMutation) AddedFields ¶
func (m *MemberLoginLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*MemberLoginLogMutation) AddedIDs ¶
func (m *MemberLoginLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*MemberLoginLogMutation) ClearEdge ¶
func (m *MemberLoginLogMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*MemberLoginLogMutation) ClearField ¶
func (m *MemberLoginLogMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*MemberLoginLogMutation) ClearIP ¶
func (m *MemberLoginLogMutation) ClearIP()
ClearIP clears the value of ip.
func (*MemberLoginLogMutation) ClearOwner ¶
func (m *MemberLoginLogMutation) ClearOwner()
ClearOwner clears the owner edge to Member.
func (*MemberLoginLogMutation) ClearUserAgent ¶
func (m *MemberLoginLogMutation) ClearUserAgent()
ClearUserAgent clears the value of user_agent.
func (*MemberLoginLogMutation) ClearedEdges ¶
func (m *MemberLoginLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MemberLoginLogMutation) ClearedFields ¶
func (m *MemberLoginLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MemberLoginLogMutation) Client ¶
func (m MemberLoginLogMutation) 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 (*MemberLoginLogMutation) CreateTime ¶
func (m *MemberLoginLogMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the create_time value in the mutation.
func (*MemberLoginLogMutation) EdgeCleared ¶
func (m *MemberLoginLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*MemberLoginLogMutation) Field ¶
func (m *MemberLoginLogMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*MemberLoginLogMutation) FieldCleared ¶
func (m *MemberLoginLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*MemberLoginLogMutation) Fields ¶
func (m *MemberLoginLogMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*MemberLoginLogMutation) ID ¶
func (m *MemberLoginLogMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*MemberLoginLogMutation) IP ¶
func (m *MemberLoginLogMutation) IP() (r string, exists bool)
IP returns the ip value in the mutation.
func (*MemberLoginLogMutation) IPCleared ¶
func (m *MemberLoginLogMutation) IPCleared() bool
IPCleared returns if the field ip was cleared in this mutation.
func (*MemberLoginLogMutation) MemberGid ¶
func (m *MemberLoginLogMutation) MemberGid() (r uuid.UUID, exists bool)
MemberGid returns the member_gid value in the mutation.
func (*MemberLoginLogMutation) OldCreateTime ¶
OldCreateTime returns the old create_time value of the MemberLoginLog. If the MemberLoginLog 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 database query fails.
func (*MemberLoginLogMutation) 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 was failed.
func (*MemberLoginLogMutation) OldIP ¶
func (m *MemberLoginLogMutation) OldIP(ctx context.Context) (v *string, err error)
OldIP returns the old ip value of the MemberLoginLog. If the MemberLoginLog 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 database query fails.
func (*MemberLoginLogMutation) OldMemberGid ¶
OldMemberGid returns the old member_gid value of the MemberLoginLog. If the MemberLoginLog 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 database query fails.
func (*MemberLoginLogMutation) OldUserAgent ¶
func (m *MemberLoginLogMutation) OldUserAgent(ctx context.Context) (v *string, err error)
OldUserAgent returns the old user_agent value of the MemberLoginLog. If the MemberLoginLog 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 database query fails.
func (*MemberLoginLogMutation) Op ¶
func (m *MemberLoginLogMutation) Op() Op
Op returns the operation name.
func (*MemberLoginLogMutation) OwnerCleared ¶
func (m *MemberLoginLogMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*MemberLoginLogMutation) OwnerID ¶
func (m *MemberLoginLogMutation) OwnerID() (id int, exists bool)
OwnerID returns the owner id in the mutation.
func (*MemberLoginLogMutation) OwnerIDs ¶
func (m *MemberLoginLogMutation) OwnerIDs() (ids []int)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*MemberLoginLogMutation) RemovedEdges ¶
func (m *MemberLoginLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MemberLoginLogMutation) RemovedIDs ¶
func (m *MemberLoginLogMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*MemberLoginLogMutation) ResetCreateTime ¶
func (m *MemberLoginLogMutation) ResetCreateTime()
ResetCreateTime reset all changes of the "create_time" field.
func (*MemberLoginLogMutation) ResetEdge ¶
func (m *MemberLoginLogMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*MemberLoginLogMutation) ResetField ¶
func (m *MemberLoginLogMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*MemberLoginLogMutation) ResetIP ¶
func (m *MemberLoginLogMutation) ResetIP()
ResetIP reset all changes of the "ip" field.
func (*MemberLoginLogMutation) ResetMemberGid ¶
func (m *MemberLoginLogMutation) ResetMemberGid()
ResetMemberGid reset all changes of the "member_gid" field.
func (*MemberLoginLogMutation) ResetOwner ¶
func (m *MemberLoginLogMutation) ResetOwner()
ResetOwner reset all changes of the "owner" edge.
func (*MemberLoginLogMutation) ResetUserAgent ¶
func (m *MemberLoginLogMutation) ResetUserAgent()
ResetUserAgent reset all changes of the "user_agent" field.
func (*MemberLoginLogMutation) SetCreateTime ¶
func (m *MemberLoginLogMutation) SetCreateTime(t time.Time)
SetCreateTime sets the create_time field.
func (*MemberLoginLogMutation) SetField ¶
func (m *MemberLoginLogMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*MemberLoginLogMutation) SetID ¶
func (m *MemberLoginLogMutation) SetID(id int)
SetID sets the value of the id field. Note that, this operation is accepted only on MemberLoginLog creation.
func (*MemberLoginLogMutation) SetIP ¶
func (m *MemberLoginLogMutation) SetIP(s string)
SetIP sets the ip field.
func (*MemberLoginLogMutation) SetMemberGid ¶
func (m *MemberLoginLogMutation) SetMemberGid(u uuid.UUID)
SetMemberGid sets the member_gid field.
func (*MemberLoginLogMutation) SetOwnerID ¶
func (m *MemberLoginLogMutation) SetOwnerID(id int)
SetOwnerID sets the owner edge to Member by id.
func (*MemberLoginLogMutation) SetUserAgent ¶
func (m *MemberLoginLogMutation) SetUserAgent(s string)
SetUserAgent sets the user_agent field.
func (MemberLoginLogMutation) Tx ¶
func (m MemberLoginLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MemberLoginLogMutation) Type ¶
func (m *MemberLoginLogMutation) Type() string
Type returns the node type of this mutation (MemberLoginLog).
func (*MemberLoginLogMutation) UserAgent ¶
func (m *MemberLoginLogMutation) UserAgent() (r string, exists bool)
UserAgent returns the user_agent value in the mutation.
func (*MemberLoginLogMutation) UserAgentCleared ¶
func (m *MemberLoginLogMutation) UserAgentCleared() bool
UserAgentCleared returns if the field user_agent was cleared in this mutation.
type MemberLoginLogQuery ¶
type MemberLoginLogQuery struct {
// contains filtered or unexported fields
}
MemberLoginLogQuery is the builder for querying MemberLoginLog entities.
func (*MemberLoginLogQuery) All ¶
func (mllq *MemberLoginLogQuery) All(ctx context.Context) ([]*MemberLoginLog, error)
All executes the query and returns a list of MemberLoginLogs.
func (*MemberLoginLogQuery) AllX ¶
func (mllq *MemberLoginLogQuery) AllX(ctx context.Context) []*MemberLoginLog
AllX is like All, but panics if an error occurs.
func (*MemberLoginLogQuery) Clone ¶
func (mllq *MemberLoginLogQuery) Clone() *MemberLoginLogQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MemberLoginLogQuery) Count ¶
func (mllq *MemberLoginLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MemberLoginLogQuery) CountX ¶
func (mllq *MemberLoginLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MemberLoginLogQuery) Exist ¶
func (mllq *MemberLoginLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MemberLoginLogQuery) ExistX ¶
func (mllq *MemberLoginLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MemberLoginLogQuery) First ¶
func (mllq *MemberLoginLogQuery) First(ctx context.Context) (*MemberLoginLog, error)
First returns the first MemberLoginLog entity in the query. Returns *NotFoundError when no memberloginlog was found.
func (*MemberLoginLogQuery) FirstID ¶
func (mllq *MemberLoginLogQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MemberLoginLog id in the query. Returns *NotFoundError when no id was found.
func (*MemberLoginLogQuery) FirstX ¶
func (mllq *MemberLoginLogQuery) FirstX(ctx context.Context) *MemberLoginLog
FirstX is like First, but panics if an error occurs.
func (*MemberLoginLogQuery) FirstXID ¶
func (mllq *MemberLoginLogQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*MemberLoginLogQuery) GroupBy ¶
func (mllq *MemberLoginLogQuery) GroupBy(field string, fields ...string) *MemberLoginLogGroupBy
GroupBy 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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.MemberLoginLog.Query(). GroupBy(memberloginlog.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MemberLoginLogQuery) IDs ¶
func (mllq *MemberLoginLogQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MemberLoginLog ids.
func (*MemberLoginLogQuery) IDsX ¶
func (mllq *MemberLoginLogQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MemberLoginLogQuery) Limit ¶
func (mllq *MemberLoginLogQuery) Limit(limit int) *MemberLoginLogQuery
Limit adds a limit step to the query.
func (*MemberLoginLogQuery) Offset ¶
func (mllq *MemberLoginLogQuery) Offset(offset int) *MemberLoginLogQuery
Offset adds an offset step to the query.
func (*MemberLoginLogQuery) Only ¶
func (mllq *MemberLoginLogQuery) Only(ctx context.Context) (*MemberLoginLog, error)
Only returns the only MemberLoginLog entity in the query, returns an error if not exactly one entity was returned.
func (*MemberLoginLogQuery) OnlyID ¶
func (mllq *MemberLoginLogQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only MemberLoginLog id in the query, returns an error if not exactly one id was returned.
func (*MemberLoginLogQuery) OnlyIDX ¶
func (mllq *MemberLoginLogQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MemberLoginLogQuery) OnlyX ¶
func (mllq *MemberLoginLogQuery) OnlyX(ctx context.Context) *MemberLoginLog
OnlyX is like Only, but panics if an error occurs.
func (*MemberLoginLogQuery) Order ¶
func (mllq *MemberLoginLogQuery) Order(o ...OrderFunc) *MemberLoginLogQuery
Order adds an order step to the query.
func (*MemberLoginLogQuery) QueryOwner ¶
func (mllq *MemberLoginLogQuery) QueryOwner() *MemberQuery
QueryOwner chains the current query on the owner edge.
func (*MemberLoginLogQuery) Select ¶
func (mllq *MemberLoginLogQuery) Select(field string, fields ...string) *MemberLoginLogSelect
Select one or more fields from the given query.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.MemberLoginLog.Query(). Select(memberloginlog.FieldCreateTime). Scan(ctx, &v)
func (*MemberLoginLogQuery) Where ¶
func (mllq *MemberLoginLogQuery) Where(ps ...predicate.MemberLoginLog) *MemberLoginLogQuery
Where adds a new predicate for the builder.
func (*MemberLoginLogQuery) WithOwner ¶
func (mllq *MemberLoginLogQuery) WithOwner(opts ...func(*MemberQuery)) *MemberLoginLogQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
type MemberLoginLogSelect ¶
type MemberLoginLogSelect struct {
// contains filtered or unexported fields
}
MemberLoginLogSelect is the builder for select fields of MemberLoginLog entities.
func (*MemberLoginLogSelect) Bool ¶
func (mlls *MemberLoginLogSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*MemberLoginLogSelect) BoolX ¶
func (mlls *MemberLoginLogSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberLoginLogSelect) Bools ¶
func (mlls *MemberLoginLogSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*MemberLoginLogSelect) BoolsX ¶
func (mlls *MemberLoginLogSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberLoginLogSelect) Float64 ¶
func (mlls *MemberLoginLogSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*MemberLoginLogSelect) Float64X ¶
func (mlls *MemberLoginLogSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberLoginLogSelect) Float64s ¶
func (mlls *MemberLoginLogSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*MemberLoginLogSelect) Float64sX ¶
func (mlls *MemberLoginLogSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberLoginLogSelect) Int ¶
func (mlls *MemberLoginLogSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*MemberLoginLogSelect) IntX ¶
func (mlls *MemberLoginLogSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberLoginLogSelect) Ints ¶
func (mlls *MemberLoginLogSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*MemberLoginLogSelect) IntsX ¶
func (mlls *MemberLoginLogSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberLoginLogSelect) Scan ¶
func (mlls *MemberLoginLogSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*MemberLoginLogSelect) ScanX ¶
func (mlls *MemberLoginLogSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberLoginLogSelect) String ¶
func (mlls *MemberLoginLogSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*MemberLoginLogSelect) StringX ¶
func (mlls *MemberLoginLogSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberLoginLogUpdate ¶
type MemberLoginLogUpdate struct {
// contains filtered or unexported fields
}
MemberLoginLogUpdate is the builder for updating MemberLoginLog entities.
func (*MemberLoginLogUpdate) ClearIP ¶
func (mllu *MemberLoginLogUpdate) ClearIP() *MemberLoginLogUpdate
ClearIP clears the value of ip.
func (*MemberLoginLogUpdate) ClearOwner ¶
func (mllu *MemberLoginLogUpdate) ClearOwner() *MemberLoginLogUpdate
ClearOwner clears the "owner" edge to type Member.
func (*MemberLoginLogUpdate) ClearUserAgent ¶
func (mllu *MemberLoginLogUpdate) ClearUserAgent() *MemberLoginLogUpdate
ClearUserAgent clears the value of user_agent.
func (*MemberLoginLogUpdate) Exec ¶
func (mllu *MemberLoginLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberLoginLogUpdate) ExecX ¶
func (mllu *MemberLoginLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberLoginLogUpdate) Mutation ¶
func (mllu *MemberLoginLogUpdate) Mutation() *MemberLoginLogMutation
Mutation returns the MemberLoginLogMutation object of the builder.
func (*MemberLoginLogUpdate) Save ¶
func (mllu *MemberLoginLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*MemberLoginLogUpdate) SaveX ¶
func (mllu *MemberLoginLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemberLoginLogUpdate) SetIP ¶
func (mllu *MemberLoginLogUpdate) SetIP(s string) *MemberLoginLogUpdate
SetIP sets the ip field.
func (*MemberLoginLogUpdate) SetMemberGid ¶
func (mllu *MemberLoginLogUpdate) SetMemberGid(u uuid.UUID) *MemberLoginLogUpdate
SetMemberGid sets the member_gid field.
func (*MemberLoginLogUpdate) SetNillableIP ¶
func (mllu *MemberLoginLogUpdate) SetNillableIP(s *string) *MemberLoginLogUpdate
SetNillableIP sets the ip field if the given value is not nil.
func (*MemberLoginLogUpdate) SetNillableOwnerID ¶
func (mllu *MemberLoginLogUpdate) SetNillableOwnerID(id *int) *MemberLoginLogUpdate
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*MemberLoginLogUpdate) SetNillableUserAgent ¶
func (mllu *MemberLoginLogUpdate) SetNillableUserAgent(s *string) *MemberLoginLogUpdate
SetNillableUserAgent sets the user_agent field if the given value is not nil.
func (*MemberLoginLogUpdate) SetOwner ¶
func (mllu *MemberLoginLogUpdate) SetOwner(m *Member) *MemberLoginLogUpdate
SetOwner sets the owner edge to Member.
func (*MemberLoginLogUpdate) SetOwnerID ¶
func (mllu *MemberLoginLogUpdate) SetOwnerID(id int) *MemberLoginLogUpdate
SetOwnerID sets the owner edge to Member by id.
func (*MemberLoginLogUpdate) SetUserAgent ¶
func (mllu *MemberLoginLogUpdate) SetUserAgent(s string) *MemberLoginLogUpdate
SetUserAgent sets the user_agent field.
func (*MemberLoginLogUpdate) Where ¶
func (mllu *MemberLoginLogUpdate) Where(ps ...predicate.MemberLoginLog) *MemberLoginLogUpdate
Where adds a new predicate for the builder.
type MemberLoginLogUpdateOne ¶
type MemberLoginLogUpdateOne struct {
// contains filtered or unexported fields
}
MemberLoginLogUpdateOne is the builder for updating a single MemberLoginLog entity.
func (*MemberLoginLogUpdateOne) ClearIP ¶
func (mlluo *MemberLoginLogUpdateOne) ClearIP() *MemberLoginLogUpdateOne
ClearIP clears the value of ip.
func (*MemberLoginLogUpdateOne) ClearOwner ¶
func (mlluo *MemberLoginLogUpdateOne) ClearOwner() *MemberLoginLogUpdateOne
ClearOwner clears the "owner" edge to type Member.
func (*MemberLoginLogUpdateOne) ClearUserAgent ¶
func (mlluo *MemberLoginLogUpdateOne) ClearUserAgent() *MemberLoginLogUpdateOne
ClearUserAgent clears the value of user_agent.
func (*MemberLoginLogUpdateOne) Exec ¶
func (mlluo *MemberLoginLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MemberLoginLogUpdateOne) ExecX ¶
func (mlluo *MemberLoginLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberLoginLogUpdateOne) Mutation ¶
func (mlluo *MemberLoginLogUpdateOne) Mutation() *MemberLoginLogMutation
Mutation returns the MemberLoginLogMutation object of the builder.
func (*MemberLoginLogUpdateOne) Save ¶
func (mlluo *MemberLoginLogUpdateOne) Save(ctx context.Context) (*MemberLoginLog, error)
Save executes the query and returns the updated entity.
func (*MemberLoginLogUpdateOne) SaveX ¶
func (mlluo *MemberLoginLogUpdateOne) SaveX(ctx context.Context) *MemberLoginLog
SaveX is like Save, but panics if an error occurs.
func (*MemberLoginLogUpdateOne) SetIP ¶
func (mlluo *MemberLoginLogUpdateOne) SetIP(s string) *MemberLoginLogUpdateOne
SetIP sets the ip field.
func (*MemberLoginLogUpdateOne) SetMemberGid ¶
func (mlluo *MemberLoginLogUpdateOne) SetMemberGid(u uuid.UUID) *MemberLoginLogUpdateOne
SetMemberGid sets the member_gid field.
func (*MemberLoginLogUpdateOne) SetNillableIP ¶
func (mlluo *MemberLoginLogUpdateOne) SetNillableIP(s *string) *MemberLoginLogUpdateOne
SetNillableIP sets the ip field if the given value is not nil.
func (*MemberLoginLogUpdateOne) SetNillableOwnerID ¶
func (mlluo *MemberLoginLogUpdateOne) SetNillableOwnerID(id *int) *MemberLoginLogUpdateOne
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*MemberLoginLogUpdateOne) SetNillableUserAgent ¶
func (mlluo *MemberLoginLogUpdateOne) SetNillableUserAgent(s *string) *MemberLoginLogUpdateOne
SetNillableUserAgent sets the user_agent field if the given value is not nil.
func (*MemberLoginLogUpdateOne) SetOwner ¶
func (mlluo *MemberLoginLogUpdateOne) SetOwner(m *Member) *MemberLoginLogUpdateOne
SetOwner sets the owner edge to Member.
func (*MemberLoginLogUpdateOne) SetOwnerID ¶
func (mlluo *MemberLoginLogUpdateOne) SetOwnerID(id int) *MemberLoginLogUpdateOne
SetOwnerID sets the owner edge to Member by id.
func (*MemberLoginLogUpdateOne) SetUserAgent ¶
func (mlluo *MemberLoginLogUpdateOne) SetUserAgent(s string) *MemberLoginLogUpdateOne
SetUserAgent sets the user_agent field.
type MemberLoginLogs ¶
type MemberLoginLogs []*MemberLoginLog
MemberLoginLogs is a parsable slice of MemberLoginLog.
type MemberMutation ¶
type MemberMutation struct {
// contains filtered or unexported fields
}
MemberMutation represents an operation that mutate the Members nodes in the graph.
func (*MemberMutation) AddField ¶
func (m *MemberMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*MemberMutation) AddGender ¶
func (m *MemberMutation) AddGender(i int)
AddGender adds i to gender.
func (*MemberMutation) AddLoginLogIDs ¶
func (m *MemberMutation) AddLoginLogIDs(ids ...int)
AddLoginLogIDs adds the loginLogs edge to MemberLoginLog by ids.
func (*MemberMutation) AddNoteArticleIDs ¶
func (m *MemberMutation) AddNoteArticleIDs(ids ...int)
AddNoteArticleIDs adds the noteArticles edge to NoteArticle by ids.
func (*MemberMutation) AddNoteFilesystemIDs ¶
func (m *MemberMutation) AddNoteFilesystemIDs(ids ...int)
AddNoteFilesystemIDs adds the noteFilesystem edge to NoteFilesystem by ids.
func (*MemberMutation) AddedEdges ¶
func (m *MemberMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MemberMutation) AddedField ¶
func (m *MemberMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*MemberMutation) AddedFields ¶
func (m *MemberMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*MemberMutation) AddedGender ¶
func (m *MemberMutation) AddedGender() (r int, exists bool)
AddedGender returns the value that was added to the gender field in this mutation.
func (*MemberMutation) AddedIDs ¶
func (m *MemberMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*MemberMutation) ClearEdge ¶
func (m *MemberMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*MemberMutation) ClearField ¶
func (m *MemberMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*MemberMutation) ClearGender ¶
func (m *MemberMutation) ClearGender()
ClearGender clears the value of gender.
func (*MemberMutation) ClearLoginLogs ¶
func (m *MemberMutation) ClearLoginLogs()
ClearLoginLogs clears the loginLogs edge to MemberLoginLog.
func (*MemberMutation) ClearNoteArticles ¶
func (m *MemberMutation) ClearNoteArticles()
ClearNoteArticles clears the noteArticles edge to NoteArticle.
func (*MemberMutation) ClearNoteFilesystem ¶
func (m *MemberMutation) ClearNoteFilesystem()
ClearNoteFilesystem clears the noteFilesystem edge to NoteFilesystem.
func (*MemberMutation) ClearedEdges ¶
func (m *MemberMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MemberMutation) ClearedFields ¶
func (m *MemberMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MemberMutation) Client ¶
func (m MemberMutation) 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 (*MemberMutation) CreatedAt ¶
func (m *MemberMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*MemberMutation) EdgeCleared ¶
func (m *MemberMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*MemberMutation) Email ¶
func (m *MemberMutation) Email() (r string, exists bool)
Email returns the email value in the mutation.
func (*MemberMutation) Field ¶
func (m *MemberMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*MemberMutation) FieldCleared ¶
func (m *MemberMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*MemberMutation) Fields ¶
func (m *MemberMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*MemberMutation) Gender ¶
func (m *MemberMutation) Gender() (r int, exists bool)
Gender returns the gender value in the mutation.
func (*MemberMutation) GenderCleared ¶
func (m *MemberMutation) GenderCleared() bool
GenderCleared returns if the field gender was cleared in this mutation.
func (*MemberMutation) Gid ¶
func (m *MemberMutation) Gid() (r uuid.UUID, exists bool)
Gid returns the gid value in the mutation.
func (*MemberMutation) ID ¶
func (m *MemberMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*MemberMutation) LoginLogsCleared ¶
func (m *MemberMutation) LoginLogsCleared() bool
LoginLogsCleared returns if the edge loginLogs was cleared.
func (*MemberMutation) LoginLogsIDs ¶
func (m *MemberMutation) LoginLogsIDs() (ids []int)
LoginLogsIDs returns the loginLogs ids in the mutation.
func (*MemberMutation) Nickname ¶
func (m *MemberMutation) Nickname() (r string, exists bool)
Nickname returns the nickname value in the mutation.
func (*MemberMutation) NoteArticlesCleared ¶
func (m *MemberMutation) NoteArticlesCleared() bool
NoteArticlesCleared returns if the edge noteArticles was cleared.
func (*MemberMutation) NoteArticlesIDs ¶
func (m *MemberMutation) NoteArticlesIDs() (ids []int)
NoteArticlesIDs returns the noteArticles ids in the mutation.
func (*MemberMutation) NoteFilesystemCleared ¶
func (m *MemberMutation) NoteFilesystemCleared() bool
NoteFilesystemCleared returns if the edge noteFilesystem was cleared.
func (*MemberMutation) NoteFilesystemIDs ¶
func (m *MemberMutation) NoteFilesystemIDs() (ids []int)
NoteFilesystemIDs returns the noteFilesystem ids in the mutation.
func (*MemberMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Member. If the Member 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 database query fails.
func (*MemberMutation) OldEmail ¶
func (m *MemberMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old email value of the Member. If the Member 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 database query fails.
func (*MemberMutation) 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 was failed.
func (*MemberMutation) OldGender ¶
func (m *MemberMutation) OldGender(ctx context.Context) (v int, err error)
OldGender returns the old gender value of the Member. If the Member 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 database query fails.
func (*MemberMutation) OldGid ¶
OldGid returns the old gid value of the Member. If the Member 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 database query fails.
func (*MemberMutation) OldNickname ¶
func (m *MemberMutation) OldNickname(ctx context.Context) (v string, err error)
OldNickname returns the old nickname value of the Member. If the Member 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 database query fails.
func (*MemberMutation) OldPassword ¶
func (m *MemberMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old password value of the Member. If the Member 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 database query fails.
func (*MemberMutation) OldSignature ¶
func (m *MemberMutation) OldSignature(ctx context.Context) (v string, err error)
OldSignature returns the old signature value of the Member. If the Member 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 database query fails.
func (*MemberMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Member. If the Member 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 database query fails.
func (*MemberMutation) Password ¶
func (m *MemberMutation) Password() (r string, exists bool)
Password returns the password value in the mutation.
func (*MemberMutation) RemoveLoginLogIDs ¶
func (m *MemberMutation) RemoveLoginLogIDs(ids ...int)
RemoveLoginLogIDs removes the loginLogs edge to MemberLoginLog by ids.
func (*MemberMutation) RemoveNoteArticleIDs ¶
func (m *MemberMutation) RemoveNoteArticleIDs(ids ...int)
RemoveNoteArticleIDs removes the noteArticles edge to NoteArticle by ids.
func (*MemberMutation) RemoveNoteFilesystemIDs ¶
func (m *MemberMutation) RemoveNoteFilesystemIDs(ids ...int)
RemoveNoteFilesystemIDs removes the noteFilesystem edge to NoteFilesystem by ids.
func (*MemberMutation) RemovedEdges ¶
func (m *MemberMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MemberMutation) RemovedIDs ¶
func (m *MemberMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*MemberMutation) RemovedLoginLogsIDs ¶
func (m *MemberMutation) RemovedLoginLogsIDs() (ids []int)
RemovedLoginLogs returns the removed ids of loginLogs.
func (*MemberMutation) RemovedNoteArticlesIDs ¶
func (m *MemberMutation) RemovedNoteArticlesIDs() (ids []int)
RemovedNoteArticles returns the removed ids of noteArticles.
func (*MemberMutation) RemovedNoteFilesystemIDs ¶
func (m *MemberMutation) RemovedNoteFilesystemIDs() (ids []int)
RemovedNoteFilesystem returns the removed ids of noteFilesystem.
func (*MemberMutation) ResetCreatedAt ¶
func (m *MemberMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*MemberMutation) ResetEdge ¶
func (m *MemberMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*MemberMutation) ResetEmail ¶
func (m *MemberMutation) ResetEmail()
ResetEmail reset all changes of the "email" field.
func (*MemberMutation) ResetField ¶
func (m *MemberMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*MemberMutation) ResetGender ¶
func (m *MemberMutation) ResetGender()
ResetGender reset all changes of the "gender" field.
func (*MemberMutation) ResetGid ¶
func (m *MemberMutation) ResetGid()
ResetGid reset all changes of the "gid" field.
func (*MemberMutation) ResetLoginLogs ¶
func (m *MemberMutation) ResetLoginLogs()
ResetLoginLogs reset all changes of the "loginLogs" edge.
func (*MemberMutation) ResetNickname ¶
func (m *MemberMutation) ResetNickname()
ResetNickname reset all changes of the "nickname" field.
func (*MemberMutation) ResetNoteArticles ¶
func (m *MemberMutation) ResetNoteArticles()
ResetNoteArticles reset all changes of the "noteArticles" edge.
func (*MemberMutation) ResetNoteFilesystem ¶
func (m *MemberMutation) ResetNoteFilesystem()
ResetNoteFilesystem reset all changes of the "noteFilesystem" edge.
func (*MemberMutation) ResetPassword ¶
func (m *MemberMutation) ResetPassword()
ResetPassword reset all changes of the "password" field.
func (*MemberMutation) ResetSignature ¶
func (m *MemberMutation) ResetSignature()
ResetSignature reset all changes of the "signature" field.
func (*MemberMutation) ResetUpdatedAt ¶
func (m *MemberMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*MemberMutation) SetCreatedAt ¶
func (m *MemberMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*MemberMutation) SetEmail ¶
func (m *MemberMutation) SetEmail(s string)
SetEmail sets the email field.
func (*MemberMutation) SetField ¶
func (m *MemberMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*MemberMutation) SetGender ¶
func (m *MemberMutation) SetGender(i int)
SetGender sets the gender field.
func (*MemberMutation) SetGid ¶
func (m *MemberMutation) SetGid(u uuid.UUID)
SetGid sets the gid field.
func (*MemberMutation) SetID ¶
func (m *MemberMutation) SetID(id int)
SetID sets the value of the id field. Note that, this operation is accepted only on Member creation.
func (*MemberMutation) SetNickname ¶
func (m *MemberMutation) SetNickname(s string)
SetNickname sets the nickname field.
func (*MemberMutation) SetPassword ¶
func (m *MemberMutation) SetPassword(s string)
SetPassword sets the password field.
func (*MemberMutation) SetSignature ¶
func (m *MemberMutation) SetSignature(s string)
SetSignature sets the signature field.
func (*MemberMutation) SetUpdatedAt ¶
func (m *MemberMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*MemberMutation) Signature ¶
func (m *MemberMutation) Signature() (r string, exists bool)
Signature returns the signature value in the mutation.
func (MemberMutation) Tx ¶
func (m MemberMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MemberMutation) Type ¶
func (m *MemberMutation) Type() string
Type returns the node type of this mutation (Member).
type MemberQuery ¶
type MemberQuery struct {
// contains filtered or unexported fields
}
MemberQuery is the builder for querying Member entities.
func (*MemberQuery) All ¶
func (mq *MemberQuery) All(ctx context.Context) ([]*Member, error)
All executes the query and returns a list of Members.
func (*MemberQuery) AllX ¶
func (mq *MemberQuery) AllX(ctx context.Context) []*Member
AllX is like All, but panics if an error occurs.
func (*MemberQuery) Clone ¶
func (mq *MemberQuery) Clone() *MemberQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MemberQuery) Count ¶
func (mq *MemberQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MemberQuery) CountX ¶
func (mq *MemberQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MemberQuery) Exist ¶
func (mq *MemberQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MemberQuery) ExistX ¶
func (mq *MemberQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MemberQuery) First ¶
func (mq *MemberQuery) First(ctx context.Context) (*Member, error)
First returns the first Member entity in the query. Returns *NotFoundError when no member was found.
func (*MemberQuery) FirstID ¶
func (mq *MemberQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Member id in the query. Returns *NotFoundError when no id was found.
func (*MemberQuery) FirstX ¶
func (mq *MemberQuery) FirstX(ctx context.Context) *Member
FirstX is like First, but panics if an error occurs.
func (*MemberQuery) FirstXID ¶
func (mq *MemberQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*MemberQuery) GroupBy ¶
func (mq *MemberQuery) GroupBy(field string, fields ...string) *MemberGroupBy
GroupBy 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.Member.Query(). GroupBy(member.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MemberQuery) IDs ¶
func (mq *MemberQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Member ids.
func (*MemberQuery) IDsX ¶
func (mq *MemberQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MemberQuery) Limit ¶
func (mq *MemberQuery) Limit(limit int) *MemberQuery
Limit adds a limit step to the query.
func (*MemberQuery) Offset ¶
func (mq *MemberQuery) Offset(offset int) *MemberQuery
Offset adds an offset step to the query.
func (*MemberQuery) Only ¶
func (mq *MemberQuery) Only(ctx context.Context) (*Member, error)
Only returns the only Member entity in the query, returns an error if not exactly one entity was returned.
func (*MemberQuery) OnlyID ¶
func (mq *MemberQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Member id in the query, returns an error if not exactly one id was returned.
func (*MemberQuery) OnlyIDX ¶
func (mq *MemberQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MemberQuery) OnlyX ¶
func (mq *MemberQuery) OnlyX(ctx context.Context) *Member
OnlyX is like Only, but panics if an error occurs.
func (*MemberQuery) Order ¶
func (mq *MemberQuery) Order(o ...OrderFunc) *MemberQuery
Order adds an order step to the query.
func (*MemberQuery) QueryLoginLogs ¶
func (mq *MemberQuery) QueryLoginLogs() *MemberLoginLogQuery
QueryLoginLogs chains the current query on the loginLogs edge.
func (*MemberQuery) QueryNoteArticles ¶
func (mq *MemberQuery) QueryNoteArticles() *NoteArticleQuery
QueryNoteArticles chains the current query on the noteArticles edge.
func (*MemberQuery) QueryNoteFilesystem ¶
func (mq *MemberQuery) QueryNoteFilesystem() *NoteFilesystemQuery
QueryNoteFilesystem chains the current query on the noteFilesystem edge.
func (*MemberQuery) Select ¶
func (mq *MemberQuery) Select(field string, fields ...string) *MemberSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Member.Query(). Select(member.FieldCreatedAt). Scan(ctx, &v)
func (*MemberQuery) Where ¶
func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery
Where adds a new predicate for the builder.
func (*MemberQuery) WithLoginLogs ¶
func (mq *MemberQuery) WithLoginLogs(opts ...func(*MemberLoginLogQuery)) *MemberQuery
WithLoginLogs tells the query-builder to eager-loads the nodes that are connected to
the "loginLogs" edge. The optional arguments used to configure the query builder of the edge.
func (*MemberQuery) WithNoteArticles ¶
func (mq *MemberQuery) WithNoteArticles(opts ...func(*NoteArticleQuery)) *MemberQuery
WithNoteArticles tells the query-builder to eager-loads the nodes that are connected to
the "noteArticles" edge. The optional arguments used to configure the query builder of the edge.
func (*MemberQuery) WithNoteFilesystem ¶
func (mq *MemberQuery) WithNoteFilesystem(opts ...func(*NoteFilesystemQuery)) *MemberQuery
WithNoteFilesystem tells the query-builder to eager-loads the nodes that are connected to
the "noteFilesystem" edge. The optional arguments used to configure the query builder of the edge.
type MemberSelect ¶
type MemberSelect struct {
// contains filtered or unexported fields
}
MemberSelect is the builder for select fields of Member entities.
func (*MemberSelect) Bool ¶
func (ms *MemberSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*MemberSelect) BoolX ¶
func (ms *MemberSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberSelect) Bools ¶
func (ms *MemberSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*MemberSelect) BoolsX ¶
func (ms *MemberSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberSelect) Float64 ¶
func (ms *MemberSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*MemberSelect) Float64X ¶
func (ms *MemberSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberSelect) Float64s ¶
func (ms *MemberSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*MemberSelect) Float64sX ¶
func (ms *MemberSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberSelect) Int ¶
func (ms *MemberSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*MemberSelect) IntX ¶
func (ms *MemberSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberSelect) Ints ¶
func (ms *MemberSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*MemberSelect) IntsX ¶
func (ms *MemberSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberSelect) Scan ¶
func (ms *MemberSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*MemberSelect) ScanX ¶
func (ms *MemberSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberSelect) String ¶
func (ms *MemberSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*MemberSelect) StringX ¶
func (ms *MemberSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberUpdate ¶
type MemberUpdate struct {
// contains filtered or unexported fields
}
MemberUpdate is the builder for updating Member entities.
func (*MemberUpdate) AddGender ¶
func (mu *MemberUpdate) AddGender(i int) *MemberUpdate
AddGender adds i to gender.
func (*MemberUpdate) AddLoginLogIDs ¶
func (mu *MemberUpdate) AddLoginLogIDs(ids ...int) *MemberUpdate
AddLoginLogIDs adds the loginLogs edge to MemberLoginLog by ids.
func (*MemberUpdate) AddLoginLogs ¶
func (mu *MemberUpdate) AddLoginLogs(m ...*MemberLoginLog) *MemberUpdate
AddLoginLogs adds the loginLogs edges to MemberLoginLog.
func (*MemberUpdate) AddNoteArticleIDs ¶
func (mu *MemberUpdate) AddNoteArticleIDs(ids ...int) *MemberUpdate
AddNoteArticleIDs adds the noteArticles edge to NoteArticle by ids.
func (*MemberUpdate) AddNoteArticles ¶
func (mu *MemberUpdate) AddNoteArticles(n ...*NoteArticle) *MemberUpdate
AddNoteArticles adds the noteArticles edges to NoteArticle.
func (*MemberUpdate) AddNoteFilesystem ¶
func (mu *MemberUpdate) AddNoteFilesystem(n ...*NoteFilesystem) *MemberUpdate
AddNoteFilesystem adds the noteFilesystem edges to NoteFilesystem.
func (*MemberUpdate) AddNoteFilesystemIDs ¶
func (mu *MemberUpdate) AddNoteFilesystemIDs(ids ...int) *MemberUpdate
AddNoteFilesystemIDs adds the noteFilesystem edge to NoteFilesystem by ids.
func (*MemberUpdate) ClearGender ¶
func (mu *MemberUpdate) ClearGender() *MemberUpdate
ClearGender clears the value of gender.
func (*MemberUpdate) ClearLoginLogs ¶
func (mu *MemberUpdate) ClearLoginLogs() *MemberUpdate
ClearLoginLogs clears all "loginLogs" edges to type MemberLoginLog.
func (*MemberUpdate) ClearNoteArticles ¶
func (mu *MemberUpdate) ClearNoteArticles() *MemberUpdate
ClearNoteArticles clears all "noteArticles" edges to type NoteArticle.
func (*MemberUpdate) ClearNoteFilesystem ¶
func (mu *MemberUpdate) ClearNoteFilesystem() *MemberUpdate
ClearNoteFilesystem clears all "noteFilesystem" edges to type NoteFilesystem.
func (*MemberUpdate) Exec ¶
func (mu *MemberUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberUpdate) ExecX ¶
func (mu *MemberUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberUpdate) Mutation ¶
func (mu *MemberUpdate) Mutation() *MemberMutation
Mutation returns the MemberMutation object of the builder.
func (*MemberUpdate) RemoveLoginLogIDs ¶
func (mu *MemberUpdate) RemoveLoginLogIDs(ids ...int) *MemberUpdate
RemoveLoginLogIDs removes the loginLogs edge to MemberLoginLog by ids.
func (*MemberUpdate) RemoveLoginLogs ¶
func (mu *MemberUpdate) RemoveLoginLogs(m ...*MemberLoginLog) *MemberUpdate
RemoveLoginLogs removes loginLogs edges to MemberLoginLog.
func (*MemberUpdate) RemoveNoteArticleIDs ¶
func (mu *MemberUpdate) RemoveNoteArticleIDs(ids ...int) *MemberUpdate
RemoveNoteArticleIDs removes the noteArticles edge to NoteArticle by ids.
func (*MemberUpdate) RemoveNoteArticles ¶
func (mu *MemberUpdate) RemoveNoteArticles(n ...*NoteArticle) *MemberUpdate
RemoveNoteArticles removes noteArticles edges to NoteArticle.
func (*MemberUpdate) RemoveNoteFilesystem ¶
func (mu *MemberUpdate) RemoveNoteFilesystem(n ...*NoteFilesystem) *MemberUpdate
RemoveNoteFilesystem removes noteFilesystem edges to NoteFilesystem.
func (*MemberUpdate) RemoveNoteFilesystemIDs ¶
func (mu *MemberUpdate) RemoveNoteFilesystemIDs(ids ...int) *MemberUpdate
RemoveNoteFilesystemIDs removes the noteFilesystem edge to NoteFilesystem by ids.
func (*MemberUpdate) Save ¶
func (mu *MemberUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*MemberUpdate) SaveX ¶
func (mu *MemberUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemberUpdate) SetEmail ¶
func (mu *MemberUpdate) SetEmail(s string) *MemberUpdate
SetEmail sets the email field.
func (*MemberUpdate) SetGender ¶
func (mu *MemberUpdate) SetGender(i int) *MemberUpdate
SetGender sets the gender field.
func (*MemberUpdate) SetNickname ¶
func (mu *MemberUpdate) SetNickname(s string) *MemberUpdate
SetNickname sets the nickname field.
func (*MemberUpdate) SetNillableGender ¶
func (mu *MemberUpdate) SetNillableGender(i *int) *MemberUpdate
SetNillableGender sets the gender field if the given value is not nil.
func (*MemberUpdate) SetPassword ¶
func (mu *MemberUpdate) SetPassword(s string) *MemberUpdate
SetPassword sets the password field.
func (*MemberUpdate) SetSignature ¶
func (mu *MemberUpdate) SetSignature(s string) *MemberUpdate
SetSignature sets the signature field.
func (*MemberUpdate) SetUpdatedAt ¶
func (mu *MemberUpdate) SetUpdatedAt(t time.Time) *MemberUpdate
SetUpdatedAt sets the updated_at field.
func (*MemberUpdate) Where ¶
func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate
Where adds a new predicate for the builder.
type MemberUpdateOne ¶
type MemberUpdateOne struct {
// contains filtered or unexported fields
}
MemberUpdateOne is the builder for updating a single Member entity.
func (*MemberUpdateOne) AddGender ¶
func (muo *MemberUpdateOne) AddGender(i int) *MemberUpdateOne
AddGender adds i to gender.
func (*MemberUpdateOne) AddLoginLogIDs ¶
func (muo *MemberUpdateOne) AddLoginLogIDs(ids ...int) *MemberUpdateOne
AddLoginLogIDs adds the loginLogs edge to MemberLoginLog by ids.
func (*MemberUpdateOne) AddLoginLogs ¶
func (muo *MemberUpdateOne) AddLoginLogs(m ...*MemberLoginLog) *MemberUpdateOne
AddLoginLogs adds the loginLogs edges to MemberLoginLog.
func (*MemberUpdateOne) AddNoteArticleIDs ¶
func (muo *MemberUpdateOne) AddNoteArticleIDs(ids ...int) *MemberUpdateOne
AddNoteArticleIDs adds the noteArticles edge to NoteArticle by ids.
func (*MemberUpdateOne) AddNoteArticles ¶
func (muo *MemberUpdateOne) AddNoteArticles(n ...*NoteArticle) *MemberUpdateOne
AddNoteArticles adds the noteArticles edges to NoteArticle.
func (*MemberUpdateOne) AddNoteFilesystem ¶
func (muo *MemberUpdateOne) AddNoteFilesystem(n ...*NoteFilesystem) *MemberUpdateOne
AddNoteFilesystem adds the noteFilesystem edges to NoteFilesystem.
func (*MemberUpdateOne) AddNoteFilesystemIDs ¶
func (muo *MemberUpdateOne) AddNoteFilesystemIDs(ids ...int) *MemberUpdateOne
AddNoteFilesystemIDs adds the noteFilesystem edge to NoteFilesystem by ids.
func (*MemberUpdateOne) ClearGender ¶
func (muo *MemberUpdateOne) ClearGender() *MemberUpdateOne
ClearGender clears the value of gender.
func (*MemberUpdateOne) ClearLoginLogs ¶
func (muo *MemberUpdateOne) ClearLoginLogs() *MemberUpdateOne
ClearLoginLogs clears all "loginLogs" edges to type MemberLoginLog.
func (*MemberUpdateOne) ClearNoteArticles ¶
func (muo *MemberUpdateOne) ClearNoteArticles() *MemberUpdateOne
ClearNoteArticles clears all "noteArticles" edges to type NoteArticle.
func (*MemberUpdateOne) ClearNoteFilesystem ¶
func (muo *MemberUpdateOne) ClearNoteFilesystem() *MemberUpdateOne
ClearNoteFilesystem clears all "noteFilesystem" edges to type NoteFilesystem.
func (*MemberUpdateOne) Exec ¶
func (muo *MemberUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MemberUpdateOne) ExecX ¶
func (muo *MemberUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberUpdateOne) Mutation ¶
func (muo *MemberUpdateOne) Mutation() *MemberMutation
Mutation returns the MemberMutation object of the builder.
func (*MemberUpdateOne) RemoveLoginLogIDs ¶
func (muo *MemberUpdateOne) RemoveLoginLogIDs(ids ...int) *MemberUpdateOne
RemoveLoginLogIDs removes the loginLogs edge to MemberLoginLog by ids.
func (*MemberUpdateOne) RemoveLoginLogs ¶
func (muo *MemberUpdateOne) RemoveLoginLogs(m ...*MemberLoginLog) *MemberUpdateOne
RemoveLoginLogs removes loginLogs edges to MemberLoginLog.
func (*MemberUpdateOne) RemoveNoteArticleIDs ¶
func (muo *MemberUpdateOne) RemoveNoteArticleIDs(ids ...int) *MemberUpdateOne
RemoveNoteArticleIDs removes the noteArticles edge to NoteArticle by ids.
func (*MemberUpdateOne) RemoveNoteArticles ¶
func (muo *MemberUpdateOne) RemoveNoteArticles(n ...*NoteArticle) *MemberUpdateOne
RemoveNoteArticles removes noteArticles edges to NoteArticle.
func (*MemberUpdateOne) RemoveNoteFilesystem ¶
func (muo *MemberUpdateOne) RemoveNoteFilesystem(n ...*NoteFilesystem) *MemberUpdateOne
RemoveNoteFilesystem removes noteFilesystem edges to NoteFilesystem.
func (*MemberUpdateOne) RemoveNoteFilesystemIDs ¶
func (muo *MemberUpdateOne) RemoveNoteFilesystemIDs(ids ...int) *MemberUpdateOne
RemoveNoteFilesystemIDs removes the noteFilesystem edge to NoteFilesystem by ids.
func (*MemberUpdateOne) Save ¶
func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)
Save executes the query and returns the updated entity.
func (*MemberUpdateOne) SaveX ¶
func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member
SaveX is like Save, but panics if an error occurs.
func (*MemberUpdateOne) SetEmail ¶
func (muo *MemberUpdateOne) SetEmail(s string) *MemberUpdateOne
SetEmail sets the email field.
func (*MemberUpdateOne) SetGender ¶
func (muo *MemberUpdateOne) SetGender(i int) *MemberUpdateOne
SetGender sets the gender field.
func (*MemberUpdateOne) SetNickname ¶
func (muo *MemberUpdateOne) SetNickname(s string) *MemberUpdateOne
SetNickname sets the nickname field.
func (*MemberUpdateOne) SetNillableGender ¶
func (muo *MemberUpdateOne) SetNillableGender(i *int) *MemberUpdateOne
SetNillableGender sets the gender field if the given value is not nil.
func (*MemberUpdateOne) SetPassword ¶
func (muo *MemberUpdateOne) SetPassword(s string) *MemberUpdateOne
SetPassword sets the password field.
func (*MemberUpdateOne) SetSignature ¶
func (muo *MemberUpdateOne) SetSignature(s string) *MemberUpdateOne
SetSignature sets the signature field.
func (*MemberUpdateOne) SetUpdatedAt ¶
func (muo *MemberUpdateOne) SetUpdatedAt(t time.Time) *MemberUpdateOne
SetUpdatedAt sets the updated_at field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflict 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 NoteArticle ¶
type NoteArticle struct { // ID of the ent. ID int `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"` // Gid holds the value of the "gid" field. Gid uuid.UUID `json:"gid,omitempty"` // MemberGid holds the value of the "member_gid" field. MemberGid uuid.UUID `json:"member_gid,omitempty"` // Mime holds the value of the "mime" field. Mime notearticle.Mime `json:"mime,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NoteArticleQuery when eager-loading is set. Edges NoteArticleEdges `json:"edges"` // contains filtered or unexported fields }
NoteArticle is the model entity for the NoteArticle schema.
func (*NoteArticle) QueryOwner ¶
func (na *NoteArticle) QueryOwner() *MemberQuery
QueryOwner queries the owner edge of the NoteArticle.
func (*NoteArticle) String ¶
func (na *NoteArticle) String() string
String implements the fmt.Stringer.
func (*NoteArticle) Unwrap ¶
func (na *NoteArticle) Unwrap() *NoteArticle
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*NoteArticle) Update ¶
func (na *NoteArticle) Update() *NoteArticleUpdateOne
Update returns a builder for updating this NoteArticle. Note that, you need to call NoteArticle.Unwrap() before calling this method, if this NoteArticle was returned from a transaction, and the transaction was committed or rolled back.
type NoteArticleClient ¶
type NoteArticleClient struct {
// contains filtered or unexported fields
}
NoteArticleClient is a client for the NoteArticle schema.
func NewNoteArticleClient ¶
func NewNoteArticleClient(c config) *NoteArticleClient
NewNoteArticleClient returns a client for the NoteArticle from the given config.
func (*NoteArticleClient) Create ¶
func (c *NoteArticleClient) Create() *NoteArticleCreate
Create returns a create builder for NoteArticle.
func (*NoteArticleClient) CreateBulk ¶
func (c *NoteArticleClient) CreateBulk(builders ...*NoteArticleCreate) *NoteArticleCreateBulk
BulkCreate returns a builder for creating a bulk of NoteArticle entities.
func (*NoteArticleClient) Delete ¶
func (c *NoteArticleClient) Delete() *NoteArticleDelete
Delete returns a delete builder for NoteArticle.
func (*NoteArticleClient) DeleteOne ¶
func (c *NoteArticleClient) DeleteOne(na *NoteArticle) *NoteArticleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NoteArticleClient) DeleteOneID ¶
func (c *NoteArticleClient) DeleteOneID(id int) *NoteArticleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NoteArticleClient) Get ¶
func (c *NoteArticleClient) Get(ctx context.Context, id int) (*NoteArticle, error)
Get returns a NoteArticle entity by its id.
func (*NoteArticleClient) GetX ¶
func (c *NoteArticleClient) GetX(ctx context.Context, id int) *NoteArticle
GetX is like Get, but panics if an error occurs.
func (*NoteArticleClient) Hooks ¶
func (c *NoteArticleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NoteArticleClient) Query ¶
func (c *NoteArticleClient) Query() *NoteArticleQuery
Query returns a query builder for NoteArticle.
func (*NoteArticleClient) QueryOwner ¶
func (c *NoteArticleClient) QueryOwner(na *NoteArticle) *MemberQuery
QueryOwner queries the owner edge of a NoteArticle.
func (*NoteArticleClient) Update ¶
func (c *NoteArticleClient) Update() *NoteArticleUpdate
Update returns an update builder for NoteArticle.
func (*NoteArticleClient) UpdateOne ¶
func (c *NoteArticleClient) UpdateOne(na *NoteArticle) *NoteArticleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NoteArticleClient) UpdateOneID ¶
func (c *NoteArticleClient) UpdateOneID(id int) *NoteArticleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NoteArticleClient) Use ¶
func (c *NoteArticleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notearticle.Hooks(f(g(h())))`.
type NoteArticleCreate ¶
type NoteArticleCreate struct {
// contains filtered or unexported fields
}
NoteArticleCreate is the builder for creating a NoteArticle entity.
func (*NoteArticleCreate) Mutation ¶
func (nac *NoteArticleCreate) Mutation() *NoteArticleMutation
Mutation returns the NoteArticleMutation object of the builder.
func (*NoteArticleCreate) Save ¶
func (nac *NoteArticleCreate) Save(ctx context.Context) (*NoteArticle, error)
Save creates the NoteArticle in the database.
func (*NoteArticleCreate) SaveX ¶
func (nac *NoteArticleCreate) SaveX(ctx context.Context) *NoteArticle
SaveX calls Save and panics if Save returns an error.
func (*NoteArticleCreate) SetContent ¶
func (nac *NoteArticleCreate) SetContent(s string) *NoteArticleCreate
SetContent sets the content field.
func (*NoteArticleCreate) SetCreatedAt ¶
func (nac *NoteArticleCreate) SetCreatedAt(t time.Time) *NoteArticleCreate
SetCreatedAt sets the created_at field.
func (*NoteArticleCreate) SetGid ¶
func (nac *NoteArticleCreate) SetGid(u uuid.UUID) *NoteArticleCreate
SetGid sets the gid field.
func (*NoteArticleCreate) SetID ¶
func (nac *NoteArticleCreate) SetID(i int) *NoteArticleCreate
SetID sets the id field.
func (*NoteArticleCreate) SetMemberGid ¶
func (nac *NoteArticleCreate) SetMemberGid(u uuid.UUID) *NoteArticleCreate
SetMemberGid sets the member_gid field.
func (*NoteArticleCreate) SetMime ¶
func (nac *NoteArticleCreate) SetMime(n notearticle.Mime) *NoteArticleCreate
SetMime sets the mime field.
func (*NoteArticleCreate) SetNillableCreatedAt ¶
func (nac *NoteArticleCreate) SetNillableCreatedAt(t *time.Time) *NoteArticleCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*NoteArticleCreate) SetNillableOwnerID ¶
func (nac *NoteArticleCreate) SetNillableOwnerID(id *int) *NoteArticleCreate
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*NoteArticleCreate) SetNillableUpdatedAt ¶
func (nac *NoteArticleCreate) SetNillableUpdatedAt(t *time.Time) *NoteArticleCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*NoteArticleCreate) SetOwner ¶
func (nac *NoteArticleCreate) SetOwner(m *Member) *NoteArticleCreate
SetOwner sets the owner edge to Member.
func (*NoteArticleCreate) SetOwnerID ¶
func (nac *NoteArticleCreate) SetOwnerID(id int) *NoteArticleCreate
SetOwnerID sets the owner edge to Member by id.
func (*NoteArticleCreate) SetUpdatedAt ¶
func (nac *NoteArticleCreate) SetUpdatedAt(t time.Time) *NoteArticleCreate
SetUpdatedAt sets the updated_at field.
type NoteArticleCreateBulk ¶
type NoteArticleCreateBulk struct {
// contains filtered or unexported fields
}
NoteArticleCreateBulk is the builder for creating a bulk of NoteArticle entities.
func (*NoteArticleCreateBulk) Save ¶
func (nacb *NoteArticleCreateBulk) Save(ctx context.Context) ([]*NoteArticle, error)
Save creates the NoteArticle entities in the database.
func (*NoteArticleCreateBulk) SaveX ¶
func (nacb *NoteArticleCreateBulk) SaveX(ctx context.Context) []*NoteArticle
SaveX calls Save and panics if Save returns an error.
type NoteArticleDelete ¶
type NoteArticleDelete struct {
// contains filtered or unexported fields
}
NoteArticleDelete is the builder for deleting a NoteArticle entity.
func (*NoteArticleDelete) Exec ¶
func (nad *NoteArticleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NoteArticleDelete) ExecX ¶
func (nad *NoteArticleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NoteArticleDelete) Where ¶
func (nad *NoteArticleDelete) Where(ps ...predicate.NoteArticle) *NoteArticleDelete
Where adds a new predicate to the delete builder.
type NoteArticleDeleteOne ¶
type NoteArticleDeleteOne struct {
// contains filtered or unexported fields
}
NoteArticleDeleteOne is the builder for deleting a single NoteArticle entity.
func (*NoteArticleDeleteOne) Exec ¶
func (nado *NoteArticleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NoteArticleDeleteOne) ExecX ¶
func (nado *NoteArticleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NoteArticleEdges ¶
type NoteArticleEdges struct { // Owner holds the value of the owner edge. Owner *Member // contains filtered or unexported fields }
NoteArticleEdges holds the relations/edges for other nodes in the graph.
func (NoteArticleEdges) OwnerOrErr ¶
func (e NoteArticleEdges) OwnerOrErr() (*Member, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NoteArticleGroupBy ¶
type NoteArticleGroupBy struct {
// contains filtered or unexported fields
}
NoteArticleGroupBy is the builder for group-by NoteArticle entities.
func (*NoteArticleGroupBy) Aggregate ¶
func (nagb *NoteArticleGroupBy) Aggregate(fns ...AggregateFunc) *NoteArticleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NoteArticleGroupBy) Bool ¶
func (nagb *NoteArticleGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*NoteArticleGroupBy) BoolX ¶
func (nagb *NoteArticleGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NoteArticleGroupBy) Bools ¶
func (nagb *NoteArticleGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*NoteArticleGroupBy) BoolsX ¶
func (nagb *NoteArticleGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NoteArticleGroupBy) Float64 ¶
func (nagb *NoteArticleGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*NoteArticleGroupBy) Float64X ¶
func (nagb *NoteArticleGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NoteArticleGroupBy) Float64s ¶
func (nagb *NoteArticleGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*NoteArticleGroupBy) Float64sX ¶
func (nagb *NoteArticleGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NoteArticleGroupBy) Int ¶
func (nagb *NoteArticleGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*NoteArticleGroupBy) IntX ¶
func (nagb *NoteArticleGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NoteArticleGroupBy) Ints ¶
func (nagb *NoteArticleGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*NoteArticleGroupBy) IntsX ¶
func (nagb *NoteArticleGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NoteArticleGroupBy) Scan ¶
func (nagb *NoteArticleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*NoteArticleGroupBy) ScanX ¶
func (nagb *NoteArticleGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NoteArticleGroupBy) String ¶
func (nagb *NoteArticleGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*NoteArticleGroupBy) StringX ¶
func (nagb *NoteArticleGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NoteArticleMutation ¶
type NoteArticleMutation struct {
// contains filtered or unexported fields
}
NoteArticleMutation represents an operation that mutate the NoteArticles nodes in the graph.
func (*NoteArticleMutation) AddField ¶
func (m *NoteArticleMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*NoteArticleMutation) AddedEdges ¶
func (m *NoteArticleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NoteArticleMutation) AddedField ¶
func (m *NoteArticleMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*NoteArticleMutation) AddedFields ¶
func (m *NoteArticleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*NoteArticleMutation) AddedIDs ¶
func (m *NoteArticleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*NoteArticleMutation) ClearEdge ¶
func (m *NoteArticleMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*NoteArticleMutation) ClearField ¶
func (m *NoteArticleMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*NoteArticleMutation) ClearOwner ¶
func (m *NoteArticleMutation) ClearOwner()
ClearOwner clears the owner edge to Member.
func (*NoteArticleMutation) ClearedEdges ¶
func (m *NoteArticleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NoteArticleMutation) ClearedFields ¶
func (m *NoteArticleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NoteArticleMutation) Client ¶
func (m NoteArticleMutation) 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 (*NoteArticleMutation) Content ¶
func (m *NoteArticleMutation) Content() (r string, exists bool)
Content returns the content value in the mutation.
func (*NoteArticleMutation) CreatedAt ¶
func (m *NoteArticleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*NoteArticleMutation) EdgeCleared ¶
func (m *NoteArticleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*NoteArticleMutation) Field ¶
func (m *NoteArticleMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*NoteArticleMutation) FieldCleared ¶
func (m *NoteArticleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*NoteArticleMutation) Fields ¶
func (m *NoteArticleMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*NoteArticleMutation) Gid ¶
func (m *NoteArticleMutation) Gid() (r uuid.UUID, exists bool)
Gid returns the gid value in the mutation.
func (*NoteArticleMutation) ID ¶
func (m *NoteArticleMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*NoteArticleMutation) MemberGid ¶
func (m *NoteArticleMutation) MemberGid() (r uuid.UUID, exists bool)
MemberGid returns the member_gid value in the mutation.
func (*NoteArticleMutation) Mime ¶
func (m *NoteArticleMutation) Mime() (r notearticle.Mime, exists bool)
Mime returns the mime value in the mutation.
func (*NoteArticleMutation) OldContent ¶
func (m *NoteArticleMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old content value of the NoteArticle. If the NoteArticle 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 database query fails.
func (*NoteArticleMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the NoteArticle. If the NoteArticle 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 database query fails.
func (*NoteArticleMutation) 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 was failed.
func (*NoteArticleMutation) OldGid ¶
OldGid returns the old gid value of the NoteArticle. If the NoteArticle 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 database query fails.
func (*NoteArticleMutation) OldMemberGid ¶
OldMemberGid returns the old member_gid value of the NoteArticle. If the NoteArticle 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 database query fails.
func (*NoteArticleMutation) OldMime ¶
func (m *NoteArticleMutation) OldMime(ctx context.Context) (v notearticle.Mime, err error)
OldMime returns the old mime value of the NoteArticle. If the NoteArticle 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 database query fails.
func (*NoteArticleMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the NoteArticle. If the NoteArticle 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 database query fails.
func (*NoteArticleMutation) Op ¶
func (m *NoteArticleMutation) Op() Op
Op returns the operation name.
func (*NoteArticleMutation) OwnerCleared ¶
func (m *NoteArticleMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*NoteArticleMutation) OwnerID ¶
func (m *NoteArticleMutation) OwnerID() (id int, exists bool)
OwnerID returns the owner id in the mutation.
func (*NoteArticleMutation) OwnerIDs ¶
func (m *NoteArticleMutation) OwnerIDs() (ids []int)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*NoteArticleMutation) RemovedEdges ¶
func (m *NoteArticleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NoteArticleMutation) RemovedIDs ¶
func (m *NoteArticleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*NoteArticleMutation) ResetContent ¶
func (m *NoteArticleMutation) ResetContent()
ResetContent reset all changes of the "content" field.
func (*NoteArticleMutation) ResetCreatedAt ¶
func (m *NoteArticleMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*NoteArticleMutation) ResetEdge ¶
func (m *NoteArticleMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*NoteArticleMutation) ResetField ¶
func (m *NoteArticleMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*NoteArticleMutation) ResetGid ¶
func (m *NoteArticleMutation) ResetGid()
ResetGid reset all changes of the "gid" field.
func (*NoteArticleMutation) ResetMemberGid ¶
func (m *NoteArticleMutation) ResetMemberGid()
ResetMemberGid reset all changes of the "member_gid" field.
func (*NoteArticleMutation) ResetMime ¶
func (m *NoteArticleMutation) ResetMime()
ResetMime reset all changes of the "mime" field.
func (*NoteArticleMutation) ResetOwner ¶
func (m *NoteArticleMutation) ResetOwner()
ResetOwner reset all changes of the "owner" edge.
func (*NoteArticleMutation) ResetUpdatedAt ¶
func (m *NoteArticleMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*NoteArticleMutation) SetContent ¶
func (m *NoteArticleMutation) SetContent(s string)
SetContent sets the content field.
func (*NoteArticleMutation) SetCreatedAt ¶
func (m *NoteArticleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*NoteArticleMutation) SetField ¶
func (m *NoteArticleMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*NoteArticleMutation) SetGid ¶
func (m *NoteArticleMutation) SetGid(u uuid.UUID)
SetGid sets the gid field.
func (*NoteArticleMutation) SetID ¶
func (m *NoteArticleMutation) SetID(id int)
SetID sets the value of the id field. Note that, this operation is accepted only on NoteArticle creation.
func (*NoteArticleMutation) SetMemberGid ¶
func (m *NoteArticleMutation) SetMemberGid(u uuid.UUID)
SetMemberGid sets the member_gid field.
func (*NoteArticleMutation) SetMime ¶
func (m *NoteArticleMutation) SetMime(n notearticle.Mime)
SetMime sets the mime field.
func (*NoteArticleMutation) SetOwnerID ¶
func (m *NoteArticleMutation) SetOwnerID(id int)
SetOwnerID sets the owner edge to Member by id.
func (*NoteArticleMutation) SetUpdatedAt ¶
func (m *NoteArticleMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (NoteArticleMutation) Tx ¶
func (m NoteArticleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NoteArticleMutation) Type ¶
func (m *NoteArticleMutation) Type() string
Type returns the node type of this mutation (NoteArticle).
type NoteArticleQuery ¶
type NoteArticleQuery struct {
// contains filtered or unexported fields
}
NoteArticleQuery is the builder for querying NoteArticle entities.
func (*NoteArticleQuery) All ¶
func (naq *NoteArticleQuery) All(ctx context.Context) ([]*NoteArticle, error)
All executes the query and returns a list of NoteArticles.
func (*NoteArticleQuery) AllX ¶
func (naq *NoteArticleQuery) AllX(ctx context.Context) []*NoteArticle
AllX is like All, but panics if an error occurs.
func (*NoteArticleQuery) Clone ¶
func (naq *NoteArticleQuery) Clone() *NoteArticleQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NoteArticleQuery) Count ¶
func (naq *NoteArticleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NoteArticleQuery) CountX ¶
func (naq *NoteArticleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NoteArticleQuery) Exist ¶
func (naq *NoteArticleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NoteArticleQuery) ExistX ¶
func (naq *NoteArticleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NoteArticleQuery) First ¶
func (naq *NoteArticleQuery) First(ctx context.Context) (*NoteArticle, error)
First returns the first NoteArticle entity in the query. Returns *NotFoundError when no notearticle was found.
func (*NoteArticleQuery) FirstID ¶
func (naq *NoteArticleQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NoteArticle id in the query. Returns *NotFoundError when no id was found.
func (*NoteArticleQuery) FirstX ¶
func (naq *NoteArticleQuery) FirstX(ctx context.Context) *NoteArticle
FirstX is like First, but panics if an error occurs.
func (*NoteArticleQuery) FirstXID ¶
func (naq *NoteArticleQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*NoteArticleQuery) GroupBy ¶
func (naq *NoteArticleQuery) GroupBy(field string, fields ...string) *NoteArticleGroupBy
GroupBy 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.NoteArticle.Query(). GroupBy(notearticle.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NoteArticleQuery) IDs ¶
func (naq *NoteArticleQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NoteArticle ids.
func (*NoteArticleQuery) IDsX ¶
func (naq *NoteArticleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NoteArticleQuery) Limit ¶
func (naq *NoteArticleQuery) Limit(limit int) *NoteArticleQuery
Limit adds a limit step to the query.
func (*NoteArticleQuery) Offset ¶
func (naq *NoteArticleQuery) Offset(offset int) *NoteArticleQuery
Offset adds an offset step to the query.
func (*NoteArticleQuery) Only ¶
func (naq *NoteArticleQuery) Only(ctx context.Context) (*NoteArticle, error)
Only returns the only NoteArticle entity in the query, returns an error if not exactly one entity was returned.
func (*NoteArticleQuery) OnlyID ¶
func (naq *NoteArticleQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only NoteArticle id in the query, returns an error if not exactly one id was returned.
func (*NoteArticleQuery) OnlyIDX ¶
func (naq *NoteArticleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NoteArticleQuery) OnlyX ¶
func (naq *NoteArticleQuery) OnlyX(ctx context.Context) *NoteArticle
OnlyX is like Only, but panics if an error occurs.
func (*NoteArticleQuery) Order ¶
func (naq *NoteArticleQuery) Order(o ...OrderFunc) *NoteArticleQuery
Order adds an order step to the query.
func (*NoteArticleQuery) QueryOwner ¶
func (naq *NoteArticleQuery) QueryOwner() *MemberQuery
QueryOwner chains the current query on the owner edge.
func (*NoteArticleQuery) Select ¶
func (naq *NoteArticleQuery) Select(field string, fields ...string) *NoteArticleSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.NoteArticle.Query(). Select(notearticle.FieldCreatedAt). Scan(ctx, &v)
func (*NoteArticleQuery) Where ¶
func (naq *NoteArticleQuery) Where(ps ...predicate.NoteArticle) *NoteArticleQuery
Where adds a new predicate for the builder.
func (*NoteArticleQuery) WithOwner ¶
func (naq *NoteArticleQuery) WithOwner(opts ...func(*MemberQuery)) *NoteArticleQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
type NoteArticleSelect ¶
type NoteArticleSelect struct {
// contains filtered or unexported fields
}
NoteArticleSelect is the builder for select fields of NoteArticle entities.
func (*NoteArticleSelect) Bool ¶
func (nas *NoteArticleSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*NoteArticleSelect) BoolX ¶
func (nas *NoteArticleSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NoteArticleSelect) Bools ¶
func (nas *NoteArticleSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*NoteArticleSelect) BoolsX ¶
func (nas *NoteArticleSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NoteArticleSelect) Float64 ¶
func (nas *NoteArticleSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*NoteArticleSelect) Float64X ¶
func (nas *NoteArticleSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NoteArticleSelect) Float64s ¶
func (nas *NoteArticleSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*NoteArticleSelect) Float64sX ¶
func (nas *NoteArticleSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NoteArticleSelect) Int ¶
func (nas *NoteArticleSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*NoteArticleSelect) IntX ¶
func (nas *NoteArticleSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NoteArticleSelect) Ints ¶
func (nas *NoteArticleSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*NoteArticleSelect) IntsX ¶
func (nas *NoteArticleSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NoteArticleSelect) Scan ¶
func (nas *NoteArticleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*NoteArticleSelect) ScanX ¶
func (nas *NoteArticleSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NoteArticleSelect) String ¶
func (nas *NoteArticleSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*NoteArticleSelect) StringX ¶
func (nas *NoteArticleSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NoteArticleUpdate ¶
type NoteArticleUpdate struct {
// contains filtered or unexported fields
}
NoteArticleUpdate is the builder for updating NoteArticle entities.
func (*NoteArticleUpdate) ClearOwner ¶
func (nau *NoteArticleUpdate) ClearOwner() *NoteArticleUpdate
ClearOwner clears the "owner" edge to type Member.
func (*NoteArticleUpdate) Exec ¶
func (nau *NoteArticleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NoteArticleUpdate) ExecX ¶
func (nau *NoteArticleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteArticleUpdate) Mutation ¶
func (nau *NoteArticleUpdate) Mutation() *NoteArticleMutation
Mutation returns the NoteArticleMutation object of the builder.
func (*NoteArticleUpdate) Save ¶
func (nau *NoteArticleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*NoteArticleUpdate) SaveX ¶
func (nau *NoteArticleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NoteArticleUpdate) SetContent ¶
func (nau *NoteArticleUpdate) SetContent(s string) *NoteArticleUpdate
SetContent sets the content field.
func (*NoteArticleUpdate) SetGid ¶
func (nau *NoteArticleUpdate) SetGid(u uuid.UUID) *NoteArticleUpdate
SetGid sets the gid field.
func (*NoteArticleUpdate) SetMemberGid ¶
func (nau *NoteArticleUpdate) SetMemberGid(u uuid.UUID) *NoteArticleUpdate
SetMemberGid sets the member_gid field.
func (*NoteArticleUpdate) SetNillableOwnerID ¶
func (nau *NoteArticleUpdate) SetNillableOwnerID(id *int) *NoteArticleUpdate
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*NoteArticleUpdate) SetOwner ¶
func (nau *NoteArticleUpdate) SetOwner(m *Member) *NoteArticleUpdate
SetOwner sets the owner edge to Member.
func (*NoteArticleUpdate) SetOwnerID ¶
func (nau *NoteArticleUpdate) SetOwnerID(id int) *NoteArticleUpdate
SetOwnerID sets the owner edge to Member by id.
func (*NoteArticleUpdate) SetUpdatedAt ¶
func (nau *NoteArticleUpdate) SetUpdatedAt(t time.Time) *NoteArticleUpdate
SetUpdatedAt sets the updated_at field.
func (*NoteArticleUpdate) Where ¶
func (nau *NoteArticleUpdate) Where(ps ...predicate.NoteArticle) *NoteArticleUpdate
Where adds a new predicate for the builder.
type NoteArticleUpdateOne ¶
type NoteArticleUpdateOne struct {
// contains filtered or unexported fields
}
NoteArticleUpdateOne is the builder for updating a single NoteArticle entity.
func (*NoteArticleUpdateOne) ClearOwner ¶
func (nauo *NoteArticleUpdateOne) ClearOwner() *NoteArticleUpdateOne
ClearOwner clears the "owner" edge to type Member.
func (*NoteArticleUpdateOne) Exec ¶
func (nauo *NoteArticleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NoteArticleUpdateOne) ExecX ¶
func (nauo *NoteArticleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteArticleUpdateOne) Mutation ¶
func (nauo *NoteArticleUpdateOne) Mutation() *NoteArticleMutation
Mutation returns the NoteArticleMutation object of the builder.
func (*NoteArticleUpdateOne) Save ¶
func (nauo *NoteArticleUpdateOne) Save(ctx context.Context) (*NoteArticle, error)
Save executes the query and returns the updated entity.
func (*NoteArticleUpdateOne) SaveX ¶
func (nauo *NoteArticleUpdateOne) SaveX(ctx context.Context) *NoteArticle
SaveX is like Save, but panics if an error occurs.
func (*NoteArticleUpdateOne) SetContent ¶
func (nauo *NoteArticleUpdateOne) SetContent(s string) *NoteArticleUpdateOne
SetContent sets the content field.
func (*NoteArticleUpdateOne) SetGid ¶
func (nauo *NoteArticleUpdateOne) SetGid(u uuid.UUID) *NoteArticleUpdateOne
SetGid sets the gid field.
func (*NoteArticleUpdateOne) SetMemberGid ¶
func (nauo *NoteArticleUpdateOne) SetMemberGid(u uuid.UUID) *NoteArticleUpdateOne
SetMemberGid sets the member_gid field.
func (*NoteArticleUpdateOne) SetNillableOwnerID ¶
func (nauo *NoteArticleUpdateOne) SetNillableOwnerID(id *int) *NoteArticleUpdateOne
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*NoteArticleUpdateOne) SetOwner ¶
func (nauo *NoteArticleUpdateOne) SetOwner(m *Member) *NoteArticleUpdateOne
SetOwner sets the owner edge to Member.
func (*NoteArticleUpdateOne) SetOwnerID ¶
func (nauo *NoteArticleUpdateOne) SetOwnerID(id int) *NoteArticleUpdateOne
SetOwnerID sets the owner edge to Member by id.
func (*NoteArticleUpdateOne) SetUpdatedAt ¶
func (nauo *NoteArticleUpdateOne) SetUpdatedAt(t time.Time) *NoteArticleUpdateOne
SetUpdatedAt sets the updated_at field.
type NoteArticles ¶
type NoteArticles []*NoteArticle
NoteArticles is a parsable slice of NoteArticle.
type NoteFilesystem ¶
type NoteFilesystem struct { // ID of the ent. ID int `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"` // MemberGid holds the value of the "member_gid" field. MemberGid uuid.UUID `json:"member_gid,omitempty"` // ParentID holds the value of the "parent_id" field. ParentID int `json:"parent_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // IsDir holds the value of the "is_dir" field. IsDir bool `json:"is_dir,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NoteFilesystemQuery when eager-loading is set. Edges NoteFilesystemEdges `json:"edges"` // contains filtered or unexported fields }
NoteFilesystem is the model entity for the NoteFilesystem schema.
func (*NoteFilesystem) QueryOwner ¶
func (nf *NoteFilesystem) QueryOwner() *MemberQuery
QueryOwner queries the owner edge of the NoteFilesystem.
func (*NoteFilesystem) String ¶
func (nf *NoteFilesystem) String() string
String implements the fmt.Stringer.
func (*NoteFilesystem) Unwrap ¶
func (nf *NoteFilesystem) Unwrap() *NoteFilesystem
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*NoteFilesystem) Update ¶
func (nf *NoteFilesystem) Update() *NoteFilesystemUpdateOne
Update returns a builder for updating this NoteFilesystem. Note that, you need to call NoteFilesystem.Unwrap() before calling this method, if this NoteFilesystem was returned from a transaction, and the transaction was committed or rolled back.
type NoteFilesystemClient ¶
type NoteFilesystemClient struct {
// contains filtered or unexported fields
}
NoteFilesystemClient is a client for the NoteFilesystem schema.
func NewNoteFilesystemClient ¶
func NewNoteFilesystemClient(c config) *NoteFilesystemClient
NewNoteFilesystemClient returns a client for the NoteFilesystem from the given config.
func (*NoteFilesystemClient) Create ¶
func (c *NoteFilesystemClient) Create() *NoteFilesystemCreate
Create returns a create builder for NoteFilesystem.
func (*NoteFilesystemClient) CreateBulk ¶
func (c *NoteFilesystemClient) CreateBulk(builders ...*NoteFilesystemCreate) *NoteFilesystemCreateBulk
BulkCreate returns a builder for creating a bulk of NoteFilesystem entities.
func (*NoteFilesystemClient) Delete ¶
func (c *NoteFilesystemClient) Delete() *NoteFilesystemDelete
Delete returns a delete builder for NoteFilesystem.
func (*NoteFilesystemClient) DeleteOne ¶
func (c *NoteFilesystemClient) DeleteOne(nf *NoteFilesystem) *NoteFilesystemDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NoteFilesystemClient) DeleteOneID ¶
func (c *NoteFilesystemClient) DeleteOneID(id int) *NoteFilesystemDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NoteFilesystemClient) Get ¶
func (c *NoteFilesystemClient) Get(ctx context.Context, id int) (*NoteFilesystem, error)
Get returns a NoteFilesystem entity by its id.
func (*NoteFilesystemClient) GetX ¶
func (c *NoteFilesystemClient) GetX(ctx context.Context, id int) *NoteFilesystem
GetX is like Get, but panics if an error occurs.
func (*NoteFilesystemClient) Hooks ¶
func (c *NoteFilesystemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NoteFilesystemClient) Query ¶
func (c *NoteFilesystemClient) Query() *NoteFilesystemQuery
Query returns a query builder for NoteFilesystem.
func (*NoteFilesystemClient) QueryOwner ¶
func (c *NoteFilesystemClient) QueryOwner(nf *NoteFilesystem) *MemberQuery
QueryOwner queries the owner edge of a NoteFilesystem.
func (*NoteFilesystemClient) Update ¶
func (c *NoteFilesystemClient) Update() *NoteFilesystemUpdate
Update returns an update builder for NoteFilesystem.
func (*NoteFilesystemClient) UpdateOne ¶
func (c *NoteFilesystemClient) UpdateOne(nf *NoteFilesystem) *NoteFilesystemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NoteFilesystemClient) UpdateOneID ¶
func (c *NoteFilesystemClient) UpdateOneID(id int) *NoteFilesystemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NoteFilesystemClient) Use ¶
func (c *NoteFilesystemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notefilesystem.Hooks(f(g(h())))`.
type NoteFilesystemCreate ¶
type NoteFilesystemCreate struct {
// contains filtered or unexported fields
}
NoteFilesystemCreate is the builder for creating a NoteFilesystem entity.
func (*NoteFilesystemCreate) Mutation ¶
func (nfc *NoteFilesystemCreate) Mutation() *NoteFilesystemMutation
Mutation returns the NoteFilesystemMutation object of the builder.
func (*NoteFilesystemCreate) Save ¶
func (nfc *NoteFilesystemCreate) Save(ctx context.Context) (*NoteFilesystem, error)
Save creates the NoteFilesystem in the database.
func (*NoteFilesystemCreate) SaveX ¶
func (nfc *NoteFilesystemCreate) SaveX(ctx context.Context) *NoteFilesystem
SaveX calls Save and panics if Save returns an error.
func (*NoteFilesystemCreate) SetCreatedAt ¶
func (nfc *NoteFilesystemCreate) SetCreatedAt(t time.Time) *NoteFilesystemCreate
SetCreatedAt sets the created_at field.
func (*NoteFilesystemCreate) SetDeleted ¶
func (nfc *NoteFilesystemCreate) SetDeleted(b bool) *NoteFilesystemCreate
SetDeleted sets the deleted field.
func (*NoteFilesystemCreate) SetID ¶
func (nfc *NoteFilesystemCreate) SetID(i int) *NoteFilesystemCreate
SetID sets the id field.
func (*NoteFilesystemCreate) SetIsDir ¶
func (nfc *NoteFilesystemCreate) SetIsDir(b bool) *NoteFilesystemCreate
SetIsDir sets the is_dir field.
func (*NoteFilesystemCreate) SetMemberGid ¶
func (nfc *NoteFilesystemCreate) SetMemberGid(u uuid.UUID) *NoteFilesystemCreate
SetMemberGid sets the member_gid field.
func (*NoteFilesystemCreate) SetName ¶
func (nfc *NoteFilesystemCreate) SetName(s string) *NoteFilesystemCreate
SetName sets the name field.
func (*NoteFilesystemCreate) SetNillableCreatedAt ¶
func (nfc *NoteFilesystemCreate) SetNillableCreatedAt(t *time.Time) *NoteFilesystemCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*NoteFilesystemCreate) SetNillableDeleted ¶
func (nfc *NoteFilesystemCreate) SetNillableDeleted(b *bool) *NoteFilesystemCreate
SetNillableDeleted sets the deleted field if the given value is not nil.
func (*NoteFilesystemCreate) SetNillableIsDir ¶
func (nfc *NoteFilesystemCreate) SetNillableIsDir(b *bool) *NoteFilesystemCreate
SetNillableIsDir sets the is_dir field if the given value is not nil.
func (*NoteFilesystemCreate) SetNillableOwnerID ¶
func (nfc *NoteFilesystemCreate) SetNillableOwnerID(id *int) *NoteFilesystemCreate
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*NoteFilesystemCreate) SetNillableUpdatedAt ¶
func (nfc *NoteFilesystemCreate) SetNillableUpdatedAt(t *time.Time) *NoteFilesystemCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*NoteFilesystemCreate) SetOwner ¶
func (nfc *NoteFilesystemCreate) SetOwner(m *Member) *NoteFilesystemCreate
SetOwner sets the owner edge to Member.
func (*NoteFilesystemCreate) SetOwnerID ¶
func (nfc *NoteFilesystemCreate) SetOwnerID(id int) *NoteFilesystemCreate
SetOwnerID sets the owner edge to Member by id.
func (*NoteFilesystemCreate) SetParentID ¶
func (nfc *NoteFilesystemCreate) SetParentID(i int) *NoteFilesystemCreate
SetParentID sets the parent_id field.
func (*NoteFilesystemCreate) SetUpdatedAt ¶
func (nfc *NoteFilesystemCreate) SetUpdatedAt(t time.Time) *NoteFilesystemCreate
SetUpdatedAt sets the updated_at field.
type NoteFilesystemCreateBulk ¶
type NoteFilesystemCreateBulk struct {
// contains filtered or unexported fields
}
NoteFilesystemCreateBulk is the builder for creating a bulk of NoteFilesystem entities.
func (*NoteFilesystemCreateBulk) Save ¶
func (nfcb *NoteFilesystemCreateBulk) Save(ctx context.Context) ([]*NoteFilesystem, error)
Save creates the NoteFilesystem entities in the database.
func (*NoteFilesystemCreateBulk) SaveX ¶
func (nfcb *NoteFilesystemCreateBulk) SaveX(ctx context.Context) []*NoteFilesystem
SaveX calls Save and panics if Save returns an error.
type NoteFilesystemDelete ¶
type NoteFilesystemDelete struct {
// contains filtered or unexported fields
}
NoteFilesystemDelete is the builder for deleting a NoteFilesystem entity.
func (*NoteFilesystemDelete) Exec ¶
func (nfd *NoteFilesystemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NoteFilesystemDelete) ExecX ¶
func (nfd *NoteFilesystemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NoteFilesystemDelete) Where ¶
func (nfd *NoteFilesystemDelete) Where(ps ...predicate.NoteFilesystem) *NoteFilesystemDelete
Where adds a new predicate to the delete builder.
type NoteFilesystemDeleteOne ¶
type NoteFilesystemDeleteOne struct {
// contains filtered or unexported fields
}
NoteFilesystemDeleteOne is the builder for deleting a single NoteFilesystem entity.
func (*NoteFilesystemDeleteOne) Exec ¶
func (nfdo *NoteFilesystemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NoteFilesystemDeleteOne) ExecX ¶
func (nfdo *NoteFilesystemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NoteFilesystemEdges ¶
type NoteFilesystemEdges struct { // Owner holds the value of the owner edge. Owner *Member // contains filtered or unexported fields }
NoteFilesystemEdges holds the relations/edges for other nodes in the graph.
func (NoteFilesystemEdges) OwnerOrErr ¶
func (e NoteFilesystemEdges) OwnerOrErr() (*Member, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NoteFilesystemGroupBy ¶
type NoteFilesystemGroupBy struct {
// contains filtered or unexported fields
}
NoteFilesystemGroupBy is the builder for group-by NoteFilesystem entities.
func (*NoteFilesystemGroupBy) Aggregate ¶
func (nfgb *NoteFilesystemGroupBy) Aggregate(fns ...AggregateFunc) *NoteFilesystemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NoteFilesystemGroupBy) Bool ¶
func (nfgb *NoteFilesystemGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*NoteFilesystemGroupBy) BoolX ¶
func (nfgb *NoteFilesystemGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NoteFilesystemGroupBy) Bools ¶
func (nfgb *NoteFilesystemGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*NoteFilesystemGroupBy) BoolsX ¶
func (nfgb *NoteFilesystemGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NoteFilesystemGroupBy) Float64 ¶
func (nfgb *NoteFilesystemGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*NoteFilesystemGroupBy) Float64X ¶
func (nfgb *NoteFilesystemGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NoteFilesystemGroupBy) Float64s ¶
func (nfgb *NoteFilesystemGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*NoteFilesystemGroupBy) Float64sX ¶
func (nfgb *NoteFilesystemGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NoteFilesystemGroupBy) Int ¶
func (nfgb *NoteFilesystemGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*NoteFilesystemGroupBy) IntX ¶
func (nfgb *NoteFilesystemGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NoteFilesystemGroupBy) Ints ¶
func (nfgb *NoteFilesystemGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*NoteFilesystemGroupBy) IntsX ¶
func (nfgb *NoteFilesystemGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NoteFilesystemGroupBy) Scan ¶
func (nfgb *NoteFilesystemGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*NoteFilesystemGroupBy) ScanX ¶
func (nfgb *NoteFilesystemGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NoteFilesystemGroupBy) String ¶
func (nfgb *NoteFilesystemGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*NoteFilesystemGroupBy) StringX ¶
func (nfgb *NoteFilesystemGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NoteFilesystemMutation ¶
type NoteFilesystemMutation struct {
// contains filtered or unexported fields
}
NoteFilesystemMutation represents an operation that mutate the NoteFilesystems nodes in the graph.
func (*NoteFilesystemMutation) AddField ¶
func (m *NoteFilesystemMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*NoteFilesystemMutation) AddParentID ¶
func (m *NoteFilesystemMutation) AddParentID(i int)
AddParentID adds i to parent_id.
func (*NoteFilesystemMutation) AddedEdges ¶
func (m *NoteFilesystemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NoteFilesystemMutation) AddedField ¶
func (m *NoteFilesystemMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*NoteFilesystemMutation) AddedFields ¶
func (m *NoteFilesystemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*NoteFilesystemMutation) AddedIDs ¶
func (m *NoteFilesystemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*NoteFilesystemMutation) AddedParentID ¶
func (m *NoteFilesystemMutation) AddedParentID() (r int, exists bool)
AddedParentID returns the value that was added to the parent_id field in this mutation.
func (*NoteFilesystemMutation) ClearEdge ¶
func (m *NoteFilesystemMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*NoteFilesystemMutation) ClearField ¶
func (m *NoteFilesystemMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*NoteFilesystemMutation) ClearOwner ¶
func (m *NoteFilesystemMutation) ClearOwner()
ClearOwner clears the owner edge to Member.
func (*NoteFilesystemMutation) ClearedEdges ¶
func (m *NoteFilesystemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NoteFilesystemMutation) ClearedFields ¶
func (m *NoteFilesystemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NoteFilesystemMutation) Client ¶
func (m NoteFilesystemMutation) 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 (*NoteFilesystemMutation) CreatedAt ¶
func (m *NoteFilesystemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*NoteFilesystemMutation) Deleted ¶
func (m *NoteFilesystemMutation) Deleted() (r bool, exists bool)
Deleted returns the deleted value in the mutation.
func (*NoteFilesystemMutation) EdgeCleared ¶
func (m *NoteFilesystemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*NoteFilesystemMutation) Field ¶
func (m *NoteFilesystemMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*NoteFilesystemMutation) FieldCleared ¶
func (m *NoteFilesystemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*NoteFilesystemMutation) Fields ¶
func (m *NoteFilesystemMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*NoteFilesystemMutation) ID ¶
func (m *NoteFilesystemMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*NoteFilesystemMutation) IsDir ¶
func (m *NoteFilesystemMutation) IsDir() (r bool, exists bool)
IsDir returns the is_dir value in the mutation.
func (*NoteFilesystemMutation) MemberGid ¶
func (m *NoteFilesystemMutation) MemberGid() (r uuid.UUID, exists bool)
MemberGid returns the member_gid value in the mutation.
func (*NoteFilesystemMutation) Name ¶
func (m *NoteFilesystemMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*NoteFilesystemMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the NoteFilesystem. If the NoteFilesystem 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 database query fails.
func (*NoteFilesystemMutation) OldDeleted ¶
func (m *NoteFilesystemMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old deleted value of the NoteFilesystem. If the NoteFilesystem 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 database query fails.
func (*NoteFilesystemMutation) 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 was failed.
func (*NoteFilesystemMutation) OldIsDir ¶
func (m *NoteFilesystemMutation) OldIsDir(ctx context.Context) (v bool, err error)
OldIsDir returns the old is_dir value of the NoteFilesystem. If the NoteFilesystem 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 database query fails.
func (*NoteFilesystemMutation) OldMemberGid ¶
OldMemberGid returns the old member_gid value of the NoteFilesystem. If the NoteFilesystem 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 database query fails.
func (*NoteFilesystemMutation) OldName ¶
func (m *NoteFilesystemMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the NoteFilesystem. If the NoteFilesystem 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 database query fails.
func (*NoteFilesystemMutation) OldParentID ¶
func (m *NoteFilesystemMutation) OldParentID(ctx context.Context) (v int, err error)
OldParentID returns the old parent_id value of the NoteFilesystem. If the NoteFilesystem 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 database query fails.
func (*NoteFilesystemMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the NoteFilesystem. If the NoteFilesystem 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 database query fails.
func (*NoteFilesystemMutation) Op ¶
func (m *NoteFilesystemMutation) Op() Op
Op returns the operation name.
func (*NoteFilesystemMutation) OwnerCleared ¶
func (m *NoteFilesystemMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*NoteFilesystemMutation) OwnerID ¶
func (m *NoteFilesystemMutation) OwnerID() (id int, exists bool)
OwnerID returns the owner id in the mutation.
func (*NoteFilesystemMutation) OwnerIDs ¶
func (m *NoteFilesystemMutation) OwnerIDs() (ids []int)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*NoteFilesystemMutation) ParentID ¶
func (m *NoteFilesystemMutation) ParentID() (r int, exists bool)
ParentID returns the parent_id value in the mutation.
func (*NoteFilesystemMutation) RemovedEdges ¶
func (m *NoteFilesystemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NoteFilesystemMutation) RemovedIDs ¶
func (m *NoteFilesystemMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*NoteFilesystemMutation) ResetCreatedAt ¶
func (m *NoteFilesystemMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*NoteFilesystemMutation) ResetDeleted ¶
func (m *NoteFilesystemMutation) ResetDeleted()
ResetDeleted reset all changes of the "deleted" field.
func (*NoteFilesystemMutation) ResetEdge ¶
func (m *NoteFilesystemMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*NoteFilesystemMutation) ResetField ¶
func (m *NoteFilesystemMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*NoteFilesystemMutation) ResetIsDir ¶
func (m *NoteFilesystemMutation) ResetIsDir()
ResetIsDir reset all changes of the "is_dir" field.
func (*NoteFilesystemMutation) ResetMemberGid ¶
func (m *NoteFilesystemMutation) ResetMemberGid()
ResetMemberGid reset all changes of the "member_gid" field.
func (*NoteFilesystemMutation) ResetName ¶
func (m *NoteFilesystemMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*NoteFilesystemMutation) ResetOwner ¶
func (m *NoteFilesystemMutation) ResetOwner()
ResetOwner reset all changes of the "owner" edge.
func (*NoteFilesystemMutation) ResetParentID ¶
func (m *NoteFilesystemMutation) ResetParentID()
ResetParentID reset all changes of the "parent_id" field.
func (*NoteFilesystemMutation) ResetUpdatedAt ¶
func (m *NoteFilesystemMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*NoteFilesystemMutation) SetCreatedAt ¶
func (m *NoteFilesystemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*NoteFilesystemMutation) SetDeleted ¶
func (m *NoteFilesystemMutation) SetDeleted(b bool)
SetDeleted sets the deleted field.
func (*NoteFilesystemMutation) SetField ¶
func (m *NoteFilesystemMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*NoteFilesystemMutation) SetID ¶
func (m *NoteFilesystemMutation) SetID(id int)
SetID sets the value of the id field. Note that, this operation is accepted only on NoteFilesystem creation.
func (*NoteFilesystemMutation) SetIsDir ¶
func (m *NoteFilesystemMutation) SetIsDir(b bool)
SetIsDir sets the is_dir field.
func (*NoteFilesystemMutation) SetMemberGid ¶
func (m *NoteFilesystemMutation) SetMemberGid(u uuid.UUID)
SetMemberGid sets the member_gid field.
func (*NoteFilesystemMutation) SetName ¶
func (m *NoteFilesystemMutation) SetName(s string)
SetName sets the name field.
func (*NoteFilesystemMutation) SetOwnerID ¶
func (m *NoteFilesystemMutation) SetOwnerID(id int)
SetOwnerID sets the owner edge to Member by id.
func (*NoteFilesystemMutation) SetParentID ¶
func (m *NoteFilesystemMutation) SetParentID(i int)
SetParentID sets the parent_id field.
func (*NoteFilesystemMutation) SetUpdatedAt ¶
func (m *NoteFilesystemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (NoteFilesystemMutation) Tx ¶
func (m NoteFilesystemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NoteFilesystemMutation) Type ¶
func (m *NoteFilesystemMutation) Type() string
Type returns the node type of this mutation (NoteFilesystem).
type NoteFilesystemQuery ¶
type NoteFilesystemQuery struct {
// contains filtered or unexported fields
}
NoteFilesystemQuery is the builder for querying NoteFilesystem entities.
func (*NoteFilesystemQuery) All ¶
func (nfq *NoteFilesystemQuery) All(ctx context.Context) ([]*NoteFilesystem, error)
All executes the query and returns a list of NoteFilesystems.
func (*NoteFilesystemQuery) AllX ¶
func (nfq *NoteFilesystemQuery) AllX(ctx context.Context) []*NoteFilesystem
AllX is like All, but panics if an error occurs.
func (*NoteFilesystemQuery) Clone ¶
func (nfq *NoteFilesystemQuery) Clone() *NoteFilesystemQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NoteFilesystemQuery) Count ¶
func (nfq *NoteFilesystemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NoteFilesystemQuery) CountX ¶
func (nfq *NoteFilesystemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NoteFilesystemQuery) Exist ¶
func (nfq *NoteFilesystemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NoteFilesystemQuery) ExistX ¶
func (nfq *NoteFilesystemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NoteFilesystemQuery) First ¶
func (nfq *NoteFilesystemQuery) First(ctx context.Context) (*NoteFilesystem, error)
First returns the first NoteFilesystem entity in the query. Returns *NotFoundError when no notefilesystem was found.
func (*NoteFilesystemQuery) FirstID ¶
func (nfq *NoteFilesystemQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NoteFilesystem id in the query. Returns *NotFoundError when no id was found.
func (*NoteFilesystemQuery) FirstX ¶
func (nfq *NoteFilesystemQuery) FirstX(ctx context.Context) *NoteFilesystem
FirstX is like First, but panics if an error occurs.
func (*NoteFilesystemQuery) FirstXID ¶
func (nfq *NoteFilesystemQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*NoteFilesystemQuery) GroupBy ¶
func (nfq *NoteFilesystemQuery) GroupBy(field string, fields ...string) *NoteFilesystemGroupBy
GroupBy 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.NoteFilesystem.Query(). GroupBy(notefilesystem.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NoteFilesystemQuery) IDs ¶
func (nfq *NoteFilesystemQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NoteFilesystem ids.
func (*NoteFilesystemQuery) IDsX ¶
func (nfq *NoteFilesystemQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NoteFilesystemQuery) Limit ¶
func (nfq *NoteFilesystemQuery) Limit(limit int) *NoteFilesystemQuery
Limit adds a limit step to the query.
func (*NoteFilesystemQuery) Offset ¶
func (nfq *NoteFilesystemQuery) Offset(offset int) *NoteFilesystemQuery
Offset adds an offset step to the query.
func (*NoteFilesystemQuery) Only ¶
func (nfq *NoteFilesystemQuery) Only(ctx context.Context) (*NoteFilesystem, error)
Only returns the only NoteFilesystem entity in the query, returns an error if not exactly one entity was returned.
func (*NoteFilesystemQuery) OnlyID ¶
func (nfq *NoteFilesystemQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only NoteFilesystem id in the query, returns an error if not exactly one id was returned.
func (*NoteFilesystemQuery) OnlyIDX ¶
func (nfq *NoteFilesystemQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NoteFilesystemQuery) OnlyX ¶
func (nfq *NoteFilesystemQuery) OnlyX(ctx context.Context) *NoteFilesystem
OnlyX is like Only, but panics if an error occurs.
func (*NoteFilesystemQuery) Order ¶
func (nfq *NoteFilesystemQuery) Order(o ...OrderFunc) *NoteFilesystemQuery
Order adds an order step to the query.
func (*NoteFilesystemQuery) QueryOwner ¶
func (nfq *NoteFilesystemQuery) QueryOwner() *MemberQuery
QueryOwner chains the current query on the owner edge.
func (*NoteFilesystemQuery) Select ¶
func (nfq *NoteFilesystemQuery) Select(field string, fields ...string) *NoteFilesystemSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.NoteFilesystem.Query(). Select(notefilesystem.FieldCreatedAt). Scan(ctx, &v)
func (*NoteFilesystemQuery) Where ¶
func (nfq *NoteFilesystemQuery) Where(ps ...predicate.NoteFilesystem) *NoteFilesystemQuery
Where adds a new predicate for the builder.
func (*NoteFilesystemQuery) WithOwner ¶
func (nfq *NoteFilesystemQuery) WithOwner(opts ...func(*MemberQuery)) *NoteFilesystemQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
type NoteFilesystemSelect ¶
type NoteFilesystemSelect struct {
// contains filtered or unexported fields
}
NoteFilesystemSelect is the builder for select fields of NoteFilesystem entities.
func (*NoteFilesystemSelect) Bool ¶
func (nfs *NoteFilesystemSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*NoteFilesystemSelect) BoolX ¶
func (nfs *NoteFilesystemSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NoteFilesystemSelect) Bools ¶
func (nfs *NoteFilesystemSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*NoteFilesystemSelect) BoolsX ¶
func (nfs *NoteFilesystemSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NoteFilesystemSelect) Float64 ¶
func (nfs *NoteFilesystemSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*NoteFilesystemSelect) Float64X ¶
func (nfs *NoteFilesystemSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NoteFilesystemSelect) Float64s ¶
func (nfs *NoteFilesystemSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*NoteFilesystemSelect) Float64sX ¶
func (nfs *NoteFilesystemSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NoteFilesystemSelect) Int ¶
func (nfs *NoteFilesystemSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*NoteFilesystemSelect) IntX ¶
func (nfs *NoteFilesystemSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NoteFilesystemSelect) Ints ¶
func (nfs *NoteFilesystemSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*NoteFilesystemSelect) IntsX ¶
func (nfs *NoteFilesystemSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NoteFilesystemSelect) Scan ¶
func (nfs *NoteFilesystemSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*NoteFilesystemSelect) ScanX ¶
func (nfs *NoteFilesystemSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NoteFilesystemSelect) String ¶
func (nfs *NoteFilesystemSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*NoteFilesystemSelect) StringX ¶
func (nfs *NoteFilesystemSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NoteFilesystemUpdate ¶
type NoteFilesystemUpdate struct {
// contains filtered or unexported fields
}
NoteFilesystemUpdate is the builder for updating NoteFilesystem entities.
func (*NoteFilesystemUpdate) AddParentID ¶
func (nfu *NoteFilesystemUpdate) AddParentID(i int) *NoteFilesystemUpdate
AddParentID adds i to parent_id.
func (*NoteFilesystemUpdate) ClearOwner ¶
func (nfu *NoteFilesystemUpdate) ClearOwner() *NoteFilesystemUpdate
ClearOwner clears the "owner" edge to type Member.
func (*NoteFilesystemUpdate) Exec ¶
func (nfu *NoteFilesystemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NoteFilesystemUpdate) ExecX ¶
func (nfu *NoteFilesystemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteFilesystemUpdate) Mutation ¶
func (nfu *NoteFilesystemUpdate) Mutation() *NoteFilesystemMutation
Mutation returns the NoteFilesystemMutation object of the builder.
func (*NoteFilesystemUpdate) Save ¶
func (nfu *NoteFilesystemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*NoteFilesystemUpdate) SaveX ¶
func (nfu *NoteFilesystemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NoteFilesystemUpdate) SetDeleted ¶
func (nfu *NoteFilesystemUpdate) SetDeleted(b bool) *NoteFilesystemUpdate
SetDeleted sets the deleted field.
func (*NoteFilesystemUpdate) SetName ¶
func (nfu *NoteFilesystemUpdate) SetName(s string) *NoteFilesystemUpdate
SetName sets the name field.
func (*NoteFilesystemUpdate) SetNillableDeleted ¶
func (nfu *NoteFilesystemUpdate) SetNillableDeleted(b *bool) *NoteFilesystemUpdate
SetNillableDeleted sets the deleted field if the given value is not nil.
func (*NoteFilesystemUpdate) SetNillableOwnerID ¶
func (nfu *NoteFilesystemUpdate) SetNillableOwnerID(id *int) *NoteFilesystemUpdate
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*NoteFilesystemUpdate) SetOwner ¶
func (nfu *NoteFilesystemUpdate) SetOwner(m *Member) *NoteFilesystemUpdate
SetOwner sets the owner edge to Member.
func (*NoteFilesystemUpdate) SetOwnerID ¶
func (nfu *NoteFilesystemUpdate) SetOwnerID(id int) *NoteFilesystemUpdate
SetOwnerID sets the owner edge to Member by id.
func (*NoteFilesystemUpdate) SetParentID ¶
func (nfu *NoteFilesystemUpdate) SetParentID(i int) *NoteFilesystemUpdate
SetParentID sets the parent_id field.
func (*NoteFilesystemUpdate) SetUpdatedAt ¶
func (nfu *NoteFilesystemUpdate) SetUpdatedAt(t time.Time) *NoteFilesystemUpdate
SetUpdatedAt sets the updated_at field.
func (*NoteFilesystemUpdate) Where ¶
func (nfu *NoteFilesystemUpdate) Where(ps ...predicate.NoteFilesystem) *NoteFilesystemUpdate
Where adds a new predicate for the builder.
type NoteFilesystemUpdateOne ¶
type NoteFilesystemUpdateOne struct {
// contains filtered or unexported fields
}
NoteFilesystemUpdateOne is the builder for updating a single NoteFilesystem entity.
func (*NoteFilesystemUpdateOne) AddParentID ¶
func (nfuo *NoteFilesystemUpdateOne) AddParentID(i int) *NoteFilesystemUpdateOne
AddParentID adds i to parent_id.
func (*NoteFilesystemUpdateOne) ClearOwner ¶
func (nfuo *NoteFilesystemUpdateOne) ClearOwner() *NoteFilesystemUpdateOne
ClearOwner clears the "owner" edge to type Member.
func (*NoteFilesystemUpdateOne) Exec ¶
func (nfuo *NoteFilesystemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NoteFilesystemUpdateOne) ExecX ¶
func (nfuo *NoteFilesystemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteFilesystemUpdateOne) Mutation ¶
func (nfuo *NoteFilesystemUpdateOne) Mutation() *NoteFilesystemMutation
Mutation returns the NoteFilesystemMutation object of the builder.
func (*NoteFilesystemUpdateOne) Save ¶
func (nfuo *NoteFilesystemUpdateOne) Save(ctx context.Context) (*NoteFilesystem, error)
Save executes the query and returns the updated entity.
func (*NoteFilesystemUpdateOne) SaveX ¶
func (nfuo *NoteFilesystemUpdateOne) SaveX(ctx context.Context) *NoteFilesystem
SaveX is like Save, but panics if an error occurs.
func (*NoteFilesystemUpdateOne) SetDeleted ¶
func (nfuo *NoteFilesystemUpdateOne) SetDeleted(b bool) *NoteFilesystemUpdateOne
SetDeleted sets the deleted field.
func (*NoteFilesystemUpdateOne) SetName ¶
func (nfuo *NoteFilesystemUpdateOne) SetName(s string) *NoteFilesystemUpdateOne
SetName sets the name field.
func (*NoteFilesystemUpdateOne) SetNillableDeleted ¶
func (nfuo *NoteFilesystemUpdateOne) SetNillableDeleted(b *bool) *NoteFilesystemUpdateOne
SetNillableDeleted sets the deleted field if the given value is not nil.
func (*NoteFilesystemUpdateOne) SetNillableOwnerID ¶
func (nfuo *NoteFilesystemUpdateOne) SetNillableOwnerID(id *int) *NoteFilesystemUpdateOne
SetNillableOwnerID sets the owner edge to Member by id if the given value is not nil.
func (*NoteFilesystemUpdateOne) SetOwner ¶
func (nfuo *NoteFilesystemUpdateOne) SetOwner(m *Member) *NoteFilesystemUpdateOne
SetOwner sets the owner edge to Member.
func (*NoteFilesystemUpdateOne) SetOwnerID ¶
func (nfuo *NoteFilesystemUpdateOne) SetOwnerID(id int) *NoteFilesystemUpdateOne
SetOwnerID sets the owner edge to Member by id.
func (*NoteFilesystemUpdateOne) SetParentID ¶
func (nfuo *NoteFilesystemUpdateOne) SetParentID(i int) *NoteFilesystemUpdateOne
SetParentID sets the parent_id field.
func (*NoteFilesystemUpdateOne) SetUpdatedAt ¶
func (nfuo *NoteFilesystemUpdateOne) SetUpdatedAt(t time.Time) *NoteFilesystemUpdateOne
SetUpdatedAt sets the updated_at field.
type NoteFilesystems ¶
type NoteFilesystems []*NoteFilesystem
NoteFilesystems is a parsable slice of NoteFilesystem.
type Options ¶
type Options struct { // ID of the ent. ID int `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"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // contains filtered or unexported fields }
Options is the model entity for the Options schema.
func (*Options) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Options) Update ¶
func (o *Options) Update() *OptionsUpdateOne
Update returns a builder for updating this Options. Note that, you need to call Options.Unwrap() before calling this method, if this Options was returned from a transaction, and the transaction was committed or rolled back.
type OptionsClient ¶
type OptionsClient struct {
// contains filtered or unexported fields
}
OptionsClient is a client for the Options schema.
func NewOptionsClient ¶
func NewOptionsClient(c config) *OptionsClient
NewOptionsClient returns a client for the Options from the given config.
func (*OptionsClient) Create ¶
func (c *OptionsClient) Create() *OptionsCreate
Create returns a create builder for Options.
func (*OptionsClient) CreateBulk ¶
func (c *OptionsClient) CreateBulk(builders ...*OptionsCreate) *OptionsCreateBulk
BulkCreate returns a builder for creating a bulk of Options entities.
func (*OptionsClient) Delete ¶
func (c *OptionsClient) Delete() *OptionsDelete
Delete returns a delete builder for Options.
func (*OptionsClient) DeleteOne ¶
func (c *OptionsClient) DeleteOne(o *Options) *OptionsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*OptionsClient) DeleteOneID ¶
func (c *OptionsClient) DeleteOneID(id int) *OptionsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*OptionsClient) GetX ¶
func (c *OptionsClient) GetX(ctx context.Context, id int) *Options
GetX is like Get, but panics if an error occurs.
func (*OptionsClient) Hooks ¶
func (c *OptionsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OptionsClient) Query ¶
func (c *OptionsClient) Query() *OptionsQuery
Query returns a query builder for Options.
func (*OptionsClient) Update ¶
func (c *OptionsClient) Update() *OptionsUpdate
Update returns an update builder for Options.
func (*OptionsClient) UpdateOne ¶
func (c *OptionsClient) UpdateOne(o *Options) *OptionsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OptionsClient) UpdateOneID ¶
func (c *OptionsClient) UpdateOneID(id int) *OptionsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OptionsClient) Use ¶
func (c *OptionsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `options.Hooks(f(g(h())))`.
type OptionsCreate ¶
type OptionsCreate struct {
// contains filtered or unexported fields
}
OptionsCreate is the builder for creating a Options entity.
func (*OptionsCreate) Mutation ¶
func (oc *OptionsCreate) Mutation() *OptionsMutation
Mutation returns the OptionsMutation object of the builder.
func (*OptionsCreate) Save ¶
func (oc *OptionsCreate) Save(ctx context.Context) (*Options, error)
Save creates the Options in the database.
func (*OptionsCreate) SaveX ¶
func (oc *OptionsCreate) SaveX(ctx context.Context) *Options
SaveX calls Save and panics if Save returns an error.
func (*OptionsCreate) SetCreatedAt ¶
func (oc *OptionsCreate) SetCreatedAt(t time.Time) *OptionsCreate
SetCreatedAt sets the created_at field.
func (*OptionsCreate) SetID ¶
func (oc *OptionsCreate) SetID(i int) *OptionsCreate
SetID sets the id field.
func (*OptionsCreate) SetKey ¶
func (oc *OptionsCreate) SetKey(s string) *OptionsCreate
SetKey sets the key field.
func (*OptionsCreate) SetNillableCreatedAt ¶
func (oc *OptionsCreate) SetNillableCreatedAt(t *time.Time) *OptionsCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*OptionsCreate) SetNillableUpdatedAt ¶
func (oc *OptionsCreate) SetNillableUpdatedAt(t *time.Time) *OptionsCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*OptionsCreate) SetUpdatedAt ¶
func (oc *OptionsCreate) SetUpdatedAt(t time.Time) *OptionsCreate
SetUpdatedAt sets the updated_at field.
func (*OptionsCreate) SetValue ¶
func (oc *OptionsCreate) SetValue(s string) *OptionsCreate
SetValue sets the value field.
type OptionsCreateBulk ¶
type OptionsCreateBulk struct {
// contains filtered or unexported fields
}
OptionsCreateBulk is the builder for creating a bulk of Options entities.
type OptionsDelete ¶
type OptionsDelete struct {
// contains filtered or unexported fields
}
OptionsDelete is the builder for deleting a Options entity.
func (*OptionsDelete) Exec ¶
func (od *OptionsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OptionsDelete) ExecX ¶
func (od *OptionsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OptionsDelete) Where ¶
func (od *OptionsDelete) Where(ps ...predicate.Options) *OptionsDelete
Where adds a new predicate to the delete builder.
type OptionsDeleteOne ¶
type OptionsDeleteOne struct {
// contains filtered or unexported fields
}
OptionsDeleteOne is the builder for deleting a single Options entity.
func (*OptionsDeleteOne) Exec ¶
func (odo *OptionsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OptionsDeleteOne) ExecX ¶
func (odo *OptionsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OptionsGroupBy ¶
type OptionsGroupBy struct {
// contains filtered or unexported fields
}
OptionsGroupBy is the builder for group-by Options entities.
func (*OptionsGroupBy) Aggregate ¶
func (ogb *OptionsGroupBy) Aggregate(fns ...AggregateFunc) *OptionsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OptionsGroupBy) Bool ¶
func (ogb *OptionsGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*OptionsGroupBy) BoolX ¶
func (ogb *OptionsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OptionsGroupBy) Bools ¶
func (ogb *OptionsGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*OptionsGroupBy) BoolsX ¶
func (ogb *OptionsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OptionsGroupBy) Float64 ¶
func (ogb *OptionsGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*OptionsGroupBy) Float64X ¶
func (ogb *OptionsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OptionsGroupBy) Float64s ¶
func (ogb *OptionsGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*OptionsGroupBy) Float64sX ¶
func (ogb *OptionsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OptionsGroupBy) Int ¶
func (ogb *OptionsGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*OptionsGroupBy) IntX ¶
func (ogb *OptionsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OptionsGroupBy) Ints ¶
func (ogb *OptionsGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*OptionsGroupBy) IntsX ¶
func (ogb *OptionsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OptionsGroupBy) Scan ¶
func (ogb *OptionsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*OptionsGroupBy) ScanX ¶
func (ogb *OptionsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OptionsGroupBy) String ¶
func (ogb *OptionsGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*OptionsGroupBy) StringX ¶
func (ogb *OptionsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OptionsMutation ¶
type OptionsMutation struct {
// contains filtered or unexported fields
}
OptionsMutation represents an operation that mutate the OptionsSlice nodes in the graph.
func (*OptionsMutation) AddField ¶
func (m *OptionsMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*OptionsMutation) AddedEdges ¶
func (m *OptionsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OptionsMutation) AddedField ¶
func (m *OptionsMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*OptionsMutation) AddedFields ¶
func (m *OptionsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*OptionsMutation) AddedIDs ¶
func (m *OptionsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*OptionsMutation) ClearEdge ¶
func (m *OptionsMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*OptionsMutation) ClearField ¶
func (m *OptionsMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*OptionsMutation) ClearedEdges ¶
func (m *OptionsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OptionsMutation) ClearedFields ¶
func (m *OptionsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OptionsMutation) Client ¶
func (m OptionsMutation) 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 (*OptionsMutation) CreatedAt ¶
func (m *OptionsMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*OptionsMutation) EdgeCleared ¶
func (m *OptionsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*OptionsMutation) Field ¶
func (m *OptionsMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*OptionsMutation) FieldCleared ¶
func (m *OptionsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*OptionsMutation) Fields ¶
func (m *OptionsMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*OptionsMutation) ID ¶
func (m *OptionsMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*OptionsMutation) Key ¶
func (m *OptionsMutation) Key() (r string, exists bool)
Key returns the key value in the mutation.
func (*OptionsMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Options. If the Options 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 database query fails.
func (*OptionsMutation) 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 was failed.
func (*OptionsMutation) OldKey ¶
func (m *OptionsMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old key value of the Options. If the Options 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 database query fails.
func (*OptionsMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Options. If the Options 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 database query fails.
func (*OptionsMutation) OldValue ¶
func (m *OptionsMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old value value of the Options. If the Options 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 database query fails.
func (*OptionsMutation) RemovedEdges ¶
func (m *OptionsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OptionsMutation) RemovedIDs ¶
func (m *OptionsMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*OptionsMutation) ResetCreatedAt ¶
func (m *OptionsMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*OptionsMutation) ResetEdge ¶
func (m *OptionsMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*OptionsMutation) ResetField ¶
func (m *OptionsMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*OptionsMutation) ResetKey ¶
func (m *OptionsMutation) ResetKey()
ResetKey reset all changes of the "key" field.
func (*OptionsMutation) ResetUpdatedAt ¶
func (m *OptionsMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*OptionsMutation) ResetValue ¶
func (m *OptionsMutation) ResetValue()
ResetValue reset all changes of the "value" field.
func (*OptionsMutation) SetCreatedAt ¶
func (m *OptionsMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*OptionsMutation) SetField ¶
func (m *OptionsMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*OptionsMutation) SetID ¶
func (m *OptionsMutation) SetID(id int)
SetID sets the value of the id field. Note that, this operation is accepted only on Options creation.
func (*OptionsMutation) SetKey ¶
func (m *OptionsMutation) SetKey(s string)
SetKey sets the key field.
func (*OptionsMutation) SetUpdatedAt ¶
func (m *OptionsMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*OptionsMutation) SetValue ¶
func (m *OptionsMutation) SetValue(s string)
SetValue sets the value field.
func (OptionsMutation) Tx ¶
func (m OptionsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OptionsMutation) Type ¶
func (m *OptionsMutation) Type() string
Type returns the node type of this mutation (Options).
func (*OptionsMutation) UpdatedAt ¶
func (m *OptionsMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*OptionsMutation) Value ¶
func (m *OptionsMutation) Value() (r string, exists bool)
Value returns the value value in the mutation.
type OptionsQuery ¶
type OptionsQuery struct {
// contains filtered or unexported fields
}
OptionsQuery is the builder for querying Options entities.
func (*OptionsQuery) All ¶
func (oq *OptionsQuery) All(ctx context.Context) ([]*Options, error)
All executes the query and returns a list of OptionsSlice.
func (*OptionsQuery) AllX ¶
func (oq *OptionsQuery) AllX(ctx context.Context) []*Options
AllX is like All, but panics if an error occurs.
func (*OptionsQuery) Clone ¶
func (oq *OptionsQuery) Clone() *OptionsQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OptionsQuery) Count ¶
func (oq *OptionsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OptionsQuery) CountX ¶
func (oq *OptionsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OptionsQuery) Exist ¶
func (oq *OptionsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OptionsQuery) ExistX ¶
func (oq *OptionsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OptionsQuery) First ¶
func (oq *OptionsQuery) First(ctx context.Context) (*Options, error)
First returns the first Options entity in the query. Returns *NotFoundError when no options was found.
func (*OptionsQuery) FirstID ¶
func (oq *OptionsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Options id in the query. Returns *NotFoundError when no id was found.
func (*OptionsQuery) FirstX ¶
func (oq *OptionsQuery) FirstX(ctx context.Context) *Options
FirstX is like First, but panics if an error occurs.
func (*OptionsQuery) FirstXID ¶
func (oq *OptionsQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*OptionsQuery) GroupBy ¶
func (oq *OptionsQuery) GroupBy(field string, fields ...string) *OptionsGroupBy
GroupBy 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.Options.Query(). GroupBy(options.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OptionsQuery) IDs ¶
func (oq *OptionsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Options ids.
func (*OptionsQuery) IDsX ¶
func (oq *OptionsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OptionsQuery) Limit ¶
func (oq *OptionsQuery) Limit(limit int) *OptionsQuery
Limit adds a limit step to the query.
func (*OptionsQuery) Offset ¶
func (oq *OptionsQuery) Offset(offset int) *OptionsQuery
Offset adds an offset step to the query.
func (*OptionsQuery) Only ¶
func (oq *OptionsQuery) Only(ctx context.Context) (*Options, error)
Only returns the only Options entity in the query, returns an error if not exactly one entity was returned.
func (*OptionsQuery) OnlyID ¶
func (oq *OptionsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Options id in the query, returns an error if not exactly one id was returned.
func (*OptionsQuery) OnlyIDX ¶
func (oq *OptionsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OptionsQuery) OnlyX ¶
func (oq *OptionsQuery) OnlyX(ctx context.Context) *Options
OnlyX is like Only, but panics if an error occurs.
func (*OptionsQuery) Order ¶
func (oq *OptionsQuery) Order(o ...OrderFunc) *OptionsQuery
Order adds an order step to the query.
func (*OptionsQuery) Select ¶
func (oq *OptionsQuery) Select(field string, fields ...string) *OptionsSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Options.Query(). Select(options.FieldCreatedAt). Scan(ctx, &v)
func (*OptionsQuery) Where ¶
func (oq *OptionsQuery) Where(ps ...predicate.Options) *OptionsQuery
Where adds a new predicate for the builder.
type OptionsSelect ¶
type OptionsSelect struct {
// contains filtered or unexported fields
}
OptionsSelect is the builder for select fields of Options entities.
func (*OptionsSelect) Bool ¶
func (os *OptionsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*OptionsSelect) BoolX ¶
func (os *OptionsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OptionsSelect) Bools ¶
func (os *OptionsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*OptionsSelect) BoolsX ¶
func (os *OptionsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OptionsSelect) Float64 ¶
func (os *OptionsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*OptionsSelect) Float64X ¶
func (os *OptionsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OptionsSelect) Float64s ¶
func (os *OptionsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*OptionsSelect) Float64sX ¶
func (os *OptionsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OptionsSelect) Int ¶
func (os *OptionsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*OptionsSelect) IntX ¶
func (os *OptionsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OptionsSelect) Ints ¶
func (os *OptionsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*OptionsSelect) IntsX ¶
func (os *OptionsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OptionsSelect) Scan ¶
func (os *OptionsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*OptionsSelect) ScanX ¶
func (os *OptionsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OptionsSelect) String ¶
func (os *OptionsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*OptionsSelect) StringX ¶
func (os *OptionsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OptionsUpdate ¶
type OptionsUpdate struct {
// contains filtered or unexported fields
}
OptionsUpdate is the builder for updating Options entities.
func (*OptionsUpdate) Exec ¶
func (ou *OptionsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OptionsUpdate) ExecX ¶
func (ou *OptionsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OptionsUpdate) Mutation ¶
func (ou *OptionsUpdate) Mutation() *OptionsMutation
Mutation returns the OptionsMutation object of the builder.
func (*OptionsUpdate) Save ¶
func (ou *OptionsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*OptionsUpdate) SaveX ¶
func (ou *OptionsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OptionsUpdate) SetKey ¶
func (ou *OptionsUpdate) SetKey(s string) *OptionsUpdate
SetKey sets the key field.
func (*OptionsUpdate) SetUpdatedAt ¶
func (ou *OptionsUpdate) SetUpdatedAt(t time.Time) *OptionsUpdate
SetUpdatedAt sets the updated_at field.
func (*OptionsUpdate) SetValue ¶
func (ou *OptionsUpdate) SetValue(s string) *OptionsUpdate
SetValue sets the value field.
func (*OptionsUpdate) Where ¶
func (ou *OptionsUpdate) Where(ps ...predicate.Options) *OptionsUpdate
Where adds a new predicate for the builder.
type OptionsUpdateOne ¶
type OptionsUpdateOne struct {
// contains filtered or unexported fields
}
OptionsUpdateOne is the builder for updating a single Options entity.
func (*OptionsUpdateOne) Exec ¶
func (ouo *OptionsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OptionsUpdateOne) ExecX ¶
func (ouo *OptionsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OptionsUpdateOne) Mutation ¶
func (ouo *OptionsUpdateOne) Mutation() *OptionsMutation
Mutation returns the OptionsMutation object of the builder.
func (*OptionsUpdateOne) Save ¶
func (ouo *OptionsUpdateOne) Save(ctx context.Context) (*Options, error)
Save executes the query and returns the updated entity.
func (*OptionsUpdateOne) SaveX ¶
func (ouo *OptionsUpdateOne) SaveX(ctx context.Context) *Options
SaveX is like Save, but panics if an error occurs.
func (*OptionsUpdateOne) SetKey ¶
func (ouo *OptionsUpdateOne) SetKey(s string) *OptionsUpdateOne
SetKey sets the key field.
func (*OptionsUpdateOne) SetUpdatedAt ¶
func (ouo *OptionsUpdateOne) SetUpdatedAt(t time.Time) *OptionsUpdateOne
SetUpdatedAt sets the updated_at field.
func (*OptionsUpdateOne) SetValue ¶
func (ouo *OptionsUpdateOne) SetValue(s string) *OptionsUpdateOne
SetValue sets the value field.
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(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 Rollbacker method.
type Tx ¶
type Tx struct { // Admin is the client for interacting with the Admin builders. Admin *AdminClient // AdminLoginLog is the client for interacting with the AdminLoginLog builders. AdminLoginLog *AdminLoginLogClient // CasbinRule is the client for interacting with the CasbinRule builders. CasbinRule *CasbinRuleClient // Member is the client for interacting with the Member builders. Member *MemberClient // MemberLoginLog is the client for interacting with the MemberLoginLog builders. MemberLoginLog *MemberLoginLogClient // NoteArticle is the client for interacting with the NoteArticle builders. NoteArticle *NoteArticleClient // NoteFilesystem is the client for interacting with the NoteFilesystem builders. NoteFilesystem *NoteFilesystemClient // Options is the client for interacting with the Options builders. Options *OptionsClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns the Tx stored in 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 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
¶
- admin.go
- admin_create.go
- admin_delete.go
- admin_query.go
- admin_update.go
- adminloginlog.go
- adminloginlog_create.go
- adminloginlog_delete.go
- adminloginlog_query.go
- adminloginlog_update.go
- casbinrule.go
- casbinrule_create.go
- casbinrule_delete.go
- casbinrule_query.go
- casbinrule_update.go
- client.go
- config.go
- context.go
- ent.go
- generate.go
- member.go
- member_create.go
- member_delete.go
- member_query.go
- member_update.go
- memberloginlog.go
- memberloginlog_create.go
- memberloginlog_delete.go
- memberloginlog_query.go
- memberloginlog_update.go
- mutation.go
- notearticle.go
- notearticle_create.go
- notearticle_delete.go
- notearticle_query.go
- notearticle_update.go
- notefilesystem.go
- notefilesystem_create.go
- notefilesystem_delete.go
- notefilesystem_query.go
- notefilesystem_update.go
- options.go
- options_create.go
- options_delete.go
- options_query.go
- options_update.go
- runtime.go
- tx.go