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 AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Group
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
- func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id int) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryMembers(gr *Group) *MemberQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupCreate
- func (gc *GroupCreate) AddMemberIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddMembers(m ...*Member) *GroupCreate
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetCreateTime(t time.Time) *GroupCreate
- func (gc *GroupCreate) SetDeleteTime(t time.Time) *GroupCreate
- func (gc *GroupCreate) SetID(i int) *GroupCreate
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- func (gc *GroupCreate) SetNillableCreateTime(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetNillableDeleteTime(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetNillableSn(s *string) *GroupCreate
- func (gc *GroupCreate) SetNillableUpdateTime(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetSn(s string) *GroupCreate
- func (gc *GroupCreate) SetUpdateTime(t time.Time) *GroupCreate
- type GroupCreateBulk
- type GroupDelete
- type GroupDeleteOne
- type GroupEdges
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (ggb *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ggb *GroupGroupBy) BoolX(ctx context.Context) bool
- func (ggb *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ggb *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (ggb *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ggb *GroupGroupBy) Float64X(ctx context.Context) float64
- func (ggb *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ggb *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (ggb *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ggb *GroupGroupBy) IntX(ctx context.Context) int
- func (ggb *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ggb *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ggb *GroupGroupBy) ScanX(ctx context.Context, v interface{})
- func (ggb *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (ggb *GroupGroupBy) StringX(ctx context.Context) string
- func (ggb *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ggb *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupMutation
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddMemberIDs(ids ...int)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) ClearDeleteTime()
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearMembers()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) CreateTime() (r time.Time, exists bool)
- func (m *GroupMutation) DeleteTime() (r time.Time, exists bool)
- func (m *GroupMutation) DeleteTimeCleared() bool
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) ID() (id int, exists bool)
- func (m *GroupMutation) MembersCleared() bool
- func (m *GroupMutation) MembersIDs() (ids []int)
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) OldDeleteTime(ctx context.Context) (v *time.Time, err error)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) RemoveMemberIDs(ids ...int)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) RemovedMembersIDs() (ids []int)
- func (m *GroupMutation) ResetCreateTime()
- func (m *GroupMutation) ResetDeleteTime()
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetMembers()
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetSn()
- func (m *GroupMutation) ResetUpdateTime()
- func (m *GroupMutation) SetCreateTime(t time.Time)
- func (m *GroupMutation) SetDeleteTime(t time.Time)
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetID(id int)
- func (m *GroupMutation) SetName(s string)
- func (m *GroupMutation) SetSn(s string)
- func (m *GroupMutation) SetUpdateTime(t time.Time)
- func (m *GroupMutation) Sn() (r string, exists bool)
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UpdateTime() (r time.Time, exists bool)
- type GroupQuery
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) int
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) ([]int, error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []int
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
- func (gq *GroupQuery) QueryMembers() *MemberQuery
- func (gq *GroupQuery) Select(field string, fields ...string) *GroupSelect
- func (gq *GroupQuery) Unique(unique bool) *GroupQuery
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithMembers(opts ...func(*MemberQuery)) *GroupQuery
- type GroupSelect
- func (gs *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (gs *GroupSelect) BoolX(ctx context.Context) bool
- func (gs *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (gs *GroupSelect) BoolsX(ctx context.Context) []bool
- func (gs *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (gs *GroupSelect) Float64X(ctx context.Context) float64
- func (gs *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (gs *GroupSelect) Float64sX(ctx context.Context) []float64
- func (gs *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (gs *GroupSelect) IntX(ctx context.Context) int
- func (gs *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (gs *GroupSelect) IntsX(ctx context.Context) []int
- func (gs *GroupSelect) Scan(ctx context.Context, v interface{}) error
- func (gs *GroupSelect) ScanX(ctx context.Context, v interface{})
- func (gs *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (gs *GroupSelect) StringX(ctx context.Context) string
- func (gs *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (gs *GroupSelect) StringsX(ctx context.Context) []string
- type GroupUpdate
- func (gu *GroupUpdate) AddMemberIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddMembers(m ...*Member) *GroupUpdate
- func (gu *GroupUpdate) ClearDeleteTime() *GroupUpdate
- func (gu *GroupUpdate) ClearMembers() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (gu *GroupUpdate) RemoveMemberIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveMembers(m ...*Member) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetDeleteTime(t time.Time) *GroupUpdate
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableDeleteTime(t *time.Time) *GroupUpdate
- func (gu *GroupUpdate) SetUpdateTime(t time.Time) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddMemberIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddMembers(m ...*Member) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearDeleteTime() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearMembers() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (guo *GroupUpdateOne) RemoveMemberIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveMembers(m ...*Member) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetDeleteTime(t time.Time) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableDeleteTime(t *time.Time) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetUpdateTime(t time.Time) *GroupUpdateOne
- type Groups
- type Hook
- type Member
- func (m *Member) QueryGroups() *GroupQuery
- func (m *Member) QueryMemberEmails() *MemberEmailQuery
- func (m *Member) QueryMemberSettings() *MemberSettingQuery
- func (m *Member) QueryMemberSnippetDocs() *SnippetDocumentQuery
- func (m *Member) QueryMemberSnippetFolders() *SnippetFolderQuery
- func (m *Member) QueryMemberSnippetTags() *SnippetTagQuery
- func (m *Member) QueryMemberSnippets() *SnippetQuery
- func (m *Member) String() string
- func (m *Member) Unwrap() *Member
- func (m *Member) Update() *MemberUpdateOne
- 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) QueryGroups(m *Member) *GroupQuery
- func (c *MemberClient) QueryMemberEmails(m *Member) *MemberEmailQuery
- func (c *MemberClient) QueryMemberSettings(m *Member) *MemberSettingQuery
- func (c *MemberClient) QueryMemberSnippetDocs(m *Member) *SnippetDocumentQuery
- func (c *MemberClient) QueryMemberSnippetFolders(m *Member) *SnippetFolderQuery
- func (c *MemberClient) QueryMemberSnippetTags(m *Member) *SnippetTagQuery
- func (c *MemberClient) QueryMemberSnippets(m *Member) *SnippetQuery
- 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) AddMemberEmailIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddMemberEmails(m ...*MemberEmail) *MemberCreate
- func (mc *MemberCreate) AddMemberSettingIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddMemberSettings(m ...*MemberSetting) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippetDocIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippetDocs(s ...*SnippetDocument) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippetFolderIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippetFolders(s ...*SnippetFolder) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippetIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippetTagIDs(ids ...int) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippetTags(s ...*SnippetTag) *MemberCreate
- func (mc *MemberCreate) AddMemberSnippets(s ...*Snippet) *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) SetCreateTime(t time.Time) *MemberCreate
- func (mc *MemberCreate) SetDeleteTime(t time.Time) *MemberCreate
- func (mc *MemberCreate) SetGroupID(i int) *MemberCreate
- func (mc *MemberCreate) SetGroups(g *Group) *MemberCreate
- func (mc *MemberCreate) SetGroupsID(id int) *MemberCreate
- func (mc *MemberCreate) SetID(i int) *MemberCreate
- func (mc *MemberCreate) SetLastPwdAuth(t time.Time) *MemberCreate
- func (mc *MemberCreate) SetNickname(s string) *MemberCreate
- func (mc *MemberCreate) SetNillableCreateTime(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetNillableDeleteTime(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetNillableGroupID(i *int) *MemberCreate
- func (mc *MemberCreate) SetNillableGroupsID(id *int) *MemberCreate
- func (mc *MemberCreate) SetNillableLastPwdAuth(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetNillablePassword(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillablePhone(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillableSn(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillableStatus(m *member.Status) *MemberCreate
- func (mc *MemberCreate) SetNillableUpdateTime(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetPassword(s string) *MemberCreate
- func (mc *MemberCreate) SetPhone(s string) *MemberCreate
- func (mc *MemberCreate) SetSignature(s string) *MemberCreate
- func (mc *MemberCreate) SetSn(s string) *MemberCreate
- func (mc *MemberCreate) SetStatus(m member.Status) *MemberCreate
- func (mc *MemberCreate) SetUpdateTime(t time.Time) *MemberCreate
- type MemberCreateBulk
- type MemberDelete
- type MemberDeleteOne
- type MemberEdges
- func (e MemberEdges) GroupsOrErr() (*Group, error)
- func (e MemberEdges) MemberEmailsOrErr() ([]*MemberEmail, error)
- func (e MemberEdges) MemberSettingsOrErr() ([]*MemberSetting, error)
- func (e MemberEdges) MemberSnippetDocsOrErr() ([]*SnippetDocument, error)
- func (e MemberEdges) MemberSnippetFoldersOrErr() ([]*SnippetFolder, error)
- func (e MemberEdges) MemberSnippetTagsOrErr() ([]*SnippetTag, error)
- func (e MemberEdges) MemberSnippetsOrErr() ([]*Snippet, error)
- type MemberEmail
- type MemberEmailClient
- func (c *MemberEmailClient) Create() *MemberEmailCreate
- func (c *MemberEmailClient) CreateBulk(builders ...*MemberEmailCreate) *MemberEmailCreateBulk
- func (c *MemberEmailClient) Delete() *MemberEmailDelete
- func (c *MemberEmailClient) DeleteOne(me *MemberEmail) *MemberEmailDeleteOne
- func (c *MemberEmailClient) DeleteOneID(id int) *MemberEmailDeleteOne
- func (c *MemberEmailClient) Get(ctx context.Context, id int) (*MemberEmail, error)
- func (c *MemberEmailClient) GetX(ctx context.Context, id int) *MemberEmail
- func (c *MemberEmailClient) Hooks() []Hook
- func (c *MemberEmailClient) Query() *MemberEmailQuery
- func (c *MemberEmailClient) QueryEmailOwner(me *MemberEmail) *MemberQuery
- func (c *MemberEmailClient) Update() *MemberEmailUpdate
- func (c *MemberEmailClient) UpdateOne(me *MemberEmail) *MemberEmailUpdateOne
- func (c *MemberEmailClient) UpdateOneID(id int) *MemberEmailUpdateOne
- func (c *MemberEmailClient) Use(hooks ...Hook)
- type MemberEmailCreate
- func (mec *MemberEmailCreate) Mutation() *MemberEmailMutation
- func (mec *MemberEmailCreate) Save(ctx context.Context) (*MemberEmail, error)
- func (mec *MemberEmailCreate) SaveX(ctx context.Context) *MemberEmail
- func (mec *MemberEmailCreate) SetCreateTime(t time.Time) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetEmail(s string) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetEmailOwner(m *Member) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetEmailOwnerID(id int) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetID(i int) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetIsPrimary(b bool) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetNillableCreateTime(t *time.Time) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetNillableIsPrimary(b *bool) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetNillableUpdateTime(t *time.Time) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetNillableVerify(b *bool) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetNillableVerifyTicket(s *string) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetNillableVerifyTime(t *time.Time) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetOwnerID(i int) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetUpdateTime(t time.Time) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetVerify(b bool) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetVerifyTicket(s string) *MemberEmailCreate
- func (mec *MemberEmailCreate) SetVerifyTime(t time.Time) *MemberEmailCreate
- type MemberEmailCreateBulk
- type MemberEmailDelete
- type MemberEmailDeleteOne
- type MemberEmailEdges
- type MemberEmailGroupBy
- func (megb *MemberEmailGroupBy) Aggregate(fns ...AggregateFunc) *MemberEmailGroupBy
- func (megb *MemberEmailGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (megb *MemberEmailGroupBy) BoolX(ctx context.Context) bool
- func (megb *MemberEmailGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (megb *MemberEmailGroupBy) BoolsX(ctx context.Context) []bool
- func (megb *MemberEmailGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (megb *MemberEmailGroupBy) Float64X(ctx context.Context) float64
- func (megb *MemberEmailGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (megb *MemberEmailGroupBy) Float64sX(ctx context.Context) []float64
- func (megb *MemberEmailGroupBy) Int(ctx context.Context) (_ int, err error)
- func (megb *MemberEmailGroupBy) IntX(ctx context.Context) int
- func (megb *MemberEmailGroupBy) Ints(ctx context.Context) ([]int, error)
- func (megb *MemberEmailGroupBy) IntsX(ctx context.Context) []int
- func (megb *MemberEmailGroupBy) Scan(ctx context.Context, v interface{}) error
- func (megb *MemberEmailGroupBy) ScanX(ctx context.Context, v interface{})
- func (megb *MemberEmailGroupBy) String(ctx context.Context) (_ string, err error)
- func (megb *MemberEmailGroupBy) StringX(ctx context.Context) string
- func (megb *MemberEmailGroupBy) Strings(ctx context.Context) ([]string, error)
- func (megb *MemberEmailGroupBy) StringsX(ctx context.Context) []string
- type MemberEmailMutation
- func (m *MemberEmailMutation) AddField(name string, value ent.Value) error
- func (m *MemberEmailMutation) AddedEdges() []string
- func (m *MemberEmailMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemberEmailMutation) AddedFields() []string
- func (m *MemberEmailMutation) AddedIDs(name string) []ent.Value
- func (m *MemberEmailMutation) ClearEdge(name string) error
- func (m *MemberEmailMutation) ClearEmailOwner()
- func (m *MemberEmailMutation) ClearField(name string) error
- func (m *MemberEmailMutation) ClearVerifyTicket()
- func (m *MemberEmailMutation) ClearedEdges() []string
- func (m *MemberEmailMutation) ClearedFields() []string
- func (m MemberEmailMutation) Client() *Client
- func (m *MemberEmailMutation) CreateTime() (r time.Time, exists bool)
- func (m *MemberEmailMutation) EdgeCleared(name string) bool
- func (m *MemberEmailMutation) Email() (r string, exists bool)
- func (m *MemberEmailMutation) EmailOwnerCleared() bool
- func (m *MemberEmailMutation) EmailOwnerID() (id int, exists bool)
- func (m *MemberEmailMutation) EmailOwnerIDs() (ids []int)
- func (m *MemberEmailMutation) Field(name string) (ent.Value, bool)
- func (m *MemberEmailMutation) FieldCleared(name string) bool
- func (m *MemberEmailMutation) Fields() []string
- func (m *MemberEmailMutation) ID() (id int, exists bool)
- func (m *MemberEmailMutation) IsPrimary() (r bool, exists bool)
- func (m *MemberEmailMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemberEmailMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *MemberEmailMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemberEmailMutation) OldIsPrimary(ctx context.Context) (v bool, err error)
- func (m *MemberEmailMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *MemberEmailMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemberEmailMutation) OldVerify(ctx context.Context) (v bool, err error)
- func (m *MemberEmailMutation) OldVerifyTicket(ctx context.Context) (v *string, err error)
- func (m *MemberEmailMutation) OldVerifyTime(ctx context.Context) (v time.Time, err error)
- func (m *MemberEmailMutation) Op() Op
- func (m *MemberEmailMutation) OwnerID() (r int, exists bool)
- func (m *MemberEmailMutation) RemovedEdges() []string
- func (m *MemberEmailMutation) RemovedIDs(name string) []ent.Value
- func (m *MemberEmailMutation) ResetCreateTime()
- func (m *MemberEmailMutation) ResetEdge(name string) error
- func (m *MemberEmailMutation) ResetEmail()
- func (m *MemberEmailMutation) ResetEmailOwner()
- func (m *MemberEmailMutation) ResetField(name string) error
- func (m *MemberEmailMutation) ResetIsPrimary()
- func (m *MemberEmailMutation) ResetOwnerID()
- func (m *MemberEmailMutation) ResetUpdateTime()
- func (m *MemberEmailMutation) ResetVerify()
- func (m *MemberEmailMutation) ResetVerifyTicket()
- func (m *MemberEmailMutation) ResetVerifyTime()
- func (m *MemberEmailMutation) SetCreateTime(t time.Time)
- func (m *MemberEmailMutation) SetEmail(s string)
- func (m *MemberEmailMutation) SetEmailOwnerID(id int)
- func (m *MemberEmailMutation) SetField(name string, value ent.Value) error
- func (m *MemberEmailMutation) SetID(id int)
- func (m *MemberEmailMutation) SetIsPrimary(b bool)
- func (m *MemberEmailMutation) SetOwnerID(i int)
- func (m *MemberEmailMutation) SetUpdateTime(t time.Time)
- func (m *MemberEmailMutation) SetVerify(b bool)
- func (m *MemberEmailMutation) SetVerifyTicket(s string)
- func (m *MemberEmailMutation) SetVerifyTime(t time.Time)
- func (m MemberEmailMutation) Tx() (*Tx, error)
- func (m *MemberEmailMutation) Type() string
- func (m *MemberEmailMutation) UpdateTime() (r time.Time, exists bool)
- func (m *MemberEmailMutation) Verify() (r bool, exists bool)
- func (m *MemberEmailMutation) VerifyTicket() (r string, exists bool)
- func (m *MemberEmailMutation) VerifyTicketCleared() bool
- func (m *MemberEmailMutation) VerifyTime() (r time.Time, exists bool)
- type MemberEmailQuery
- func (meq *MemberEmailQuery) All(ctx context.Context) ([]*MemberEmail, error)
- func (meq *MemberEmailQuery) AllX(ctx context.Context) []*MemberEmail
- func (meq *MemberEmailQuery) Clone() *MemberEmailQuery
- func (meq *MemberEmailQuery) Count(ctx context.Context) (int, error)
- func (meq *MemberEmailQuery) CountX(ctx context.Context) int
- func (meq *MemberEmailQuery) Exist(ctx context.Context) (bool, error)
- func (meq *MemberEmailQuery) ExistX(ctx context.Context) bool
- func (meq *MemberEmailQuery) First(ctx context.Context) (*MemberEmail, error)
- func (meq *MemberEmailQuery) FirstID(ctx context.Context) (id int, err error)
- func (meq *MemberEmailQuery) FirstIDX(ctx context.Context) int
- func (meq *MemberEmailQuery) FirstX(ctx context.Context) *MemberEmail
- func (meq *MemberEmailQuery) GroupBy(field string, fields ...string) *MemberEmailGroupBy
- func (meq *MemberEmailQuery) IDs(ctx context.Context) ([]int, error)
- func (meq *MemberEmailQuery) IDsX(ctx context.Context) []int
- func (meq *MemberEmailQuery) Limit(limit int) *MemberEmailQuery
- func (meq *MemberEmailQuery) Offset(offset int) *MemberEmailQuery
- func (meq *MemberEmailQuery) Only(ctx context.Context) (*MemberEmail, error)
- func (meq *MemberEmailQuery) OnlyID(ctx context.Context) (id int, err error)
- func (meq *MemberEmailQuery) OnlyIDX(ctx context.Context) int
- func (meq *MemberEmailQuery) OnlyX(ctx context.Context) *MemberEmail
- func (meq *MemberEmailQuery) Order(o ...OrderFunc) *MemberEmailQuery
- func (meq *MemberEmailQuery) QueryEmailOwner() *MemberQuery
- func (meq *MemberEmailQuery) Select(field string, fields ...string) *MemberEmailSelect
- func (meq *MemberEmailQuery) Unique(unique bool) *MemberEmailQuery
- func (meq *MemberEmailQuery) Where(ps ...predicate.MemberEmail) *MemberEmailQuery
- func (meq *MemberEmailQuery) WithEmailOwner(opts ...func(*MemberQuery)) *MemberEmailQuery
- type MemberEmailSelect
- func (mes *MemberEmailSelect) Bool(ctx context.Context) (_ bool, err error)
- func (mes *MemberEmailSelect) BoolX(ctx context.Context) bool
- func (mes *MemberEmailSelect) Bools(ctx context.Context) ([]bool, error)
- func (mes *MemberEmailSelect) BoolsX(ctx context.Context) []bool
- func (mes *MemberEmailSelect) Float64(ctx context.Context) (_ float64, err error)
- func (mes *MemberEmailSelect) Float64X(ctx context.Context) float64
- func (mes *MemberEmailSelect) Float64s(ctx context.Context) ([]float64, error)
- func (mes *MemberEmailSelect) Float64sX(ctx context.Context) []float64
- func (mes *MemberEmailSelect) Int(ctx context.Context) (_ int, err error)
- func (mes *MemberEmailSelect) IntX(ctx context.Context) int
- func (mes *MemberEmailSelect) Ints(ctx context.Context) ([]int, error)
- func (mes *MemberEmailSelect) IntsX(ctx context.Context) []int
- func (mes *MemberEmailSelect) Scan(ctx context.Context, v interface{}) error
- func (mes *MemberEmailSelect) ScanX(ctx context.Context, v interface{})
- func (mes *MemberEmailSelect) String(ctx context.Context) (_ string, err error)
- func (mes *MemberEmailSelect) StringX(ctx context.Context) string
- func (mes *MemberEmailSelect) Strings(ctx context.Context) ([]string, error)
- func (mes *MemberEmailSelect) StringsX(ctx context.Context) []string
- type MemberEmailUpdate
- func (meu *MemberEmailUpdate) ClearEmailOwner() *MemberEmailUpdate
- func (meu *MemberEmailUpdate) ClearVerifyTicket() *MemberEmailUpdate
- func (meu *MemberEmailUpdate) Exec(ctx context.Context) error
- func (meu *MemberEmailUpdate) ExecX(ctx context.Context)
- func (meu *MemberEmailUpdate) Mutation() *MemberEmailMutation
- func (meu *MemberEmailUpdate) Save(ctx context.Context) (int, error)
- func (meu *MemberEmailUpdate) SaveX(ctx context.Context) int
- func (meu *MemberEmailUpdate) SetEmail(s string) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetEmailOwner(m *Member) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetEmailOwnerID(id int) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetIsPrimary(b bool) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetNillableIsPrimary(b *bool) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetNillableVerify(b *bool) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetNillableVerifyTicket(s *string) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetUpdateTime(t time.Time) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetVerify(b bool) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetVerifyTicket(s string) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) SetVerifyTime(t time.Time) *MemberEmailUpdate
- func (meu *MemberEmailUpdate) Where(ps ...predicate.MemberEmail) *MemberEmailUpdate
- type MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) ClearEmailOwner() *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) ClearVerifyTicket() *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) Exec(ctx context.Context) error
- func (meuo *MemberEmailUpdateOne) ExecX(ctx context.Context)
- func (meuo *MemberEmailUpdateOne) Mutation() *MemberEmailMutation
- func (meuo *MemberEmailUpdateOne) Save(ctx context.Context) (*MemberEmail, error)
- func (meuo *MemberEmailUpdateOne) SaveX(ctx context.Context) *MemberEmail
- func (meuo *MemberEmailUpdateOne) Select(field string, fields ...string) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetEmail(s string) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetEmailOwner(m *Member) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetEmailOwnerID(id int) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetIsPrimary(b bool) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetNillableIsPrimary(b *bool) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetNillableVerify(b *bool) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetNillableVerifyTicket(s *string) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetUpdateTime(t time.Time) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetVerify(b bool) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetVerifyTicket(s string) *MemberEmailUpdateOne
- func (meuo *MemberEmailUpdateOne) SetVerifyTime(t time.Time) *MemberEmailUpdateOne
- type MemberEmails
- 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 MemberMutation
- func (m *MemberMutation) AddField(name string, value ent.Value) error
- func (m *MemberMutation) AddMemberEmailIDs(ids ...int)
- func (m *MemberMutation) AddMemberSettingIDs(ids ...int)
- func (m *MemberMutation) AddMemberSnippetDocIDs(ids ...int)
- func (m *MemberMutation) AddMemberSnippetFolderIDs(ids ...int)
- func (m *MemberMutation) AddMemberSnippetIDs(ids ...int)
- func (m *MemberMutation) AddMemberSnippetTagIDs(ids ...int)
- func (m *MemberMutation) AddedEdges() []string
- func (m *MemberMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemberMutation) AddedFields() []string
- func (m *MemberMutation) AddedIDs(name string) []ent.Value
- func (m *MemberMutation) ClearDeleteTime()
- func (m *MemberMutation) ClearEdge(name string) error
- func (m *MemberMutation) ClearField(name string) error
- func (m *MemberMutation) ClearGroupID()
- func (m *MemberMutation) ClearGroups()
- func (m *MemberMutation) ClearLastPwdAuth()
- func (m *MemberMutation) ClearMemberEmails()
- func (m *MemberMutation) ClearMemberSettings()
- func (m *MemberMutation) ClearMemberSnippetDocs()
- func (m *MemberMutation) ClearMemberSnippetFolders()
- func (m *MemberMutation) ClearMemberSnippetTags()
- func (m *MemberMutation) ClearMemberSnippets()
- func (m *MemberMutation) ClearPassword()
- func (m *MemberMutation) ClearPhone()
- func (m *MemberMutation) ClearStatus()
- func (m *MemberMutation) ClearedEdges() []string
- func (m *MemberMutation) ClearedFields() []string
- func (m MemberMutation) Client() *Client
- func (m *MemberMutation) CreateTime() (r time.Time, exists bool)
- func (m *MemberMutation) DeleteTime() (r time.Time, exists bool)
- func (m *MemberMutation) DeleteTimeCleared() bool
- func (m *MemberMutation) EdgeCleared(name string) 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) GroupID() (r int, exists bool)
- func (m *MemberMutation) GroupIDCleared() bool
- func (m *MemberMutation) GroupsCleared() bool
- func (m *MemberMutation) GroupsID() (id int, exists bool)
- func (m *MemberMutation) GroupsIDs() (ids []int)
- func (m *MemberMutation) ID() (id int, exists bool)
- func (m *MemberMutation) LastPwdAuth() (r time.Time, exists bool)
- func (m *MemberMutation) LastPwdAuthCleared() bool
- func (m *MemberMutation) MemberEmailsCleared() bool
- func (m *MemberMutation) MemberEmailsIDs() (ids []int)
- func (m *MemberMutation) MemberSettingsCleared() bool
- func (m *MemberMutation) MemberSettingsIDs() (ids []int)
- func (m *MemberMutation) MemberSnippetDocsCleared() bool
- func (m *MemberMutation) MemberSnippetDocsIDs() (ids []int)
- func (m *MemberMutation) MemberSnippetFoldersCleared() bool
- func (m *MemberMutation) MemberSnippetFoldersIDs() (ids []int)
- func (m *MemberMutation) MemberSnippetTagsCleared() bool
- func (m *MemberMutation) MemberSnippetTagsIDs() (ids []int)
- func (m *MemberMutation) MemberSnippetsCleared() bool
- func (m *MemberMutation) MemberSnippetsIDs() (ids []int)
- func (m *MemberMutation) Nickname() (r string, exists bool)
- func (m *MemberMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemberMutation) OldDeleteTime(ctx context.Context) (v *time.Time, err error)
- func (m *MemberMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemberMutation) OldGroupID(ctx context.Context) (v *int, err error)
- func (m *MemberMutation) OldLastPwdAuth(ctx context.Context) (v *time.Time, 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) OldPhone(ctx context.Context) (v *string, err error)
- func (m *MemberMutation) OldSignature(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldStatus(ctx context.Context) (v *member.Status, err error)
- func (m *MemberMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemberMutation) Op() Op
- func (m *MemberMutation) Password() (r string, exists bool)
- func (m *MemberMutation) PasswordCleared() bool
- func (m *MemberMutation) Phone() (r string, exists bool)
- func (m *MemberMutation) PhoneCleared() bool
- func (m *MemberMutation) RemoveMemberEmailIDs(ids ...int)
- func (m *MemberMutation) RemoveMemberSettingIDs(ids ...int)
- func (m *MemberMutation) RemoveMemberSnippetDocIDs(ids ...int)
- func (m *MemberMutation) RemoveMemberSnippetFolderIDs(ids ...int)
- func (m *MemberMutation) RemoveMemberSnippetIDs(ids ...int)
- func (m *MemberMutation) RemoveMemberSnippetTagIDs(ids ...int)
- func (m *MemberMutation) RemovedEdges() []string
- func (m *MemberMutation) RemovedIDs(name string) []ent.Value
- func (m *MemberMutation) RemovedMemberEmailsIDs() (ids []int)
- func (m *MemberMutation) RemovedMemberSettingsIDs() (ids []int)
- func (m *MemberMutation) RemovedMemberSnippetDocsIDs() (ids []int)
- func (m *MemberMutation) RemovedMemberSnippetFoldersIDs() (ids []int)
- func (m *MemberMutation) RemovedMemberSnippetTagsIDs() (ids []int)
- func (m *MemberMutation) RemovedMemberSnippetsIDs() (ids []int)
- func (m *MemberMutation) ResetCreateTime()
- func (m *MemberMutation) ResetDeleteTime()
- func (m *MemberMutation) ResetEdge(name string) error
- func (m *MemberMutation) ResetField(name string) error
- func (m *MemberMutation) ResetGroupID()
- func (m *MemberMutation) ResetGroups()
- func (m *MemberMutation) ResetLastPwdAuth()
- func (m *MemberMutation) ResetMemberEmails()
- func (m *MemberMutation) ResetMemberSettings()
- func (m *MemberMutation) ResetMemberSnippetDocs()
- func (m *MemberMutation) ResetMemberSnippetFolders()
- func (m *MemberMutation) ResetMemberSnippetTags()
- func (m *MemberMutation) ResetMemberSnippets()
- func (m *MemberMutation) ResetNickname()
- func (m *MemberMutation) ResetPassword()
- func (m *MemberMutation) ResetPhone()
- func (m *MemberMutation) ResetSignature()
- func (m *MemberMutation) ResetSn()
- func (m *MemberMutation) ResetStatus()
- func (m *MemberMutation) ResetUpdateTime()
- func (m *MemberMutation) SetCreateTime(t time.Time)
- func (m *MemberMutation) SetDeleteTime(t time.Time)
- func (m *MemberMutation) SetField(name string, value ent.Value) error
- func (m *MemberMutation) SetGroupID(i int)
- func (m *MemberMutation) SetGroupsID(id int)
- func (m *MemberMutation) SetID(id int)
- func (m *MemberMutation) SetLastPwdAuth(t time.Time)
- func (m *MemberMutation) SetNickname(s string)
- func (m *MemberMutation) SetPassword(s string)
- func (m *MemberMutation) SetPhone(s string)
- func (m *MemberMutation) SetSignature(s string)
- func (m *MemberMutation) SetSn(s string)
- func (m *MemberMutation) SetStatus(value member.Status)
- func (m *MemberMutation) SetUpdateTime(t time.Time)
- func (m *MemberMutation) Signature() (r string, exists bool)
- func (m *MemberMutation) Sn() (r string, exists bool)
- func (m *MemberMutation) Status() (r member.Status, exists bool)
- func (m *MemberMutation) StatusCleared() bool
- func (m MemberMutation) Tx() (*Tx, error)
- func (m *MemberMutation) Type() string
- func (m *MemberMutation) UpdateTime() (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) FirstIDX(ctx context.Context) int
- func (mq *MemberQuery) FirstX(ctx context.Context) *Member
- 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) QueryGroups() *GroupQuery
- func (mq *MemberQuery) QueryMemberEmails() *MemberEmailQuery
- func (mq *MemberQuery) QueryMemberSettings() *MemberSettingQuery
- func (mq *MemberQuery) QueryMemberSnippetDocs() *SnippetDocumentQuery
- func (mq *MemberQuery) QueryMemberSnippetFolders() *SnippetFolderQuery
- func (mq *MemberQuery) QueryMemberSnippetTags() *SnippetTagQuery
- func (mq *MemberQuery) QueryMemberSnippets() *SnippetQuery
- func (mq *MemberQuery) Select(field string, fields ...string) *MemberSelect
- func (mq *MemberQuery) Unique(unique bool) *MemberQuery
- func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery
- func (mq *MemberQuery) WithGroups(opts ...func(*GroupQuery)) *MemberQuery
- func (mq *MemberQuery) WithMemberEmails(opts ...func(*MemberEmailQuery)) *MemberQuery
- func (mq *MemberQuery) WithMemberSettings(opts ...func(*MemberSettingQuery)) *MemberQuery
- func (mq *MemberQuery) WithMemberSnippetDocs(opts ...func(*SnippetDocumentQuery)) *MemberQuery
- func (mq *MemberQuery) WithMemberSnippetFolders(opts ...func(*SnippetFolderQuery)) *MemberQuery
- func (mq *MemberQuery) WithMemberSnippetTags(opts ...func(*SnippetTagQuery)) *MemberQuery
- func (mq *MemberQuery) WithMemberSnippets(opts ...func(*SnippetQuery)) *MemberQuery
- type MemberSecurityLog
- type MemberSecurityLogClient
- func (c *MemberSecurityLogClient) Create() *MemberSecurityLogCreate
- func (c *MemberSecurityLogClient) CreateBulk(builders ...*MemberSecurityLogCreate) *MemberSecurityLogCreateBulk
- func (c *MemberSecurityLogClient) Delete() *MemberSecurityLogDelete
- func (c *MemberSecurityLogClient) DeleteOne(msl *MemberSecurityLog) *MemberSecurityLogDeleteOne
- func (c *MemberSecurityLogClient) DeleteOneID(id int) *MemberSecurityLogDeleteOne
- func (c *MemberSecurityLogClient) Get(ctx context.Context, id int) (*MemberSecurityLog, error)
- func (c *MemberSecurityLogClient) GetX(ctx context.Context, id int) *MemberSecurityLog
- func (c *MemberSecurityLogClient) Hooks() []Hook
- func (c *MemberSecurityLogClient) Query() *MemberSecurityLogQuery
- func (c *MemberSecurityLogClient) Update() *MemberSecurityLogUpdate
- func (c *MemberSecurityLogClient) UpdateOne(msl *MemberSecurityLog) *MemberSecurityLogUpdateOne
- func (c *MemberSecurityLogClient) UpdateOneID(id int) *MemberSecurityLogUpdateOne
- func (c *MemberSecurityLogClient) Use(hooks ...Hook)
- type MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) Mutation() *MemberSecurityLogMutation
- func (mslc *MemberSecurityLogCreate) Save(ctx context.Context) (*MemberSecurityLog, error)
- func (mslc *MemberSecurityLogCreate) SaveX(ctx context.Context) *MemberSecurityLog
- func (mslc *MemberSecurityLogCreate) SetAction(m membersecuritylog.Action) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetCreateTime(t time.Time) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetDescription(s string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetID(i int) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetIP(s string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetMemberID(i int) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetNillableAction(m *membersecuritylog.Action) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetNillableCreateTime(t *time.Time) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetNillableDescription(s *string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetNillableIP(s *string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetNillableRemark(s *string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetNillableRequestID(s *string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetNillableServerVersion(s *string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetRemark(s string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetRequestID(s string) *MemberSecurityLogCreate
- func (mslc *MemberSecurityLogCreate) SetServerVersion(s string) *MemberSecurityLogCreate
- type MemberSecurityLogCreateBulk
- type MemberSecurityLogDelete
- type MemberSecurityLogDeleteOne
- type MemberSecurityLogGroupBy
- func (mslgb *MemberSecurityLogGroupBy) Aggregate(fns ...AggregateFunc) *MemberSecurityLogGroupBy
- func (mslgb *MemberSecurityLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mslgb *MemberSecurityLogGroupBy) BoolX(ctx context.Context) bool
- func (mslgb *MemberSecurityLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mslgb *MemberSecurityLogGroupBy) BoolsX(ctx context.Context) []bool
- func (mslgb *MemberSecurityLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mslgb *MemberSecurityLogGroupBy) Float64X(ctx context.Context) float64
- func (mslgb *MemberSecurityLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mslgb *MemberSecurityLogGroupBy) Float64sX(ctx context.Context) []float64
- func (mslgb *MemberSecurityLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mslgb *MemberSecurityLogGroupBy) IntX(ctx context.Context) int
- func (mslgb *MemberSecurityLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mslgb *MemberSecurityLogGroupBy) IntsX(ctx context.Context) []int
- func (mslgb *MemberSecurityLogGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mslgb *MemberSecurityLogGroupBy) ScanX(ctx context.Context, v interface{})
- func (mslgb *MemberSecurityLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (mslgb *MemberSecurityLogGroupBy) StringX(ctx context.Context) string
- func (mslgb *MemberSecurityLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mslgb *MemberSecurityLogGroupBy) StringsX(ctx context.Context) []string
- type MemberSecurityLogMutation
- func (m *MemberSecurityLogMutation) Action() (r membersecuritylog.Action, exists bool)
- func (m *MemberSecurityLogMutation) AddField(name string, value ent.Value) error
- func (m *MemberSecurityLogMutation) AddMemberID(i int)
- func (m *MemberSecurityLogMutation) AddedEdges() []string
- func (m *MemberSecurityLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemberSecurityLogMutation) AddedFields() []string
- func (m *MemberSecurityLogMutation) AddedIDs(name string) []ent.Value
- func (m *MemberSecurityLogMutation) AddedMemberID() (r int, exists bool)
- func (m *MemberSecurityLogMutation) ClearDescription()
- func (m *MemberSecurityLogMutation) ClearEdge(name string) error
- func (m *MemberSecurityLogMutation) ClearField(name string) error
- func (m *MemberSecurityLogMutation) ClearIP()
- func (m *MemberSecurityLogMutation) ClearRemark()
- func (m *MemberSecurityLogMutation) ClearRequestID()
- func (m *MemberSecurityLogMutation) ClearServerVersion()
- func (m *MemberSecurityLogMutation) ClearedEdges() []string
- func (m *MemberSecurityLogMutation) ClearedFields() []string
- func (m MemberSecurityLogMutation) Client() *Client
- func (m *MemberSecurityLogMutation) CreateTime() (r time.Time, exists bool)
- func (m *MemberSecurityLogMutation) Description() (r string, exists bool)
- func (m *MemberSecurityLogMutation) DescriptionCleared() bool
- func (m *MemberSecurityLogMutation) EdgeCleared(name string) bool
- func (m *MemberSecurityLogMutation) Field(name string) (ent.Value, bool)
- func (m *MemberSecurityLogMutation) FieldCleared(name string) bool
- func (m *MemberSecurityLogMutation) Fields() []string
- func (m *MemberSecurityLogMutation) ID() (id int, exists bool)
- func (m *MemberSecurityLogMutation) IP() (r string, exists bool)
- func (m *MemberSecurityLogMutation) IPCleared() bool
- func (m *MemberSecurityLogMutation) MemberID() (r int, exists bool)
- func (m *MemberSecurityLogMutation) OldAction(ctx context.Context) (v membersecuritylog.Action, err error)
- func (m *MemberSecurityLogMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemberSecurityLogMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *MemberSecurityLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemberSecurityLogMutation) OldIP(ctx context.Context) (v *string, err error)
- func (m *MemberSecurityLogMutation) OldMemberID(ctx context.Context) (v int, err error)
- func (m *MemberSecurityLogMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *MemberSecurityLogMutation) OldRequestID(ctx context.Context) (v *string, err error)
- func (m *MemberSecurityLogMutation) OldServerVersion(ctx context.Context) (v *string, err error)
- func (m *MemberSecurityLogMutation) Op() Op
- func (m *MemberSecurityLogMutation) Remark() (r string, exists bool)
- func (m *MemberSecurityLogMutation) RemarkCleared() bool
- func (m *MemberSecurityLogMutation) RemovedEdges() []string
- func (m *MemberSecurityLogMutation) RemovedIDs(name string) []ent.Value
- func (m *MemberSecurityLogMutation) RequestID() (r string, exists bool)
- func (m *MemberSecurityLogMutation) RequestIDCleared() bool
- func (m *MemberSecurityLogMutation) ResetAction()
- func (m *MemberSecurityLogMutation) ResetCreateTime()
- func (m *MemberSecurityLogMutation) ResetDescription()
- func (m *MemberSecurityLogMutation) ResetEdge(name string) error
- func (m *MemberSecurityLogMutation) ResetField(name string) error
- func (m *MemberSecurityLogMutation) ResetIP()
- func (m *MemberSecurityLogMutation) ResetMemberID()
- func (m *MemberSecurityLogMutation) ResetRemark()
- func (m *MemberSecurityLogMutation) ResetRequestID()
- func (m *MemberSecurityLogMutation) ResetServerVersion()
- func (m *MemberSecurityLogMutation) ServerVersion() (r string, exists bool)
- func (m *MemberSecurityLogMutation) ServerVersionCleared() bool
- func (m *MemberSecurityLogMutation) SetAction(value membersecuritylog.Action)
- func (m *MemberSecurityLogMutation) SetCreateTime(t time.Time)
- func (m *MemberSecurityLogMutation) SetDescription(s string)
- func (m *MemberSecurityLogMutation) SetField(name string, value ent.Value) error
- func (m *MemberSecurityLogMutation) SetID(id int)
- func (m *MemberSecurityLogMutation) SetIP(s string)
- func (m *MemberSecurityLogMutation) SetMemberID(i int)
- func (m *MemberSecurityLogMutation) SetRemark(s string)
- func (m *MemberSecurityLogMutation) SetRequestID(s string)
- func (m *MemberSecurityLogMutation) SetServerVersion(s string)
- func (m MemberSecurityLogMutation) Tx() (*Tx, error)
- func (m *MemberSecurityLogMutation) Type() string
- type MemberSecurityLogQuery
- func (mslq *MemberSecurityLogQuery) All(ctx context.Context) ([]*MemberSecurityLog, error)
- func (mslq *MemberSecurityLogQuery) AllX(ctx context.Context) []*MemberSecurityLog
- func (mslq *MemberSecurityLogQuery) Clone() *MemberSecurityLogQuery
- func (mslq *MemberSecurityLogQuery) Count(ctx context.Context) (int, error)
- func (mslq *MemberSecurityLogQuery) CountX(ctx context.Context) int
- func (mslq *MemberSecurityLogQuery) Exist(ctx context.Context) (bool, error)
- func (mslq *MemberSecurityLogQuery) ExistX(ctx context.Context) bool
- func (mslq *MemberSecurityLogQuery) First(ctx context.Context) (*MemberSecurityLog, error)
- func (mslq *MemberSecurityLogQuery) FirstID(ctx context.Context) (id int, err error)
- func (mslq *MemberSecurityLogQuery) FirstIDX(ctx context.Context) int
- func (mslq *MemberSecurityLogQuery) FirstX(ctx context.Context) *MemberSecurityLog
- func (mslq *MemberSecurityLogQuery) GroupBy(field string, fields ...string) *MemberSecurityLogGroupBy
- func (mslq *MemberSecurityLogQuery) IDs(ctx context.Context) ([]int, error)
- func (mslq *MemberSecurityLogQuery) IDsX(ctx context.Context) []int
- func (mslq *MemberSecurityLogQuery) Limit(limit int) *MemberSecurityLogQuery
- func (mslq *MemberSecurityLogQuery) Offset(offset int) *MemberSecurityLogQuery
- func (mslq *MemberSecurityLogQuery) Only(ctx context.Context) (*MemberSecurityLog, error)
- func (mslq *MemberSecurityLogQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mslq *MemberSecurityLogQuery) OnlyIDX(ctx context.Context) int
- func (mslq *MemberSecurityLogQuery) OnlyX(ctx context.Context) *MemberSecurityLog
- func (mslq *MemberSecurityLogQuery) Order(o ...OrderFunc) *MemberSecurityLogQuery
- func (mslq *MemberSecurityLogQuery) Select(field string, fields ...string) *MemberSecurityLogSelect
- func (mslq *MemberSecurityLogQuery) Unique(unique bool) *MemberSecurityLogQuery
- func (mslq *MemberSecurityLogQuery) Where(ps ...predicate.MemberSecurityLog) *MemberSecurityLogQuery
- type MemberSecurityLogSelect
- func (msls *MemberSecurityLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (msls *MemberSecurityLogSelect) BoolX(ctx context.Context) bool
- func (msls *MemberSecurityLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (msls *MemberSecurityLogSelect) BoolsX(ctx context.Context) []bool
- func (msls *MemberSecurityLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (msls *MemberSecurityLogSelect) Float64X(ctx context.Context) float64
- func (msls *MemberSecurityLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (msls *MemberSecurityLogSelect) Float64sX(ctx context.Context) []float64
- func (msls *MemberSecurityLogSelect) Int(ctx context.Context) (_ int, err error)
- func (msls *MemberSecurityLogSelect) IntX(ctx context.Context) int
- func (msls *MemberSecurityLogSelect) Ints(ctx context.Context) ([]int, error)
- func (msls *MemberSecurityLogSelect) IntsX(ctx context.Context) []int
- func (msls *MemberSecurityLogSelect) Scan(ctx context.Context, v interface{}) error
- func (msls *MemberSecurityLogSelect) ScanX(ctx context.Context, v interface{})
- func (msls *MemberSecurityLogSelect) String(ctx context.Context) (_ string, err error)
- func (msls *MemberSecurityLogSelect) StringX(ctx context.Context) string
- func (msls *MemberSecurityLogSelect) Strings(ctx context.Context) ([]string, error)
- func (msls *MemberSecurityLogSelect) StringsX(ctx context.Context) []string
- type MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) ClearDescription() *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) ClearIP() *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) ClearRemark() *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) ClearRequestID() *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) ClearServerVersion() *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) Exec(ctx context.Context) error
- func (mslu *MemberSecurityLogUpdate) ExecX(ctx context.Context)
- func (mslu *MemberSecurityLogUpdate) Mutation() *MemberSecurityLogMutation
- func (mslu *MemberSecurityLogUpdate) Save(ctx context.Context) (int, error)
- func (mslu *MemberSecurityLogUpdate) SaveX(ctx context.Context) int
- func (mslu *MemberSecurityLogUpdate) SetAction(m membersecuritylog.Action) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetDescription(s string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetIP(s string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetNillableAction(m *membersecuritylog.Action) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetNillableDescription(s *string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetNillableIP(s *string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetNillableRemark(s *string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetNillableRequestID(s *string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetNillableServerVersion(s *string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetRemark(s string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetRequestID(s string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) SetServerVersion(s string) *MemberSecurityLogUpdate
- func (mslu *MemberSecurityLogUpdate) Where(ps ...predicate.MemberSecurityLog) *MemberSecurityLogUpdate
- type MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) ClearDescription() *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) ClearIP() *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) ClearRemark() *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) ClearRequestID() *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) ClearServerVersion() *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) Exec(ctx context.Context) error
- func (msluo *MemberSecurityLogUpdateOne) ExecX(ctx context.Context)
- func (msluo *MemberSecurityLogUpdateOne) Mutation() *MemberSecurityLogMutation
- func (msluo *MemberSecurityLogUpdateOne) Save(ctx context.Context) (*MemberSecurityLog, error)
- func (msluo *MemberSecurityLogUpdateOne) SaveX(ctx context.Context) *MemberSecurityLog
- func (msluo *MemberSecurityLogUpdateOne) Select(field string, fields ...string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetAction(m membersecuritylog.Action) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetDescription(s string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetIP(s string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetNillableAction(m *membersecuritylog.Action) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetNillableDescription(s *string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetNillableIP(s *string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetNillableRemark(s *string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetNillableRequestID(s *string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetNillableServerVersion(s *string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetRemark(s string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetRequestID(s string) *MemberSecurityLogUpdateOne
- func (msluo *MemberSecurityLogUpdateOne) SetServerVersion(s string) *MemberSecurityLogUpdateOne
- type MemberSecurityLogs
- 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 MemberSetting
- type MemberSettingClient
- func (c *MemberSettingClient) Create() *MemberSettingCreate
- func (c *MemberSettingClient) CreateBulk(builders ...*MemberSettingCreate) *MemberSettingCreateBulk
- func (c *MemberSettingClient) Delete() *MemberSettingDelete
- func (c *MemberSettingClient) DeleteOne(ms *MemberSetting) *MemberSettingDeleteOne
- func (c *MemberSettingClient) DeleteOneID(id int) *MemberSettingDeleteOne
- func (c *MemberSettingClient) Get(ctx context.Context, id int) (*MemberSetting, error)
- func (c *MemberSettingClient) GetX(ctx context.Context, id int) *MemberSetting
- func (c *MemberSettingClient) Hooks() []Hook
- func (c *MemberSettingClient) Query() *MemberSettingQuery
- func (c *MemberSettingClient) QuerySettingsOwner(ms *MemberSetting) *MemberQuery
- func (c *MemberSettingClient) Update() *MemberSettingUpdate
- func (c *MemberSettingClient) UpdateOne(ms *MemberSetting) *MemberSettingUpdateOne
- func (c *MemberSettingClient) UpdateOneID(id int) *MemberSettingUpdateOne
- func (c *MemberSettingClient) Use(hooks ...Hook)
- type MemberSettingCreate
- func (msc *MemberSettingCreate) Mutation() *MemberSettingMutation
- func (msc *MemberSettingCreate) Save(ctx context.Context) (*MemberSetting, error)
- func (msc *MemberSettingCreate) SaveX(ctx context.Context) *MemberSetting
- func (msc *MemberSettingCreate) SetID(i int) *MemberSettingCreate
- func (msc *MemberSettingCreate) SetKey(s string) *MemberSettingCreate
- func (msc *MemberSettingCreate) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingCreate
- func (msc *MemberSettingCreate) SetOwnerID(i int) *MemberSettingCreate
- func (msc *MemberSettingCreate) SetSettingsOwner(m *Member) *MemberSettingCreate
- func (msc *MemberSettingCreate) SetSettingsOwnerID(id int) *MemberSettingCreate
- func (msc *MemberSettingCreate) SetTypeof(m membersetting.Typeof) *MemberSettingCreate
- func (msc *MemberSettingCreate) SetValue(s string) *MemberSettingCreate
- type MemberSettingCreateBulk
- type MemberSettingDelete
- type MemberSettingDeleteOne
- type MemberSettingEdges
- type MemberSettingGroupBy
- func (msgb *MemberSettingGroupBy) Aggregate(fns ...AggregateFunc) *MemberSettingGroupBy
- func (msgb *MemberSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (msgb *MemberSettingGroupBy) BoolX(ctx context.Context) bool
- func (msgb *MemberSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (msgb *MemberSettingGroupBy) BoolsX(ctx context.Context) []bool
- func (msgb *MemberSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (msgb *MemberSettingGroupBy) Float64X(ctx context.Context) float64
- func (msgb *MemberSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (msgb *MemberSettingGroupBy) Float64sX(ctx context.Context) []float64
- func (msgb *MemberSettingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (msgb *MemberSettingGroupBy) IntX(ctx context.Context) int
- func (msgb *MemberSettingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (msgb *MemberSettingGroupBy) IntsX(ctx context.Context) []int
- func (msgb *MemberSettingGroupBy) Scan(ctx context.Context, v interface{}) error
- func (msgb *MemberSettingGroupBy) ScanX(ctx context.Context, v interface{})
- func (msgb *MemberSettingGroupBy) String(ctx context.Context) (_ string, err error)
- func (msgb *MemberSettingGroupBy) StringX(ctx context.Context) string
- func (msgb *MemberSettingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (msgb *MemberSettingGroupBy) StringsX(ctx context.Context) []string
- type MemberSettingMutation
- func (m *MemberSettingMutation) AddField(name string, value ent.Value) error
- func (m *MemberSettingMutation) AddedEdges() []string
- func (m *MemberSettingMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemberSettingMutation) AddedFields() []string
- func (m *MemberSettingMutation) AddedIDs(name string) []ent.Value
- func (m *MemberSettingMutation) ClearEdge(name string) error
- func (m *MemberSettingMutation) ClearField(name string) error
- func (m *MemberSettingMutation) ClearSettingsOwner()
- func (m *MemberSettingMutation) ClearedEdges() []string
- func (m *MemberSettingMutation) ClearedFields() []string
- func (m MemberSettingMutation) Client() *Client
- func (m *MemberSettingMutation) EdgeCleared(name string) bool
- func (m *MemberSettingMutation) Field(name string) (ent.Value, bool)
- func (m *MemberSettingMutation) FieldCleared(name string) bool
- func (m *MemberSettingMutation) Fields() []string
- func (m *MemberSettingMutation) ID() (id int, exists bool)
- func (m *MemberSettingMutation) Key() (r string, exists bool)
- func (m *MemberSettingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemberSettingMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *MemberSettingMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *MemberSettingMutation) OldTypeof(ctx context.Context) (v membersetting.Typeof, err error)
- func (m *MemberSettingMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *MemberSettingMutation) Op() Op
- func (m *MemberSettingMutation) OwnerID() (r int, exists bool)
- func (m *MemberSettingMutation) RemovedEdges() []string
- func (m *MemberSettingMutation) RemovedIDs(name string) []ent.Value
- func (m *MemberSettingMutation) ResetEdge(name string) error
- func (m *MemberSettingMutation) ResetField(name string) error
- func (m *MemberSettingMutation) ResetKey()
- func (m *MemberSettingMutation) ResetOwnerID()
- func (m *MemberSettingMutation) ResetSettingsOwner()
- func (m *MemberSettingMutation) ResetTypeof()
- func (m *MemberSettingMutation) ResetValue()
- func (m *MemberSettingMutation) SetField(name string, value ent.Value) error
- func (m *MemberSettingMutation) SetID(id int)
- func (m *MemberSettingMutation) SetKey(s string)
- func (m *MemberSettingMutation) SetOwnerID(i int)
- func (m *MemberSettingMutation) SetSettingsOwnerID(id int)
- func (m *MemberSettingMutation) SetTypeof(value membersetting.Typeof)
- func (m *MemberSettingMutation) SetValue(s string)
- func (m *MemberSettingMutation) SettingsOwnerCleared() bool
- func (m *MemberSettingMutation) SettingsOwnerID() (id int, exists bool)
- func (m *MemberSettingMutation) SettingsOwnerIDs() (ids []int)
- func (m MemberSettingMutation) Tx() (*Tx, error)
- func (m *MemberSettingMutation) Type() string
- func (m *MemberSettingMutation) Typeof() (r membersetting.Typeof, exists bool)
- func (m *MemberSettingMutation) Value() (r string, exists bool)
- type MemberSettingQuery
- func (msq *MemberSettingQuery) All(ctx context.Context) ([]*MemberSetting, error)
- func (msq *MemberSettingQuery) AllX(ctx context.Context) []*MemberSetting
- func (msq *MemberSettingQuery) Clone() *MemberSettingQuery
- func (msq *MemberSettingQuery) Count(ctx context.Context) (int, error)
- func (msq *MemberSettingQuery) CountX(ctx context.Context) int
- func (msq *MemberSettingQuery) Exist(ctx context.Context) (bool, error)
- func (msq *MemberSettingQuery) ExistX(ctx context.Context) bool
- func (msq *MemberSettingQuery) First(ctx context.Context) (*MemberSetting, error)
- func (msq *MemberSettingQuery) FirstID(ctx context.Context) (id int, err error)
- func (msq *MemberSettingQuery) FirstIDX(ctx context.Context) int
- func (msq *MemberSettingQuery) FirstX(ctx context.Context) *MemberSetting
- func (msq *MemberSettingQuery) GroupBy(field string, fields ...string) *MemberSettingGroupBy
- func (msq *MemberSettingQuery) IDs(ctx context.Context) ([]int, error)
- func (msq *MemberSettingQuery) IDsX(ctx context.Context) []int
- func (msq *MemberSettingQuery) Limit(limit int) *MemberSettingQuery
- func (msq *MemberSettingQuery) Offset(offset int) *MemberSettingQuery
- func (msq *MemberSettingQuery) Only(ctx context.Context) (*MemberSetting, error)
- func (msq *MemberSettingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (msq *MemberSettingQuery) OnlyIDX(ctx context.Context) int
- func (msq *MemberSettingQuery) OnlyX(ctx context.Context) *MemberSetting
- func (msq *MemberSettingQuery) Order(o ...OrderFunc) *MemberSettingQuery
- func (msq *MemberSettingQuery) QuerySettingsOwner() *MemberQuery
- func (msq *MemberSettingQuery) Select(field string, fields ...string) *MemberSettingSelect
- func (msq *MemberSettingQuery) Unique(unique bool) *MemberSettingQuery
- func (msq *MemberSettingQuery) Where(ps ...predicate.MemberSetting) *MemberSettingQuery
- func (msq *MemberSettingQuery) WithSettingsOwner(opts ...func(*MemberQuery)) *MemberSettingQuery
- type MemberSettingSelect
- func (mss *MemberSettingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (mss *MemberSettingSelect) BoolX(ctx context.Context) bool
- func (mss *MemberSettingSelect) Bools(ctx context.Context) ([]bool, error)
- func (mss *MemberSettingSelect) BoolsX(ctx context.Context) []bool
- func (mss *MemberSettingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (mss *MemberSettingSelect) Float64X(ctx context.Context) float64
- func (mss *MemberSettingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (mss *MemberSettingSelect) Float64sX(ctx context.Context) []float64
- func (mss *MemberSettingSelect) Int(ctx context.Context) (_ int, err error)
- func (mss *MemberSettingSelect) IntX(ctx context.Context) int
- func (mss *MemberSettingSelect) Ints(ctx context.Context) ([]int, error)
- func (mss *MemberSettingSelect) IntsX(ctx context.Context) []int
- func (mss *MemberSettingSelect) Scan(ctx context.Context, v interface{}) error
- func (mss *MemberSettingSelect) ScanX(ctx context.Context, v interface{})
- func (mss *MemberSettingSelect) String(ctx context.Context) (_ string, err error)
- func (mss *MemberSettingSelect) StringX(ctx context.Context) string
- func (mss *MemberSettingSelect) Strings(ctx context.Context) ([]string, error)
- func (mss *MemberSettingSelect) StringsX(ctx context.Context) []string
- type MemberSettingUpdate
- func (msu *MemberSettingUpdate) ClearSettingsOwner() *MemberSettingUpdate
- func (msu *MemberSettingUpdate) Exec(ctx context.Context) error
- func (msu *MemberSettingUpdate) ExecX(ctx context.Context)
- func (msu *MemberSettingUpdate) Mutation() *MemberSettingMutation
- func (msu *MemberSettingUpdate) Save(ctx context.Context) (int, error)
- func (msu *MemberSettingUpdate) SaveX(ctx context.Context) int
- func (msu *MemberSettingUpdate) SetKey(s string) *MemberSettingUpdate
- func (msu *MemberSettingUpdate) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingUpdate
- func (msu *MemberSettingUpdate) SetOwnerID(i int) *MemberSettingUpdate
- func (msu *MemberSettingUpdate) SetSettingsOwner(m *Member) *MemberSettingUpdate
- func (msu *MemberSettingUpdate) SetSettingsOwnerID(id int) *MemberSettingUpdate
- func (msu *MemberSettingUpdate) SetTypeof(m membersetting.Typeof) *MemberSettingUpdate
- func (msu *MemberSettingUpdate) SetValue(s string) *MemberSettingUpdate
- func (msu *MemberSettingUpdate) Where(ps ...predicate.MemberSetting) *MemberSettingUpdate
- type MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) ClearSettingsOwner() *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) Exec(ctx context.Context) error
- func (msuo *MemberSettingUpdateOne) ExecX(ctx context.Context)
- func (msuo *MemberSettingUpdateOne) Mutation() *MemberSettingMutation
- func (msuo *MemberSettingUpdateOne) Save(ctx context.Context) (*MemberSetting, error)
- func (msuo *MemberSettingUpdateOne) SaveX(ctx context.Context) *MemberSetting
- func (msuo *MemberSettingUpdateOne) Select(field string, fields ...string) *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) SetKey(s string) *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) SetOwnerID(i int) *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) SetSettingsOwner(m *Member) *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) SetSettingsOwnerID(id int) *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) SetTypeof(m membersetting.Typeof) *MemberSettingUpdateOne
- func (msuo *MemberSettingUpdateOne) SetValue(s string) *MemberSettingUpdateOne
- type MemberSettings
- type MemberUpdate
- func (mu *MemberUpdate) AddMemberEmailIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddMemberEmails(m ...*MemberEmail) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSettingIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSettings(m ...*MemberSetting) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippetDocIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippetFolderIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippetIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippetTagIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippetTags(s ...*SnippetTag) *MemberUpdate
- func (mu *MemberUpdate) AddMemberSnippets(s ...*Snippet) *MemberUpdate
- func (mu *MemberUpdate) ClearDeleteTime() *MemberUpdate
- func (mu *MemberUpdate) ClearGroupID() *MemberUpdate
- func (mu *MemberUpdate) ClearGroups() *MemberUpdate
- func (mu *MemberUpdate) ClearLastPwdAuth() *MemberUpdate
- func (mu *MemberUpdate) ClearMemberEmails() *MemberUpdate
- func (mu *MemberUpdate) ClearMemberSettings() *MemberUpdate
- func (mu *MemberUpdate) ClearMemberSnippetDocs() *MemberUpdate
- func (mu *MemberUpdate) ClearMemberSnippetFolders() *MemberUpdate
- func (mu *MemberUpdate) ClearMemberSnippetTags() *MemberUpdate
- func (mu *MemberUpdate) ClearMemberSnippets() *MemberUpdate
- func (mu *MemberUpdate) ClearPassword() *MemberUpdate
- func (mu *MemberUpdate) ClearPhone() *MemberUpdate
- func (mu *MemberUpdate) ClearStatus() *MemberUpdate
- func (mu *MemberUpdate) Exec(ctx context.Context) error
- func (mu *MemberUpdate) ExecX(ctx context.Context)
- func (mu *MemberUpdate) Mutation() *MemberMutation
- func (mu *MemberUpdate) RemoveMemberEmailIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberEmails(m ...*MemberEmail) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSettingIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSettings(m ...*MemberSetting) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippetDocIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippetFolderIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippetIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippetTagIDs(ids ...int) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippetTags(s ...*SnippetTag) *MemberUpdate
- func (mu *MemberUpdate) RemoveMemberSnippets(s ...*Snippet) *MemberUpdate
- func (mu *MemberUpdate) Save(ctx context.Context) (int, error)
- func (mu *MemberUpdate) SaveX(ctx context.Context) int
- func (mu *MemberUpdate) SetDeleteTime(t time.Time) *MemberUpdate
- func (mu *MemberUpdate) SetGroupID(i int) *MemberUpdate
- func (mu *MemberUpdate) SetGroups(g *Group) *MemberUpdate
- func (mu *MemberUpdate) SetGroupsID(id int) *MemberUpdate
- func (mu *MemberUpdate) SetLastPwdAuth(t time.Time) *MemberUpdate
- func (mu *MemberUpdate) SetNickname(s string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableDeleteTime(t *time.Time) *MemberUpdate
- func (mu *MemberUpdate) SetNillableGroupID(i *int) *MemberUpdate
- func (mu *MemberUpdate) SetNillableGroupsID(id *int) *MemberUpdate
- func (mu *MemberUpdate) SetNillableLastPwdAuth(t *time.Time) *MemberUpdate
- func (mu *MemberUpdate) SetNillablePassword(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillablePhone(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableStatus(m *member.Status) *MemberUpdate
- func (mu *MemberUpdate) SetPassword(s string) *MemberUpdate
- func (mu *MemberUpdate) SetPhone(s string) *MemberUpdate
- func (mu *MemberUpdate) SetSignature(s string) *MemberUpdate
- func (mu *MemberUpdate) SetStatus(m member.Status) *MemberUpdate
- func (mu *MemberUpdate) SetUpdateTime(t time.Time) *MemberUpdate
- func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate
- type MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberEmailIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberEmails(m ...*MemberEmail) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSettingIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSettings(m ...*MemberSetting) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippetDocIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippetFolderIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippetIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippetTagIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippetTags(s ...*SnippetTag) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddMemberSnippets(s ...*Snippet) *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearDeleteTime() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearGroupID() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearGroups() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearLastPwdAuth() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearMemberEmails() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearMemberSettings() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearMemberSnippetDocs() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearMemberSnippetFolders() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearMemberSnippetTags() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearMemberSnippets() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearPassword() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearPhone() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearStatus() *MemberUpdateOne
- func (muo *MemberUpdateOne) Exec(ctx context.Context) error
- func (muo *MemberUpdateOne) ExecX(ctx context.Context)
- func (muo *MemberUpdateOne) Mutation() *MemberMutation
- func (muo *MemberUpdateOne) RemoveMemberEmailIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberEmails(m ...*MemberEmail) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSettingIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSettings(m ...*MemberSetting) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippetDocIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippetFolderIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippetIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippetTagIDs(ids ...int) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippetTags(s ...*SnippetTag) *MemberUpdateOne
- func (muo *MemberUpdateOne) RemoveMemberSnippets(s ...*Snippet) *MemberUpdateOne
- func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)
- func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member
- func (muo *MemberUpdateOne) Select(field string, fields ...string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetDeleteTime(t time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetGroupID(i int) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetGroups(g *Group) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetGroupsID(id int) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetLastPwdAuth(t time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNickname(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableDeleteTime(t *time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableGroupID(i *int) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableGroupsID(id *int) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableLastPwdAuth(t *time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillablePassword(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillablePhone(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableStatus(m *member.Status) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetPassword(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetPhone(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetSignature(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetStatus(m member.Status) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetUpdateTime(t time.Time) *MemberUpdateOne
- type Members
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Snippet
- type SnippetClient
- func (c *SnippetClient) Create() *SnippetCreate
- func (c *SnippetClient) CreateBulk(builders ...*SnippetCreate) *SnippetCreateBulk
- func (c *SnippetClient) Delete() *SnippetDelete
- func (c *SnippetClient) DeleteOne(s *Snippet) *SnippetDeleteOne
- func (c *SnippetClient) DeleteOneID(id int) *SnippetDeleteOne
- func (c *SnippetClient) Get(ctx context.Context, id int) (*Snippet, error)
- func (c *SnippetClient) GetX(ctx context.Context, id int) *Snippet
- func (c *SnippetClient) Hooks() []Hook
- func (c *SnippetClient) Query() *SnippetQuery
- func (c *SnippetClient) QuerySnippetDocs(s *Snippet) *SnippetDocumentQuery
- func (c *SnippetClient) QuerySnippetOwner(s *Snippet) *MemberQuery
- func (c *SnippetClient) QuerySnippetTags(s *Snippet) *SnippetTagQuery
- func (c *SnippetClient) Update() *SnippetUpdate
- func (c *SnippetClient) UpdateOne(s *Snippet) *SnippetUpdateOne
- func (c *SnippetClient) UpdateOneID(id int) *SnippetUpdateOne
- func (c *SnippetClient) Use(hooks ...Hook)
- type SnippetCreate
- func (sc *SnippetCreate) AddSnippetDocIDs(ids ...int) *SnippetCreate
- func (sc *SnippetCreate) AddSnippetDocs(s ...*SnippetDocument) *SnippetCreate
- func (sc *SnippetCreate) AddSnippetTagIDs(ids ...int) *SnippetCreate
- func (sc *SnippetCreate) AddSnippetTags(s ...*SnippetTag) *SnippetCreate
- func (sc *SnippetCreate) Mutation() *SnippetMutation
- func (sc *SnippetCreate) Save(ctx context.Context) (*Snippet, error)
- func (sc *SnippetCreate) SaveX(ctx context.Context) *Snippet
- func (sc *SnippetCreate) SetCreateTime(t time.Time) *SnippetCreate
- func (sc *SnippetCreate) SetFolderID(i int) *SnippetCreate
- func (sc *SnippetCreate) SetID(i int) *SnippetCreate
- func (sc *SnippetCreate) SetNillableCreateTime(t *time.Time) *SnippetCreate
- func (sc *SnippetCreate) SetNillableFolderID(i *int) *SnippetCreate
- func (sc *SnippetCreate) SetNillableSn(s *string) *SnippetCreate
- func (sc *SnippetCreate) SetNillableTitle(s *string) *SnippetCreate
- func (sc *SnippetCreate) SetNillableUpdateTime(t *time.Time) *SnippetCreate
- func (sc *SnippetCreate) SetOwnerID(i int) *SnippetCreate
- func (sc *SnippetCreate) SetSn(s string) *SnippetCreate
- func (sc *SnippetCreate) SetSnippetOwner(m *Member) *SnippetCreate
- func (sc *SnippetCreate) SetSnippetOwnerID(id int) *SnippetCreate
- func (sc *SnippetCreate) SetTitle(s string) *SnippetCreate
- func (sc *SnippetCreate) SetUpdateTime(t time.Time) *SnippetCreate
- type SnippetCreateBulk
- type SnippetDelete
- type SnippetDeleteOne
- type SnippetDocument
- type SnippetDocumentClient
- func (c *SnippetDocumentClient) Create() *SnippetDocumentCreate
- func (c *SnippetDocumentClient) CreateBulk(builders ...*SnippetDocumentCreate) *SnippetDocumentCreateBulk
- func (c *SnippetDocumentClient) Delete() *SnippetDocumentDelete
- func (c *SnippetDocumentClient) DeleteOne(sd *SnippetDocument) *SnippetDocumentDeleteOne
- func (c *SnippetDocumentClient) DeleteOneID(id int) *SnippetDocumentDeleteOne
- func (c *SnippetDocumentClient) Get(ctx context.Context, id int) (*SnippetDocument, error)
- func (c *SnippetDocumentClient) GetX(ctx context.Context, id int) *SnippetDocument
- func (c *SnippetDocumentClient) Hooks() []Hook
- func (c *SnippetDocumentClient) Query() *SnippetDocumentQuery
- func (c *SnippetDocumentClient) QueryDocOwner(sd *SnippetDocument) *MemberQuery
- func (c *SnippetDocumentClient) QueryDocSnippet(sd *SnippetDocument) *SnippetQuery
- func (c *SnippetDocumentClient) Update() *SnippetDocumentUpdate
- func (c *SnippetDocumentClient) UpdateOne(sd *SnippetDocument) *SnippetDocumentUpdateOne
- func (c *SnippetDocumentClient) UpdateOneID(id int) *SnippetDocumentUpdateOne
- func (c *SnippetDocumentClient) Use(hooks ...Hook)
- type SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) Mutation() *SnippetDocumentMutation
- func (sdc *SnippetDocumentCreate) Save(ctx context.Context) (*SnippetDocument, error)
- func (sdc *SnippetDocumentCreate) SaveX(ctx context.Context) *SnippetDocument
- func (sdc *SnippetDocumentCreate) SetCreateTime(t time.Time) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetDescription(s string) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetDocOwner(m *Member) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetDocOwnerID(id int) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetDocSnippet(s *Snippet) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetDocSnippetID(id int) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetID(i int) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetLanguage(s string) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetNillableCreateTime(t *time.Time) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetNillableLanguage(s *string) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetNillableUpdateTime(t *time.Time) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetOwnerID(i int) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetRaw(s string) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetSnippetID(i int) *SnippetDocumentCreate
- func (sdc *SnippetDocumentCreate) SetUpdateTime(t time.Time) *SnippetDocumentCreate
- type SnippetDocumentCreateBulk
- type SnippetDocumentDelete
- type SnippetDocumentDeleteOne
- type SnippetDocumentEdges
- type SnippetDocumentGroupBy
- func (sdgb *SnippetDocumentGroupBy) Aggregate(fns ...AggregateFunc) *SnippetDocumentGroupBy
- func (sdgb *SnippetDocumentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sdgb *SnippetDocumentGroupBy) BoolX(ctx context.Context) bool
- func (sdgb *SnippetDocumentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sdgb *SnippetDocumentGroupBy) BoolsX(ctx context.Context) []bool
- func (sdgb *SnippetDocumentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sdgb *SnippetDocumentGroupBy) Float64X(ctx context.Context) float64
- func (sdgb *SnippetDocumentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sdgb *SnippetDocumentGroupBy) Float64sX(ctx context.Context) []float64
- func (sdgb *SnippetDocumentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sdgb *SnippetDocumentGroupBy) IntX(ctx context.Context) int
- func (sdgb *SnippetDocumentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sdgb *SnippetDocumentGroupBy) IntsX(ctx context.Context) []int
- func (sdgb *SnippetDocumentGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sdgb *SnippetDocumentGroupBy) ScanX(ctx context.Context, v interface{})
- func (sdgb *SnippetDocumentGroupBy) String(ctx context.Context) (_ string, err error)
- func (sdgb *SnippetDocumentGroupBy) StringX(ctx context.Context) string
- func (sdgb *SnippetDocumentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sdgb *SnippetDocumentGroupBy) StringsX(ctx context.Context) []string
- type SnippetDocumentMutation
- func (m *SnippetDocumentMutation) AddField(name string, value ent.Value) error
- func (m *SnippetDocumentMutation) AddedEdges() []string
- func (m *SnippetDocumentMutation) AddedField(name string) (ent.Value, bool)
- func (m *SnippetDocumentMutation) AddedFields() []string
- func (m *SnippetDocumentMutation) AddedIDs(name string) []ent.Value
- func (m *SnippetDocumentMutation) ClearDocOwner()
- func (m *SnippetDocumentMutation) ClearDocSnippet()
- func (m *SnippetDocumentMutation) ClearEdge(name string) error
- func (m *SnippetDocumentMutation) ClearField(name string) error
- func (m *SnippetDocumentMutation) ClearedEdges() []string
- func (m *SnippetDocumentMutation) ClearedFields() []string
- func (m SnippetDocumentMutation) Client() *Client
- func (m *SnippetDocumentMutation) CreateTime() (r time.Time, exists bool)
- func (m *SnippetDocumentMutation) Description() (r string, exists bool)
- func (m *SnippetDocumentMutation) DocOwnerCleared() bool
- func (m *SnippetDocumentMutation) DocOwnerID() (id int, exists bool)
- func (m *SnippetDocumentMutation) DocOwnerIDs() (ids []int)
- func (m *SnippetDocumentMutation) DocSnippetCleared() bool
- func (m *SnippetDocumentMutation) DocSnippetID() (id int, exists bool)
- func (m *SnippetDocumentMutation) DocSnippetIDs() (ids []int)
- func (m *SnippetDocumentMutation) EdgeCleared(name string) bool
- func (m *SnippetDocumentMutation) Field(name string) (ent.Value, bool)
- func (m *SnippetDocumentMutation) FieldCleared(name string) bool
- func (m *SnippetDocumentMutation) Fields() []string
- func (m *SnippetDocumentMutation) ID() (id int, exists bool)
- func (m *SnippetDocumentMutation) Language() (r string, exists bool)
- func (m *SnippetDocumentMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetDocumentMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *SnippetDocumentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SnippetDocumentMutation) OldLanguage(ctx context.Context) (v string, err error)
- func (m *SnippetDocumentMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *SnippetDocumentMutation) OldRaw(ctx context.Context) (v string, err error)
- func (m *SnippetDocumentMutation) OldSnippetID(ctx context.Context) (v int, err error)
- func (m *SnippetDocumentMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetDocumentMutation) Op() Op
- func (m *SnippetDocumentMutation) OwnerID() (r int, exists bool)
- func (m *SnippetDocumentMutation) Raw() (r string, exists bool)
- func (m *SnippetDocumentMutation) RemovedEdges() []string
- func (m *SnippetDocumentMutation) RemovedIDs(name string) []ent.Value
- func (m *SnippetDocumentMutation) ResetCreateTime()
- func (m *SnippetDocumentMutation) ResetDescription()
- func (m *SnippetDocumentMutation) ResetDocOwner()
- func (m *SnippetDocumentMutation) ResetDocSnippet()
- func (m *SnippetDocumentMutation) ResetEdge(name string) error
- func (m *SnippetDocumentMutation) ResetField(name string) error
- func (m *SnippetDocumentMutation) ResetLanguage()
- func (m *SnippetDocumentMutation) ResetOwnerID()
- func (m *SnippetDocumentMutation) ResetRaw()
- func (m *SnippetDocumentMutation) ResetSnippetID()
- func (m *SnippetDocumentMutation) ResetUpdateTime()
- func (m *SnippetDocumentMutation) SetCreateTime(t time.Time)
- func (m *SnippetDocumentMutation) SetDescription(s string)
- func (m *SnippetDocumentMutation) SetDocOwnerID(id int)
- func (m *SnippetDocumentMutation) SetDocSnippetID(id int)
- func (m *SnippetDocumentMutation) SetField(name string, value ent.Value) error
- func (m *SnippetDocumentMutation) SetID(id int)
- func (m *SnippetDocumentMutation) SetLanguage(s string)
- func (m *SnippetDocumentMutation) SetOwnerID(i int)
- func (m *SnippetDocumentMutation) SetRaw(s string)
- func (m *SnippetDocumentMutation) SetSnippetID(i int)
- func (m *SnippetDocumentMutation) SetUpdateTime(t time.Time)
- func (m *SnippetDocumentMutation) SnippetID() (r int, exists bool)
- func (m SnippetDocumentMutation) Tx() (*Tx, error)
- func (m *SnippetDocumentMutation) Type() string
- func (m *SnippetDocumentMutation) UpdateTime() (r time.Time, exists bool)
- type SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) All(ctx context.Context) ([]*SnippetDocument, error)
- func (sdq *SnippetDocumentQuery) AllX(ctx context.Context) []*SnippetDocument
- func (sdq *SnippetDocumentQuery) Clone() *SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) Count(ctx context.Context) (int, error)
- func (sdq *SnippetDocumentQuery) CountX(ctx context.Context) int
- func (sdq *SnippetDocumentQuery) Exist(ctx context.Context) (bool, error)
- func (sdq *SnippetDocumentQuery) ExistX(ctx context.Context) bool
- func (sdq *SnippetDocumentQuery) First(ctx context.Context) (*SnippetDocument, error)
- func (sdq *SnippetDocumentQuery) FirstID(ctx context.Context) (id int, err error)
- func (sdq *SnippetDocumentQuery) FirstIDX(ctx context.Context) int
- func (sdq *SnippetDocumentQuery) FirstX(ctx context.Context) *SnippetDocument
- func (sdq *SnippetDocumentQuery) GroupBy(field string, fields ...string) *SnippetDocumentGroupBy
- func (sdq *SnippetDocumentQuery) IDs(ctx context.Context) ([]int, error)
- func (sdq *SnippetDocumentQuery) IDsX(ctx context.Context) []int
- func (sdq *SnippetDocumentQuery) Limit(limit int) *SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) Offset(offset int) *SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) Only(ctx context.Context) (*SnippetDocument, error)
- func (sdq *SnippetDocumentQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sdq *SnippetDocumentQuery) OnlyIDX(ctx context.Context) int
- func (sdq *SnippetDocumentQuery) OnlyX(ctx context.Context) *SnippetDocument
- func (sdq *SnippetDocumentQuery) Order(o ...OrderFunc) *SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) QueryDocOwner() *MemberQuery
- func (sdq *SnippetDocumentQuery) QueryDocSnippet() *SnippetQuery
- func (sdq *SnippetDocumentQuery) Select(field string, fields ...string) *SnippetDocumentSelect
- func (sdq *SnippetDocumentQuery) Unique(unique bool) *SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) Where(ps ...predicate.SnippetDocument) *SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) WithDocOwner(opts ...func(*MemberQuery)) *SnippetDocumentQuery
- func (sdq *SnippetDocumentQuery) WithDocSnippet(opts ...func(*SnippetQuery)) *SnippetDocumentQuery
- type SnippetDocumentSelect
- func (sds *SnippetDocumentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (sds *SnippetDocumentSelect) BoolX(ctx context.Context) bool
- func (sds *SnippetDocumentSelect) Bools(ctx context.Context) ([]bool, error)
- func (sds *SnippetDocumentSelect) BoolsX(ctx context.Context) []bool
- func (sds *SnippetDocumentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (sds *SnippetDocumentSelect) Float64X(ctx context.Context) float64
- func (sds *SnippetDocumentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (sds *SnippetDocumentSelect) Float64sX(ctx context.Context) []float64
- func (sds *SnippetDocumentSelect) Int(ctx context.Context) (_ int, err error)
- func (sds *SnippetDocumentSelect) IntX(ctx context.Context) int
- func (sds *SnippetDocumentSelect) Ints(ctx context.Context) ([]int, error)
- func (sds *SnippetDocumentSelect) IntsX(ctx context.Context) []int
- func (sds *SnippetDocumentSelect) Scan(ctx context.Context, v interface{}) error
- func (sds *SnippetDocumentSelect) ScanX(ctx context.Context, v interface{})
- func (sds *SnippetDocumentSelect) String(ctx context.Context) (_ string, err error)
- func (sds *SnippetDocumentSelect) StringX(ctx context.Context) string
- func (sds *SnippetDocumentSelect) Strings(ctx context.Context) ([]string, error)
- func (sds *SnippetDocumentSelect) StringsX(ctx context.Context) []string
- type SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) ClearDocOwner() *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) ClearDocSnippet() *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) Exec(ctx context.Context) error
- func (sdu *SnippetDocumentUpdate) ExecX(ctx context.Context)
- func (sdu *SnippetDocumentUpdate) Mutation() *SnippetDocumentMutation
- func (sdu *SnippetDocumentUpdate) Save(ctx context.Context) (int, error)
- func (sdu *SnippetDocumentUpdate) SaveX(ctx context.Context) int
- func (sdu *SnippetDocumentUpdate) SetDescription(s string) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetDocOwner(m *Member) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetDocOwnerID(id int) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetDocSnippet(s *Snippet) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetDocSnippetID(id int) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetLanguage(s string) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetNillableLanguage(s *string) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetRaw(s string) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) SetUpdateTime(t time.Time) *SnippetDocumentUpdate
- func (sdu *SnippetDocumentUpdate) Where(ps ...predicate.SnippetDocument) *SnippetDocumentUpdate
- type SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) ClearDocOwner() *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) ClearDocSnippet() *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) Exec(ctx context.Context) error
- func (sduo *SnippetDocumentUpdateOne) ExecX(ctx context.Context)
- func (sduo *SnippetDocumentUpdateOne) Mutation() *SnippetDocumentMutation
- func (sduo *SnippetDocumentUpdateOne) Save(ctx context.Context) (*SnippetDocument, error)
- func (sduo *SnippetDocumentUpdateOne) SaveX(ctx context.Context) *SnippetDocument
- func (sduo *SnippetDocumentUpdateOne) Select(field string, fields ...string) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetDescription(s string) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetDocOwner(m *Member) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetDocOwnerID(id int) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetDocSnippet(s *Snippet) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetDocSnippetID(id int) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetLanguage(s string) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetNillableLanguage(s *string) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetRaw(s string) *SnippetDocumentUpdateOne
- func (sduo *SnippetDocumentUpdateOne) SetUpdateTime(t time.Time) *SnippetDocumentUpdateOne
- type SnippetDocuments
- type SnippetEdges
- type SnippetFolder
- type SnippetFolderClient
- func (c *SnippetFolderClient) Create() *SnippetFolderCreate
- func (c *SnippetFolderClient) CreateBulk(builders ...*SnippetFolderCreate) *SnippetFolderCreateBulk
- func (c *SnippetFolderClient) Delete() *SnippetFolderDelete
- func (c *SnippetFolderClient) DeleteOne(sf *SnippetFolder) *SnippetFolderDeleteOne
- func (c *SnippetFolderClient) DeleteOneID(id int) *SnippetFolderDeleteOne
- func (c *SnippetFolderClient) Get(ctx context.Context, id int) (*SnippetFolder, error)
- func (c *SnippetFolderClient) GetX(ctx context.Context, id int) *SnippetFolder
- func (c *SnippetFolderClient) Hooks() []Hook
- func (c *SnippetFolderClient) Query() *SnippetFolderQuery
- func (c *SnippetFolderClient) QueryFolderOwner(sf *SnippetFolder) *MemberQuery
- func (c *SnippetFolderClient) QuerySnippets(sf *SnippetFolder) *SnippetQuery
- func (c *SnippetFolderClient) Update() *SnippetFolderUpdate
- func (c *SnippetFolderClient) UpdateOne(sf *SnippetFolder) *SnippetFolderUpdateOne
- func (c *SnippetFolderClient) UpdateOneID(id int) *SnippetFolderUpdateOne
- func (c *SnippetFolderClient) Use(hooks ...Hook)
- type SnippetFolderCreate
- func (sfc *SnippetFolderCreate) AddSnippetIDs(ids ...int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) AddSnippets(s ...*Snippet) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) Mutation() *SnippetFolderMutation
- func (sfc *SnippetFolderCreate) Save(ctx context.Context) (*SnippetFolder, error)
- func (sfc *SnippetFolderCreate) SaveX(ctx context.Context) *SnippetFolder
- func (sfc *SnippetFolderCreate) SetCreateTime(t time.Time) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetFolderOwner(m *Member) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetFolderOwnerID(id int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetID(i int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetLanguage(s string) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetName(s string) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetNillableCreateTime(t *time.Time) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetNillableLanguage(s *string) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetNillablePid(i *int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetNillableSnippetsTotal(i *int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetNillableUpdateTime(t *time.Time) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetOwnerID(i int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetPid(i int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetSnippetID(i int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetSnippetsTotal(i int) *SnippetFolderCreate
- func (sfc *SnippetFolderCreate) SetUpdateTime(t time.Time) *SnippetFolderCreate
- type SnippetFolderCreateBulk
- type SnippetFolderDelete
- type SnippetFolderDeleteOne
- type SnippetFolderEdges
- type SnippetFolderGroupBy
- func (sfgb *SnippetFolderGroupBy) Aggregate(fns ...AggregateFunc) *SnippetFolderGroupBy
- func (sfgb *SnippetFolderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sfgb *SnippetFolderGroupBy) BoolX(ctx context.Context) bool
- func (sfgb *SnippetFolderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sfgb *SnippetFolderGroupBy) BoolsX(ctx context.Context) []bool
- func (sfgb *SnippetFolderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sfgb *SnippetFolderGroupBy) Float64X(ctx context.Context) float64
- func (sfgb *SnippetFolderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sfgb *SnippetFolderGroupBy) Float64sX(ctx context.Context) []float64
- func (sfgb *SnippetFolderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sfgb *SnippetFolderGroupBy) IntX(ctx context.Context) int
- func (sfgb *SnippetFolderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sfgb *SnippetFolderGroupBy) IntsX(ctx context.Context) []int
- func (sfgb *SnippetFolderGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sfgb *SnippetFolderGroupBy) ScanX(ctx context.Context, v interface{})
- func (sfgb *SnippetFolderGroupBy) String(ctx context.Context) (_ string, err error)
- func (sfgb *SnippetFolderGroupBy) StringX(ctx context.Context) string
- func (sfgb *SnippetFolderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sfgb *SnippetFolderGroupBy) StringsX(ctx context.Context) []string
- type SnippetFolderMutation
- func (m *SnippetFolderMutation) AddField(name string, value ent.Value) error
- func (m *SnippetFolderMutation) AddPid(i int)
- func (m *SnippetFolderMutation) AddSnippetID(i int)
- func (m *SnippetFolderMutation) AddSnippetIDs(ids ...int)
- func (m *SnippetFolderMutation) AddSnippetsTotal(i int)
- func (m *SnippetFolderMutation) AddedEdges() []string
- func (m *SnippetFolderMutation) AddedField(name string) (ent.Value, bool)
- func (m *SnippetFolderMutation) AddedFields() []string
- func (m *SnippetFolderMutation) AddedIDs(name string) []ent.Value
- func (m *SnippetFolderMutation) AddedPid() (r int, exists bool)
- func (m *SnippetFolderMutation) AddedSnippetID() (r int, exists bool)
- func (m *SnippetFolderMutation) AddedSnippetsTotal() (r int, exists bool)
- func (m *SnippetFolderMutation) ClearEdge(name string) error
- func (m *SnippetFolderMutation) ClearField(name string) error
- func (m *SnippetFolderMutation) ClearFolderOwner()
- func (m *SnippetFolderMutation) ClearPid()
- func (m *SnippetFolderMutation) ClearSnippets()
- func (m *SnippetFolderMutation) ClearedEdges() []string
- func (m *SnippetFolderMutation) ClearedFields() []string
- func (m SnippetFolderMutation) Client() *Client
- func (m *SnippetFolderMutation) CreateTime() (r time.Time, exists bool)
- func (m *SnippetFolderMutation) EdgeCleared(name string) bool
- func (m *SnippetFolderMutation) Field(name string) (ent.Value, bool)
- func (m *SnippetFolderMutation) FieldCleared(name string) bool
- func (m *SnippetFolderMutation) Fields() []string
- func (m *SnippetFolderMutation) FolderOwnerCleared() bool
- func (m *SnippetFolderMutation) FolderOwnerID() (id int, exists bool)
- func (m *SnippetFolderMutation) FolderOwnerIDs() (ids []int)
- func (m *SnippetFolderMutation) ID() (id int, exists bool)
- func (m *SnippetFolderMutation) Language() (r string, exists bool)
- func (m *SnippetFolderMutation) Name() (r string, exists bool)
- func (m *SnippetFolderMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetFolderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SnippetFolderMutation) OldLanguage(ctx context.Context) (v string, err error)
- func (m *SnippetFolderMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SnippetFolderMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *SnippetFolderMutation) OldPid(ctx context.Context) (v *int, err error)
- func (m *SnippetFolderMutation) OldSnippetID(ctx context.Context) (v int, err error)
- func (m *SnippetFolderMutation) OldSnippetsTotal(ctx context.Context) (v int, err error)
- func (m *SnippetFolderMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetFolderMutation) Op() Op
- func (m *SnippetFolderMutation) OwnerID() (r int, exists bool)
- func (m *SnippetFolderMutation) Pid() (r int, exists bool)
- func (m *SnippetFolderMutation) PidCleared() bool
- func (m *SnippetFolderMutation) RemoveSnippetIDs(ids ...int)
- func (m *SnippetFolderMutation) RemovedEdges() []string
- func (m *SnippetFolderMutation) RemovedIDs(name string) []ent.Value
- func (m *SnippetFolderMutation) RemovedSnippetsIDs() (ids []int)
- func (m *SnippetFolderMutation) ResetCreateTime()
- func (m *SnippetFolderMutation) ResetEdge(name string) error
- func (m *SnippetFolderMutation) ResetField(name string) error
- func (m *SnippetFolderMutation) ResetFolderOwner()
- func (m *SnippetFolderMutation) ResetLanguage()
- func (m *SnippetFolderMutation) ResetName()
- func (m *SnippetFolderMutation) ResetOwnerID()
- func (m *SnippetFolderMutation) ResetPid()
- func (m *SnippetFolderMutation) ResetSnippetID()
- func (m *SnippetFolderMutation) ResetSnippets()
- func (m *SnippetFolderMutation) ResetSnippetsTotal()
- func (m *SnippetFolderMutation) ResetUpdateTime()
- func (m *SnippetFolderMutation) SetCreateTime(t time.Time)
- func (m *SnippetFolderMutation) SetField(name string, value ent.Value) error
- func (m *SnippetFolderMutation) SetFolderOwnerID(id int)
- func (m *SnippetFolderMutation) SetID(id int)
- func (m *SnippetFolderMutation) SetLanguage(s string)
- func (m *SnippetFolderMutation) SetName(s string)
- func (m *SnippetFolderMutation) SetOwnerID(i int)
- func (m *SnippetFolderMutation) SetPid(i int)
- func (m *SnippetFolderMutation) SetSnippetID(i int)
- func (m *SnippetFolderMutation) SetSnippetsTotal(i int)
- func (m *SnippetFolderMutation) SetUpdateTime(t time.Time)
- func (m *SnippetFolderMutation) SnippetID() (r int, exists bool)
- func (m *SnippetFolderMutation) SnippetsCleared() bool
- func (m *SnippetFolderMutation) SnippetsIDs() (ids []int)
- func (m *SnippetFolderMutation) SnippetsTotal() (r int, exists bool)
- func (m SnippetFolderMutation) Tx() (*Tx, error)
- func (m *SnippetFolderMutation) Type() string
- func (m *SnippetFolderMutation) UpdateTime() (r time.Time, exists bool)
- type SnippetFolderQuery
- func (sfq *SnippetFolderQuery) All(ctx context.Context) ([]*SnippetFolder, error)
- func (sfq *SnippetFolderQuery) AllX(ctx context.Context) []*SnippetFolder
- func (sfq *SnippetFolderQuery) Clone() *SnippetFolderQuery
- func (sfq *SnippetFolderQuery) Count(ctx context.Context) (int, error)
- func (sfq *SnippetFolderQuery) CountX(ctx context.Context) int
- func (sfq *SnippetFolderQuery) Exist(ctx context.Context) (bool, error)
- func (sfq *SnippetFolderQuery) ExistX(ctx context.Context) bool
- func (sfq *SnippetFolderQuery) First(ctx context.Context) (*SnippetFolder, error)
- func (sfq *SnippetFolderQuery) FirstID(ctx context.Context) (id int, err error)
- func (sfq *SnippetFolderQuery) FirstIDX(ctx context.Context) int
- func (sfq *SnippetFolderQuery) FirstX(ctx context.Context) *SnippetFolder
- func (sfq *SnippetFolderQuery) GroupBy(field string, fields ...string) *SnippetFolderGroupBy
- func (sfq *SnippetFolderQuery) IDs(ctx context.Context) ([]int, error)
- func (sfq *SnippetFolderQuery) IDsX(ctx context.Context) []int
- func (sfq *SnippetFolderQuery) Limit(limit int) *SnippetFolderQuery
- func (sfq *SnippetFolderQuery) Offset(offset int) *SnippetFolderQuery
- func (sfq *SnippetFolderQuery) Only(ctx context.Context) (*SnippetFolder, error)
- func (sfq *SnippetFolderQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sfq *SnippetFolderQuery) OnlyIDX(ctx context.Context) int
- func (sfq *SnippetFolderQuery) OnlyX(ctx context.Context) *SnippetFolder
- func (sfq *SnippetFolderQuery) Order(o ...OrderFunc) *SnippetFolderQuery
- func (sfq *SnippetFolderQuery) QueryFolderOwner() *MemberQuery
- func (sfq *SnippetFolderQuery) QuerySnippets() *SnippetQuery
- func (sfq *SnippetFolderQuery) Select(field string, fields ...string) *SnippetFolderSelect
- func (sfq *SnippetFolderQuery) Unique(unique bool) *SnippetFolderQuery
- func (sfq *SnippetFolderQuery) Where(ps ...predicate.SnippetFolder) *SnippetFolderQuery
- func (sfq *SnippetFolderQuery) WithFolderOwner(opts ...func(*MemberQuery)) *SnippetFolderQuery
- func (sfq *SnippetFolderQuery) WithSnippets(opts ...func(*SnippetQuery)) *SnippetFolderQuery
- type SnippetFolderSelect
- func (sfs *SnippetFolderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (sfs *SnippetFolderSelect) BoolX(ctx context.Context) bool
- func (sfs *SnippetFolderSelect) Bools(ctx context.Context) ([]bool, error)
- func (sfs *SnippetFolderSelect) BoolsX(ctx context.Context) []bool
- func (sfs *SnippetFolderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (sfs *SnippetFolderSelect) Float64X(ctx context.Context) float64
- func (sfs *SnippetFolderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (sfs *SnippetFolderSelect) Float64sX(ctx context.Context) []float64
- func (sfs *SnippetFolderSelect) Int(ctx context.Context) (_ int, err error)
- func (sfs *SnippetFolderSelect) IntX(ctx context.Context) int
- func (sfs *SnippetFolderSelect) Ints(ctx context.Context) ([]int, error)
- func (sfs *SnippetFolderSelect) IntsX(ctx context.Context) []int
- func (sfs *SnippetFolderSelect) Scan(ctx context.Context, v interface{}) error
- func (sfs *SnippetFolderSelect) ScanX(ctx context.Context, v interface{})
- func (sfs *SnippetFolderSelect) String(ctx context.Context) (_ string, err error)
- func (sfs *SnippetFolderSelect) StringX(ctx context.Context) string
- func (sfs *SnippetFolderSelect) Strings(ctx context.Context) ([]string, error)
- func (sfs *SnippetFolderSelect) StringsX(ctx context.Context) []string
- type SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) AddPid(i int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) AddSnippetIDs(ids ...int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) AddSnippets(s ...*Snippet) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) AddSnippetsTotal(i int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) ClearFolderOwner() *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) ClearPid() *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) ClearSnippets() *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) Exec(ctx context.Context) error
- func (sfu *SnippetFolderUpdate) ExecX(ctx context.Context)
- func (sfu *SnippetFolderUpdate) Mutation() *SnippetFolderMutation
- func (sfu *SnippetFolderUpdate) RemoveSnippetIDs(ids ...int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) RemoveSnippets(s ...*Snippet) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) Save(ctx context.Context) (int, error)
- func (sfu *SnippetFolderUpdate) SaveX(ctx context.Context) int
- func (sfu *SnippetFolderUpdate) SetFolderOwner(m *Member) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetFolderOwnerID(id int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetLanguage(s string) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetName(s string) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetNillableLanguage(s *string) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetNillablePid(i *int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetNillableSnippetsTotal(i *int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetPid(i int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetSnippetsTotal(i int) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) SetUpdateTime(t time.Time) *SnippetFolderUpdate
- func (sfu *SnippetFolderUpdate) Where(ps ...predicate.SnippetFolder) *SnippetFolderUpdate
- type SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) AddPid(i int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) AddSnippetIDs(ids ...int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) AddSnippets(s ...*Snippet) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) AddSnippetsTotal(i int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) ClearFolderOwner() *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) ClearPid() *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) ClearSnippets() *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) Exec(ctx context.Context) error
- func (sfuo *SnippetFolderUpdateOne) ExecX(ctx context.Context)
- func (sfuo *SnippetFolderUpdateOne) Mutation() *SnippetFolderMutation
- func (sfuo *SnippetFolderUpdateOne) RemoveSnippetIDs(ids ...int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) RemoveSnippets(s ...*Snippet) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) Save(ctx context.Context) (*SnippetFolder, error)
- func (sfuo *SnippetFolderUpdateOne) SaveX(ctx context.Context) *SnippetFolder
- func (sfuo *SnippetFolderUpdateOne) Select(field string, fields ...string) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetFolderOwner(m *Member) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetFolderOwnerID(id int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetLanguage(s string) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetName(s string) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetNillableLanguage(s *string) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetNillablePid(i *int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetNillableSnippetsTotal(i *int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetPid(i int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetSnippetsTotal(i int) *SnippetFolderUpdateOne
- func (sfuo *SnippetFolderUpdateOne) SetUpdateTime(t time.Time) *SnippetFolderUpdateOne
- type SnippetFolders
- type SnippetGroupBy
- func (sgb *SnippetGroupBy) Aggregate(fns ...AggregateFunc) *SnippetGroupBy
- func (sgb *SnippetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *SnippetGroupBy) BoolX(ctx context.Context) bool
- func (sgb *SnippetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *SnippetGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *SnippetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *SnippetGroupBy) Float64X(ctx context.Context) float64
- func (sgb *SnippetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *SnippetGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *SnippetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *SnippetGroupBy) IntX(ctx context.Context) int
- func (sgb *SnippetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *SnippetGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SnippetGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *SnippetGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *SnippetGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *SnippetGroupBy) StringX(ctx context.Context) string
- func (sgb *SnippetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *SnippetGroupBy) StringsX(ctx context.Context) []string
- type SnippetMutation
- func (m *SnippetMutation) AddField(name string, value ent.Value) error
- func (m *SnippetMutation) AddFolderID(i int)
- func (m *SnippetMutation) AddSnippetDocIDs(ids ...int)
- func (m *SnippetMutation) AddSnippetTagIDs(ids ...int)
- func (m *SnippetMutation) AddedEdges() []string
- func (m *SnippetMutation) AddedField(name string) (ent.Value, bool)
- func (m *SnippetMutation) AddedFields() []string
- func (m *SnippetMutation) AddedFolderID() (r int, exists bool)
- func (m *SnippetMutation) AddedIDs(name string) []ent.Value
- func (m *SnippetMutation) ClearEdge(name string) error
- func (m *SnippetMutation) ClearField(name string) error
- func (m *SnippetMutation) ClearFolderID()
- func (m *SnippetMutation) ClearSnippetDocs()
- func (m *SnippetMutation) ClearSnippetOwner()
- func (m *SnippetMutation) ClearSnippetTags()
- func (m *SnippetMutation) ClearTitle()
- func (m *SnippetMutation) ClearedEdges() []string
- func (m *SnippetMutation) ClearedFields() []string
- func (m SnippetMutation) Client() *Client
- func (m *SnippetMutation) CreateTime() (r time.Time, exists bool)
- func (m *SnippetMutation) EdgeCleared(name string) bool
- func (m *SnippetMutation) Field(name string) (ent.Value, bool)
- func (m *SnippetMutation) FieldCleared(name string) bool
- func (m *SnippetMutation) Fields() []string
- func (m *SnippetMutation) FolderID() (r int, exists bool)
- func (m *SnippetMutation) FolderIDCleared() bool
- func (m *SnippetMutation) ID() (id int, exists bool)
- func (m *SnippetMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SnippetMutation) OldFolderID(ctx context.Context) (v *int, err error)
- func (m *SnippetMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *SnippetMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *SnippetMutation) OldTitle(ctx context.Context) (v *string, err error)
- func (m *SnippetMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetMutation) Op() Op
- func (m *SnippetMutation) OwnerID() (r int, exists bool)
- func (m *SnippetMutation) RemoveSnippetDocIDs(ids ...int)
- func (m *SnippetMutation) RemoveSnippetTagIDs(ids ...int)
- func (m *SnippetMutation) RemovedEdges() []string
- func (m *SnippetMutation) RemovedIDs(name string) []ent.Value
- func (m *SnippetMutation) RemovedSnippetDocsIDs() (ids []int)
- func (m *SnippetMutation) RemovedSnippetTagsIDs() (ids []int)
- func (m *SnippetMutation) ResetCreateTime()
- func (m *SnippetMutation) ResetEdge(name string) error
- func (m *SnippetMutation) ResetField(name string) error
- func (m *SnippetMutation) ResetFolderID()
- func (m *SnippetMutation) ResetOwnerID()
- func (m *SnippetMutation) ResetSn()
- func (m *SnippetMutation) ResetSnippetDocs()
- func (m *SnippetMutation) ResetSnippetOwner()
- func (m *SnippetMutation) ResetSnippetTags()
- func (m *SnippetMutation) ResetTitle()
- func (m *SnippetMutation) ResetUpdateTime()
- func (m *SnippetMutation) SetCreateTime(t time.Time)
- func (m *SnippetMutation) SetField(name string, value ent.Value) error
- func (m *SnippetMutation) SetFolderID(i int)
- func (m *SnippetMutation) SetID(id int)
- func (m *SnippetMutation) SetOwnerID(i int)
- func (m *SnippetMutation) SetSn(s string)
- func (m *SnippetMutation) SetSnippetOwnerID(id int)
- func (m *SnippetMutation) SetTitle(s string)
- func (m *SnippetMutation) SetUpdateTime(t time.Time)
- func (m *SnippetMutation) Sn() (r string, exists bool)
- func (m *SnippetMutation) SnippetDocsCleared() bool
- func (m *SnippetMutation) SnippetDocsIDs() (ids []int)
- func (m *SnippetMutation) SnippetOwnerCleared() bool
- func (m *SnippetMutation) SnippetOwnerID() (id int, exists bool)
- func (m *SnippetMutation) SnippetOwnerIDs() (ids []int)
- func (m *SnippetMutation) SnippetTagsCleared() bool
- func (m *SnippetMutation) SnippetTagsIDs() (ids []int)
- func (m *SnippetMutation) Title() (r string, exists bool)
- func (m *SnippetMutation) TitleCleared() bool
- func (m SnippetMutation) Tx() (*Tx, error)
- func (m *SnippetMutation) Type() string
- func (m *SnippetMutation) UpdateTime() (r time.Time, exists bool)
- type SnippetQuery
- func (sq *SnippetQuery) All(ctx context.Context) ([]*Snippet, error)
- func (sq *SnippetQuery) AllX(ctx context.Context) []*Snippet
- func (sq *SnippetQuery) Clone() *SnippetQuery
- func (sq *SnippetQuery) Count(ctx context.Context) (int, error)
- func (sq *SnippetQuery) CountX(ctx context.Context) int
- func (sq *SnippetQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SnippetQuery) ExistX(ctx context.Context) bool
- func (sq *SnippetQuery) First(ctx context.Context) (*Snippet, error)
- func (sq *SnippetQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SnippetQuery) FirstIDX(ctx context.Context) int
- func (sq *SnippetQuery) FirstX(ctx context.Context) *Snippet
- func (sq *SnippetQuery) GroupBy(field string, fields ...string) *SnippetGroupBy
- func (sq *SnippetQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *SnippetQuery) IDsX(ctx context.Context) []int
- func (sq *SnippetQuery) Limit(limit int) *SnippetQuery
- func (sq *SnippetQuery) Offset(offset int) *SnippetQuery
- func (sq *SnippetQuery) Only(ctx context.Context) (*Snippet, error)
- func (sq *SnippetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SnippetQuery) OnlyIDX(ctx context.Context) int
- func (sq *SnippetQuery) OnlyX(ctx context.Context) *Snippet
- func (sq *SnippetQuery) Order(o ...OrderFunc) *SnippetQuery
- func (sq *SnippetQuery) QuerySnippetDocs() *SnippetDocumentQuery
- func (sq *SnippetQuery) QuerySnippetOwner() *MemberQuery
- func (sq *SnippetQuery) QuerySnippetTags() *SnippetTagQuery
- func (sq *SnippetQuery) Select(field string, fields ...string) *SnippetSelect
- func (sq *SnippetQuery) Unique(unique bool) *SnippetQuery
- func (sq *SnippetQuery) Where(ps ...predicate.Snippet) *SnippetQuery
- func (sq *SnippetQuery) WithSnippetDocs(opts ...func(*SnippetDocumentQuery)) *SnippetQuery
- func (sq *SnippetQuery) WithSnippetOwner(opts ...func(*MemberQuery)) *SnippetQuery
- func (sq *SnippetQuery) WithSnippetTags(opts ...func(*SnippetTagQuery)) *SnippetQuery
- type SnippetSelect
- func (ss *SnippetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *SnippetSelect) BoolX(ctx context.Context) bool
- func (ss *SnippetSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *SnippetSelect) BoolsX(ctx context.Context) []bool
- func (ss *SnippetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *SnippetSelect) Float64X(ctx context.Context) float64
- func (ss *SnippetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *SnippetSelect) Float64sX(ctx context.Context) []float64
- func (ss *SnippetSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *SnippetSelect) IntX(ctx context.Context) int
- func (ss *SnippetSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *SnippetSelect) IntsX(ctx context.Context) []int
- func (ss *SnippetSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *SnippetSelect) ScanX(ctx context.Context, v interface{})
- func (ss *SnippetSelect) String(ctx context.Context) (_ string, err error)
- func (ss *SnippetSelect) StringX(ctx context.Context) string
- func (ss *SnippetSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *SnippetSelect) StringsX(ctx context.Context) []string
- type SnippetTag
- type SnippetTagClient
- func (c *SnippetTagClient) Create() *SnippetTagCreate
- func (c *SnippetTagClient) CreateBulk(builders ...*SnippetTagCreate) *SnippetTagCreateBulk
- func (c *SnippetTagClient) Delete() *SnippetTagDelete
- func (c *SnippetTagClient) DeleteOne(st *SnippetTag) *SnippetTagDeleteOne
- func (c *SnippetTagClient) DeleteOneID(id int) *SnippetTagDeleteOne
- func (c *SnippetTagClient) Get(ctx context.Context, id int) (*SnippetTag, error)
- func (c *SnippetTagClient) GetX(ctx context.Context, id int) *SnippetTag
- func (c *SnippetTagClient) Hooks() []Hook
- func (c *SnippetTagClient) Query() *SnippetTagQuery
- func (c *SnippetTagClient) QueryTagOwner(st *SnippetTag) *MemberQuery
- func (c *SnippetTagClient) QueryTagSnippet(st *SnippetTag) *SnippetQuery
- func (c *SnippetTagClient) Update() *SnippetTagUpdate
- func (c *SnippetTagClient) UpdateOne(st *SnippetTag) *SnippetTagUpdateOne
- func (c *SnippetTagClient) UpdateOneID(id int) *SnippetTagUpdateOne
- func (c *SnippetTagClient) Use(hooks ...Hook)
- type SnippetTagCreate
- func (stc *SnippetTagCreate) Mutation() *SnippetTagMutation
- func (stc *SnippetTagCreate) Save(ctx context.Context) (*SnippetTag, error)
- func (stc *SnippetTagCreate) SaveX(ctx context.Context) *SnippetTag
- func (stc *SnippetTagCreate) SetCreateTime(t time.Time) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetID(i int) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetName(s string) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetNillableCreateTime(t *time.Time) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetNillableSnippetsTotal(i *int) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetNillableUpdateTime(t *time.Time) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetOwnerID(i int) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetSnippetID(i int) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetSnippetsTotal(i int) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetTagOwner(m *Member) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetTagOwnerID(id int) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetTagSnippet(s *Snippet) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetTagSnippetID(id int) *SnippetTagCreate
- func (stc *SnippetTagCreate) SetUpdateTime(t time.Time) *SnippetTagCreate
- type SnippetTagCreateBulk
- type SnippetTagDelete
- type SnippetTagDeleteOne
- type SnippetTagEdges
- type SnippetTagGroupBy
- func (stgb *SnippetTagGroupBy) Aggregate(fns ...AggregateFunc) *SnippetTagGroupBy
- func (stgb *SnippetTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (stgb *SnippetTagGroupBy) BoolX(ctx context.Context) bool
- func (stgb *SnippetTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (stgb *SnippetTagGroupBy) BoolsX(ctx context.Context) []bool
- func (stgb *SnippetTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (stgb *SnippetTagGroupBy) Float64X(ctx context.Context) float64
- func (stgb *SnippetTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (stgb *SnippetTagGroupBy) Float64sX(ctx context.Context) []float64
- func (stgb *SnippetTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (stgb *SnippetTagGroupBy) IntX(ctx context.Context) int
- func (stgb *SnippetTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (stgb *SnippetTagGroupBy) IntsX(ctx context.Context) []int
- func (stgb *SnippetTagGroupBy) Scan(ctx context.Context, v interface{}) error
- func (stgb *SnippetTagGroupBy) ScanX(ctx context.Context, v interface{})
- func (stgb *SnippetTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (stgb *SnippetTagGroupBy) StringX(ctx context.Context) string
- func (stgb *SnippetTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (stgb *SnippetTagGroupBy) StringsX(ctx context.Context) []string
- type SnippetTagMutation
- func (m *SnippetTagMutation) AddField(name string, value ent.Value) error
- func (m *SnippetTagMutation) AddSnippetsTotal(i int)
- func (m *SnippetTagMutation) AddedEdges() []string
- func (m *SnippetTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *SnippetTagMutation) AddedFields() []string
- func (m *SnippetTagMutation) AddedIDs(name string) []ent.Value
- func (m *SnippetTagMutation) AddedSnippetsTotal() (r int, exists bool)
- func (m *SnippetTagMutation) ClearEdge(name string) error
- func (m *SnippetTagMutation) ClearField(name string) error
- func (m *SnippetTagMutation) ClearTagOwner()
- func (m *SnippetTagMutation) ClearTagSnippet()
- func (m *SnippetTagMutation) ClearedEdges() []string
- func (m *SnippetTagMutation) ClearedFields() []string
- func (m SnippetTagMutation) Client() *Client
- func (m *SnippetTagMutation) CreateTime() (r time.Time, exists bool)
- func (m *SnippetTagMutation) EdgeCleared(name string) bool
- func (m *SnippetTagMutation) Field(name string) (ent.Value, bool)
- func (m *SnippetTagMutation) FieldCleared(name string) bool
- func (m *SnippetTagMutation) Fields() []string
- func (m *SnippetTagMutation) ID() (id int, exists bool)
- func (m *SnippetTagMutation) Name() (r string, exists bool)
- func (m *SnippetTagMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SnippetTagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SnippetTagMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *SnippetTagMutation) OldSnippetID(ctx context.Context) (v int, err error)
- func (m *SnippetTagMutation) OldSnippetsTotal(ctx context.Context) (v int, err error)
- func (m *SnippetTagMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SnippetTagMutation) Op() Op
- func (m *SnippetTagMutation) OwnerID() (r int, exists bool)
- func (m *SnippetTagMutation) RemovedEdges() []string
- func (m *SnippetTagMutation) RemovedIDs(name string) []ent.Value
- func (m *SnippetTagMutation) ResetCreateTime()
- func (m *SnippetTagMutation) ResetEdge(name string) error
- func (m *SnippetTagMutation) ResetField(name string) error
- func (m *SnippetTagMutation) ResetName()
- func (m *SnippetTagMutation) ResetOwnerID()
- func (m *SnippetTagMutation) ResetSnippetID()
- func (m *SnippetTagMutation) ResetSnippetsTotal()
- func (m *SnippetTagMutation) ResetTagOwner()
- func (m *SnippetTagMutation) ResetTagSnippet()
- func (m *SnippetTagMutation) ResetUpdateTime()
- func (m *SnippetTagMutation) SetCreateTime(t time.Time)
- func (m *SnippetTagMutation) SetField(name string, value ent.Value) error
- func (m *SnippetTagMutation) SetID(id int)
- func (m *SnippetTagMutation) SetName(s string)
- func (m *SnippetTagMutation) SetOwnerID(i int)
- func (m *SnippetTagMutation) SetSnippetID(i int)
- func (m *SnippetTagMutation) SetSnippetsTotal(i int)
- func (m *SnippetTagMutation) SetTagOwnerID(id int)
- func (m *SnippetTagMutation) SetTagSnippetID(id int)
- func (m *SnippetTagMutation) SetUpdateTime(t time.Time)
- func (m *SnippetTagMutation) SnippetID() (r int, exists bool)
- func (m *SnippetTagMutation) SnippetsTotal() (r int, exists bool)
- func (m *SnippetTagMutation) TagOwnerCleared() bool
- func (m *SnippetTagMutation) TagOwnerID() (id int, exists bool)
- func (m *SnippetTagMutation) TagOwnerIDs() (ids []int)
- func (m *SnippetTagMutation) TagSnippetCleared() bool
- func (m *SnippetTagMutation) TagSnippetID() (id int, exists bool)
- func (m *SnippetTagMutation) TagSnippetIDs() (ids []int)
- func (m SnippetTagMutation) Tx() (*Tx, error)
- func (m *SnippetTagMutation) Type() string
- func (m *SnippetTagMutation) UpdateTime() (r time.Time, exists bool)
- type SnippetTagQuery
- func (stq *SnippetTagQuery) All(ctx context.Context) ([]*SnippetTag, error)
- func (stq *SnippetTagQuery) AllX(ctx context.Context) []*SnippetTag
- func (stq *SnippetTagQuery) Clone() *SnippetTagQuery
- func (stq *SnippetTagQuery) Count(ctx context.Context) (int, error)
- func (stq *SnippetTagQuery) CountX(ctx context.Context) int
- func (stq *SnippetTagQuery) Exist(ctx context.Context) (bool, error)
- func (stq *SnippetTagQuery) ExistX(ctx context.Context) bool
- func (stq *SnippetTagQuery) First(ctx context.Context) (*SnippetTag, error)
- func (stq *SnippetTagQuery) FirstID(ctx context.Context) (id int, err error)
- func (stq *SnippetTagQuery) FirstIDX(ctx context.Context) int
- func (stq *SnippetTagQuery) FirstX(ctx context.Context) *SnippetTag
- func (stq *SnippetTagQuery) GroupBy(field string, fields ...string) *SnippetTagGroupBy
- func (stq *SnippetTagQuery) IDs(ctx context.Context) ([]int, error)
- func (stq *SnippetTagQuery) IDsX(ctx context.Context) []int
- func (stq *SnippetTagQuery) Limit(limit int) *SnippetTagQuery
- func (stq *SnippetTagQuery) Offset(offset int) *SnippetTagQuery
- func (stq *SnippetTagQuery) Only(ctx context.Context) (*SnippetTag, error)
- func (stq *SnippetTagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (stq *SnippetTagQuery) OnlyIDX(ctx context.Context) int
- func (stq *SnippetTagQuery) OnlyX(ctx context.Context) *SnippetTag
- func (stq *SnippetTagQuery) Order(o ...OrderFunc) *SnippetTagQuery
- func (stq *SnippetTagQuery) QueryTagOwner() *MemberQuery
- func (stq *SnippetTagQuery) QueryTagSnippet() *SnippetQuery
- func (stq *SnippetTagQuery) Select(field string, fields ...string) *SnippetTagSelect
- func (stq *SnippetTagQuery) Unique(unique bool) *SnippetTagQuery
- func (stq *SnippetTagQuery) Where(ps ...predicate.SnippetTag) *SnippetTagQuery
- func (stq *SnippetTagQuery) WithTagOwner(opts ...func(*MemberQuery)) *SnippetTagQuery
- func (stq *SnippetTagQuery) WithTagSnippet(opts ...func(*SnippetQuery)) *SnippetTagQuery
- type SnippetTagSelect
- func (sts *SnippetTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (sts *SnippetTagSelect) BoolX(ctx context.Context) bool
- func (sts *SnippetTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (sts *SnippetTagSelect) BoolsX(ctx context.Context) []bool
- func (sts *SnippetTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (sts *SnippetTagSelect) Float64X(ctx context.Context) float64
- func (sts *SnippetTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (sts *SnippetTagSelect) Float64sX(ctx context.Context) []float64
- func (sts *SnippetTagSelect) Int(ctx context.Context) (_ int, err error)
- func (sts *SnippetTagSelect) IntX(ctx context.Context) int
- func (sts *SnippetTagSelect) Ints(ctx context.Context) ([]int, error)
- func (sts *SnippetTagSelect) IntsX(ctx context.Context) []int
- func (sts *SnippetTagSelect) Scan(ctx context.Context, v interface{}) error
- func (sts *SnippetTagSelect) ScanX(ctx context.Context, v interface{})
- func (sts *SnippetTagSelect) String(ctx context.Context) (_ string, err error)
- func (sts *SnippetTagSelect) StringX(ctx context.Context) string
- func (sts *SnippetTagSelect) Strings(ctx context.Context) ([]string, error)
- func (sts *SnippetTagSelect) StringsX(ctx context.Context) []string
- type SnippetTagUpdate
- func (stu *SnippetTagUpdate) AddSnippetsTotal(i int) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) ClearTagOwner() *SnippetTagUpdate
- func (stu *SnippetTagUpdate) ClearTagSnippet() *SnippetTagUpdate
- func (stu *SnippetTagUpdate) Exec(ctx context.Context) error
- func (stu *SnippetTagUpdate) ExecX(ctx context.Context)
- func (stu *SnippetTagUpdate) Mutation() *SnippetTagMutation
- func (stu *SnippetTagUpdate) Save(ctx context.Context) (int, error)
- func (stu *SnippetTagUpdate) SaveX(ctx context.Context) int
- func (stu *SnippetTagUpdate) SetName(s string) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) SetNillableSnippetsTotal(i *int) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) SetSnippetsTotal(i int) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) SetTagOwner(m *Member) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) SetTagOwnerID(id int) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) SetTagSnippet(s *Snippet) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) SetTagSnippetID(id int) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) SetUpdateTime(t time.Time) *SnippetTagUpdate
- func (stu *SnippetTagUpdate) Where(ps ...predicate.SnippetTag) *SnippetTagUpdate
- type SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) AddSnippetsTotal(i int) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) ClearTagOwner() *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) ClearTagSnippet() *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) Exec(ctx context.Context) error
- func (stuo *SnippetTagUpdateOne) ExecX(ctx context.Context)
- func (stuo *SnippetTagUpdateOne) Mutation() *SnippetTagMutation
- func (stuo *SnippetTagUpdateOne) Save(ctx context.Context) (*SnippetTag, error)
- func (stuo *SnippetTagUpdateOne) SaveX(ctx context.Context) *SnippetTag
- func (stuo *SnippetTagUpdateOne) Select(field string, fields ...string) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetName(s string) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetNillableSnippetsTotal(i *int) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetSnippetsTotal(i int) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetTagOwner(m *Member) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetTagOwnerID(id int) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetTagSnippet(s *Snippet) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetTagSnippetID(id int) *SnippetTagUpdateOne
- func (stuo *SnippetTagUpdateOne) SetUpdateTime(t time.Time) *SnippetTagUpdateOne
- type SnippetTags
- type SnippetUpdate
- func (su *SnippetUpdate) AddFolderID(i int) *SnippetUpdate
- func (su *SnippetUpdate) AddSnippetDocIDs(ids ...int) *SnippetUpdate
- func (su *SnippetUpdate) AddSnippetDocs(s ...*SnippetDocument) *SnippetUpdate
- func (su *SnippetUpdate) AddSnippetTagIDs(ids ...int) *SnippetUpdate
- func (su *SnippetUpdate) AddSnippetTags(s ...*SnippetTag) *SnippetUpdate
- func (su *SnippetUpdate) ClearFolderID() *SnippetUpdate
- func (su *SnippetUpdate) ClearSnippetDocs() *SnippetUpdate
- func (su *SnippetUpdate) ClearSnippetOwner() *SnippetUpdate
- func (su *SnippetUpdate) ClearSnippetTags() *SnippetUpdate
- func (su *SnippetUpdate) ClearTitle() *SnippetUpdate
- func (su *SnippetUpdate) Exec(ctx context.Context) error
- func (su *SnippetUpdate) ExecX(ctx context.Context)
- func (su *SnippetUpdate) Mutation() *SnippetMutation
- func (su *SnippetUpdate) RemoveSnippetDocIDs(ids ...int) *SnippetUpdate
- func (su *SnippetUpdate) RemoveSnippetDocs(s ...*SnippetDocument) *SnippetUpdate
- func (su *SnippetUpdate) RemoveSnippetTagIDs(ids ...int) *SnippetUpdate
- func (su *SnippetUpdate) RemoveSnippetTags(s ...*SnippetTag) *SnippetUpdate
- func (su *SnippetUpdate) Save(ctx context.Context) (int, error)
- func (su *SnippetUpdate) SaveX(ctx context.Context) int
- func (su *SnippetUpdate) SetFolderID(i int) *SnippetUpdate
- func (su *SnippetUpdate) SetNillableFolderID(i *int) *SnippetUpdate
- func (su *SnippetUpdate) SetNillableTitle(s *string) *SnippetUpdate
- func (su *SnippetUpdate) SetOwnerID(i int) *SnippetUpdate
- func (su *SnippetUpdate) SetSnippetOwner(m *Member) *SnippetUpdate
- func (su *SnippetUpdate) SetSnippetOwnerID(id int) *SnippetUpdate
- func (su *SnippetUpdate) SetTitle(s string) *SnippetUpdate
- func (su *SnippetUpdate) SetUpdateTime(t time.Time) *SnippetUpdate
- func (su *SnippetUpdate) Where(ps ...predicate.Snippet) *SnippetUpdate
- type SnippetUpdateOne
- func (suo *SnippetUpdateOne) AddFolderID(i int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) AddSnippetDocIDs(ids ...int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) AddSnippetDocs(s ...*SnippetDocument) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) AddSnippetTagIDs(ids ...int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) AddSnippetTags(s ...*SnippetTag) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) ClearFolderID() *SnippetUpdateOne
- func (suo *SnippetUpdateOne) ClearSnippetDocs() *SnippetUpdateOne
- func (suo *SnippetUpdateOne) ClearSnippetOwner() *SnippetUpdateOne
- func (suo *SnippetUpdateOne) ClearSnippetTags() *SnippetUpdateOne
- func (suo *SnippetUpdateOne) ClearTitle() *SnippetUpdateOne
- func (suo *SnippetUpdateOne) Exec(ctx context.Context) error
- func (suo *SnippetUpdateOne) ExecX(ctx context.Context)
- func (suo *SnippetUpdateOne) Mutation() *SnippetMutation
- func (suo *SnippetUpdateOne) RemoveSnippetDocIDs(ids ...int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) RemoveSnippetDocs(s ...*SnippetDocument) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) RemoveSnippetTagIDs(ids ...int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) RemoveSnippetTags(s ...*SnippetTag) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) Save(ctx context.Context) (*Snippet, error)
- func (suo *SnippetUpdateOne) SaveX(ctx context.Context) *Snippet
- func (suo *SnippetUpdateOne) Select(field string, fields ...string) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetFolderID(i int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetNillableFolderID(i *int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetNillableTitle(s *string) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetOwnerID(i int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetSnippetOwner(m *Member) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetSnippetOwnerID(id int) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetTitle(s string) *SnippetUpdateOne
- func (suo *SnippetUpdateOne) SetUpdateTime(t time.Time) *SnippetUpdateOne
- type Snippets
- type SystemSetting
- type SystemSettingClient
- func (c *SystemSettingClient) Create() *SystemSettingCreate
- func (c *SystemSettingClient) CreateBulk(builders ...*SystemSettingCreate) *SystemSettingCreateBulk
- func (c *SystemSettingClient) Delete() *SystemSettingDelete
- func (c *SystemSettingClient) DeleteOne(ss *SystemSetting) *SystemSettingDeleteOne
- func (c *SystemSettingClient) DeleteOneID(id int) *SystemSettingDeleteOne
- func (c *SystemSettingClient) Get(ctx context.Context, id int) (*SystemSetting, error)
- func (c *SystemSettingClient) GetX(ctx context.Context, id int) *SystemSetting
- func (c *SystemSettingClient) Hooks() []Hook
- func (c *SystemSettingClient) Query() *SystemSettingQuery
- func (c *SystemSettingClient) Update() *SystemSettingUpdate
- func (c *SystemSettingClient) UpdateOne(ss *SystemSetting) *SystemSettingUpdateOne
- func (c *SystemSettingClient) UpdateOneID(id int) *SystemSettingUpdateOne
- func (c *SystemSettingClient) Use(hooks ...Hook)
- type SystemSettingCreate
- func (ssc *SystemSettingCreate) Mutation() *SystemSettingMutation
- func (ssc *SystemSettingCreate) Save(ctx context.Context) (*SystemSetting, error)
- func (ssc *SystemSettingCreate) SaveX(ctx context.Context) *SystemSetting
- func (ssc *SystemSettingCreate) SetID(i int) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetKey(s string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableSpace(s *systemsetting.Space) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableTypeof(s *string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableUpdateTime(t *time.Time) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableValue(s *string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetSpace(s systemsetting.Space) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetTypeof(s string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetUpdateTime(t time.Time) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetValue(s string) *SystemSettingCreate
- type SystemSettingCreateBulk
- type SystemSettingDelete
- type SystemSettingDeleteOne
- type SystemSettingGroupBy
- func (ssgb *SystemSettingGroupBy) Aggregate(fns ...AggregateFunc) *SystemSettingGroupBy
- func (ssgb *SystemSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ssgb *SystemSettingGroupBy) BoolX(ctx context.Context) bool
- func (ssgb *SystemSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ssgb *SystemSettingGroupBy) BoolsX(ctx context.Context) []bool
- func (ssgb *SystemSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ssgb *SystemSettingGroupBy) Float64X(ctx context.Context) float64
- func (ssgb *SystemSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ssgb *SystemSettingGroupBy) Float64sX(ctx context.Context) []float64
- func (ssgb *SystemSettingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ssgb *SystemSettingGroupBy) IntX(ctx context.Context) int
- func (ssgb *SystemSettingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ssgb *SystemSettingGroupBy) IntsX(ctx context.Context) []int
- func (ssgb *SystemSettingGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ssgb *SystemSettingGroupBy) ScanX(ctx context.Context, v interface{})
- func (ssgb *SystemSettingGroupBy) String(ctx context.Context) (_ string, err error)
- func (ssgb *SystemSettingGroupBy) StringX(ctx context.Context) string
- func (ssgb *SystemSettingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ssgb *SystemSettingGroupBy) StringsX(ctx context.Context) []string
- type SystemSettingMutation
- func (m *SystemSettingMutation) AddField(name string, value ent.Value) error
- func (m *SystemSettingMutation) AddedEdges() []string
- func (m *SystemSettingMutation) AddedField(name string) (ent.Value, bool)
- func (m *SystemSettingMutation) AddedFields() []string
- func (m *SystemSettingMutation) AddedIDs(name string) []ent.Value
- func (m *SystemSettingMutation) ClearEdge(name string) error
- func (m *SystemSettingMutation) ClearField(name string) error
- func (m *SystemSettingMutation) ClearSpace()
- func (m *SystemSettingMutation) ClearValue()
- func (m *SystemSettingMutation) ClearedEdges() []string
- func (m *SystemSettingMutation) ClearedFields() []string
- func (m SystemSettingMutation) Client() *Client
- func (m *SystemSettingMutation) EdgeCleared(name string) bool
- func (m *SystemSettingMutation) Field(name string) (ent.Value, bool)
- func (m *SystemSettingMutation) FieldCleared(name string) bool
- func (m *SystemSettingMutation) Fields() []string
- func (m *SystemSettingMutation) ID() (id int, exists bool)
- func (m *SystemSettingMutation) Key() (r string, exists bool)
- func (m *SystemSettingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SystemSettingMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *SystemSettingMutation) OldSpace(ctx context.Context) (v *systemsetting.Space, err error)
- func (m *SystemSettingMutation) OldTypeof(ctx context.Context) (v string, err error)
- func (m *SystemSettingMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SystemSettingMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *SystemSettingMutation) Op() Op
- func (m *SystemSettingMutation) RemovedEdges() []string
- func (m *SystemSettingMutation) RemovedIDs(name string) []ent.Value
- func (m *SystemSettingMutation) ResetEdge(name string) error
- func (m *SystemSettingMutation) ResetField(name string) error
- func (m *SystemSettingMutation) ResetKey()
- func (m *SystemSettingMutation) ResetSpace()
- func (m *SystemSettingMutation) ResetTypeof()
- func (m *SystemSettingMutation) ResetUpdateTime()
- func (m *SystemSettingMutation) ResetValue()
- func (m *SystemSettingMutation) SetField(name string, value ent.Value) error
- func (m *SystemSettingMutation) SetID(id int)
- func (m *SystemSettingMutation) SetKey(s string)
- func (m *SystemSettingMutation) SetSpace(s systemsetting.Space)
- func (m *SystemSettingMutation) SetTypeof(s string)
- func (m *SystemSettingMutation) SetUpdateTime(t time.Time)
- func (m *SystemSettingMutation) SetValue(s string)
- func (m *SystemSettingMutation) Space() (r systemsetting.Space, exists bool)
- func (m *SystemSettingMutation) SpaceCleared() bool
- func (m SystemSettingMutation) Tx() (*Tx, error)
- func (m *SystemSettingMutation) Type() string
- func (m *SystemSettingMutation) Typeof() (r string, exists bool)
- func (m *SystemSettingMutation) UpdateTime() (r time.Time, exists bool)
- func (m *SystemSettingMutation) Value() (r string, exists bool)
- func (m *SystemSettingMutation) ValueCleared() bool
- type SystemSettingQuery
- func (ssq *SystemSettingQuery) All(ctx context.Context) ([]*SystemSetting, error)
- func (ssq *SystemSettingQuery) AllX(ctx context.Context) []*SystemSetting
- func (ssq *SystemSettingQuery) Clone() *SystemSettingQuery
- func (ssq *SystemSettingQuery) Count(ctx context.Context) (int, error)
- func (ssq *SystemSettingQuery) CountX(ctx context.Context) int
- func (ssq *SystemSettingQuery) Exist(ctx context.Context) (bool, error)
- func (ssq *SystemSettingQuery) ExistX(ctx context.Context) bool
- func (ssq *SystemSettingQuery) First(ctx context.Context) (*SystemSetting, error)
- func (ssq *SystemSettingQuery) FirstID(ctx context.Context) (id int, err error)
- func (ssq *SystemSettingQuery) FirstIDX(ctx context.Context) int
- func (ssq *SystemSettingQuery) FirstX(ctx context.Context) *SystemSetting
- func (ssq *SystemSettingQuery) GroupBy(field string, fields ...string) *SystemSettingGroupBy
- func (ssq *SystemSettingQuery) IDs(ctx context.Context) ([]int, error)
- func (ssq *SystemSettingQuery) IDsX(ctx context.Context) []int
- func (ssq *SystemSettingQuery) Limit(limit int) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Offset(offset int) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Only(ctx context.Context) (*SystemSetting, error)
- func (ssq *SystemSettingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ssq *SystemSettingQuery) OnlyIDX(ctx context.Context) int
- func (ssq *SystemSettingQuery) OnlyX(ctx context.Context) *SystemSetting
- func (ssq *SystemSettingQuery) Order(o ...OrderFunc) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Select(field string, fields ...string) *SystemSettingSelect
- func (ssq *SystemSettingQuery) Unique(unique bool) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Where(ps ...predicate.SystemSetting) *SystemSettingQuery
- type SystemSettingSelect
- func (sss *SystemSettingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (sss *SystemSettingSelect) BoolX(ctx context.Context) bool
- func (sss *SystemSettingSelect) Bools(ctx context.Context) ([]bool, error)
- func (sss *SystemSettingSelect) BoolsX(ctx context.Context) []bool
- func (sss *SystemSettingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (sss *SystemSettingSelect) Float64X(ctx context.Context) float64
- func (sss *SystemSettingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (sss *SystemSettingSelect) Float64sX(ctx context.Context) []float64
- func (sss *SystemSettingSelect) Int(ctx context.Context) (_ int, err error)
- func (sss *SystemSettingSelect) IntX(ctx context.Context) int
- func (sss *SystemSettingSelect) Ints(ctx context.Context) ([]int, error)
- func (sss *SystemSettingSelect) IntsX(ctx context.Context) []int
- func (sss *SystemSettingSelect) Scan(ctx context.Context, v interface{}) error
- func (sss *SystemSettingSelect) ScanX(ctx context.Context, v interface{})
- func (sss *SystemSettingSelect) String(ctx context.Context) (_ string, err error)
- func (sss *SystemSettingSelect) StringX(ctx context.Context) string
- func (sss *SystemSettingSelect) Strings(ctx context.Context) ([]string, error)
- func (sss *SystemSettingSelect) StringsX(ctx context.Context) []string
- type SystemSettingUpdate
- func (ssu *SystemSettingUpdate) ClearSpace() *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) ClearValue() *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) Exec(ctx context.Context) error
- func (ssu *SystemSettingUpdate) ExecX(ctx context.Context)
- func (ssu *SystemSettingUpdate) Mutation() *SystemSettingMutation
- func (ssu *SystemSettingUpdate) Save(ctx context.Context) (int, error)
- func (ssu *SystemSettingUpdate) SaveX(ctx context.Context) int
- func (ssu *SystemSettingUpdate) SetKey(s string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetNillableTypeof(s *string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetNillableValue(s *string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetSpace(s systemsetting.Space) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetTypeof(s string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetUpdateTime(t time.Time) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetValue(s string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) Where(ps ...predicate.SystemSetting) *SystemSettingUpdate
- type SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) ClearSpace() *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) ClearValue() *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) Exec(ctx context.Context) error
- func (ssuo *SystemSettingUpdateOne) ExecX(ctx context.Context)
- func (ssuo *SystemSettingUpdateOne) Mutation() *SystemSettingMutation
- func (ssuo *SystemSettingUpdateOne) Save(ctx context.Context) (*SystemSetting, error)
- func (ssuo *SystemSettingUpdateOne) SaveX(ctx context.Context) *SystemSetting
- func (ssuo *SystemSettingUpdateOne) Select(field string, fields ...string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetKey(s string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetNillableTypeof(s *string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetNillableValue(s *string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetSpace(s systemsetting.Space) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetTypeof(s string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetUpdateTime(t time.Time) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetValue(s string) *SystemSettingUpdateOne
- type SystemSettings
- 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. TypeGroup = "Group" TypeMember = "Member" TypeMemberEmail = "MemberEmail" TypeMemberSecurityLog = "MemberSecurityLog" TypeMemberSetting = "MemberSetting" TypeSnippet = "Snippet" TypeSnippetDocument = "SnippetDocument" TypeSnippetFolder = "SnippetFolder" TypeSnippetTag = "SnippetTag" TypeSystemSetting = "SystemSetting" )
const Version string = "1.0.9"
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 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(model.As(model.Sum(field1), "sum_field1"), (model.As(model.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Group is the client for interacting with the Group builders. Group *GroupClient // Member is the client for interacting with the Member builders. Member *MemberClient // MemberEmail is the client for interacting with the MemberEmail builders. MemberEmail *MemberEmailClient // MemberSecurityLog is the client for interacting with the MemberSecurityLog builders. MemberSecurityLog *MemberSecurityLogClient // MemberSetting is the client for interacting with the MemberSetting builders. MemberSetting *MemberSettingClient // Snippet is the client for interacting with the Snippet builders. Snippet *SnippetClient // SnippetDocument is the client for interacting with the SnippetDocument builders. SnippetDocument *SnippetDocumentClient // SnippetFolder is the client for interacting with the SnippetFolder builders. SnippetFolder *SnippetFolderClient // SnippetTag is the client for interacting with the SnippetTag builders. SnippetTag *SnippetTagClient // SystemSetting is the client for interacting with the SystemSetting builders. SystemSetting *SystemSettingClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Group. 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 Group ¶ added in v1.0.2
type Group struct { // ID of the ent. ID int `json:"id,omitempty"` // Sn holds the value of the "sn" field. Sn string `json:"sn,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // DeleteTime holds the value of the "delete_time" field. DeleteTime *time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupQuery when eager-loading is set. Edges GroupEdges `json:"edges"` // contains filtered or unexported fields }
Group is the model entity for the Group schema.
func (*Group) QueryMembers ¶ added in v1.0.2
func (gr *Group) QueryMembers() *MemberQuery
QueryMembers queries the "members" edge of the Group entity.
func (*Group) Unwrap ¶ added in v1.0.2
Unwrap unwraps the Group entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Group) Update ¶ added in v1.0.2
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that you need to call Group.Unwrap() before calling this method if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶ added in v1.0.2
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶ added in v1.0.2
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶ added in v1.0.2
func (c *GroupClient) Create() *GroupCreate
Create returns a create builder for Group.
func (*GroupClient) CreateBulk ¶ added in v1.0.2
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶ added in v1.0.2
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶ added in v1.0.2
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*GroupClient) DeleteOneID ¶ added in v1.0.2
func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*GroupClient) GetX ¶ added in v1.0.2
func (c *GroupClient) GetX(ctx context.Context, id int) *Group
GetX is like Get, but panics if an error occurs.
func (*GroupClient) Hooks ¶ added in v1.0.2
func (c *GroupClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupClient) Query ¶ added in v1.0.2
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryMembers ¶ added in v1.0.2
func (c *GroupClient) QueryMembers(gr *Group) *MemberQuery
QueryMembers queries the members edge of a Group.
func (*GroupClient) Update ¶ added in v1.0.2
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶ added in v1.0.2
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶ added in v1.0.2
func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶ added in v1.0.2
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `group.Hooks(f(g(h())))`.
type GroupCreate ¶ added in v1.0.2
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddMemberIDs ¶ added in v1.0.2
func (gc *GroupCreate) AddMemberIDs(ids ...int) *GroupCreate
AddMemberIDs adds the "members" edge to the Member entity by IDs.
func (*GroupCreate) AddMembers ¶ added in v1.0.2
func (gc *GroupCreate) AddMembers(m ...*Member) *GroupCreate
AddMembers adds the "members" edges to the Member entity.
func (*GroupCreate) Mutation ¶ added in v1.0.2
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) Save ¶ added in v1.0.2
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶ added in v1.0.2
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetCreateTime ¶ added in v1.0.2
func (gc *GroupCreate) SetCreateTime(t time.Time) *GroupCreate
SetCreateTime sets the "create_time" field.
func (*GroupCreate) SetDeleteTime ¶ added in v1.0.2
func (gc *GroupCreate) SetDeleteTime(t time.Time) *GroupCreate
SetDeleteTime sets the "delete_time" field.
func (*GroupCreate) SetID ¶ added in v1.0.2
func (gc *GroupCreate) SetID(i int) *GroupCreate
SetID sets the "id" field.
func (*GroupCreate) SetName ¶ added in v1.0.2
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the "name" field.
func (*GroupCreate) SetNillableCreateTime ¶ added in v1.0.2
func (gc *GroupCreate) SetNillableCreateTime(t *time.Time) *GroupCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*GroupCreate) SetNillableDeleteTime ¶ added in v1.0.2
func (gc *GroupCreate) SetNillableDeleteTime(t *time.Time) *GroupCreate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*GroupCreate) SetNillableSn ¶ added in v1.0.2
func (gc *GroupCreate) SetNillableSn(s *string) *GroupCreate
SetNillableSn sets the "sn" field if the given value is not nil.
func (*GroupCreate) SetNillableUpdateTime ¶ added in v1.0.2
func (gc *GroupCreate) SetNillableUpdateTime(t *time.Time) *GroupCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*GroupCreate) SetSn ¶ added in v1.0.2
func (gc *GroupCreate) SetSn(s string) *GroupCreate
SetSn sets the "sn" field.
func (*GroupCreate) SetUpdateTime ¶ added in v1.0.2
func (gc *GroupCreate) SetUpdateTime(t time.Time) *GroupCreate
SetUpdateTime sets the "update_time" field.
type GroupCreateBulk ¶ added in v1.0.2
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating many Group entities in bulk.
type GroupDelete ¶ added in v1.0.2
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶ added in v1.0.2
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecX ¶ added in v1.0.2
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) Where ¶ added in v1.0.2
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where adds a new predicate to the GroupDelete builder.
type GroupDeleteOne ¶ added in v1.0.2
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶ added in v1.0.2
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶ added in v1.0.2
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupEdges ¶ added in v1.0.2
type GroupEdges struct { // Members holds the value of the members edge. Members []*Member `json:"members,omitempty"` // contains filtered or unexported fields }
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) MembersOrErr ¶ added in v1.0.2
func (e GroupEdges) MembersOrErr() ([]*Member, error)
MembersOrErr returns the Members value or an error if the edge was not loaded in eager-loading.
type GroupGroupBy ¶ added in v1.0.2
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the group-by builder for Group entities.
func (*GroupGroupBy) Aggregate ¶ added in v1.0.2
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶ added in v1.0.2
func (ggb *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupGroupBy) BoolX ¶ added in v1.0.2
func (ggb *GroupGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupGroupBy) Bools ¶ added in v1.0.2
func (ggb *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupGroupBy) BoolsX ¶ added in v1.0.2
func (ggb *GroupGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupGroupBy) Float64 ¶ added in v1.0.2
func (ggb *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupGroupBy) Float64X ¶ added in v1.0.2
func (ggb *GroupGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupGroupBy) Float64s ¶ added in v1.0.2
func (ggb *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupGroupBy) Float64sX ¶ added in v1.0.2
func (ggb *GroupGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupGroupBy) Int ¶ added in v1.0.2
func (ggb *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupGroupBy) IntX ¶ added in v1.0.2
func (ggb *GroupGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupGroupBy) Ints ¶ added in v1.0.2
func (ggb *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupGroupBy) IntsX ¶ added in v1.0.2
func (ggb *GroupGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupGroupBy) Scan ¶ added in v1.0.2
func (ggb *GroupGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*GroupGroupBy) ScanX ¶ added in v1.0.2
func (ggb *GroupGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupGroupBy) String ¶ added in v1.0.2
func (ggb *GroupGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupGroupBy) StringX ¶ added in v1.0.2
func (ggb *GroupGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupMutation ¶ added in v1.0.2
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutates the Group nodes in the graph.
func (*GroupMutation) AddField ¶ added in v1.0.2
func (m *GroupMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*GroupMutation) AddMemberIDs ¶ added in v1.0.2
func (m *GroupMutation) AddMemberIDs(ids ...int)
AddMemberIDs adds the "members" edge to the Member entity by ids.
func (*GroupMutation) AddedEdges ¶ added in v1.0.2
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶ added in v1.0.2
func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*GroupMutation) AddedFields ¶ added in v1.0.2
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupMutation) AddedIDs ¶ added in v1.0.2
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupMutation) ClearDeleteTime ¶ added in v1.0.2
func (m *GroupMutation) ClearDeleteTime()
ClearDeleteTime clears the value of the "delete_time" field.
func (*GroupMutation) ClearEdge ¶ added in v1.0.2
func (m *GroupMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*GroupMutation) ClearField ¶ added in v1.0.2
func (m *GroupMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*GroupMutation) ClearMembers ¶ added in v1.0.2
func (m *GroupMutation) ClearMembers()
ClearMembers clears the "members" edge to the Member entity.
func (*GroupMutation) ClearedEdges ¶ added in v1.0.2
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶ added in v1.0.2
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶ added in v1.0.2
func (m GroupMutation) 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 (*GroupMutation) CreateTime ¶ added in v1.0.2
func (m *GroupMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*GroupMutation) DeleteTime ¶ added in v1.0.2
func (m *GroupMutation) DeleteTime() (r time.Time, exists bool)
DeleteTime returns the value of the "delete_time" field in the mutation.
func (*GroupMutation) DeleteTimeCleared ¶ added in v1.0.2
func (m *GroupMutation) DeleteTimeCleared() bool
DeleteTimeCleared returns if the "delete_time" field was cleared in this mutation.
func (*GroupMutation) EdgeCleared ¶ added in v1.0.2
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupMutation) Field ¶ added in v1.0.2
func (m *GroupMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*GroupMutation) FieldCleared ¶ added in v1.0.2
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupMutation) Fields ¶ added in v1.0.2
func (m *GroupMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*GroupMutation) ID ¶ added in v1.0.2
func (m *GroupMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*GroupMutation) MembersCleared ¶ added in v1.0.2
func (m *GroupMutation) MembersCleared() bool
MembersCleared reports if the "members" edge to the Member entity was cleared.
func (*GroupMutation) MembersIDs ¶ added in v1.0.2
func (m *GroupMutation) MembersIDs() (ids []int)
MembersIDs returns the "members" edge IDs in the mutation.
func (*GroupMutation) Name ¶ added in v1.0.2
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroupMutation) OldCreateTime ¶ added in v1.0.2
OldCreateTime returns the old "create_time" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) OldDeleteTime ¶ added in v1.0.2
OldDeleteTime returns the old "delete_time" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) OldField ¶ added in v1.0.2
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*GroupMutation) OldName ¶ added in v1.0.2
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) OldSn ¶ added in v1.0.2
func (m *GroupMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) OldUpdateTime ¶ added in v1.0.2
OldUpdateTime returns the old "update_time" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) Op ¶ added in v1.0.2
func (m *GroupMutation) Op() Op
Op returns the operation name.
func (*GroupMutation) RemoveMemberIDs ¶ added in v1.0.2
func (m *GroupMutation) RemoveMemberIDs(ids ...int)
RemoveMemberIDs removes the "members" edge to the Member entity by IDs.
func (*GroupMutation) RemovedEdges ¶ added in v1.0.2
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedIDs ¶ added in v1.0.2
func (m *GroupMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*GroupMutation) RemovedMembersIDs ¶ added in v1.0.2
func (m *GroupMutation) RemovedMembersIDs() (ids []int)
RemovedMembers returns the removed IDs of the "members" edge to the Member entity.
func (*GroupMutation) ResetCreateTime ¶ added in v1.0.2
func (m *GroupMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*GroupMutation) ResetDeleteTime ¶ added in v1.0.2
func (m *GroupMutation) ResetDeleteTime()
ResetDeleteTime resets all changes to the "delete_time" field.
func (*GroupMutation) ResetEdge ¶ added in v1.0.2
func (m *GroupMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*GroupMutation) ResetField ¶ added in v1.0.2
func (m *GroupMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*GroupMutation) ResetMembers ¶ added in v1.0.2
func (m *GroupMutation) ResetMembers()
ResetMembers resets all changes to the "members" edge.
func (*GroupMutation) ResetName ¶ added in v1.0.2
func (m *GroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroupMutation) ResetSn ¶ added in v1.0.2
func (m *GroupMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*GroupMutation) ResetUpdateTime ¶ added in v1.0.2
func (m *GroupMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*GroupMutation) SetCreateTime ¶ added in v1.0.2
func (m *GroupMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*GroupMutation) SetDeleteTime ¶ added in v1.0.2
func (m *GroupMutation) SetDeleteTime(t time.Time)
SetDeleteTime sets the "delete_time" field.
func (*GroupMutation) SetField ¶ added in v1.0.2
func (m *GroupMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*GroupMutation) SetID ¶ added in v1.0.2
func (m *GroupMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Group entities.
func (*GroupMutation) SetName ¶ added in v1.0.2
func (m *GroupMutation) SetName(s string)
SetName sets the "name" field.
func (*GroupMutation) SetSn ¶ added in v1.0.2
func (m *GroupMutation) SetSn(s string)
SetSn sets the "sn" field.
func (*GroupMutation) SetUpdateTime ¶ added in v1.0.2
func (m *GroupMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*GroupMutation) Sn ¶ added in v1.0.2
func (m *GroupMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" field in the mutation.
func (GroupMutation) Tx ¶ added in v1.0.2
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶ added in v1.0.2
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UpdateTime ¶ added in v1.0.2
func (m *GroupMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type GroupQuery ¶ added in v1.0.2
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) All ¶ added in v1.0.2
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶ added in v1.0.2
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶ added in v1.0.2
func (gq *GroupQuery) Clone() *GroupQuery
Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupQuery) Count ¶ added in v1.0.2
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶ added in v1.0.2
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) Exist ¶ added in v1.0.2
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶ added in v1.0.2
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) First ¶ added in v1.0.2
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.
func (*GroupQuery) FirstID ¶ added in v1.0.2
func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.
func (*GroupQuery) FirstIDX ¶ added in v1.0.2
func (gq *GroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶ added in v1.0.2
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶ added in v1.0.2
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Sn string `json:"sn,omitempty"` Count int `json:"count,omitempty"` } client.Group.Query(). GroupBy(group.FieldSn). Aggregate(model.Count()). Scan(ctx, &v)
func (*GroupQuery) IDs ¶ added in v1.0.2
func (gq *GroupQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Group IDs.
func (*GroupQuery) IDsX ¶ added in v1.0.2
func (gq *GroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶ added in v1.0.2
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit adds a limit step to the query.
func (*GroupQuery) Offset ¶ added in v1.0.2
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset adds an offset step to the query.
func (*GroupQuery) Only ¶ added in v1.0.2
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Group entity is not found. Returns a *NotFoundError when no Group entities are found.
func (*GroupQuery) OnlyID ¶ added in v1.0.2
func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when exactly one Group ID is not found. Returns a *NotFoundError when no entities are found.
func (*GroupQuery) OnlyIDX ¶ added in v1.0.2
func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶ added in v1.0.2
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶ added in v1.0.2
func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
Order adds an order step to the query.
func (*GroupQuery) QueryMembers ¶ added in v1.0.2
func (gq *GroupQuery) QueryMembers() *MemberQuery
QueryMembers chains the current query on the "members" edge.
func (*GroupQuery) Select ¶ added in v1.0.2
func (gq *GroupQuery) Select(field string, fields ...string) *GroupSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Sn string `json:"sn,omitempty"` } client.Group.Query(). Select(group.FieldSn). Scan(ctx, &v)
func (*GroupQuery) Unique ¶ added in v1.0.2
func (gq *GroupQuery) Unique(unique bool) *GroupQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*GroupQuery) Where ¶ added in v1.0.2
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the GroupQuery builder.
func (*GroupQuery) WithMembers ¶ added in v1.0.2
func (gq *GroupQuery) WithMembers(opts ...func(*MemberQuery)) *GroupQuery
WithMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge. The optional arguments are used to configure the query builder of the edge.
type GroupSelect ¶ added in v1.0.2
type GroupSelect struct { *GroupQuery // contains filtered or unexported fields }
GroupSelect is the builder for selecting fields of Group entities.
func (*GroupSelect) Bool ¶ added in v1.0.2
func (gs *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupSelect) BoolX ¶ added in v1.0.2
func (gs *GroupSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupSelect) Bools ¶ added in v1.0.2
func (gs *GroupSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupSelect) BoolsX ¶ added in v1.0.2
func (gs *GroupSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupSelect) Float64 ¶ added in v1.0.2
func (gs *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64X ¶ added in v1.0.2
func (gs *GroupSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupSelect) Float64s ¶ added in v1.0.2
func (gs *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64sX ¶ added in v1.0.2
func (gs *GroupSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupSelect) Int ¶ added in v1.0.2
func (gs *GroupSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupSelect) IntX ¶ added in v1.0.2
func (gs *GroupSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupSelect) Ints ¶ added in v1.0.2
func (gs *GroupSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupSelect) IntsX ¶ added in v1.0.2
func (gs *GroupSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupSelect) Scan ¶ added in v1.0.2
func (gs *GroupSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*GroupSelect) ScanX ¶ added in v1.0.2
func (gs *GroupSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupSelect) String ¶ added in v1.0.2
func (gs *GroupSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupSelect) StringX ¶ added in v1.0.2
func (gs *GroupSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupUpdate ¶ added in v1.0.2
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddMemberIDs ¶ added in v1.0.2
func (gu *GroupUpdate) AddMemberIDs(ids ...int) *GroupUpdate
AddMemberIDs adds the "members" edge to the Member entity by IDs.
func (*GroupUpdate) AddMembers ¶ added in v1.0.2
func (gu *GroupUpdate) AddMembers(m ...*Member) *GroupUpdate
AddMembers adds the "members" edges to the Member entity.
func (*GroupUpdate) ClearDeleteTime ¶ added in v1.0.2
func (gu *GroupUpdate) ClearDeleteTime() *GroupUpdate
ClearDeleteTime clears the value of the "delete_time" field.
func (*GroupUpdate) ClearMembers ¶ added in v1.0.2
func (gu *GroupUpdate) ClearMembers() *GroupUpdate
ClearMembers clears all "members" edges to the Member entity.
func (*GroupUpdate) Exec ¶ added in v1.0.2
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecX ¶ added in v1.0.2
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶ added in v1.0.2
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) RemoveMemberIDs ¶ added in v1.0.2
func (gu *GroupUpdate) RemoveMemberIDs(ids ...int) *GroupUpdate
RemoveMemberIDs removes the "members" edge to Member entities by IDs.
func (*GroupUpdate) RemoveMembers ¶ added in v1.0.2
func (gu *GroupUpdate) RemoveMembers(m ...*Member) *GroupUpdate
RemoveMembers removes "members" edges to Member entities.
func (*GroupUpdate) Save ¶ added in v1.0.2
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶ added in v1.0.2
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetDeleteTime ¶ added in v1.0.2
func (gu *GroupUpdate) SetDeleteTime(t time.Time) *GroupUpdate
SetDeleteTime sets the "delete_time" field.
func (*GroupUpdate) SetName ¶ added in v1.0.2
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the "name" field.
func (*GroupUpdate) SetNillableDeleteTime ¶ added in v1.0.2
func (gu *GroupUpdate) SetNillableDeleteTime(t *time.Time) *GroupUpdate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*GroupUpdate) SetUpdateTime ¶ added in v1.0.2
func (gu *GroupUpdate) SetUpdateTime(t time.Time) *GroupUpdate
SetUpdateTime sets the "update_time" field.
func (*GroupUpdate) Where ¶ added in v1.0.2
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where adds a new predicate for the GroupUpdate builder.
type GroupUpdateOne ¶ added in v1.0.2
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddMemberIDs ¶ added in v1.0.2
func (guo *GroupUpdateOne) AddMemberIDs(ids ...int) *GroupUpdateOne
AddMemberIDs adds the "members" edge to the Member entity by IDs.
func (*GroupUpdateOne) AddMembers ¶ added in v1.0.2
func (guo *GroupUpdateOne) AddMembers(m ...*Member) *GroupUpdateOne
AddMembers adds the "members" edges to the Member entity.
func (*GroupUpdateOne) ClearDeleteTime ¶ added in v1.0.2
func (guo *GroupUpdateOne) ClearDeleteTime() *GroupUpdateOne
ClearDeleteTime clears the value of the "delete_time" field.
func (*GroupUpdateOne) ClearMembers ¶ added in v1.0.2
func (guo *GroupUpdateOne) ClearMembers() *GroupUpdateOne
ClearMembers clears all "members" edges to the Member entity.
func (*GroupUpdateOne) Exec ¶ added in v1.0.2
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecX ¶ added in v1.0.2
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶ added in v1.0.2
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) RemoveMemberIDs ¶ added in v1.0.2
func (guo *GroupUpdateOne) RemoveMemberIDs(ids ...int) *GroupUpdateOne
RemoveMemberIDs removes the "members" edge to Member entities by IDs.
func (*GroupUpdateOne) RemoveMembers ¶ added in v1.0.2
func (guo *GroupUpdateOne) RemoveMembers(m ...*Member) *GroupUpdateOne
RemoveMembers removes "members" edges to Member entities.
func (*GroupUpdateOne) Save ¶ added in v1.0.2
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated Group entity.
func (*GroupUpdateOne) SaveX ¶ added in v1.0.2
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) Select ¶ added in v1.0.2
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUpdateOne) SetDeleteTime ¶ added in v1.0.2
func (guo *GroupUpdateOne) SetDeleteTime(t time.Time) *GroupUpdateOne
SetDeleteTime sets the "delete_time" field.
func (*GroupUpdateOne) SetName ¶ added in v1.0.2
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the "name" field.
func (*GroupUpdateOne) SetNillableDeleteTime ¶ added in v1.0.2
func (guo *GroupUpdateOne) SetNillableDeleteTime(t *time.Time) *GroupUpdateOne
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*GroupUpdateOne) SetUpdateTime ¶ added in v1.0.2
func (guo *GroupUpdateOne) SetUpdateTime(t time.Time) *GroupUpdateOne
SetUpdateTime sets the "update_time" field.
type Member ¶
type Member struct { // ID of the ent. ID int `json:"id,omitempty"` // Sn holds the value of the "sn" field. Sn string `json:"sn,omitempty"` // Nickname holds the value of the "nickname" field. Nickname string `json:"nickname,omitempty"` // Phone holds the value of the "phone" field. Phone *string `json:"phone,omitempty"` // Password holds the value of the "password" field. Password *string `json:"-"` // Status holds the value of the "status" field. Status *member.Status `json:"-"` // Signature holds the value of the "signature" field. Signature string `json:"-"` // LastPwdAuth holds the value of the "last_pwd_auth" field. LastPwdAuth *time.Time `json:"last_pwd_auth,omitempty"` // GroupID holds the value of the "group_id" field. GroupID *int `json:"group_id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // DeleteTime holds the value of the "delete_time" field. DeleteTime *time.Time `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) QueryGroups ¶ added in v1.0.9
func (m *Member) QueryGroups() *GroupQuery
QueryGroups queries the "groups" edge of the Member entity.
func (*Member) QueryMemberEmails ¶ added in v1.0.8
func (m *Member) QueryMemberEmails() *MemberEmailQuery
QueryMemberEmails queries the "member_emails" edge of the Member entity.
func (*Member) QueryMemberSettings ¶ added in v1.0.8
func (m *Member) QueryMemberSettings() *MemberSettingQuery
QueryMemberSettings queries the "member_settings" edge of the Member entity.
func (*Member) QueryMemberSnippetDocs ¶ added in v1.0.9
func (m *Member) QueryMemberSnippetDocs() *SnippetDocumentQuery
QueryMemberSnippetDocs queries the "member_snippet_docs" edge of the Member entity.
func (*Member) QueryMemberSnippetFolders ¶ added in v1.0.9
func (m *Member) QueryMemberSnippetFolders() *SnippetFolderQuery
QueryMemberSnippetFolders queries the "member_snippet_folders" edge of the Member entity.
func (*Member) QueryMemberSnippetTags ¶ added in v1.0.9
func (m *Member) QueryMemberSnippetTags() *SnippetTagQuery
QueryMemberSnippetTags queries the "member_snippet_tags" edge of the Member entity.
func (*Member) QueryMemberSnippets ¶ added in v1.0.9
func (m *Member) QueryMemberSnippets() *SnippetQuery
QueryMemberSnippets queries the "member_snippets" edge of the Member entity.
func (*Member) Unwrap ¶
Unwrap unwraps the Member entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*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
CreateBulk 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) QueryGroups ¶ added in v1.0.9
func (c *MemberClient) QueryGroups(m *Member) *GroupQuery
QueryGroups queries the groups edge of a Member.
func (*MemberClient) QueryMemberEmails ¶ added in v1.0.8
func (c *MemberClient) QueryMemberEmails(m *Member) *MemberEmailQuery
QueryMemberEmails queries the member_emails edge of a Member.
func (*MemberClient) QueryMemberSettings ¶ added in v1.0.8
func (c *MemberClient) QueryMemberSettings(m *Member) *MemberSettingQuery
QueryMemberSettings queries the member_settings edge of a Member.
func (*MemberClient) QueryMemberSnippetDocs ¶ added in v1.0.9
func (c *MemberClient) QueryMemberSnippetDocs(m *Member) *SnippetDocumentQuery
QueryMemberSnippetDocs queries the member_snippet_docs edge of a Member.
func (*MemberClient) QueryMemberSnippetFolders ¶ added in v1.0.9
func (c *MemberClient) QueryMemberSnippetFolders(m *Member) *SnippetFolderQuery
QueryMemberSnippetFolders queries the member_snippet_folders edge of a Member.
func (*MemberClient) QueryMemberSnippetTags ¶ added in v1.0.9
func (c *MemberClient) QueryMemberSnippetTags(m *Member) *SnippetTagQuery
QueryMemberSnippetTags queries the member_snippet_tags edge of a Member.
func (*MemberClient) QueryMemberSnippets ¶ added in v1.0.9
func (c *MemberClient) QueryMemberSnippets(m *Member) *SnippetQuery
QueryMemberSnippets queries the member_snippets 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) AddMemberEmailIDs ¶ added in v1.0.8
func (mc *MemberCreate) AddMemberEmailIDs(ids ...int) *MemberCreate
AddMemberEmailIDs adds the "member_emails" edge to the MemberEmail entity by IDs.
func (*MemberCreate) AddMemberEmails ¶ added in v1.0.8
func (mc *MemberCreate) AddMemberEmails(m ...*MemberEmail) *MemberCreate
AddMemberEmails adds the "member_emails" edges to the MemberEmail entity.
func (*MemberCreate) AddMemberSettingIDs ¶ added in v1.0.8
func (mc *MemberCreate) AddMemberSettingIDs(ids ...int) *MemberCreate
AddMemberSettingIDs adds the "member_settings" edge to the MemberSetting entity by IDs.
func (*MemberCreate) AddMemberSettings ¶ added in v1.0.8
func (mc *MemberCreate) AddMemberSettings(m ...*MemberSetting) *MemberCreate
AddMemberSettings adds the "member_settings" edges to the MemberSetting entity.
func (*MemberCreate) AddMemberSnippetDocIDs ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippetDocIDs(ids ...int) *MemberCreate
AddMemberSnippetDocIDs adds the "member_snippet_docs" edge to the SnippetDocument entity by IDs.
func (*MemberCreate) AddMemberSnippetDocs ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippetDocs(s ...*SnippetDocument) *MemberCreate
AddMemberSnippetDocs adds the "member_snippet_docs" edges to the SnippetDocument entity.
func (*MemberCreate) AddMemberSnippetFolderIDs ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippetFolderIDs(ids ...int) *MemberCreate
AddMemberSnippetFolderIDs adds the "member_snippet_folders" edge to the SnippetFolder entity by IDs.
func (*MemberCreate) AddMemberSnippetFolders ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippetFolders(s ...*SnippetFolder) *MemberCreate
AddMemberSnippetFolders adds the "member_snippet_folders" edges to the SnippetFolder entity.
func (*MemberCreate) AddMemberSnippetIDs ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippetIDs(ids ...int) *MemberCreate
AddMemberSnippetIDs adds the "member_snippets" edge to the Snippet entity by IDs.
func (*MemberCreate) AddMemberSnippetTagIDs ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippetTagIDs(ids ...int) *MemberCreate
AddMemberSnippetTagIDs adds the "member_snippet_tags" edge to the SnippetTag entity by IDs.
func (*MemberCreate) AddMemberSnippetTags ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippetTags(s ...*SnippetTag) *MemberCreate
AddMemberSnippetTags adds the "member_snippet_tags" edges to the SnippetTag entity.
func (*MemberCreate) AddMemberSnippets ¶ added in v1.0.9
func (mc *MemberCreate) AddMemberSnippets(s ...*Snippet) *MemberCreate
AddMemberSnippets adds the "member_snippets" edges to the Snippet entity.
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) SetCreateTime ¶
func (mc *MemberCreate) SetCreateTime(t time.Time) *MemberCreate
SetCreateTime sets the "create_time" field.
func (*MemberCreate) SetDeleteTime ¶
func (mc *MemberCreate) SetDeleteTime(t time.Time) *MemberCreate
SetDeleteTime sets the "delete_time" field.
func (*MemberCreate) SetGroupID ¶ added in v1.0.2
func (mc *MemberCreate) SetGroupID(i int) *MemberCreate
SetGroupID sets the "group_id" field.
func (*MemberCreate) SetGroups ¶ added in v1.0.9
func (mc *MemberCreate) SetGroups(g *Group) *MemberCreate
SetGroups sets the "groups" edge to the Group entity.
func (*MemberCreate) SetGroupsID ¶ added in v1.0.9
func (mc *MemberCreate) SetGroupsID(id int) *MemberCreate
SetGroupsID sets the "groups" edge to the Group entity by ID.
func (*MemberCreate) SetID ¶
func (mc *MemberCreate) SetID(i int) *MemberCreate
SetID sets the "id" field.
func (*MemberCreate) SetLastPwdAuth ¶
func (mc *MemberCreate) SetLastPwdAuth(t time.Time) *MemberCreate
SetLastPwdAuth sets the "last_pwd_auth" field.
func (*MemberCreate) SetNickname ¶
func (mc *MemberCreate) SetNickname(s string) *MemberCreate
SetNickname sets the "nickname" field.
func (*MemberCreate) SetNillableCreateTime ¶
func (mc *MemberCreate) SetNillableCreateTime(t *time.Time) *MemberCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*MemberCreate) SetNillableDeleteTime ¶
func (mc *MemberCreate) SetNillableDeleteTime(t *time.Time) *MemberCreate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*MemberCreate) SetNillableGroupID ¶ added in v1.0.2
func (mc *MemberCreate) SetNillableGroupID(i *int) *MemberCreate
SetNillableGroupID sets the "group_id" field if the given value is not nil.
func (*MemberCreate) SetNillableGroupsID ¶ added in v1.0.9
func (mc *MemberCreate) SetNillableGroupsID(id *int) *MemberCreate
SetNillableGroupsID sets the "groups" edge to the Group entity by ID if the given value is not nil.
func (*MemberCreate) SetNillableLastPwdAuth ¶
func (mc *MemberCreate) SetNillableLastPwdAuth(t *time.Time) *MemberCreate
SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.
func (*MemberCreate) SetNillablePassword ¶ added in v1.0.4
func (mc *MemberCreate) SetNillablePassword(s *string) *MemberCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MemberCreate) SetNillablePhone ¶
func (mc *MemberCreate) SetNillablePhone(s *string) *MemberCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MemberCreate) SetNillableSn ¶ added in v1.0.2
func (mc *MemberCreate) SetNillableSn(s *string) *MemberCreate
SetNillableSn sets the "sn" field if the given value is not nil.
func (*MemberCreate) SetNillableStatus ¶
func (mc *MemberCreate) SetNillableStatus(m *member.Status) *MemberCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MemberCreate) SetNillableUpdateTime ¶
func (mc *MemberCreate) SetNillableUpdateTime(t *time.Time) *MemberCreate
SetNillableUpdateTime sets the "update_time" 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) SetPhone ¶
func (mc *MemberCreate) SetPhone(s string) *MemberCreate
SetPhone sets the "phone" field.
func (*MemberCreate) SetSignature ¶
func (mc *MemberCreate) SetSignature(s string) *MemberCreate
SetSignature sets the "signature" field.
func (*MemberCreate) SetSn ¶ added in v1.0.2
func (mc *MemberCreate) SetSn(s string) *MemberCreate
SetSn sets the "sn" field.
func (*MemberCreate) SetStatus ¶
func (mc *MemberCreate) SetStatus(m member.Status) *MemberCreate
SetStatus sets the "status" field.
func (*MemberCreate) SetUpdateTime ¶
func (mc *MemberCreate) SetUpdateTime(t time.Time) *MemberCreate
SetUpdateTime sets the "update_time" field.
type MemberCreateBulk ¶
type MemberCreateBulk struct {
// contains filtered or unexported fields
}
MemberCreateBulk is the builder for creating many Member entities in bulk.
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 MemberDelete 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 ¶ added in v1.0.2
type MemberEdges struct { // Groups holds the value of the groups edge. Groups *Group `json:"groups,omitempty"` // MemberEmails holds the value of the member_emails edge. MemberEmails []*MemberEmail `json:"member_emails,omitempty"` // MemberSettings holds the value of the member_settings edge. MemberSettings []*MemberSetting `json:"member_settings,omitempty"` // MemberSnippets holds the value of the member_snippets edge. MemberSnippets []*Snippet `json:"member_snippets,omitempty"` // MemberSnippetFolders holds the value of the member_snippet_folders edge. MemberSnippetFolders []*SnippetFolder `json:"member_snippet_folders,omitempty"` // MemberSnippetTags holds the value of the member_snippet_tags edge. MemberSnippetTags []*SnippetTag `json:"member_snippet_tags,omitempty"` // MemberSnippetDocs holds the value of the member_snippet_docs edge. MemberSnippetDocs []*SnippetDocument `json:"member_snippet_docs,omitempty"` // contains filtered or unexported fields }
MemberEdges holds the relations/edges for other nodes in the graph.
func (MemberEdges) GroupsOrErr ¶ added in v1.0.9
func (e MemberEdges) GroupsOrErr() (*Group, error)
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MemberEdges) MemberEmailsOrErr ¶ added in v1.0.8
func (e MemberEdges) MemberEmailsOrErr() ([]*MemberEmail, error)
MemberEmailsOrErr returns the MemberEmails value or an error if the edge was not loaded in eager-loading.
func (MemberEdges) MemberSettingsOrErr ¶ added in v1.0.8
func (e MemberEdges) MemberSettingsOrErr() ([]*MemberSetting, error)
MemberSettingsOrErr returns the MemberSettings value or an error if the edge was not loaded in eager-loading.
func (MemberEdges) MemberSnippetDocsOrErr ¶ added in v1.0.9
func (e MemberEdges) MemberSnippetDocsOrErr() ([]*SnippetDocument, error)
MemberSnippetDocsOrErr returns the MemberSnippetDocs value or an error if the edge was not loaded in eager-loading.
func (MemberEdges) MemberSnippetFoldersOrErr ¶ added in v1.0.9
func (e MemberEdges) MemberSnippetFoldersOrErr() ([]*SnippetFolder, error)
MemberSnippetFoldersOrErr returns the MemberSnippetFolders value or an error if the edge was not loaded in eager-loading.
func (MemberEdges) MemberSnippetTagsOrErr ¶ added in v1.0.9
func (e MemberEdges) MemberSnippetTagsOrErr() ([]*SnippetTag, error)
MemberSnippetTagsOrErr returns the MemberSnippetTags value or an error if the edge was not loaded in eager-loading.
func (MemberEdges) MemberSnippetsOrErr ¶ added in v1.0.9
func (e MemberEdges) MemberSnippetsOrErr() ([]*Snippet, error)
MemberSnippetsOrErr returns the MemberSnippets value or an error if the edge was not loaded in eager-loading.
type MemberEmail ¶ added in v1.0.2
type MemberEmail struct { // ID of the ent. ID int `json:"id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"owner_id,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Verify holds the value of the "verify" field. Verify bool `json:"-"` // VerifyTicket holds the value of the "verify_ticket" field. VerifyTicket *string `json:"verify_ticket,omitempty"` // VerifyTime holds the value of the "verify_time" field. VerifyTime time.Time `json:"-"` // IsPrimary holds the value of the "is_primary" field. IsPrimary bool `json:"is_primary,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MemberEmailQuery when eager-loading is set. Edges MemberEmailEdges `json:"edges"` // contains filtered or unexported fields }
MemberEmail is the model entity for the MemberEmail schema.
func (*MemberEmail) QueryEmailOwner ¶ added in v1.0.8
func (me *MemberEmail) QueryEmailOwner() *MemberQuery
QueryEmailOwner queries the "email_owner" edge of the MemberEmail entity.
func (*MemberEmail) String ¶ added in v1.0.2
func (me *MemberEmail) String() string
String implements the fmt.Stringer.
func (*MemberEmail) Unwrap ¶ added in v1.0.2
func (me *MemberEmail) Unwrap() *MemberEmail
Unwrap unwraps the MemberEmail entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*MemberEmail) Update ¶ added in v1.0.2
func (me *MemberEmail) Update() *MemberEmailUpdateOne
Update returns a builder for updating this MemberEmail. Note that you need to call MemberEmail.Unwrap() before calling this method if this MemberEmail was returned from a transaction, and the transaction was committed or rolled back.
type MemberEmailClient ¶ added in v1.0.2
type MemberEmailClient struct {
// contains filtered or unexported fields
}
MemberEmailClient is a client for the MemberEmail schema.
func NewMemberEmailClient ¶ added in v1.0.2
func NewMemberEmailClient(c config) *MemberEmailClient
NewMemberEmailClient returns a client for the MemberEmail from the given config.
func (*MemberEmailClient) Create ¶ added in v1.0.2
func (c *MemberEmailClient) Create() *MemberEmailCreate
Create returns a create builder for MemberEmail.
func (*MemberEmailClient) CreateBulk ¶ added in v1.0.2
func (c *MemberEmailClient) CreateBulk(builders ...*MemberEmailCreate) *MemberEmailCreateBulk
CreateBulk returns a builder for creating a bulk of MemberEmail entities.
func (*MemberEmailClient) Delete ¶ added in v1.0.2
func (c *MemberEmailClient) Delete() *MemberEmailDelete
Delete returns a delete builder for MemberEmail.
func (*MemberEmailClient) DeleteOne ¶ added in v1.0.2
func (c *MemberEmailClient) DeleteOne(me *MemberEmail) *MemberEmailDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MemberEmailClient) DeleteOneID ¶ added in v1.0.2
func (c *MemberEmailClient) DeleteOneID(id int) *MemberEmailDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MemberEmailClient) Get ¶ added in v1.0.2
func (c *MemberEmailClient) Get(ctx context.Context, id int) (*MemberEmail, error)
Get returns a MemberEmail entity by its id.
func (*MemberEmailClient) GetX ¶ added in v1.0.2
func (c *MemberEmailClient) GetX(ctx context.Context, id int) *MemberEmail
GetX is like Get, but panics if an error occurs.
func (*MemberEmailClient) Hooks ¶ added in v1.0.2
func (c *MemberEmailClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MemberEmailClient) Query ¶ added in v1.0.2
func (c *MemberEmailClient) Query() *MemberEmailQuery
Query returns a query builder for MemberEmail.
func (*MemberEmailClient) QueryEmailOwner ¶ added in v1.0.8
func (c *MemberEmailClient) QueryEmailOwner(me *MemberEmail) *MemberQuery
QueryEmailOwner queries the email_owner edge of a MemberEmail.
func (*MemberEmailClient) Update ¶ added in v1.0.2
func (c *MemberEmailClient) Update() *MemberEmailUpdate
Update returns an update builder for MemberEmail.
func (*MemberEmailClient) UpdateOne ¶ added in v1.0.2
func (c *MemberEmailClient) UpdateOne(me *MemberEmail) *MemberEmailUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MemberEmailClient) UpdateOneID ¶ added in v1.0.2
func (c *MemberEmailClient) UpdateOneID(id int) *MemberEmailUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MemberEmailClient) Use ¶ added in v1.0.2
func (c *MemberEmailClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `memberemail.Hooks(f(g(h())))`.
type MemberEmailCreate ¶ added in v1.0.2
type MemberEmailCreate struct {
// contains filtered or unexported fields
}
MemberEmailCreate is the builder for creating a MemberEmail entity.
func (*MemberEmailCreate) Mutation ¶ added in v1.0.2
func (mec *MemberEmailCreate) Mutation() *MemberEmailMutation
Mutation returns the MemberEmailMutation object of the builder.
func (*MemberEmailCreate) Save ¶ added in v1.0.2
func (mec *MemberEmailCreate) Save(ctx context.Context) (*MemberEmail, error)
Save creates the MemberEmail in the database.
func (*MemberEmailCreate) SaveX ¶ added in v1.0.2
func (mec *MemberEmailCreate) SaveX(ctx context.Context) *MemberEmail
SaveX calls Save and panics if Save returns an error.
func (*MemberEmailCreate) SetCreateTime ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetCreateTime(t time.Time) *MemberEmailCreate
SetCreateTime sets the "create_time" field.
func (*MemberEmailCreate) SetEmail ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetEmail(s string) *MemberEmailCreate
SetEmail sets the "email" field.
func (*MemberEmailCreate) SetEmailOwner ¶ added in v1.0.8
func (mec *MemberEmailCreate) SetEmailOwner(m *Member) *MemberEmailCreate
SetEmailOwner sets the "email_owner" edge to the Member entity.
func (*MemberEmailCreate) SetEmailOwnerID ¶ added in v1.0.8
func (mec *MemberEmailCreate) SetEmailOwnerID(id int) *MemberEmailCreate
SetEmailOwnerID sets the "email_owner" edge to the Member entity by ID.
func (*MemberEmailCreate) SetID ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetID(i int) *MemberEmailCreate
SetID sets the "id" field.
func (*MemberEmailCreate) SetIsPrimary ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetIsPrimary(b bool) *MemberEmailCreate
SetIsPrimary sets the "is_primary" field.
func (*MemberEmailCreate) SetNillableCreateTime ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetNillableCreateTime(t *time.Time) *MemberEmailCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*MemberEmailCreate) SetNillableIsPrimary ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetNillableIsPrimary(b *bool) *MemberEmailCreate
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*MemberEmailCreate) SetNillableUpdateTime ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetNillableUpdateTime(t *time.Time) *MemberEmailCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*MemberEmailCreate) SetNillableVerify ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetNillableVerify(b *bool) *MemberEmailCreate
SetNillableVerify sets the "verify" field if the given value is not nil.
func (*MemberEmailCreate) SetNillableVerifyTicket ¶ added in v1.0.6
func (mec *MemberEmailCreate) SetNillableVerifyTicket(s *string) *MemberEmailCreate
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*MemberEmailCreate) SetNillableVerifyTime ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetNillableVerifyTime(t *time.Time) *MemberEmailCreate
SetNillableVerifyTime sets the "verify_time" field if the given value is not nil.
func (*MemberEmailCreate) SetOwnerID ¶ added in v1.0.4
func (mec *MemberEmailCreate) SetOwnerID(i int) *MemberEmailCreate
SetOwnerID sets the "owner_id" field.
func (*MemberEmailCreate) SetUpdateTime ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetUpdateTime(t time.Time) *MemberEmailCreate
SetUpdateTime sets the "update_time" field.
func (*MemberEmailCreate) SetVerify ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetVerify(b bool) *MemberEmailCreate
SetVerify sets the "verify" field.
func (*MemberEmailCreate) SetVerifyTicket ¶ added in v1.0.6
func (mec *MemberEmailCreate) SetVerifyTicket(s string) *MemberEmailCreate
SetVerifyTicket sets the "verify_ticket" field.
func (*MemberEmailCreate) SetVerifyTime ¶ added in v1.0.2
func (mec *MemberEmailCreate) SetVerifyTime(t time.Time) *MemberEmailCreate
SetVerifyTime sets the "verify_time" field.
type MemberEmailCreateBulk ¶ added in v1.0.2
type MemberEmailCreateBulk struct {
// contains filtered or unexported fields
}
MemberEmailCreateBulk is the builder for creating many MemberEmail entities in bulk.
func (*MemberEmailCreateBulk) Save ¶ added in v1.0.2
func (mecb *MemberEmailCreateBulk) Save(ctx context.Context) ([]*MemberEmail, error)
Save creates the MemberEmail entities in the database.
func (*MemberEmailCreateBulk) SaveX ¶ added in v1.0.2
func (mecb *MemberEmailCreateBulk) SaveX(ctx context.Context) []*MemberEmail
SaveX is like Save, but panics if an error occurs.
type MemberEmailDelete ¶ added in v1.0.2
type MemberEmailDelete struct {
// contains filtered or unexported fields
}
MemberEmailDelete is the builder for deleting a MemberEmail entity.
func (*MemberEmailDelete) Exec ¶ added in v1.0.2
func (med *MemberEmailDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MemberEmailDelete) ExecX ¶ added in v1.0.2
func (med *MemberEmailDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MemberEmailDelete) Where ¶ added in v1.0.2
func (med *MemberEmailDelete) Where(ps ...predicate.MemberEmail) *MemberEmailDelete
Where adds a new predicate to the MemberEmailDelete builder.
type MemberEmailDeleteOne ¶ added in v1.0.2
type MemberEmailDeleteOne struct {
// contains filtered or unexported fields
}
MemberEmailDeleteOne is the builder for deleting a single MemberEmail entity.
func (*MemberEmailDeleteOne) Exec ¶ added in v1.0.2
func (medo *MemberEmailDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MemberEmailDeleteOne) ExecX ¶ added in v1.0.2
func (medo *MemberEmailDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MemberEmailEdges ¶ added in v1.0.2
type MemberEmailEdges struct { // EmailOwner holds the value of the email_owner edge. EmailOwner *Member `json:"email_owner,omitempty"` // contains filtered or unexported fields }
MemberEmailEdges holds the relations/edges for other nodes in the graph.
func (MemberEmailEdges) EmailOwnerOrErr ¶ added in v1.0.8
func (e MemberEmailEdges) EmailOwnerOrErr() (*Member, error)
EmailOwnerOrErr returns the EmailOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MemberEmailGroupBy ¶ added in v1.0.2
type MemberEmailGroupBy struct {
// contains filtered or unexported fields
}
MemberEmailGroupBy is the group-by builder for MemberEmail entities.
func (*MemberEmailGroupBy) Aggregate ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Aggregate(fns ...AggregateFunc) *MemberEmailGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MemberEmailGroupBy) Bool ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberEmailGroupBy) BoolX ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberEmailGroupBy) Bools ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberEmailGroupBy) BoolsX ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberEmailGroupBy) Float64 ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberEmailGroupBy) Float64X ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberEmailGroupBy) Float64s ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberEmailGroupBy) Float64sX ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberEmailGroupBy) Int ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberEmailGroupBy) IntX ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberEmailGroupBy) Ints ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberEmailGroupBy) IntsX ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberEmailGroupBy) Scan ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*MemberEmailGroupBy) ScanX ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberEmailGroupBy) String ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberEmailGroupBy) StringX ¶ added in v1.0.2
func (megb *MemberEmailGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberEmailMutation ¶ added in v1.0.2
type MemberEmailMutation struct {
// contains filtered or unexported fields
}
MemberEmailMutation represents an operation that mutates the MemberEmail nodes in the graph.
func (*MemberEmailMutation) AddField ¶ added in v1.0.2
func (m *MemberEmailMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberEmailMutation) AddedEdges ¶ added in v1.0.2
func (m *MemberEmailMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MemberEmailMutation) AddedField ¶ added in v1.0.2
func (m *MemberEmailMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MemberEmailMutation) AddedFields ¶ added in v1.0.2
func (m *MemberEmailMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MemberEmailMutation) AddedIDs ¶ added in v1.0.2
func (m *MemberEmailMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MemberEmailMutation) ClearEdge ¶ added in v1.0.2
func (m *MemberEmailMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*MemberEmailMutation) ClearEmailOwner ¶ added in v1.0.8
func (m *MemberEmailMutation) ClearEmailOwner()
ClearEmailOwner clears the "email_owner" edge to the Member entity.
func (*MemberEmailMutation) ClearField ¶ added in v1.0.2
func (m *MemberEmailMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberEmailMutation) ClearVerifyTicket ¶ added in v1.0.6
func (m *MemberEmailMutation) ClearVerifyTicket()
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*MemberEmailMutation) ClearedEdges ¶ added in v1.0.2
func (m *MemberEmailMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MemberEmailMutation) ClearedFields ¶ added in v1.0.2
func (m *MemberEmailMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MemberEmailMutation) Client ¶ added in v1.0.2
func (m MemberEmailMutation) 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 (*MemberEmailMutation) CreateTime ¶ added in v1.0.2
func (m *MemberEmailMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*MemberEmailMutation) EdgeCleared ¶ added in v1.0.2
func (m *MemberEmailMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MemberEmailMutation) Email ¶ added in v1.0.2
func (m *MemberEmailMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*MemberEmailMutation) EmailOwnerCleared ¶ added in v1.0.8
func (m *MemberEmailMutation) EmailOwnerCleared() bool
EmailOwnerCleared reports if the "email_owner" edge to the Member entity was cleared.
func (*MemberEmailMutation) EmailOwnerID ¶ added in v1.0.8
func (m *MemberEmailMutation) EmailOwnerID() (id int, exists bool)
EmailOwnerID returns the "email_owner" edge ID in the mutation.
func (*MemberEmailMutation) EmailOwnerIDs ¶ added in v1.0.8
func (m *MemberEmailMutation) EmailOwnerIDs() (ids []int)
EmailOwnerIDs returns the "email_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EmailOwnerID instead. It exists only for internal usage by the builders.
func (*MemberEmailMutation) Field ¶ added in v1.0.2
func (m *MemberEmailMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MemberEmailMutation) FieldCleared ¶ added in v1.0.2
func (m *MemberEmailMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MemberEmailMutation) Fields ¶ added in v1.0.2
func (m *MemberEmailMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*MemberEmailMutation) ID ¶ added in v1.0.2
func (m *MemberEmailMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*MemberEmailMutation) IsPrimary ¶ added in v1.0.2
func (m *MemberEmailMutation) IsPrimary() (r bool, exists bool)
IsPrimary returns the value of the "is_primary" field in the mutation.
func (*MemberEmailMutation) OldCreateTime ¶ added in v1.0.2
OldCreateTime returns the old "create_time" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) OldEmail ¶ added in v1.0.2
func (m *MemberEmailMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) OldField ¶ added in v1.0.2
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*MemberEmailMutation) OldIsPrimary ¶ added in v1.0.2
func (m *MemberEmailMutation) OldIsPrimary(ctx context.Context) (v bool, err error)
OldIsPrimary returns the old "is_primary" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) OldOwnerID ¶ added in v1.0.4
func (m *MemberEmailMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) OldUpdateTime ¶ added in v1.0.2
OldUpdateTime returns the old "update_time" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) OldVerify ¶ added in v1.0.2
func (m *MemberEmailMutation) OldVerify(ctx context.Context) (v bool, err error)
OldVerify returns the old "verify" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) OldVerifyTicket ¶ added in v1.0.6
func (m *MemberEmailMutation) OldVerifyTicket(ctx context.Context) (v *string, err error)
OldVerifyTicket returns the old "verify_ticket" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) OldVerifyTime ¶ added in v1.0.2
OldVerifyTime returns the old "verify_time" field's value of the MemberEmail entity. If the MemberEmail object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberEmailMutation) Op ¶ added in v1.0.2
func (m *MemberEmailMutation) Op() Op
Op returns the operation name.
func (*MemberEmailMutation) OwnerID ¶ added in v1.0.4
func (m *MemberEmailMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*MemberEmailMutation) RemovedEdges ¶ added in v1.0.2
func (m *MemberEmailMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MemberEmailMutation) RemovedIDs ¶ added in v1.0.2
func (m *MemberEmailMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*MemberEmailMutation) ResetCreateTime ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*MemberEmailMutation) ResetEdge ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*MemberEmailMutation) ResetEmail ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*MemberEmailMutation) ResetEmailOwner ¶ added in v1.0.8
func (m *MemberEmailMutation) ResetEmailOwner()
ResetEmailOwner resets all changes to the "email_owner" edge.
func (*MemberEmailMutation) ResetField ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberEmailMutation) ResetIsPrimary ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetIsPrimary()
ResetIsPrimary resets all changes to the "is_primary" field.
func (*MemberEmailMutation) ResetOwnerID ¶ added in v1.0.4
func (m *MemberEmailMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*MemberEmailMutation) ResetUpdateTime ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*MemberEmailMutation) ResetVerify ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetVerify()
ResetVerify resets all changes to the "verify" field.
func (*MemberEmailMutation) ResetVerifyTicket ¶ added in v1.0.6
func (m *MemberEmailMutation) ResetVerifyTicket()
ResetVerifyTicket resets all changes to the "verify_ticket" field.
func (*MemberEmailMutation) ResetVerifyTime ¶ added in v1.0.2
func (m *MemberEmailMutation) ResetVerifyTime()
ResetVerifyTime resets all changes to the "verify_time" field.
func (*MemberEmailMutation) SetCreateTime ¶ added in v1.0.2
func (m *MemberEmailMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*MemberEmailMutation) SetEmail ¶ added in v1.0.2
func (m *MemberEmailMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*MemberEmailMutation) SetEmailOwnerID ¶ added in v1.0.8
func (m *MemberEmailMutation) SetEmailOwnerID(id int)
SetEmailOwnerID sets the "email_owner" edge to the Member entity by id.
func (*MemberEmailMutation) SetField ¶ added in v1.0.2
func (m *MemberEmailMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberEmailMutation) SetID ¶ added in v1.0.2
func (m *MemberEmailMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of MemberEmail entities.
func (*MemberEmailMutation) SetIsPrimary ¶ added in v1.0.2
func (m *MemberEmailMutation) SetIsPrimary(b bool)
SetIsPrimary sets the "is_primary" field.
func (*MemberEmailMutation) SetOwnerID ¶ added in v1.0.4
func (m *MemberEmailMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*MemberEmailMutation) SetUpdateTime ¶ added in v1.0.2
func (m *MemberEmailMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*MemberEmailMutation) SetVerify ¶ added in v1.0.2
func (m *MemberEmailMutation) SetVerify(b bool)
SetVerify sets the "verify" field.
func (*MemberEmailMutation) SetVerifyTicket ¶ added in v1.0.6
func (m *MemberEmailMutation) SetVerifyTicket(s string)
SetVerifyTicket sets the "verify_ticket" field.
func (*MemberEmailMutation) SetVerifyTime ¶ added in v1.0.2
func (m *MemberEmailMutation) SetVerifyTime(t time.Time)
SetVerifyTime sets the "verify_time" field.
func (MemberEmailMutation) Tx ¶ added in v1.0.2
func (m MemberEmailMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MemberEmailMutation) Type ¶ added in v1.0.2
func (m *MemberEmailMutation) Type() string
Type returns the node type of this mutation (MemberEmail).
func (*MemberEmailMutation) UpdateTime ¶ added in v1.0.2
func (m *MemberEmailMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*MemberEmailMutation) Verify ¶ added in v1.0.2
func (m *MemberEmailMutation) Verify() (r bool, exists bool)
Verify returns the value of the "verify" field in the mutation.
func (*MemberEmailMutation) VerifyTicket ¶ added in v1.0.6
func (m *MemberEmailMutation) VerifyTicket() (r string, exists bool)
VerifyTicket returns the value of the "verify_ticket" field in the mutation.
func (*MemberEmailMutation) VerifyTicketCleared ¶ added in v1.0.6
func (m *MemberEmailMutation) VerifyTicketCleared() bool
VerifyTicketCleared returns if the "verify_ticket" field was cleared in this mutation.
func (*MemberEmailMutation) VerifyTime ¶ added in v1.0.2
func (m *MemberEmailMutation) VerifyTime() (r time.Time, exists bool)
VerifyTime returns the value of the "verify_time" field in the mutation.
type MemberEmailQuery ¶ added in v1.0.2
type MemberEmailQuery struct {
// contains filtered or unexported fields
}
MemberEmailQuery is the builder for querying MemberEmail entities.
func (*MemberEmailQuery) All ¶ added in v1.0.2
func (meq *MemberEmailQuery) All(ctx context.Context) ([]*MemberEmail, error)
All executes the query and returns a list of MemberEmails.
func (*MemberEmailQuery) AllX ¶ added in v1.0.2
func (meq *MemberEmailQuery) AllX(ctx context.Context) []*MemberEmail
AllX is like All, but panics if an error occurs.
func (*MemberEmailQuery) Clone ¶ added in v1.0.2
func (meq *MemberEmailQuery) Clone() *MemberEmailQuery
Clone returns a duplicate of the MemberEmailQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MemberEmailQuery) Count ¶ added in v1.0.2
func (meq *MemberEmailQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MemberEmailQuery) CountX ¶ added in v1.0.2
func (meq *MemberEmailQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MemberEmailQuery) Exist ¶ added in v1.0.2
func (meq *MemberEmailQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MemberEmailQuery) ExistX ¶ added in v1.0.2
func (meq *MemberEmailQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MemberEmailQuery) First ¶ added in v1.0.2
func (meq *MemberEmailQuery) First(ctx context.Context) (*MemberEmail, error)
First returns the first MemberEmail entity from the query. Returns a *NotFoundError when no MemberEmail was found.
func (*MemberEmailQuery) FirstID ¶ added in v1.0.2
func (meq *MemberEmailQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MemberEmail ID from the query. Returns a *NotFoundError when no MemberEmail ID was found.
func (*MemberEmailQuery) FirstIDX ¶ added in v1.0.2
func (meq *MemberEmailQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MemberEmailQuery) FirstX ¶ added in v1.0.2
func (meq *MemberEmailQuery) FirstX(ctx context.Context) *MemberEmail
FirstX is like First, but panics if an error occurs.
func (*MemberEmailQuery) GroupBy ¶ added in v1.0.2
func (meq *MemberEmailQuery) GroupBy(field string, fields ...string) *MemberEmailGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { OwnerID int `json:"owner_id,omitempty"` Count int `json:"count,omitempty"` } client.MemberEmail.Query(). GroupBy(memberemail.FieldOwnerID). Aggregate(model.Count()). Scan(ctx, &v)
func (*MemberEmailQuery) IDs ¶ added in v1.0.2
func (meq *MemberEmailQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MemberEmail IDs.
func (*MemberEmailQuery) IDsX ¶ added in v1.0.2
func (meq *MemberEmailQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MemberEmailQuery) Limit ¶ added in v1.0.2
func (meq *MemberEmailQuery) Limit(limit int) *MemberEmailQuery
Limit adds a limit step to the query.
func (*MemberEmailQuery) Offset ¶ added in v1.0.2
func (meq *MemberEmailQuery) Offset(offset int) *MemberEmailQuery
Offset adds an offset step to the query.
func (*MemberEmailQuery) Only ¶ added in v1.0.2
func (meq *MemberEmailQuery) Only(ctx context.Context) (*MemberEmail, error)
Only returns a single MemberEmail entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one MemberEmail entity is not found. Returns a *NotFoundError when no MemberEmail entities are found.
func (*MemberEmailQuery) OnlyID ¶ added in v1.0.2
func (meq *MemberEmailQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MemberEmail ID in the query. Returns a *NotSingularError when exactly one MemberEmail ID is not found. Returns a *NotFoundError when no entities are found.
func (*MemberEmailQuery) OnlyIDX ¶ added in v1.0.2
func (meq *MemberEmailQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MemberEmailQuery) OnlyX ¶ added in v1.0.2
func (meq *MemberEmailQuery) OnlyX(ctx context.Context) *MemberEmail
OnlyX is like Only, but panics if an error occurs.
func (*MemberEmailQuery) Order ¶ added in v1.0.2
func (meq *MemberEmailQuery) Order(o ...OrderFunc) *MemberEmailQuery
Order adds an order step to the query.
func (*MemberEmailQuery) QueryEmailOwner ¶ added in v1.0.8
func (meq *MemberEmailQuery) QueryEmailOwner() *MemberQuery
QueryEmailOwner chains the current query on the "email_owner" edge.
func (*MemberEmailQuery) Select ¶ added in v1.0.2
func (meq *MemberEmailQuery) Select(field string, fields ...string) *MemberEmailSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { OwnerID int `json:"owner_id,omitempty"` } client.MemberEmail.Query(). Select(memberemail.FieldOwnerID). Scan(ctx, &v)
func (*MemberEmailQuery) Unique ¶ added in v1.0.2
func (meq *MemberEmailQuery) Unique(unique bool) *MemberEmailQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MemberEmailQuery) Where ¶ added in v1.0.2
func (meq *MemberEmailQuery) Where(ps ...predicate.MemberEmail) *MemberEmailQuery
Where adds a new predicate for the MemberEmailQuery builder.
func (*MemberEmailQuery) WithEmailOwner ¶ added in v1.0.8
func (meq *MemberEmailQuery) WithEmailOwner(opts ...func(*MemberQuery)) *MemberEmailQuery
WithEmailOwner tells the query-builder to eager-load the nodes that are connected to the "email_owner" edge. The optional arguments are used to configure the query builder of the edge.
type MemberEmailSelect ¶ added in v1.0.2
type MemberEmailSelect struct { *MemberEmailQuery // contains filtered or unexported fields }
MemberEmailSelect is the builder for selecting fields of MemberEmail entities.
func (*MemberEmailSelect) Bool ¶ added in v1.0.2
func (mes *MemberEmailSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MemberEmailSelect) BoolX ¶ added in v1.0.2
func (mes *MemberEmailSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberEmailSelect) Bools ¶ added in v1.0.2
func (mes *MemberEmailSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MemberEmailSelect) BoolsX ¶ added in v1.0.2
func (mes *MemberEmailSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberEmailSelect) Float64 ¶ added in v1.0.2
func (mes *MemberEmailSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MemberEmailSelect) Float64X ¶ added in v1.0.2
func (mes *MemberEmailSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberEmailSelect) Float64s ¶ added in v1.0.2
func (mes *MemberEmailSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MemberEmailSelect) Float64sX ¶ added in v1.0.2
func (mes *MemberEmailSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberEmailSelect) Int ¶ added in v1.0.2
func (mes *MemberEmailSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MemberEmailSelect) IntX ¶ added in v1.0.2
func (mes *MemberEmailSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberEmailSelect) Ints ¶ added in v1.0.2
func (mes *MemberEmailSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MemberEmailSelect) IntsX ¶ added in v1.0.2
func (mes *MemberEmailSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberEmailSelect) Scan ¶ added in v1.0.2
func (mes *MemberEmailSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*MemberEmailSelect) ScanX ¶ added in v1.0.2
func (mes *MemberEmailSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberEmailSelect) String ¶ added in v1.0.2
func (mes *MemberEmailSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MemberEmailSelect) StringX ¶ added in v1.0.2
func (mes *MemberEmailSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberEmailUpdate ¶ added in v1.0.2
type MemberEmailUpdate struct {
// contains filtered or unexported fields
}
MemberEmailUpdate is the builder for updating MemberEmail entities.
func (*MemberEmailUpdate) ClearEmailOwner ¶ added in v1.0.8
func (meu *MemberEmailUpdate) ClearEmailOwner() *MemberEmailUpdate
ClearEmailOwner clears the "email_owner" edge to the Member entity.
func (*MemberEmailUpdate) ClearVerifyTicket ¶ added in v1.0.6
func (meu *MemberEmailUpdate) ClearVerifyTicket() *MemberEmailUpdate
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*MemberEmailUpdate) Exec ¶ added in v1.0.2
func (meu *MemberEmailUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberEmailUpdate) ExecX ¶ added in v1.0.2
func (meu *MemberEmailUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberEmailUpdate) Mutation ¶ added in v1.0.2
func (meu *MemberEmailUpdate) Mutation() *MemberEmailMutation
Mutation returns the MemberEmailMutation object of the builder.
func (*MemberEmailUpdate) Save ¶ added in v1.0.2
func (meu *MemberEmailUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MemberEmailUpdate) SaveX ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemberEmailUpdate) SetEmail ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SetEmail(s string) *MemberEmailUpdate
SetEmail sets the "email" field.
func (*MemberEmailUpdate) SetEmailOwner ¶ added in v1.0.8
func (meu *MemberEmailUpdate) SetEmailOwner(m *Member) *MemberEmailUpdate
SetEmailOwner sets the "email_owner" edge to the Member entity.
func (*MemberEmailUpdate) SetEmailOwnerID ¶ added in v1.0.8
func (meu *MemberEmailUpdate) SetEmailOwnerID(id int) *MemberEmailUpdate
SetEmailOwnerID sets the "email_owner" edge to the Member entity by ID.
func (*MemberEmailUpdate) SetIsPrimary ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SetIsPrimary(b bool) *MemberEmailUpdate
SetIsPrimary sets the "is_primary" field.
func (*MemberEmailUpdate) SetNillableIsPrimary ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SetNillableIsPrimary(b *bool) *MemberEmailUpdate
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*MemberEmailUpdate) SetNillableVerify ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SetNillableVerify(b *bool) *MemberEmailUpdate
SetNillableVerify sets the "verify" field if the given value is not nil.
func (*MemberEmailUpdate) SetNillableVerifyTicket ¶ added in v1.0.6
func (meu *MemberEmailUpdate) SetNillableVerifyTicket(s *string) *MemberEmailUpdate
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*MemberEmailUpdate) SetUpdateTime ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SetUpdateTime(t time.Time) *MemberEmailUpdate
SetUpdateTime sets the "update_time" field.
func (*MemberEmailUpdate) SetVerify ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SetVerify(b bool) *MemberEmailUpdate
SetVerify sets the "verify" field.
func (*MemberEmailUpdate) SetVerifyTicket ¶ added in v1.0.6
func (meu *MemberEmailUpdate) SetVerifyTicket(s string) *MemberEmailUpdate
SetVerifyTicket sets the "verify_ticket" field.
func (*MemberEmailUpdate) SetVerifyTime ¶ added in v1.0.2
func (meu *MemberEmailUpdate) SetVerifyTime(t time.Time) *MemberEmailUpdate
SetVerifyTime sets the "verify_time" field.
func (*MemberEmailUpdate) Where ¶ added in v1.0.2
func (meu *MemberEmailUpdate) Where(ps ...predicate.MemberEmail) *MemberEmailUpdate
Where adds a new predicate for the MemberEmailUpdate builder.
type MemberEmailUpdateOne ¶ added in v1.0.2
type MemberEmailUpdateOne struct {
// contains filtered or unexported fields
}
MemberEmailUpdateOne is the builder for updating a single MemberEmail entity.
func (*MemberEmailUpdateOne) ClearEmailOwner ¶ added in v1.0.8
func (meuo *MemberEmailUpdateOne) ClearEmailOwner() *MemberEmailUpdateOne
ClearEmailOwner clears the "email_owner" edge to the Member entity.
func (*MemberEmailUpdateOne) ClearVerifyTicket ¶ added in v1.0.6
func (meuo *MemberEmailUpdateOne) ClearVerifyTicket() *MemberEmailUpdateOne
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*MemberEmailUpdateOne) Exec ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MemberEmailUpdateOne) ExecX ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberEmailUpdateOne) Mutation ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) Mutation() *MemberEmailMutation
Mutation returns the MemberEmailMutation object of the builder.
func (*MemberEmailUpdateOne) Save ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) Save(ctx context.Context) (*MemberEmail, error)
Save executes the query and returns the updated MemberEmail entity.
func (*MemberEmailUpdateOne) SaveX ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SaveX(ctx context.Context) *MemberEmail
SaveX is like Save, but panics if an error occurs.
func (*MemberEmailUpdateOne) Select ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) Select(field string, fields ...string) *MemberEmailUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MemberEmailUpdateOne) SetEmail ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SetEmail(s string) *MemberEmailUpdateOne
SetEmail sets the "email" field.
func (*MemberEmailUpdateOne) SetEmailOwner ¶ added in v1.0.8
func (meuo *MemberEmailUpdateOne) SetEmailOwner(m *Member) *MemberEmailUpdateOne
SetEmailOwner sets the "email_owner" edge to the Member entity.
func (*MemberEmailUpdateOne) SetEmailOwnerID ¶ added in v1.0.8
func (meuo *MemberEmailUpdateOne) SetEmailOwnerID(id int) *MemberEmailUpdateOne
SetEmailOwnerID sets the "email_owner" edge to the Member entity by ID.
func (*MemberEmailUpdateOne) SetIsPrimary ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SetIsPrimary(b bool) *MemberEmailUpdateOne
SetIsPrimary sets the "is_primary" field.
func (*MemberEmailUpdateOne) SetNillableIsPrimary ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SetNillableIsPrimary(b *bool) *MemberEmailUpdateOne
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*MemberEmailUpdateOne) SetNillableVerify ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SetNillableVerify(b *bool) *MemberEmailUpdateOne
SetNillableVerify sets the "verify" field if the given value is not nil.
func (*MemberEmailUpdateOne) SetNillableVerifyTicket ¶ added in v1.0.6
func (meuo *MemberEmailUpdateOne) SetNillableVerifyTicket(s *string) *MemberEmailUpdateOne
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*MemberEmailUpdateOne) SetUpdateTime ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SetUpdateTime(t time.Time) *MemberEmailUpdateOne
SetUpdateTime sets the "update_time" field.
func (*MemberEmailUpdateOne) SetVerify ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SetVerify(b bool) *MemberEmailUpdateOne
SetVerify sets the "verify" field.
func (*MemberEmailUpdateOne) SetVerifyTicket ¶ added in v1.0.6
func (meuo *MemberEmailUpdateOne) SetVerifyTicket(s string) *MemberEmailUpdateOne
SetVerifyTicket sets the "verify_ticket" field.
func (*MemberEmailUpdateOne) SetVerifyTime ¶ added in v1.0.2
func (meuo *MemberEmailUpdateOne) SetVerifyTime(t time.Time) *MemberEmailUpdateOne
SetVerifyTime sets the "verify_time" field.
type MemberEmails ¶ added in v1.0.2
type MemberEmails []*MemberEmail
MemberEmails is a parsable slice of MemberEmail.
type MemberGroupBy ¶
type MemberGroupBy struct {
// contains filtered or unexported fields
}
MemberGroupBy is the group-by builder for 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 scans 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 a group-by query. It is only allowed when executing a group-by query 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 MemberMutation ¶
type MemberMutation struct {
// contains filtered or unexported fields
}
MemberMutation represents an operation that mutates the Member nodes in the graph.
func (*MemberMutation) AddField ¶
func (m *MemberMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberMutation) AddMemberEmailIDs ¶ added in v1.0.8
func (m *MemberMutation) AddMemberEmailIDs(ids ...int)
AddMemberEmailIDs adds the "member_emails" edge to the MemberEmail entity by ids.
func (*MemberMutation) AddMemberSettingIDs ¶ added in v1.0.8
func (m *MemberMutation) AddMemberSettingIDs(ids ...int)
AddMemberSettingIDs adds the "member_settings" edge to the MemberSetting entity by ids.
func (*MemberMutation) AddMemberSnippetDocIDs ¶ added in v1.0.9
func (m *MemberMutation) AddMemberSnippetDocIDs(ids ...int)
AddMemberSnippetDocIDs adds the "member_snippet_docs" edge to the SnippetDocument entity by ids.
func (*MemberMutation) AddMemberSnippetFolderIDs ¶ added in v1.0.9
func (m *MemberMutation) AddMemberSnippetFolderIDs(ids ...int)
AddMemberSnippetFolderIDs adds the "member_snippet_folders" edge to the SnippetFolder entity by ids.
func (*MemberMutation) AddMemberSnippetIDs ¶ added in v1.0.9
func (m *MemberMutation) AddMemberSnippetIDs(ids ...int)
AddMemberSnippetIDs adds the "member_snippets" edge to the Snippet entity by ids.
func (*MemberMutation) AddMemberSnippetTagIDs ¶ added in v1.0.9
func (m *MemberMutation) AddMemberSnippetTagIDs(ids ...int)
AddMemberSnippetTagIDs adds the "member_snippet_tags" edge to the SnippetTag entity 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 incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MemberMutation) AddedFields ¶
func (m *MemberMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during 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 in this mutation.
func (*MemberMutation) ClearDeleteTime ¶
func (m *MemberMutation) ClearDeleteTime()
ClearDeleteTime clears the value of the "delete_time" field.
func (*MemberMutation) ClearEdge ¶
func (m *MemberMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*MemberMutation) ClearField ¶
func (m *MemberMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberMutation) ClearGroupID ¶ added in v1.0.2
func (m *MemberMutation) ClearGroupID()
ClearGroupID clears the value of the "group_id" field.
func (*MemberMutation) ClearGroups ¶ added in v1.0.9
func (m *MemberMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Group entity.
func (*MemberMutation) ClearLastPwdAuth ¶
func (m *MemberMutation) ClearLastPwdAuth()
ClearLastPwdAuth clears the value of the "last_pwd_auth" field.
func (*MemberMutation) ClearMemberEmails ¶ added in v1.0.8
func (m *MemberMutation) ClearMemberEmails()
ClearMemberEmails clears the "member_emails" edge to the MemberEmail entity.
func (*MemberMutation) ClearMemberSettings ¶ added in v1.0.8
func (m *MemberMutation) ClearMemberSettings()
ClearMemberSettings clears the "member_settings" edge to the MemberSetting entity.
func (*MemberMutation) ClearMemberSnippetDocs ¶ added in v1.0.9
func (m *MemberMutation) ClearMemberSnippetDocs()
ClearMemberSnippetDocs clears the "member_snippet_docs" edge to the SnippetDocument entity.
func (*MemberMutation) ClearMemberSnippetFolders ¶ added in v1.0.9
func (m *MemberMutation) ClearMemberSnippetFolders()
ClearMemberSnippetFolders clears the "member_snippet_folders" edge to the SnippetFolder entity.
func (*MemberMutation) ClearMemberSnippetTags ¶ added in v1.0.9
func (m *MemberMutation) ClearMemberSnippetTags()
ClearMemberSnippetTags clears the "member_snippet_tags" edge to the SnippetTag entity.
func (*MemberMutation) ClearMemberSnippets ¶ added in v1.0.9
func (m *MemberMutation) ClearMemberSnippets()
ClearMemberSnippets clears the "member_snippets" edge to the Snippet entity.
func (*MemberMutation) ClearPassword ¶ added in v1.0.4
func (m *MemberMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*MemberMutation) ClearPhone ¶
func (m *MemberMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*MemberMutation) ClearStatus ¶
func (m *MemberMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
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) CreateTime ¶
func (m *MemberMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*MemberMutation) DeleteTime ¶
func (m *MemberMutation) DeleteTime() (r time.Time, exists bool)
DeleteTime returns the value of the "delete_time" field in the mutation.
func (*MemberMutation) DeleteTimeCleared ¶
func (m *MemberMutation) DeleteTimeCleared() bool
DeleteTimeCleared returns if the "delete_time" field was cleared in this mutation.
func (*MemberMutation) EdgeCleared ¶
func (m *MemberMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this 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 return value indicates that this field was not set, or was not defined in the schema.
func (*MemberMutation) FieldCleared ¶
func (m *MemberMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name 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 incremented/decremented, call AddedFields().
func (*MemberMutation) GroupID ¶ added in v1.0.2
func (m *MemberMutation) GroupID() (r int, exists bool)
GroupID returns the value of the "group_id" field in the mutation.
func (*MemberMutation) GroupIDCleared ¶ added in v1.0.2
func (m *MemberMutation) GroupIDCleared() bool
GroupIDCleared returns if the "group_id" field was cleared in this mutation.
func (*MemberMutation) GroupsCleared ¶ added in v1.0.9
func (m *MemberMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Group entity was cleared.
func (*MemberMutation) GroupsID ¶ added in v1.0.9
func (m *MemberMutation) GroupsID() (id int, exists bool)
GroupsID returns the "groups" edge ID in the mutation.
func (*MemberMutation) GroupsIDs ¶ added in v1.0.9
func (m *MemberMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupsID instead. It exists only for internal usage by the builders.
func (*MemberMutation) ID ¶
func (m *MemberMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*MemberMutation) LastPwdAuth ¶
func (m *MemberMutation) LastPwdAuth() (r time.Time, exists bool)
LastPwdAuth returns the value of the "last_pwd_auth" field in the mutation.
func (*MemberMutation) LastPwdAuthCleared ¶
func (m *MemberMutation) LastPwdAuthCleared() bool
LastPwdAuthCleared returns if the "last_pwd_auth" field was cleared in this mutation.
func (*MemberMutation) MemberEmailsCleared ¶ added in v1.0.8
func (m *MemberMutation) MemberEmailsCleared() bool
MemberEmailsCleared reports if the "member_emails" edge to the MemberEmail entity was cleared.
func (*MemberMutation) MemberEmailsIDs ¶ added in v1.0.8
func (m *MemberMutation) MemberEmailsIDs() (ids []int)
MemberEmailsIDs returns the "member_emails" edge IDs in the mutation.
func (*MemberMutation) MemberSettingsCleared ¶ added in v1.0.8
func (m *MemberMutation) MemberSettingsCleared() bool
MemberSettingsCleared reports if the "member_settings" edge to the MemberSetting entity was cleared.
func (*MemberMutation) MemberSettingsIDs ¶ added in v1.0.8
func (m *MemberMutation) MemberSettingsIDs() (ids []int)
MemberSettingsIDs returns the "member_settings" edge IDs in the mutation.
func (*MemberMutation) MemberSnippetDocsCleared ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetDocsCleared() bool
MemberSnippetDocsCleared reports if the "member_snippet_docs" edge to the SnippetDocument entity was cleared.
func (*MemberMutation) MemberSnippetDocsIDs ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetDocsIDs() (ids []int)
MemberSnippetDocsIDs returns the "member_snippet_docs" edge IDs in the mutation.
func (*MemberMutation) MemberSnippetFoldersCleared ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetFoldersCleared() bool
MemberSnippetFoldersCleared reports if the "member_snippet_folders" edge to the SnippetFolder entity was cleared.
func (*MemberMutation) MemberSnippetFoldersIDs ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetFoldersIDs() (ids []int)
MemberSnippetFoldersIDs returns the "member_snippet_folders" edge IDs in the mutation.
func (*MemberMutation) MemberSnippetTagsCleared ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetTagsCleared() bool
MemberSnippetTagsCleared reports if the "member_snippet_tags" edge to the SnippetTag entity was cleared.
func (*MemberMutation) MemberSnippetTagsIDs ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetTagsIDs() (ids []int)
MemberSnippetTagsIDs returns the "member_snippet_tags" edge IDs in the mutation.
func (*MemberMutation) MemberSnippetsCleared ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetsCleared() bool
MemberSnippetsCleared reports if the "member_snippets" edge to the Snippet entity was cleared.
func (*MemberMutation) MemberSnippetsIDs ¶ added in v1.0.9
func (m *MemberMutation) MemberSnippetsIDs() (ids []int)
MemberSnippetsIDs returns the "member_snippets" edge IDs in the mutation.
func (*MemberMutation) Nickname ¶
func (m *MemberMutation) Nickname() (r string, exists bool)
Nickname returns the value of the "nickname" field in the mutation.
func (*MemberMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldDeleteTime ¶
OldDeleteTime returns the old "delete_time" field's value of the Member entity. 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 the 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 failed.
func (*MemberMutation) OldGroupID ¶ added in v1.0.2
func (m *MemberMutation) OldGroupID(ctx context.Context) (v *int, err error)
OldGroupID returns the old "group_id" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldLastPwdAuth ¶
OldLastPwdAuth returns the old "last_pwd_auth" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldNickname ¶
func (m *MemberMutation) OldNickname(ctx context.Context) (v string, err error)
OldNickname returns the old "nickname" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldPassword ¶
func (m *MemberMutation) OldPassword(ctx context.Context) (v *string, err error)
OldPassword returns the old "password" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldPhone ¶
func (m *MemberMutation) OldPhone(ctx context.Context) (v *string, err error)
OldPhone returns the old "phone" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldSignature ¶
func (m *MemberMutation) OldSignature(ctx context.Context) (v string, err error)
OldSignature returns the old "signature" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldSn ¶ added in v1.0.2
func (m *MemberMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Member entity. 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 the database query fails.
func (*MemberMutation) Password ¶
func (m *MemberMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*MemberMutation) PasswordCleared ¶ added in v1.0.4
func (m *MemberMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*MemberMutation) Phone ¶
func (m *MemberMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*MemberMutation) PhoneCleared ¶
func (m *MemberMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*MemberMutation) RemoveMemberEmailIDs ¶ added in v1.0.8
func (m *MemberMutation) RemoveMemberEmailIDs(ids ...int)
RemoveMemberEmailIDs removes the "member_emails" edge to the MemberEmail entity by IDs.
func (*MemberMutation) RemoveMemberSettingIDs ¶ added in v1.0.8
func (m *MemberMutation) RemoveMemberSettingIDs(ids ...int)
RemoveMemberSettingIDs removes the "member_settings" edge to the MemberSetting entity by IDs.
func (*MemberMutation) RemoveMemberSnippetDocIDs ¶ added in v1.0.9
func (m *MemberMutation) RemoveMemberSnippetDocIDs(ids ...int)
RemoveMemberSnippetDocIDs removes the "member_snippet_docs" edge to the SnippetDocument entity by IDs.
func (*MemberMutation) RemoveMemberSnippetFolderIDs ¶ added in v1.0.9
func (m *MemberMutation) RemoveMemberSnippetFolderIDs(ids ...int)
RemoveMemberSnippetFolderIDs removes the "member_snippet_folders" edge to the SnippetFolder entity by IDs.
func (*MemberMutation) RemoveMemberSnippetIDs ¶ added in v1.0.9
func (m *MemberMutation) RemoveMemberSnippetIDs(ids ...int)
RemoveMemberSnippetIDs removes the "member_snippets" edge to the Snippet entity by IDs.
func (*MemberMutation) RemoveMemberSnippetTagIDs ¶ added in v1.0.9
func (m *MemberMutation) RemoveMemberSnippetTagIDs(ids ...int)
RemoveMemberSnippetTagIDs removes the "member_snippet_tags" edge to the SnippetTag entity 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 edge with the given name in this mutation.
func (*MemberMutation) RemovedMemberEmailsIDs ¶ added in v1.0.8
func (m *MemberMutation) RemovedMemberEmailsIDs() (ids []int)
RemovedMemberEmails returns the removed IDs of the "member_emails" edge to the MemberEmail entity.
func (*MemberMutation) RemovedMemberSettingsIDs ¶ added in v1.0.8
func (m *MemberMutation) RemovedMemberSettingsIDs() (ids []int)
RemovedMemberSettings returns the removed IDs of the "member_settings" edge to the MemberSetting entity.
func (*MemberMutation) RemovedMemberSnippetDocsIDs ¶ added in v1.0.9
func (m *MemberMutation) RemovedMemberSnippetDocsIDs() (ids []int)
RemovedMemberSnippetDocs returns the removed IDs of the "member_snippet_docs" edge to the SnippetDocument entity.
func (*MemberMutation) RemovedMemberSnippetFoldersIDs ¶ added in v1.0.9
func (m *MemberMutation) RemovedMemberSnippetFoldersIDs() (ids []int)
RemovedMemberSnippetFolders returns the removed IDs of the "member_snippet_folders" edge to the SnippetFolder entity.
func (*MemberMutation) RemovedMemberSnippetTagsIDs ¶ added in v1.0.9
func (m *MemberMutation) RemovedMemberSnippetTagsIDs() (ids []int)
RemovedMemberSnippetTags returns the removed IDs of the "member_snippet_tags" edge to the SnippetTag entity.
func (*MemberMutation) RemovedMemberSnippetsIDs ¶ added in v1.0.9
func (m *MemberMutation) RemovedMemberSnippetsIDs() (ids []int)
RemovedMemberSnippets returns the removed IDs of the "member_snippets" edge to the Snippet entity.
func (*MemberMutation) ResetCreateTime ¶
func (m *MemberMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*MemberMutation) ResetDeleteTime ¶
func (m *MemberMutation) ResetDeleteTime()
ResetDeleteTime resets all changes to the "delete_time" field.
func (*MemberMutation) ResetEdge ¶
func (m *MemberMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*MemberMutation) ResetField ¶
func (m *MemberMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberMutation) ResetGroupID ¶ added in v1.0.2
func (m *MemberMutation) ResetGroupID()
ResetGroupID resets all changes to the "group_id" field.
func (*MemberMutation) ResetGroups ¶ added in v1.0.9
func (m *MemberMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*MemberMutation) ResetLastPwdAuth ¶
func (m *MemberMutation) ResetLastPwdAuth()
ResetLastPwdAuth resets all changes to the "last_pwd_auth" field.
func (*MemberMutation) ResetMemberEmails ¶ added in v1.0.8
func (m *MemberMutation) ResetMemberEmails()
ResetMemberEmails resets all changes to the "member_emails" edge.
func (*MemberMutation) ResetMemberSettings ¶ added in v1.0.8
func (m *MemberMutation) ResetMemberSettings()
ResetMemberSettings resets all changes to the "member_settings" edge.
func (*MemberMutation) ResetMemberSnippetDocs ¶ added in v1.0.9
func (m *MemberMutation) ResetMemberSnippetDocs()
ResetMemberSnippetDocs resets all changes to the "member_snippet_docs" edge.
func (*MemberMutation) ResetMemberSnippetFolders ¶ added in v1.0.9
func (m *MemberMutation) ResetMemberSnippetFolders()
ResetMemberSnippetFolders resets all changes to the "member_snippet_folders" edge.
func (*MemberMutation) ResetMemberSnippetTags ¶ added in v1.0.9
func (m *MemberMutation) ResetMemberSnippetTags()
ResetMemberSnippetTags resets all changes to the "member_snippet_tags" edge.
func (*MemberMutation) ResetMemberSnippets ¶ added in v1.0.9
func (m *MemberMutation) ResetMemberSnippets()
ResetMemberSnippets resets all changes to the "member_snippets" edge.
func (*MemberMutation) ResetNickname ¶
func (m *MemberMutation) ResetNickname()
ResetNickname resets all changes to the "nickname" field.
func (*MemberMutation) ResetPassword ¶
func (m *MemberMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*MemberMutation) ResetPhone ¶
func (m *MemberMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*MemberMutation) ResetSignature ¶
func (m *MemberMutation) ResetSignature()
ResetSignature resets all changes to the "signature" field.
func (*MemberMutation) ResetSn ¶ added in v1.0.2
func (m *MemberMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*MemberMutation) ResetStatus ¶
func (m *MemberMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*MemberMutation) ResetUpdateTime ¶
func (m *MemberMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*MemberMutation) SetCreateTime ¶
func (m *MemberMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*MemberMutation) SetDeleteTime ¶
func (m *MemberMutation) SetDeleteTime(t time.Time)
SetDeleteTime sets the "delete_time" field.
func (*MemberMutation) SetField ¶
func (m *MemberMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberMutation) SetGroupID ¶ added in v1.0.2
func (m *MemberMutation) SetGroupID(i int)
SetGroupID sets the "group_id" field.
func (*MemberMutation) SetGroupsID ¶ added in v1.0.9
func (m *MemberMutation) SetGroupsID(id int)
SetGroupsID sets the "groups" edge to the Group entity by id.
func (*MemberMutation) SetID ¶
func (m *MemberMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Member entities.
func (*MemberMutation) SetLastPwdAuth ¶
func (m *MemberMutation) SetLastPwdAuth(t time.Time)
SetLastPwdAuth sets the "last_pwd_auth" field.
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) SetPhone ¶
func (m *MemberMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*MemberMutation) SetSignature ¶
func (m *MemberMutation) SetSignature(s string)
SetSignature sets the "signature" field.
func (*MemberMutation) SetSn ¶ added in v1.0.2
func (m *MemberMutation) SetSn(s string)
SetSn sets the "sn" field.
func (*MemberMutation) SetStatus ¶
func (m *MemberMutation) SetStatus(value member.Status)
SetStatus sets the "status" field.
func (*MemberMutation) SetUpdateTime ¶
func (m *MemberMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*MemberMutation) Signature ¶
func (m *MemberMutation) Signature() (r string, exists bool)
Signature returns the value of the "signature" field in the mutation.
func (*MemberMutation) Sn ¶ added in v1.0.2
func (m *MemberMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" field in the mutation.
func (*MemberMutation) Status ¶
func (m *MemberMutation) Status() (r member.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*MemberMutation) StatusCleared ¶
func (m *MemberMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this 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).
func (*MemberMutation) UpdateTime ¶
func (m *MemberMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
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 MemberQuery 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 from the query. Returns a *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 from the query. Returns a *NotFoundError when no Member ID was found.
func (*MemberQuery) FirstIDX ¶
func (mq *MemberQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MemberQuery) FirstX ¶
func (mq *MemberQuery) FirstX(ctx context.Context) *Member
FirstX is like First, but panics if an error occurs.
func (*MemberQuery) GroupBy ¶
func (mq *MemberQuery) GroupBy(field string, fields ...string) *MemberGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Sn string `json:"sn,omitempty"` Count int `json:"count,omitempty"` } client.Member.Query(). GroupBy(member.FieldSn). Aggregate(model.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 a single Member entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Member entity is not found. Returns a *NotFoundError when no Member entities are found.
func (*MemberQuery) OnlyID ¶
func (mq *MemberQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Member ID in the query. Returns a *NotSingularError when exactly one Member ID is not found. Returns a *NotFoundError when no entities are found.
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) QueryGroups ¶ added in v1.0.9
func (mq *MemberQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*MemberQuery) QueryMemberEmails ¶ added in v1.0.8
func (mq *MemberQuery) QueryMemberEmails() *MemberEmailQuery
QueryMemberEmails chains the current query on the "member_emails" edge.
func (*MemberQuery) QueryMemberSettings ¶ added in v1.0.8
func (mq *MemberQuery) QueryMemberSettings() *MemberSettingQuery
QueryMemberSettings chains the current query on the "member_settings" edge.
func (*MemberQuery) QueryMemberSnippetDocs ¶ added in v1.0.9
func (mq *MemberQuery) QueryMemberSnippetDocs() *SnippetDocumentQuery
QueryMemberSnippetDocs chains the current query on the "member_snippet_docs" edge.
func (*MemberQuery) QueryMemberSnippetFolders ¶ added in v1.0.9
func (mq *MemberQuery) QueryMemberSnippetFolders() *SnippetFolderQuery
QueryMemberSnippetFolders chains the current query on the "member_snippet_folders" edge.
func (*MemberQuery) QueryMemberSnippetTags ¶ added in v1.0.9
func (mq *MemberQuery) QueryMemberSnippetTags() *SnippetTagQuery
QueryMemberSnippetTags chains the current query on the "member_snippet_tags" edge.
func (*MemberQuery) QueryMemberSnippets ¶ added in v1.0.9
func (mq *MemberQuery) QueryMemberSnippets() *SnippetQuery
QueryMemberSnippets chains the current query on the "member_snippets" edge.
func (*MemberQuery) Select ¶
func (mq *MemberQuery) Select(field string, fields ...string) *MemberSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Sn string `json:"sn,omitempty"` } client.Member.Query(). Select(member.FieldSn). Scan(ctx, &v)
func (*MemberQuery) Unique ¶
func (mq *MemberQuery) Unique(unique bool) *MemberQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MemberQuery) Where ¶
func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery
Where adds a new predicate for the MemberQuery builder.
func (*MemberQuery) WithGroups ¶ added in v1.0.9
func (mq *MemberQuery) WithGroups(opts ...func(*GroupQuery)) *MemberQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemberQuery) WithMemberEmails ¶ added in v1.0.8
func (mq *MemberQuery) WithMemberEmails(opts ...func(*MemberEmailQuery)) *MemberQuery
WithMemberEmails tells the query-builder to eager-load the nodes that are connected to the "member_emails" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemberQuery) WithMemberSettings ¶ added in v1.0.8
func (mq *MemberQuery) WithMemberSettings(opts ...func(*MemberSettingQuery)) *MemberQuery
WithMemberSettings tells the query-builder to eager-load the nodes that are connected to the "member_settings" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemberQuery) WithMemberSnippetDocs ¶ added in v1.0.9
func (mq *MemberQuery) WithMemberSnippetDocs(opts ...func(*SnippetDocumentQuery)) *MemberQuery
WithMemberSnippetDocs tells the query-builder to eager-load the nodes that are connected to the "member_snippet_docs" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemberQuery) WithMemberSnippetFolders ¶ added in v1.0.9
func (mq *MemberQuery) WithMemberSnippetFolders(opts ...func(*SnippetFolderQuery)) *MemberQuery
WithMemberSnippetFolders tells the query-builder to eager-load the nodes that are connected to the "member_snippet_folders" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemberQuery) WithMemberSnippetTags ¶ added in v1.0.9
func (mq *MemberQuery) WithMemberSnippetTags(opts ...func(*SnippetTagQuery)) *MemberQuery
WithMemberSnippetTags tells the query-builder to eager-load the nodes that are connected to the "member_snippet_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemberQuery) WithMemberSnippets ¶ added in v1.0.9
func (mq *MemberQuery) WithMemberSnippets(opts ...func(*SnippetQuery)) *MemberQuery
WithMemberSnippets tells the query-builder to eager-load the nodes that are connected to the "member_snippets" edge. The optional arguments are used to configure the query builder of the edge.
type MemberSecurityLog ¶
type MemberSecurityLog struct { // ID of the ent. ID int `json:"id,omitempty"` // MemberID holds the value of the "member_id" field. MemberID int `json:"member_id,omitempty"` // Action holds the value of the "action" field. Action membersecuritylog.Action `json:"action,omitempty"` // IP holds the value of the "ip" field. IP *string `json:"ip,omitempty"` // RequestID holds the value of the "request_id" field. RequestID *string `json:"request_id,omitempty"` // ServerVersion holds the value of the "server_version" field. ServerVersion *string `json:"server_version,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Remark holds the value of the "remark" field. Remark *string `json:"remark,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // contains filtered or unexported fields }
MemberSecurityLog is the model entity for the MemberSecurityLog schema.
func (*MemberSecurityLog) String ¶
func (msl *MemberSecurityLog) String() string
String implements the fmt.Stringer.
func (*MemberSecurityLog) Unwrap ¶
func (msl *MemberSecurityLog) Unwrap() *MemberSecurityLog
Unwrap unwraps the MemberSecurityLog entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*MemberSecurityLog) Update ¶
func (msl *MemberSecurityLog) Update() *MemberSecurityLogUpdateOne
Update returns a builder for updating this MemberSecurityLog. Note that you need to call MemberSecurityLog.Unwrap() before calling this method if this MemberSecurityLog was returned from a transaction, and the transaction was committed or rolled back.
type MemberSecurityLogClient ¶
type MemberSecurityLogClient struct {
// contains filtered or unexported fields
}
MemberSecurityLogClient is a client for the MemberSecurityLog schema.
func NewMemberSecurityLogClient ¶
func NewMemberSecurityLogClient(c config) *MemberSecurityLogClient
NewMemberSecurityLogClient returns a client for the MemberSecurityLog from the given config.
func (*MemberSecurityLogClient) Create ¶
func (c *MemberSecurityLogClient) Create() *MemberSecurityLogCreate
Create returns a create builder for MemberSecurityLog.
func (*MemberSecurityLogClient) CreateBulk ¶
func (c *MemberSecurityLogClient) CreateBulk(builders ...*MemberSecurityLogCreate) *MemberSecurityLogCreateBulk
CreateBulk returns a builder for creating a bulk of MemberSecurityLog entities.
func (*MemberSecurityLogClient) Delete ¶
func (c *MemberSecurityLogClient) Delete() *MemberSecurityLogDelete
Delete returns a delete builder for MemberSecurityLog.
func (*MemberSecurityLogClient) DeleteOne ¶
func (c *MemberSecurityLogClient) DeleteOne(msl *MemberSecurityLog) *MemberSecurityLogDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MemberSecurityLogClient) DeleteOneID ¶
func (c *MemberSecurityLogClient) DeleteOneID(id int) *MemberSecurityLogDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MemberSecurityLogClient) Get ¶
func (c *MemberSecurityLogClient) Get(ctx context.Context, id int) (*MemberSecurityLog, error)
Get returns a MemberSecurityLog entity by its id.
func (*MemberSecurityLogClient) GetX ¶
func (c *MemberSecurityLogClient) GetX(ctx context.Context, id int) *MemberSecurityLog
GetX is like Get, but panics if an error occurs.
func (*MemberSecurityLogClient) Hooks ¶
func (c *MemberSecurityLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MemberSecurityLogClient) Query ¶
func (c *MemberSecurityLogClient) Query() *MemberSecurityLogQuery
Query returns a query builder for MemberSecurityLog.
func (*MemberSecurityLogClient) Update ¶
func (c *MemberSecurityLogClient) Update() *MemberSecurityLogUpdate
Update returns an update builder for MemberSecurityLog.
func (*MemberSecurityLogClient) UpdateOne ¶
func (c *MemberSecurityLogClient) UpdateOne(msl *MemberSecurityLog) *MemberSecurityLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MemberSecurityLogClient) UpdateOneID ¶
func (c *MemberSecurityLogClient) UpdateOneID(id int) *MemberSecurityLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MemberSecurityLogClient) Use ¶
func (c *MemberSecurityLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `membersecuritylog.Hooks(f(g(h())))`.
type MemberSecurityLogCreate ¶
type MemberSecurityLogCreate struct {
// contains filtered or unexported fields
}
MemberSecurityLogCreate is the builder for creating a MemberSecurityLog entity.
func (*MemberSecurityLogCreate) Mutation ¶
func (mslc *MemberSecurityLogCreate) Mutation() *MemberSecurityLogMutation
Mutation returns the MemberSecurityLogMutation object of the builder.
func (*MemberSecurityLogCreate) Save ¶
func (mslc *MemberSecurityLogCreate) Save(ctx context.Context) (*MemberSecurityLog, error)
Save creates the MemberSecurityLog in the database.
func (*MemberSecurityLogCreate) SaveX ¶
func (mslc *MemberSecurityLogCreate) SaveX(ctx context.Context) *MemberSecurityLog
SaveX calls Save and panics if Save returns an error.
func (*MemberSecurityLogCreate) SetAction ¶
func (mslc *MemberSecurityLogCreate) SetAction(m membersecuritylog.Action) *MemberSecurityLogCreate
SetAction sets the "action" field.
func (*MemberSecurityLogCreate) SetCreateTime ¶
func (mslc *MemberSecurityLogCreate) SetCreateTime(t time.Time) *MemberSecurityLogCreate
SetCreateTime sets the "create_time" field.
func (*MemberSecurityLogCreate) SetDescription ¶
func (mslc *MemberSecurityLogCreate) SetDescription(s string) *MemberSecurityLogCreate
SetDescription sets the "description" field.
func (*MemberSecurityLogCreate) SetID ¶
func (mslc *MemberSecurityLogCreate) SetID(i int) *MemberSecurityLogCreate
SetID sets the "id" field.
func (*MemberSecurityLogCreate) SetIP ¶
func (mslc *MemberSecurityLogCreate) SetIP(s string) *MemberSecurityLogCreate
SetIP sets the "ip" field.
func (*MemberSecurityLogCreate) SetMemberID ¶ added in v1.0.4
func (mslc *MemberSecurityLogCreate) SetMemberID(i int) *MemberSecurityLogCreate
SetMemberID sets the "member_id" field.
func (*MemberSecurityLogCreate) SetNillableAction ¶
func (mslc *MemberSecurityLogCreate) SetNillableAction(m *membersecuritylog.Action) *MemberSecurityLogCreate
SetNillableAction sets the "action" field if the given value is not nil.
func (*MemberSecurityLogCreate) SetNillableCreateTime ¶
func (mslc *MemberSecurityLogCreate) SetNillableCreateTime(t *time.Time) *MemberSecurityLogCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*MemberSecurityLogCreate) SetNillableDescription ¶
func (mslc *MemberSecurityLogCreate) SetNillableDescription(s *string) *MemberSecurityLogCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MemberSecurityLogCreate) SetNillableIP ¶
func (mslc *MemberSecurityLogCreate) SetNillableIP(s *string) *MemberSecurityLogCreate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*MemberSecurityLogCreate) SetNillableRemark ¶
func (mslc *MemberSecurityLogCreate) SetNillableRemark(s *string) *MemberSecurityLogCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MemberSecurityLogCreate) SetNillableRequestID ¶
func (mslc *MemberSecurityLogCreate) SetNillableRequestID(s *string) *MemberSecurityLogCreate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*MemberSecurityLogCreate) SetNillableServerVersion ¶
func (mslc *MemberSecurityLogCreate) SetNillableServerVersion(s *string) *MemberSecurityLogCreate
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*MemberSecurityLogCreate) SetRemark ¶
func (mslc *MemberSecurityLogCreate) SetRemark(s string) *MemberSecurityLogCreate
SetRemark sets the "remark" field.
func (*MemberSecurityLogCreate) SetRequestID ¶
func (mslc *MemberSecurityLogCreate) SetRequestID(s string) *MemberSecurityLogCreate
SetRequestID sets the "request_id" field.
func (*MemberSecurityLogCreate) SetServerVersion ¶
func (mslc *MemberSecurityLogCreate) SetServerVersion(s string) *MemberSecurityLogCreate
SetServerVersion sets the "server_version" field.
type MemberSecurityLogCreateBulk ¶
type MemberSecurityLogCreateBulk struct {
// contains filtered or unexported fields
}
MemberSecurityLogCreateBulk is the builder for creating many MemberSecurityLog entities in bulk.
func (*MemberSecurityLogCreateBulk) Save ¶
func (mslcb *MemberSecurityLogCreateBulk) Save(ctx context.Context) ([]*MemberSecurityLog, error)
Save creates the MemberSecurityLog entities in the database.
func (*MemberSecurityLogCreateBulk) SaveX ¶
func (mslcb *MemberSecurityLogCreateBulk) SaveX(ctx context.Context) []*MemberSecurityLog
SaveX is like Save, but panics if an error occurs.
type MemberSecurityLogDelete ¶
type MemberSecurityLogDelete struct {
// contains filtered or unexported fields
}
MemberSecurityLogDelete is the builder for deleting a MemberSecurityLog entity.
func (*MemberSecurityLogDelete) Exec ¶
func (msld *MemberSecurityLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MemberSecurityLogDelete) ExecX ¶
func (msld *MemberSecurityLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MemberSecurityLogDelete) Where ¶
func (msld *MemberSecurityLogDelete) Where(ps ...predicate.MemberSecurityLog) *MemberSecurityLogDelete
Where adds a new predicate to the MemberSecurityLogDelete builder.
type MemberSecurityLogDeleteOne ¶
type MemberSecurityLogDeleteOne struct {
// contains filtered or unexported fields
}
MemberSecurityLogDeleteOne is the builder for deleting a single MemberSecurityLog entity.
func (*MemberSecurityLogDeleteOne) Exec ¶
func (msldo *MemberSecurityLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MemberSecurityLogDeleteOne) ExecX ¶
func (msldo *MemberSecurityLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MemberSecurityLogGroupBy ¶
type MemberSecurityLogGroupBy struct {
// contains filtered or unexported fields
}
MemberSecurityLogGroupBy is the group-by builder for MemberSecurityLog entities.
func (*MemberSecurityLogGroupBy) Aggregate ¶
func (mslgb *MemberSecurityLogGroupBy) Aggregate(fns ...AggregateFunc) *MemberSecurityLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MemberSecurityLogGroupBy) Bool ¶
func (mslgb *MemberSecurityLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSecurityLogGroupBy) BoolX ¶
func (mslgb *MemberSecurityLogGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberSecurityLogGroupBy) Bools ¶
func (mslgb *MemberSecurityLogGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberSecurityLogGroupBy) BoolsX ¶
func (mslgb *MemberSecurityLogGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberSecurityLogGroupBy) Float64 ¶
func (mslgb *MemberSecurityLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSecurityLogGroupBy) Float64X ¶
func (mslgb *MemberSecurityLogGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberSecurityLogGroupBy) Float64s ¶
func (mslgb *MemberSecurityLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberSecurityLogGroupBy) Float64sX ¶
func (mslgb *MemberSecurityLogGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberSecurityLogGroupBy) Int ¶
func (mslgb *MemberSecurityLogGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSecurityLogGroupBy) IntX ¶
func (mslgb *MemberSecurityLogGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberSecurityLogGroupBy) Ints ¶
func (mslgb *MemberSecurityLogGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberSecurityLogGroupBy) IntsX ¶
func (mslgb *MemberSecurityLogGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberSecurityLogGroupBy) Scan ¶
func (mslgb *MemberSecurityLogGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*MemberSecurityLogGroupBy) ScanX ¶
func (mslgb *MemberSecurityLogGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberSecurityLogGroupBy) String ¶
func (mslgb *MemberSecurityLogGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSecurityLogGroupBy) StringX ¶
func (mslgb *MemberSecurityLogGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberSecurityLogMutation ¶
type MemberSecurityLogMutation struct {
// contains filtered or unexported fields
}
MemberSecurityLogMutation represents an operation that mutates the MemberSecurityLog nodes in the graph.
func (*MemberSecurityLogMutation) Action ¶
func (m *MemberSecurityLogMutation) Action() (r membersecuritylog.Action, exists bool)
Action returns the value of the "action" field in the mutation.
func (*MemberSecurityLogMutation) AddField ¶
func (m *MemberSecurityLogMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberSecurityLogMutation) AddMemberID ¶ added in v1.0.4
func (m *MemberSecurityLogMutation) AddMemberID(i int)
AddMemberID adds i to the "member_id" field.
func (*MemberSecurityLogMutation) AddedEdges ¶
func (m *MemberSecurityLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MemberSecurityLogMutation) AddedField ¶
func (m *MemberSecurityLogMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MemberSecurityLogMutation) AddedFields ¶
func (m *MemberSecurityLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MemberSecurityLogMutation) AddedIDs ¶
func (m *MemberSecurityLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MemberSecurityLogMutation) AddedMemberID ¶ added in v1.0.4
func (m *MemberSecurityLogMutation) AddedMemberID() (r int, exists bool)
AddedMemberID returns the value that was added to the "member_id" field in this mutation.
func (*MemberSecurityLogMutation) ClearDescription ¶
func (m *MemberSecurityLogMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*MemberSecurityLogMutation) ClearEdge ¶
func (m *MemberSecurityLogMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*MemberSecurityLogMutation) ClearField ¶
func (m *MemberSecurityLogMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberSecurityLogMutation) ClearIP ¶
func (m *MemberSecurityLogMutation) ClearIP()
ClearIP clears the value of the "ip" field.
func (*MemberSecurityLogMutation) ClearRemark ¶
func (m *MemberSecurityLogMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*MemberSecurityLogMutation) ClearRequestID ¶
func (m *MemberSecurityLogMutation) ClearRequestID()
ClearRequestID clears the value of the "request_id" field.
func (*MemberSecurityLogMutation) ClearServerVersion ¶
func (m *MemberSecurityLogMutation) ClearServerVersion()
ClearServerVersion clears the value of the "server_version" field.
func (*MemberSecurityLogMutation) ClearedEdges ¶
func (m *MemberSecurityLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MemberSecurityLogMutation) ClearedFields ¶
func (m *MemberSecurityLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MemberSecurityLogMutation) Client ¶
func (m MemberSecurityLogMutation) 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 (*MemberSecurityLogMutation) CreateTime ¶
func (m *MemberSecurityLogMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*MemberSecurityLogMutation) Description ¶
func (m *MemberSecurityLogMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*MemberSecurityLogMutation) DescriptionCleared ¶
func (m *MemberSecurityLogMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*MemberSecurityLogMutation) EdgeCleared ¶
func (m *MemberSecurityLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MemberSecurityLogMutation) Field ¶
func (m *MemberSecurityLogMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MemberSecurityLogMutation) FieldCleared ¶
func (m *MemberSecurityLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MemberSecurityLogMutation) Fields ¶
func (m *MemberSecurityLogMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*MemberSecurityLogMutation) ID ¶
func (m *MemberSecurityLogMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*MemberSecurityLogMutation) IP ¶
func (m *MemberSecurityLogMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*MemberSecurityLogMutation) IPCleared ¶
func (m *MemberSecurityLogMutation) IPCleared() bool
IPCleared returns if the "ip" field was cleared in this mutation.
func (*MemberSecurityLogMutation) MemberID ¶ added in v1.0.4
func (m *MemberSecurityLogMutation) MemberID() (r int, exists bool)
MemberID returns the value of the "member_id" field in the mutation.
func (*MemberSecurityLogMutation) OldAction ¶
func (m *MemberSecurityLogMutation) OldAction(ctx context.Context) (v membersecuritylog.Action, err error)
OldAction returns the old "action" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) OldDescription ¶
func (m *MemberSecurityLogMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*MemberSecurityLogMutation) OldIP ¶
func (m *MemberSecurityLogMutation) OldIP(ctx context.Context) (v *string, err error)
OldIP returns the old "ip" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) OldMemberID ¶ added in v1.0.4
func (m *MemberSecurityLogMutation) OldMemberID(ctx context.Context) (v int, err error)
OldMemberID returns the old "member_id" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) OldRemark ¶
func (m *MemberSecurityLogMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) OldRequestID ¶
func (m *MemberSecurityLogMutation) OldRequestID(ctx context.Context) (v *string, err error)
OldRequestID returns the old "request_id" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) OldServerVersion ¶
func (m *MemberSecurityLogMutation) OldServerVersion(ctx context.Context) (v *string, err error)
OldServerVersion returns the old "server_version" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSecurityLogMutation) Op ¶
func (m *MemberSecurityLogMutation) Op() Op
Op returns the operation name.
func (*MemberSecurityLogMutation) Remark ¶
func (m *MemberSecurityLogMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*MemberSecurityLogMutation) RemarkCleared ¶
func (m *MemberSecurityLogMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*MemberSecurityLogMutation) RemovedEdges ¶
func (m *MemberSecurityLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MemberSecurityLogMutation) RemovedIDs ¶
func (m *MemberSecurityLogMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*MemberSecurityLogMutation) RequestID ¶
func (m *MemberSecurityLogMutation) RequestID() (r string, exists bool)
RequestID returns the value of the "request_id" field in the mutation.
func (*MemberSecurityLogMutation) RequestIDCleared ¶
func (m *MemberSecurityLogMutation) RequestIDCleared() bool
RequestIDCleared returns if the "request_id" field was cleared in this mutation.
func (*MemberSecurityLogMutation) ResetAction ¶
func (m *MemberSecurityLogMutation) ResetAction()
ResetAction resets all changes to the "action" field.
func (*MemberSecurityLogMutation) ResetCreateTime ¶
func (m *MemberSecurityLogMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*MemberSecurityLogMutation) ResetDescription ¶
func (m *MemberSecurityLogMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*MemberSecurityLogMutation) ResetEdge ¶
func (m *MemberSecurityLogMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*MemberSecurityLogMutation) ResetField ¶
func (m *MemberSecurityLogMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberSecurityLogMutation) ResetIP ¶
func (m *MemberSecurityLogMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*MemberSecurityLogMutation) ResetMemberID ¶ added in v1.0.4
func (m *MemberSecurityLogMutation) ResetMemberID()
ResetMemberID resets all changes to the "member_id" field.
func (*MemberSecurityLogMutation) ResetRemark ¶
func (m *MemberSecurityLogMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*MemberSecurityLogMutation) ResetRequestID ¶
func (m *MemberSecurityLogMutation) ResetRequestID()
ResetRequestID resets all changes to the "request_id" field.
func (*MemberSecurityLogMutation) ResetServerVersion ¶
func (m *MemberSecurityLogMutation) ResetServerVersion()
ResetServerVersion resets all changes to the "server_version" field.
func (*MemberSecurityLogMutation) ServerVersion ¶
func (m *MemberSecurityLogMutation) ServerVersion() (r string, exists bool)
ServerVersion returns the value of the "server_version" field in the mutation.
func (*MemberSecurityLogMutation) ServerVersionCleared ¶
func (m *MemberSecurityLogMutation) ServerVersionCleared() bool
ServerVersionCleared returns if the "server_version" field was cleared in this mutation.
func (*MemberSecurityLogMutation) SetAction ¶
func (m *MemberSecurityLogMutation) SetAction(value membersecuritylog.Action)
SetAction sets the "action" field.
func (*MemberSecurityLogMutation) SetCreateTime ¶
func (m *MemberSecurityLogMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*MemberSecurityLogMutation) SetDescription ¶
func (m *MemberSecurityLogMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*MemberSecurityLogMutation) SetField ¶
func (m *MemberSecurityLogMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberSecurityLogMutation) SetID ¶
func (m *MemberSecurityLogMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of MemberSecurityLog entities.
func (*MemberSecurityLogMutation) SetIP ¶
func (m *MemberSecurityLogMutation) SetIP(s string)
SetIP sets the "ip" field.
func (*MemberSecurityLogMutation) SetMemberID ¶ added in v1.0.4
func (m *MemberSecurityLogMutation) SetMemberID(i int)
SetMemberID sets the "member_id" field.
func (*MemberSecurityLogMutation) SetRemark ¶
func (m *MemberSecurityLogMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*MemberSecurityLogMutation) SetRequestID ¶
func (m *MemberSecurityLogMutation) SetRequestID(s string)
SetRequestID sets the "request_id" field.
func (*MemberSecurityLogMutation) SetServerVersion ¶
func (m *MemberSecurityLogMutation) SetServerVersion(s string)
SetServerVersion sets the "server_version" field.
func (MemberSecurityLogMutation) Tx ¶
func (m MemberSecurityLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MemberSecurityLogMutation) Type ¶
func (m *MemberSecurityLogMutation) Type() string
Type returns the node type of this mutation (MemberSecurityLog).
type MemberSecurityLogQuery ¶
type MemberSecurityLogQuery struct {
// contains filtered or unexported fields
}
MemberSecurityLogQuery is the builder for querying MemberSecurityLog entities.
func (*MemberSecurityLogQuery) All ¶
func (mslq *MemberSecurityLogQuery) All(ctx context.Context) ([]*MemberSecurityLog, error)
All executes the query and returns a list of MemberSecurityLogs.
func (*MemberSecurityLogQuery) AllX ¶
func (mslq *MemberSecurityLogQuery) AllX(ctx context.Context) []*MemberSecurityLog
AllX is like All, but panics if an error occurs.
func (*MemberSecurityLogQuery) Clone ¶
func (mslq *MemberSecurityLogQuery) Clone() *MemberSecurityLogQuery
Clone returns a duplicate of the MemberSecurityLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MemberSecurityLogQuery) Count ¶
func (mslq *MemberSecurityLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MemberSecurityLogQuery) CountX ¶
func (mslq *MemberSecurityLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MemberSecurityLogQuery) Exist ¶
func (mslq *MemberSecurityLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MemberSecurityLogQuery) ExistX ¶
func (mslq *MemberSecurityLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MemberSecurityLogQuery) First ¶
func (mslq *MemberSecurityLogQuery) First(ctx context.Context) (*MemberSecurityLog, error)
First returns the first MemberSecurityLog entity from the query. Returns a *NotFoundError when no MemberSecurityLog was found.
func (*MemberSecurityLogQuery) FirstID ¶
func (mslq *MemberSecurityLogQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MemberSecurityLog ID from the query. Returns a *NotFoundError when no MemberSecurityLog ID was found.
func (*MemberSecurityLogQuery) FirstIDX ¶
func (mslq *MemberSecurityLogQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MemberSecurityLogQuery) FirstX ¶
func (mslq *MemberSecurityLogQuery) FirstX(ctx context.Context) *MemberSecurityLog
FirstX is like First, but panics if an error occurs.
func (*MemberSecurityLogQuery) GroupBy ¶
func (mslq *MemberSecurityLogQuery) GroupBy(field string, fields ...string) *MemberSecurityLogGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { MemberID int `json:"member_id,omitempty"` Count int `json:"count,omitempty"` } client.MemberSecurityLog.Query(). GroupBy(membersecuritylog.FieldMemberID). Aggregate(model.Count()). Scan(ctx, &v)
func (*MemberSecurityLogQuery) IDs ¶
func (mslq *MemberSecurityLogQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MemberSecurityLog IDs.
func (*MemberSecurityLogQuery) IDsX ¶
func (mslq *MemberSecurityLogQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MemberSecurityLogQuery) Limit ¶
func (mslq *MemberSecurityLogQuery) Limit(limit int) *MemberSecurityLogQuery
Limit adds a limit step to the query.
func (*MemberSecurityLogQuery) Offset ¶
func (mslq *MemberSecurityLogQuery) Offset(offset int) *MemberSecurityLogQuery
Offset adds an offset step to the query.
func (*MemberSecurityLogQuery) Only ¶
func (mslq *MemberSecurityLogQuery) Only(ctx context.Context) (*MemberSecurityLog, error)
Only returns a single MemberSecurityLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one MemberSecurityLog entity is not found. Returns a *NotFoundError when no MemberSecurityLog entities are found.
func (*MemberSecurityLogQuery) OnlyID ¶
func (mslq *MemberSecurityLogQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MemberSecurityLog ID in the query. Returns a *NotSingularError when exactly one MemberSecurityLog ID is not found. Returns a *NotFoundError when no entities are found.
func (*MemberSecurityLogQuery) OnlyIDX ¶
func (mslq *MemberSecurityLogQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MemberSecurityLogQuery) OnlyX ¶
func (mslq *MemberSecurityLogQuery) OnlyX(ctx context.Context) *MemberSecurityLog
OnlyX is like Only, but panics if an error occurs.
func (*MemberSecurityLogQuery) Order ¶
func (mslq *MemberSecurityLogQuery) Order(o ...OrderFunc) *MemberSecurityLogQuery
Order adds an order step to the query.
func (*MemberSecurityLogQuery) Select ¶
func (mslq *MemberSecurityLogQuery) Select(field string, fields ...string) *MemberSecurityLogSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { MemberID int `json:"member_id,omitempty"` } client.MemberSecurityLog.Query(). Select(membersecuritylog.FieldMemberID). Scan(ctx, &v)
func (*MemberSecurityLogQuery) Unique ¶
func (mslq *MemberSecurityLogQuery) Unique(unique bool) *MemberSecurityLogQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MemberSecurityLogQuery) Where ¶
func (mslq *MemberSecurityLogQuery) Where(ps ...predicate.MemberSecurityLog) *MemberSecurityLogQuery
Where adds a new predicate for the MemberSecurityLogQuery builder.
type MemberSecurityLogSelect ¶
type MemberSecurityLogSelect struct { *MemberSecurityLogQuery // contains filtered or unexported fields }
MemberSecurityLogSelect is the builder for selecting fields of MemberSecurityLog entities.
func (*MemberSecurityLogSelect) Bool ¶
func (msls *MemberSecurityLogSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MemberSecurityLogSelect) BoolX ¶
func (msls *MemberSecurityLogSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberSecurityLogSelect) Bools ¶
func (msls *MemberSecurityLogSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MemberSecurityLogSelect) BoolsX ¶
func (msls *MemberSecurityLogSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberSecurityLogSelect) Float64 ¶
func (msls *MemberSecurityLogSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MemberSecurityLogSelect) Float64X ¶
func (msls *MemberSecurityLogSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberSecurityLogSelect) Float64s ¶
func (msls *MemberSecurityLogSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MemberSecurityLogSelect) Float64sX ¶
func (msls *MemberSecurityLogSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberSecurityLogSelect) Int ¶
func (msls *MemberSecurityLogSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MemberSecurityLogSelect) IntX ¶
func (msls *MemberSecurityLogSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberSecurityLogSelect) Ints ¶
func (msls *MemberSecurityLogSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MemberSecurityLogSelect) IntsX ¶
func (msls *MemberSecurityLogSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberSecurityLogSelect) Scan ¶
func (msls *MemberSecurityLogSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*MemberSecurityLogSelect) ScanX ¶
func (msls *MemberSecurityLogSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberSecurityLogSelect) String ¶
func (msls *MemberSecurityLogSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MemberSecurityLogSelect) StringX ¶
func (msls *MemberSecurityLogSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberSecurityLogUpdate ¶
type MemberSecurityLogUpdate struct {
// contains filtered or unexported fields
}
MemberSecurityLogUpdate is the builder for updating MemberSecurityLog entities.
func (*MemberSecurityLogUpdate) ClearDescription ¶
func (mslu *MemberSecurityLogUpdate) ClearDescription() *MemberSecurityLogUpdate
ClearDescription clears the value of the "description" field.
func (*MemberSecurityLogUpdate) ClearIP ¶
func (mslu *MemberSecurityLogUpdate) ClearIP() *MemberSecurityLogUpdate
ClearIP clears the value of the "ip" field.
func (*MemberSecurityLogUpdate) ClearRemark ¶
func (mslu *MemberSecurityLogUpdate) ClearRemark() *MemberSecurityLogUpdate
ClearRemark clears the value of the "remark" field.
func (*MemberSecurityLogUpdate) ClearRequestID ¶
func (mslu *MemberSecurityLogUpdate) ClearRequestID() *MemberSecurityLogUpdate
ClearRequestID clears the value of the "request_id" field.
func (*MemberSecurityLogUpdate) ClearServerVersion ¶
func (mslu *MemberSecurityLogUpdate) ClearServerVersion() *MemberSecurityLogUpdate
ClearServerVersion clears the value of the "server_version" field.
func (*MemberSecurityLogUpdate) Exec ¶
func (mslu *MemberSecurityLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberSecurityLogUpdate) ExecX ¶
func (mslu *MemberSecurityLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberSecurityLogUpdate) Mutation ¶
func (mslu *MemberSecurityLogUpdate) Mutation() *MemberSecurityLogMutation
Mutation returns the MemberSecurityLogMutation object of the builder.
func (*MemberSecurityLogUpdate) Save ¶
func (mslu *MemberSecurityLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MemberSecurityLogUpdate) SaveX ¶
func (mslu *MemberSecurityLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemberSecurityLogUpdate) SetAction ¶
func (mslu *MemberSecurityLogUpdate) SetAction(m membersecuritylog.Action) *MemberSecurityLogUpdate
SetAction sets the "action" field.
func (*MemberSecurityLogUpdate) SetDescription ¶
func (mslu *MemberSecurityLogUpdate) SetDescription(s string) *MemberSecurityLogUpdate
SetDescription sets the "description" field.
func (*MemberSecurityLogUpdate) SetIP ¶
func (mslu *MemberSecurityLogUpdate) SetIP(s string) *MemberSecurityLogUpdate
SetIP sets the "ip" field.
func (*MemberSecurityLogUpdate) SetNillableAction ¶
func (mslu *MemberSecurityLogUpdate) SetNillableAction(m *membersecuritylog.Action) *MemberSecurityLogUpdate
SetNillableAction sets the "action" field if the given value is not nil.
func (*MemberSecurityLogUpdate) SetNillableDescription ¶
func (mslu *MemberSecurityLogUpdate) SetNillableDescription(s *string) *MemberSecurityLogUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MemberSecurityLogUpdate) SetNillableIP ¶
func (mslu *MemberSecurityLogUpdate) SetNillableIP(s *string) *MemberSecurityLogUpdate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*MemberSecurityLogUpdate) SetNillableRemark ¶
func (mslu *MemberSecurityLogUpdate) SetNillableRemark(s *string) *MemberSecurityLogUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MemberSecurityLogUpdate) SetNillableRequestID ¶
func (mslu *MemberSecurityLogUpdate) SetNillableRequestID(s *string) *MemberSecurityLogUpdate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*MemberSecurityLogUpdate) SetNillableServerVersion ¶
func (mslu *MemberSecurityLogUpdate) SetNillableServerVersion(s *string) *MemberSecurityLogUpdate
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*MemberSecurityLogUpdate) SetRemark ¶
func (mslu *MemberSecurityLogUpdate) SetRemark(s string) *MemberSecurityLogUpdate
SetRemark sets the "remark" field.
func (*MemberSecurityLogUpdate) SetRequestID ¶
func (mslu *MemberSecurityLogUpdate) SetRequestID(s string) *MemberSecurityLogUpdate
SetRequestID sets the "request_id" field.
func (*MemberSecurityLogUpdate) SetServerVersion ¶
func (mslu *MemberSecurityLogUpdate) SetServerVersion(s string) *MemberSecurityLogUpdate
SetServerVersion sets the "server_version" field.
func (*MemberSecurityLogUpdate) Where ¶
func (mslu *MemberSecurityLogUpdate) Where(ps ...predicate.MemberSecurityLog) *MemberSecurityLogUpdate
Where adds a new predicate for the MemberSecurityLogUpdate builder.
type MemberSecurityLogUpdateOne ¶
type MemberSecurityLogUpdateOne struct {
// contains filtered or unexported fields
}
MemberSecurityLogUpdateOne is the builder for updating a single MemberSecurityLog entity.
func (*MemberSecurityLogUpdateOne) ClearDescription ¶
func (msluo *MemberSecurityLogUpdateOne) ClearDescription() *MemberSecurityLogUpdateOne
ClearDescription clears the value of the "description" field.
func (*MemberSecurityLogUpdateOne) ClearIP ¶
func (msluo *MemberSecurityLogUpdateOne) ClearIP() *MemberSecurityLogUpdateOne
ClearIP clears the value of the "ip" field.
func (*MemberSecurityLogUpdateOne) ClearRemark ¶
func (msluo *MemberSecurityLogUpdateOne) ClearRemark() *MemberSecurityLogUpdateOne
ClearRemark clears the value of the "remark" field.
func (*MemberSecurityLogUpdateOne) ClearRequestID ¶
func (msluo *MemberSecurityLogUpdateOne) ClearRequestID() *MemberSecurityLogUpdateOne
ClearRequestID clears the value of the "request_id" field.
func (*MemberSecurityLogUpdateOne) ClearServerVersion ¶
func (msluo *MemberSecurityLogUpdateOne) ClearServerVersion() *MemberSecurityLogUpdateOne
ClearServerVersion clears the value of the "server_version" field.
func (*MemberSecurityLogUpdateOne) Exec ¶
func (msluo *MemberSecurityLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MemberSecurityLogUpdateOne) ExecX ¶
func (msluo *MemberSecurityLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberSecurityLogUpdateOne) Mutation ¶
func (msluo *MemberSecurityLogUpdateOne) Mutation() *MemberSecurityLogMutation
Mutation returns the MemberSecurityLogMutation object of the builder.
func (*MemberSecurityLogUpdateOne) Save ¶
func (msluo *MemberSecurityLogUpdateOne) Save(ctx context.Context) (*MemberSecurityLog, error)
Save executes the query and returns the updated MemberSecurityLog entity.
func (*MemberSecurityLogUpdateOne) SaveX ¶
func (msluo *MemberSecurityLogUpdateOne) SaveX(ctx context.Context) *MemberSecurityLog
SaveX is like Save, but panics if an error occurs.
func (*MemberSecurityLogUpdateOne) Select ¶
func (msluo *MemberSecurityLogUpdateOne) Select(field string, fields ...string) *MemberSecurityLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MemberSecurityLogUpdateOne) SetAction ¶
func (msluo *MemberSecurityLogUpdateOne) SetAction(m membersecuritylog.Action) *MemberSecurityLogUpdateOne
SetAction sets the "action" field.
func (*MemberSecurityLogUpdateOne) SetDescription ¶
func (msluo *MemberSecurityLogUpdateOne) SetDescription(s string) *MemberSecurityLogUpdateOne
SetDescription sets the "description" field.
func (*MemberSecurityLogUpdateOne) SetIP ¶
func (msluo *MemberSecurityLogUpdateOne) SetIP(s string) *MemberSecurityLogUpdateOne
SetIP sets the "ip" field.
func (*MemberSecurityLogUpdateOne) SetNillableAction ¶
func (msluo *MemberSecurityLogUpdateOne) SetNillableAction(m *membersecuritylog.Action) *MemberSecurityLogUpdateOne
SetNillableAction sets the "action" field if the given value is not nil.
func (*MemberSecurityLogUpdateOne) SetNillableDescription ¶
func (msluo *MemberSecurityLogUpdateOne) SetNillableDescription(s *string) *MemberSecurityLogUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MemberSecurityLogUpdateOne) SetNillableIP ¶
func (msluo *MemberSecurityLogUpdateOne) SetNillableIP(s *string) *MemberSecurityLogUpdateOne
SetNillableIP sets the "ip" field if the given value is not nil.
func (*MemberSecurityLogUpdateOne) SetNillableRemark ¶
func (msluo *MemberSecurityLogUpdateOne) SetNillableRemark(s *string) *MemberSecurityLogUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MemberSecurityLogUpdateOne) SetNillableRequestID ¶
func (msluo *MemberSecurityLogUpdateOne) SetNillableRequestID(s *string) *MemberSecurityLogUpdateOne
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*MemberSecurityLogUpdateOne) SetNillableServerVersion ¶
func (msluo *MemberSecurityLogUpdateOne) SetNillableServerVersion(s *string) *MemberSecurityLogUpdateOne
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*MemberSecurityLogUpdateOne) SetRemark ¶
func (msluo *MemberSecurityLogUpdateOne) SetRemark(s string) *MemberSecurityLogUpdateOne
SetRemark sets the "remark" field.
func (*MemberSecurityLogUpdateOne) SetRequestID ¶
func (msluo *MemberSecurityLogUpdateOne) SetRequestID(s string) *MemberSecurityLogUpdateOne
SetRequestID sets the "request_id" field.
func (*MemberSecurityLogUpdateOne) SetServerVersion ¶
func (msluo *MemberSecurityLogUpdateOne) SetServerVersion(s string) *MemberSecurityLogUpdateOne
SetServerVersion sets the "server_version" field.
type MemberSecurityLogs ¶
type MemberSecurityLogs []*MemberSecurityLog
MemberSecurityLogs is a parsable slice of MemberSecurityLog.
type MemberSelect ¶
type MemberSelect struct { *MemberQuery // contains filtered or unexported fields }
MemberSelect is the builder for selecting fields of Member entities.
func (*MemberSelect) Bool ¶
func (ms *MemberSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a 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 a 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 a 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 a 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 a 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 a 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 scans 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 a 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 MemberSetting ¶ added in v1.0.2
type MemberSetting struct { // ID of the ent. ID int `json:"id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"owner_id,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"` // Typeof holds the value of the "typeof" field. Typeof membersetting.Typeof `json:"typeof,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MemberSettingQuery when eager-loading is set. Edges MemberSettingEdges `json:"edges"` // contains filtered or unexported fields }
MemberSetting is the model entity for the MemberSetting schema.
func (*MemberSetting) QuerySettingsOwner ¶ added in v1.0.8
func (ms *MemberSetting) QuerySettingsOwner() *MemberQuery
QuerySettingsOwner queries the "settings_owner" edge of the MemberSetting entity.
func (*MemberSetting) String ¶ added in v1.0.2
func (ms *MemberSetting) String() string
String implements the fmt.Stringer.
func (*MemberSetting) Unwrap ¶ added in v1.0.2
func (ms *MemberSetting) Unwrap() *MemberSetting
Unwrap unwraps the MemberSetting entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*MemberSetting) Update ¶ added in v1.0.2
func (ms *MemberSetting) Update() *MemberSettingUpdateOne
Update returns a builder for updating this MemberSetting. Note that you need to call MemberSetting.Unwrap() before calling this method if this MemberSetting was returned from a transaction, and the transaction was committed or rolled back.
type MemberSettingClient ¶ added in v1.0.2
type MemberSettingClient struct {
// contains filtered or unexported fields
}
MemberSettingClient is a client for the MemberSetting schema.
func NewMemberSettingClient ¶ added in v1.0.2
func NewMemberSettingClient(c config) *MemberSettingClient
NewMemberSettingClient returns a client for the MemberSetting from the given config.
func (*MemberSettingClient) Create ¶ added in v1.0.2
func (c *MemberSettingClient) Create() *MemberSettingCreate
Create returns a create builder for MemberSetting.
func (*MemberSettingClient) CreateBulk ¶ added in v1.0.2
func (c *MemberSettingClient) CreateBulk(builders ...*MemberSettingCreate) *MemberSettingCreateBulk
CreateBulk returns a builder for creating a bulk of MemberSetting entities.
func (*MemberSettingClient) Delete ¶ added in v1.0.2
func (c *MemberSettingClient) Delete() *MemberSettingDelete
Delete returns a delete builder for MemberSetting.
func (*MemberSettingClient) DeleteOne ¶ added in v1.0.2
func (c *MemberSettingClient) DeleteOne(ms *MemberSetting) *MemberSettingDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MemberSettingClient) DeleteOneID ¶ added in v1.0.2
func (c *MemberSettingClient) DeleteOneID(id int) *MemberSettingDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MemberSettingClient) Get ¶ added in v1.0.2
func (c *MemberSettingClient) Get(ctx context.Context, id int) (*MemberSetting, error)
Get returns a MemberSetting entity by its id.
func (*MemberSettingClient) GetX ¶ added in v1.0.2
func (c *MemberSettingClient) GetX(ctx context.Context, id int) *MemberSetting
GetX is like Get, but panics if an error occurs.
func (*MemberSettingClient) Hooks ¶ added in v1.0.2
func (c *MemberSettingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MemberSettingClient) Query ¶ added in v1.0.2
func (c *MemberSettingClient) Query() *MemberSettingQuery
Query returns a query builder for MemberSetting.
func (*MemberSettingClient) QuerySettingsOwner ¶ added in v1.0.8
func (c *MemberSettingClient) QuerySettingsOwner(ms *MemberSetting) *MemberQuery
QuerySettingsOwner queries the settings_owner edge of a MemberSetting.
func (*MemberSettingClient) Update ¶ added in v1.0.2
func (c *MemberSettingClient) Update() *MemberSettingUpdate
Update returns an update builder for MemberSetting.
func (*MemberSettingClient) UpdateOne ¶ added in v1.0.2
func (c *MemberSettingClient) UpdateOne(ms *MemberSetting) *MemberSettingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MemberSettingClient) UpdateOneID ¶ added in v1.0.2
func (c *MemberSettingClient) UpdateOneID(id int) *MemberSettingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MemberSettingClient) Use ¶ added in v1.0.2
func (c *MemberSettingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `membersetting.Hooks(f(g(h())))`.
type MemberSettingCreate ¶ added in v1.0.2
type MemberSettingCreate struct {
// contains filtered or unexported fields
}
MemberSettingCreate is the builder for creating a MemberSetting entity.
func (*MemberSettingCreate) Mutation ¶ added in v1.0.2
func (msc *MemberSettingCreate) Mutation() *MemberSettingMutation
Mutation returns the MemberSettingMutation object of the builder.
func (*MemberSettingCreate) Save ¶ added in v1.0.2
func (msc *MemberSettingCreate) Save(ctx context.Context) (*MemberSetting, error)
Save creates the MemberSetting in the database.
func (*MemberSettingCreate) SaveX ¶ added in v1.0.2
func (msc *MemberSettingCreate) SaveX(ctx context.Context) *MemberSetting
SaveX calls Save and panics if Save returns an error.
func (*MemberSettingCreate) SetID ¶ added in v1.0.2
func (msc *MemberSettingCreate) SetID(i int) *MemberSettingCreate
SetID sets the "id" field.
func (*MemberSettingCreate) SetKey ¶ added in v1.0.2
func (msc *MemberSettingCreate) SetKey(s string) *MemberSettingCreate
SetKey sets the "key" field.
func (*MemberSettingCreate) SetNillableTypeof ¶ added in v1.0.2
func (msc *MemberSettingCreate) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingCreate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*MemberSettingCreate) SetOwnerID ¶ added in v1.0.8
func (msc *MemberSettingCreate) SetOwnerID(i int) *MemberSettingCreate
SetOwnerID sets the "owner_id" field.
func (*MemberSettingCreate) SetSettingsOwner ¶ added in v1.0.8
func (msc *MemberSettingCreate) SetSettingsOwner(m *Member) *MemberSettingCreate
SetSettingsOwner sets the "settings_owner" edge to the Member entity.
func (*MemberSettingCreate) SetSettingsOwnerID ¶ added in v1.0.8
func (msc *MemberSettingCreate) SetSettingsOwnerID(id int) *MemberSettingCreate
SetSettingsOwnerID sets the "settings_owner" edge to the Member entity by ID.
func (*MemberSettingCreate) SetTypeof ¶ added in v1.0.2
func (msc *MemberSettingCreate) SetTypeof(m membersetting.Typeof) *MemberSettingCreate
SetTypeof sets the "typeof" field.
func (*MemberSettingCreate) SetValue ¶ added in v1.0.2
func (msc *MemberSettingCreate) SetValue(s string) *MemberSettingCreate
SetValue sets the "value" field.
type MemberSettingCreateBulk ¶ added in v1.0.2
type MemberSettingCreateBulk struct {
// contains filtered or unexported fields
}
MemberSettingCreateBulk is the builder for creating many MemberSetting entities in bulk.
func (*MemberSettingCreateBulk) Save ¶ added in v1.0.2
func (mscb *MemberSettingCreateBulk) Save(ctx context.Context) ([]*MemberSetting, error)
Save creates the MemberSetting entities in the database.
func (*MemberSettingCreateBulk) SaveX ¶ added in v1.0.2
func (mscb *MemberSettingCreateBulk) SaveX(ctx context.Context) []*MemberSetting
SaveX is like Save, but panics if an error occurs.
type MemberSettingDelete ¶ added in v1.0.2
type MemberSettingDelete struct {
// contains filtered or unexported fields
}
MemberSettingDelete is the builder for deleting a MemberSetting entity.
func (*MemberSettingDelete) Exec ¶ added in v1.0.2
func (msd *MemberSettingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MemberSettingDelete) ExecX ¶ added in v1.0.2
func (msd *MemberSettingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MemberSettingDelete) Where ¶ added in v1.0.2
func (msd *MemberSettingDelete) Where(ps ...predicate.MemberSetting) *MemberSettingDelete
Where adds a new predicate to the MemberSettingDelete builder.
type MemberSettingDeleteOne ¶ added in v1.0.2
type MemberSettingDeleteOne struct {
// contains filtered or unexported fields
}
MemberSettingDeleteOne is the builder for deleting a single MemberSetting entity.
func (*MemberSettingDeleteOne) Exec ¶ added in v1.0.2
func (msdo *MemberSettingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MemberSettingDeleteOne) ExecX ¶ added in v1.0.2
func (msdo *MemberSettingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MemberSettingEdges ¶ added in v1.0.2
type MemberSettingEdges struct { // SettingsOwner holds the value of the settings_owner edge. SettingsOwner *Member `json:"settings_owner,omitempty"` // contains filtered or unexported fields }
MemberSettingEdges holds the relations/edges for other nodes in the graph.
func (MemberSettingEdges) SettingsOwnerOrErr ¶ added in v1.0.8
func (e MemberSettingEdges) SettingsOwnerOrErr() (*Member, error)
SettingsOwnerOrErr returns the SettingsOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MemberSettingGroupBy ¶ added in v1.0.2
type MemberSettingGroupBy struct {
// contains filtered or unexported fields
}
MemberSettingGroupBy is the group-by builder for MemberSetting entities.
func (*MemberSettingGroupBy) Aggregate ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Aggregate(fns ...AggregateFunc) *MemberSettingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MemberSettingGroupBy) Bool ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSettingGroupBy) BoolX ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberSettingGroupBy) Bools ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberSettingGroupBy) BoolsX ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberSettingGroupBy) Float64 ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSettingGroupBy) Float64X ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberSettingGroupBy) Float64s ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberSettingGroupBy) Float64sX ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberSettingGroupBy) Int ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSettingGroupBy) IntX ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberSettingGroupBy) Ints ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*MemberSettingGroupBy) IntsX ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberSettingGroupBy) Scan ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*MemberSettingGroupBy) ScanX ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberSettingGroupBy) String ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MemberSettingGroupBy) StringX ¶ added in v1.0.2
func (msgb *MemberSettingGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberSettingMutation ¶ added in v1.0.2
type MemberSettingMutation struct {
// contains filtered or unexported fields
}
MemberSettingMutation represents an operation that mutates the MemberSetting nodes in the graph.
func (*MemberSettingMutation) AddField ¶ added in v1.0.2
func (m *MemberSettingMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberSettingMutation) AddedEdges ¶ added in v1.0.2
func (m *MemberSettingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MemberSettingMutation) AddedField ¶ added in v1.0.2
func (m *MemberSettingMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MemberSettingMutation) AddedFields ¶ added in v1.0.2
func (m *MemberSettingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MemberSettingMutation) AddedIDs ¶ added in v1.0.2
func (m *MemberSettingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MemberSettingMutation) ClearEdge ¶ added in v1.0.2
func (m *MemberSettingMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*MemberSettingMutation) ClearField ¶ added in v1.0.2
func (m *MemberSettingMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberSettingMutation) ClearSettingsOwner ¶ added in v1.0.8
func (m *MemberSettingMutation) ClearSettingsOwner()
ClearSettingsOwner clears the "settings_owner" edge to the Member entity.
func (*MemberSettingMutation) ClearedEdges ¶ added in v1.0.2
func (m *MemberSettingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MemberSettingMutation) ClearedFields ¶ added in v1.0.2
func (m *MemberSettingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MemberSettingMutation) Client ¶ added in v1.0.2
func (m MemberSettingMutation) 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 (*MemberSettingMutation) EdgeCleared ¶ added in v1.0.2
func (m *MemberSettingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MemberSettingMutation) Field ¶ added in v1.0.2
func (m *MemberSettingMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MemberSettingMutation) FieldCleared ¶ added in v1.0.2
func (m *MemberSettingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MemberSettingMutation) Fields ¶ added in v1.0.2
func (m *MemberSettingMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*MemberSettingMutation) ID ¶ added in v1.0.2
func (m *MemberSettingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*MemberSettingMutation) Key ¶ added in v1.0.2
func (m *MemberSettingMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*MemberSettingMutation) OldField ¶ added in v1.0.2
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*MemberSettingMutation) OldKey ¶ added in v1.0.2
func (m *MemberSettingMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the MemberSetting entity. If the MemberSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSettingMutation) OldOwnerID ¶ added in v1.0.8
func (m *MemberSettingMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the MemberSetting entity. If the MemberSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSettingMutation) OldTypeof ¶ added in v1.0.2
func (m *MemberSettingMutation) OldTypeof(ctx context.Context) (v membersetting.Typeof, err error)
OldTypeof returns the old "typeof" field's value of the MemberSetting entity. If the MemberSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSettingMutation) OldValue ¶ added in v1.0.2
func (m *MemberSettingMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the MemberSetting entity. If the MemberSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemberSettingMutation) Op ¶ added in v1.0.2
func (m *MemberSettingMutation) Op() Op
Op returns the operation name.
func (*MemberSettingMutation) OwnerID ¶ added in v1.0.8
func (m *MemberSettingMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*MemberSettingMutation) RemovedEdges ¶ added in v1.0.2
func (m *MemberSettingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MemberSettingMutation) RemovedIDs ¶ added in v1.0.2
func (m *MemberSettingMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*MemberSettingMutation) ResetEdge ¶ added in v1.0.2
func (m *MemberSettingMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*MemberSettingMutation) ResetField ¶ added in v1.0.2
func (m *MemberSettingMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*MemberSettingMutation) ResetKey ¶ added in v1.0.2
func (m *MemberSettingMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*MemberSettingMutation) ResetOwnerID ¶ added in v1.0.8
func (m *MemberSettingMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*MemberSettingMutation) ResetSettingsOwner ¶ added in v1.0.8
func (m *MemberSettingMutation) ResetSettingsOwner()
ResetSettingsOwner resets all changes to the "settings_owner" edge.
func (*MemberSettingMutation) ResetTypeof ¶ added in v1.0.2
func (m *MemberSettingMutation) ResetTypeof()
ResetTypeof resets all changes to the "typeof" field.
func (*MemberSettingMutation) ResetValue ¶ added in v1.0.2
func (m *MemberSettingMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*MemberSettingMutation) SetField ¶ added in v1.0.2
func (m *MemberSettingMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MemberSettingMutation) SetID ¶ added in v1.0.2
func (m *MemberSettingMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of MemberSetting entities.
func (*MemberSettingMutation) SetKey ¶ added in v1.0.2
func (m *MemberSettingMutation) SetKey(s string)
SetKey sets the "key" field.
func (*MemberSettingMutation) SetOwnerID ¶ added in v1.0.8
func (m *MemberSettingMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*MemberSettingMutation) SetSettingsOwnerID ¶ added in v1.0.8
func (m *MemberSettingMutation) SetSettingsOwnerID(id int)
SetSettingsOwnerID sets the "settings_owner" edge to the Member entity by id.
func (*MemberSettingMutation) SetTypeof ¶ added in v1.0.2
func (m *MemberSettingMutation) SetTypeof(value membersetting.Typeof)
SetTypeof sets the "typeof" field.
func (*MemberSettingMutation) SetValue ¶ added in v1.0.2
func (m *MemberSettingMutation) SetValue(s string)
SetValue sets the "value" field.
func (*MemberSettingMutation) SettingsOwnerCleared ¶ added in v1.0.8
func (m *MemberSettingMutation) SettingsOwnerCleared() bool
SettingsOwnerCleared reports if the "settings_owner" edge to the Member entity was cleared.
func (*MemberSettingMutation) SettingsOwnerID ¶ added in v1.0.8
func (m *MemberSettingMutation) SettingsOwnerID() (id int, exists bool)
SettingsOwnerID returns the "settings_owner" edge ID in the mutation.
func (*MemberSettingMutation) SettingsOwnerIDs ¶ added in v1.0.8
func (m *MemberSettingMutation) SettingsOwnerIDs() (ids []int)
SettingsOwnerIDs returns the "settings_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SettingsOwnerID instead. It exists only for internal usage by the builders.
func (MemberSettingMutation) Tx ¶ added in v1.0.2
func (m MemberSettingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MemberSettingMutation) Type ¶ added in v1.0.2
func (m *MemberSettingMutation) Type() string
Type returns the node type of this mutation (MemberSetting).
func (*MemberSettingMutation) Typeof ¶ added in v1.0.2
func (m *MemberSettingMutation) Typeof() (r membersetting.Typeof, exists bool)
Typeof returns the value of the "typeof" field in the mutation.
func (*MemberSettingMutation) Value ¶ added in v1.0.2
func (m *MemberSettingMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
type MemberSettingQuery ¶ added in v1.0.2
type MemberSettingQuery struct {
// contains filtered or unexported fields
}
MemberSettingQuery is the builder for querying MemberSetting entities.
func (*MemberSettingQuery) All ¶ added in v1.0.2
func (msq *MemberSettingQuery) All(ctx context.Context) ([]*MemberSetting, error)
All executes the query and returns a list of MemberSettings.
func (*MemberSettingQuery) AllX ¶ added in v1.0.2
func (msq *MemberSettingQuery) AllX(ctx context.Context) []*MemberSetting
AllX is like All, but panics if an error occurs.
func (*MemberSettingQuery) Clone ¶ added in v1.0.2
func (msq *MemberSettingQuery) Clone() *MemberSettingQuery
Clone returns a duplicate of the MemberSettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MemberSettingQuery) Count ¶ added in v1.0.2
func (msq *MemberSettingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MemberSettingQuery) CountX ¶ added in v1.0.2
func (msq *MemberSettingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MemberSettingQuery) Exist ¶ added in v1.0.2
func (msq *MemberSettingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MemberSettingQuery) ExistX ¶ added in v1.0.2
func (msq *MemberSettingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MemberSettingQuery) First ¶ added in v1.0.2
func (msq *MemberSettingQuery) First(ctx context.Context) (*MemberSetting, error)
First returns the first MemberSetting entity from the query. Returns a *NotFoundError when no MemberSetting was found.
func (*MemberSettingQuery) FirstID ¶ added in v1.0.2
func (msq *MemberSettingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MemberSetting ID from the query. Returns a *NotFoundError when no MemberSetting ID was found.
func (*MemberSettingQuery) FirstIDX ¶ added in v1.0.2
func (msq *MemberSettingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MemberSettingQuery) FirstX ¶ added in v1.0.2
func (msq *MemberSettingQuery) FirstX(ctx context.Context) *MemberSetting
FirstX is like First, but panics if an error occurs.
func (*MemberSettingQuery) GroupBy ¶ added in v1.0.2
func (msq *MemberSettingQuery) GroupBy(field string, fields ...string) *MemberSettingGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { OwnerID int `json:"owner_id,omitempty"` Count int `json:"count,omitempty"` } client.MemberSetting.Query(). GroupBy(membersetting.FieldOwnerID). Aggregate(model.Count()). Scan(ctx, &v)
func (*MemberSettingQuery) IDs ¶ added in v1.0.2
func (msq *MemberSettingQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MemberSetting IDs.
func (*MemberSettingQuery) IDsX ¶ added in v1.0.2
func (msq *MemberSettingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MemberSettingQuery) Limit ¶ added in v1.0.2
func (msq *MemberSettingQuery) Limit(limit int) *MemberSettingQuery
Limit adds a limit step to the query.
func (*MemberSettingQuery) Offset ¶ added in v1.0.2
func (msq *MemberSettingQuery) Offset(offset int) *MemberSettingQuery
Offset adds an offset step to the query.
func (*MemberSettingQuery) Only ¶ added in v1.0.2
func (msq *MemberSettingQuery) Only(ctx context.Context) (*MemberSetting, error)
Only returns a single MemberSetting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one MemberSetting entity is not found. Returns a *NotFoundError when no MemberSetting entities are found.
func (*MemberSettingQuery) OnlyID ¶ added in v1.0.2
func (msq *MemberSettingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MemberSetting ID in the query. Returns a *NotSingularError when exactly one MemberSetting ID is not found. Returns a *NotFoundError when no entities are found.
func (*MemberSettingQuery) OnlyIDX ¶ added in v1.0.2
func (msq *MemberSettingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MemberSettingQuery) OnlyX ¶ added in v1.0.2
func (msq *MemberSettingQuery) OnlyX(ctx context.Context) *MemberSetting
OnlyX is like Only, but panics if an error occurs.
func (*MemberSettingQuery) Order ¶ added in v1.0.2
func (msq *MemberSettingQuery) Order(o ...OrderFunc) *MemberSettingQuery
Order adds an order step to the query.
func (*MemberSettingQuery) QuerySettingsOwner ¶ added in v1.0.8
func (msq *MemberSettingQuery) QuerySettingsOwner() *MemberQuery
QuerySettingsOwner chains the current query on the "settings_owner" edge.
func (*MemberSettingQuery) Select ¶ added in v1.0.2
func (msq *MemberSettingQuery) Select(field string, fields ...string) *MemberSettingSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { OwnerID int `json:"owner_id,omitempty"` } client.MemberSetting.Query(). Select(membersetting.FieldOwnerID). Scan(ctx, &v)
func (*MemberSettingQuery) Unique ¶ added in v1.0.2
func (msq *MemberSettingQuery) Unique(unique bool) *MemberSettingQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MemberSettingQuery) Where ¶ added in v1.0.2
func (msq *MemberSettingQuery) Where(ps ...predicate.MemberSetting) *MemberSettingQuery
Where adds a new predicate for the MemberSettingQuery builder.
func (*MemberSettingQuery) WithSettingsOwner ¶ added in v1.0.8
func (msq *MemberSettingQuery) WithSettingsOwner(opts ...func(*MemberQuery)) *MemberSettingQuery
WithSettingsOwner tells the query-builder to eager-load the nodes that are connected to the "settings_owner" edge. The optional arguments are used to configure the query builder of the edge.
type MemberSettingSelect ¶ added in v1.0.2
type MemberSettingSelect struct { *MemberSettingQuery // contains filtered or unexported fields }
MemberSettingSelect is the builder for selecting fields of MemberSetting entities.
func (*MemberSettingSelect) Bool ¶ added in v1.0.2
func (mss *MemberSettingSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MemberSettingSelect) BoolX ¶ added in v1.0.2
func (mss *MemberSettingSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MemberSettingSelect) Bools ¶ added in v1.0.2
func (mss *MemberSettingSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MemberSettingSelect) BoolsX ¶ added in v1.0.2
func (mss *MemberSettingSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MemberSettingSelect) Float64 ¶ added in v1.0.2
func (mss *MemberSettingSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MemberSettingSelect) Float64X ¶ added in v1.0.2
func (mss *MemberSettingSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MemberSettingSelect) Float64s ¶ added in v1.0.2
func (mss *MemberSettingSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MemberSettingSelect) Float64sX ¶ added in v1.0.2
func (mss *MemberSettingSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MemberSettingSelect) Int ¶ added in v1.0.2
func (mss *MemberSettingSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MemberSettingSelect) IntX ¶ added in v1.0.2
func (mss *MemberSettingSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MemberSettingSelect) Ints ¶ added in v1.0.2
func (mss *MemberSettingSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MemberSettingSelect) IntsX ¶ added in v1.0.2
func (mss *MemberSettingSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MemberSettingSelect) Scan ¶ added in v1.0.2
func (mss *MemberSettingSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*MemberSettingSelect) ScanX ¶ added in v1.0.2
func (mss *MemberSettingSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MemberSettingSelect) String ¶ added in v1.0.2
func (mss *MemberSettingSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MemberSettingSelect) StringX ¶ added in v1.0.2
func (mss *MemberSettingSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MemberSettingUpdate ¶ added in v1.0.2
type MemberSettingUpdate struct {
// contains filtered or unexported fields
}
MemberSettingUpdate is the builder for updating MemberSetting entities.
func (*MemberSettingUpdate) ClearSettingsOwner ¶ added in v1.0.8
func (msu *MemberSettingUpdate) ClearSettingsOwner() *MemberSettingUpdate
ClearSettingsOwner clears the "settings_owner" edge to the Member entity.
func (*MemberSettingUpdate) Exec ¶ added in v1.0.2
func (msu *MemberSettingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberSettingUpdate) ExecX ¶ added in v1.0.2
func (msu *MemberSettingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberSettingUpdate) Mutation ¶ added in v1.0.2
func (msu *MemberSettingUpdate) Mutation() *MemberSettingMutation
Mutation returns the MemberSettingMutation object of the builder.
func (*MemberSettingUpdate) Save ¶ added in v1.0.2
func (msu *MemberSettingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MemberSettingUpdate) SaveX ¶ added in v1.0.2
func (msu *MemberSettingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemberSettingUpdate) SetKey ¶ added in v1.0.2
func (msu *MemberSettingUpdate) SetKey(s string) *MemberSettingUpdate
SetKey sets the "key" field.
func (*MemberSettingUpdate) SetNillableTypeof ¶ added in v1.0.2
func (msu *MemberSettingUpdate) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingUpdate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*MemberSettingUpdate) SetOwnerID ¶ added in v1.0.8
func (msu *MemberSettingUpdate) SetOwnerID(i int) *MemberSettingUpdate
SetOwnerID sets the "owner_id" field.
func (*MemberSettingUpdate) SetSettingsOwner ¶ added in v1.0.8
func (msu *MemberSettingUpdate) SetSettingsOwner(m *Member) *MemberSettingUpdate
SetSettingsOwner sets the "settings_owner" edge to the Member entity.
func (*MemberSettingUpdate) SetSettingsOwnerID ¶ added in v1.0.8
func (msu *MemberSettingUpdate) SetSettingsOwnerID(id int) *MemberSettingUpdate
SetSettingsOwnerID sets the "settings_owner" edge to the Member entity by ID.
func (*MemberSettingUpdate) SetTypeof ¶ added in v1.0.2
func (msu *MemberSettingUpdate) SetTypeof(m membersetting.Typeof) *MemberSettingUpdate
SetTypeof sets the "typeof" field.
func (*MemberSettingUpdate) SetValue ¶ added in v1.0.2
func (msu *MemberSettingUpdate) SetValue(s string) *MemberSettingUpdate
SetValue sets the "value" field.
func (*MemberSettingUpdate) Where ¶ added in v1.0.2
func (msu *MemberSettingUpdate) Where(ps ...predicate.MemberSetting) *MemberSettingUpdate
Where adds a new predicate for the MemberSettingUpdate builder.
type MemberSettingUpdateOne ¶ added in v1.0.2
type MemberSettingUpdateOne struct {
// contains filtered or unexported fields
}
MemberSettingUpdateOne is the builder for updating a single MemberSetting entity.
func (*MemberSettingUpdateOne) ClearSettingsOwner ¶ added in v1.0.8
func (msuo *MemberSettingUpdateOne) ClearSettingsOwner() *MemberSettingUpdateOne
ClearSettingsOwner clears the "settings_owner" edge to the Member entity.
func (*MemberSettingUpdateOne) Exec ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MemberSettingUpdateOne) ExecX ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberSettingUpdateOne) Mutation ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) Mutation() *MemberSettingMutation
Mutation returns the MemberSettingMutation object of the builder.
func (*MemberSettingUpdateOne) Save ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) Save(ctx context.Context) (*MemberSetting, error)
Save executes the query and returns the updated MemberSetting entity.
func (*MemberSettingUpdateOne) SaveX ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) SaveX(ctx context.Context) *MemberSetting
SaveX is like Save, but panics if an error occurs.
func (*MemberSettingUpdateOne) Select ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) Select(field string, fields ...string) *MemberSettingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MemberSettingUpdateOne) SetKey ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) SetKey(s string) *MemberSettingUpdateOne
SetKey sets the "key" field.
func (*MemberSettingUpdateOne) SetNillableTypeof ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingUpdateOne
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*MemberSettingUpdateOne) SetOwnerID ¶ added in v1.0.8
func (msuo *MemberSettingUpdateOne) SetOwnerID(i int) *MemberSettingUpdateOne
SetOwnerID sets the "owner_id" field.
func (*MemberSettingUpdateOne) SetSettingsOwner ¶ added in v1.0.8
func (msuo *MemberSettingUpdateOne) SetSettingsOwner(m *Member) *MemberSettingUpdateOne
SetSettingsOwner sets the "settings_owner" edge to the Member entity.
func (*MemberSettingUpdateOne) SetSettingsOwnerID ¶ added in v1.0.8
func (msuo *MemberSettingUpdateOne) SetSettingsOwnerID(id int) *MemberSettingUpdateOne
SetSettingsOwnerID sets the "settings_owner" edge to the Member entity by ID.
func (*MemberSettingUpdateOne) SetTypeof ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) SetTypeof(m membersetting.Typeof) *MemberSettingUpdateOne
SetTypeof sets the "typeof" field.
func (*MemberSettingUpdateOne) SetValue ¶ added in v1.0.2
func (msuo *MemberSettingUpdateOne) SetValue(s string) *MemberSettingUpdateOne
SetValue sets the "value" field.
type MemberSettings ¶ added in v1.0.2
type MemberSettings []*MemberSetting
MemberSettings is a parsable slice of MemberSetting.
type MemberUpdate ¶
type MemberUpdate struct {
// contains filtered or unexported fields
}
MemberUpdate is the builder for updating Member entities.
func (*MemberUpdate) AddMemberEmailIDs ¶ added in v1.0.8
func (mu *MemberUpdate) AddMemberEmailIDs(ids ...int) *MemberUpdate
AddMemberEmailIDs adds the "member_emails" edge to the MemberEmail entity by IDs.
func (*MemberUpdate) AddMemberEmails ¶ added in v1.0.8
func (mu *MemberUpdate) AddMemberEmails(m ...*MemberEmail) *MemberUpdate
AddMemberEmails adds the "member_emails" edges to the MemberEmail entity.
func (*MemberUpdate) AddMemberSettingIDs ¶ added in v1.0.8
func (mu *MemberUpdate) AddMemberSettingIDs(ids ...int) *MemberUpdate
AddMemberSettingIDs adds the "member_settings" edge to the MemberSetting entity by IDs.
func (*MemberUpdate) AddMemberSettings ¶ added in v1.0.8
func (mu *MemberUpdate) AddMemberSettings(m ...*MemberSetting) *MemberUpdate
AddMemberSettings adds the "member_settings" edges to the MemberSetting entity.
func (*MemberUpdate) AddMemberSnippetDocIDs ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippetDocIDs(ids ...int) *MemberUpdate
AddMemberSnippetDocIDs adds the "member_snippet_docs" edge to the SnippetDocument entity by IDs.
func (*MemberUpdate) AddMemberSnippetDocs ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdate
AddMemberSnippetDocs adds the "member_snippet_docs" edges to the SnippetDocument entity.
func (*MemberUpdate) AddMemberSnippetFolderIDs ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippetFolderIDs(ids ...int) *MemberUpdate
AddMemberSnippetFolderIDs adds the "member_snippet_folders" edge to the SnippetFolder entity by IDs.
func (*MemberUpdate) AddMemberSnippetFolders ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdate
AddMemberSnippetFolders adds the "member_snippet_folders" edges to the SnippetFolder entity.
func (*MemberUpdate) AddMemberSnippetIDs ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippetIDs(ids ...int) *MemberUpdate
AddMemberSnippetIDs adds the "member_snippets" edge to the Snippet entity by IDs.
func (*MemberUpdate) AddMemberSnippetTagIDs ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippetTagIDs(ids ...int) *MemberUpdate
AddMemberSnippetTagIDs adds the "member_snippet_tags" edge to the SnippetTag entity by IDs.
func (*MemberUpdate) AddMemberSnippetTags ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippetTags(s ...*SnippetTag) *MemberUpdate
AddMemberSnippetTags adds the "member_snippet_tags" edges to the SnippetTag entity.
func (*MemberUpdate) AddMemberSnippets ¶ added in v1.0.9
func (mu *MemberUpdate) AddMemberSnippets(s ...*Snippet) *MemberUpdate
AddMemberSnippets adds the "member_snippets" edges to the Snippet entity.
func (*MemberUpdate) ClearDeleteTime ¶
func (mu *MemberUpdate) ClearDeleteTime() *MemberUpdate
ClearDeleteTime clears the value of the "delete_time" field.
func (*MemberUpdate) ClearGroupID ¶ added in v1.0.2
func (mu *MemberUpdate) ClearGroupID() *MemberUpdate
ClearGroupID clears the value of the "group_id" field.
func (*MemberUpdate) ClearGroups ¶ added in v1.0.9
func (mu *MemberUpdate) ClearGroups() *MemberUpdate
ClearGroups clears the "groups" edge to the Group entity.
func (*MemberUpdate) ClearLastPwdAuth ¶
func (mu *MemberUpdate) ClearLastPwdAuth() *MemberUpdate
ClearLastPwdAuth clears the value of the "last_pwd_auth" field.
func (*MemberUpdate) ClearMemberEmails ¶ added in v1.0.8
func (mu *MemberUpdate) ClearMemberEmails() *MemberUpdate
ClearMemberEmails clears all "member_emails" edges to the MemberEmail entity.
func (*MemberUpdate) ClearMemberSettings ¶ added in v1.0.8
func (mu *MemberUpdate) ClearMemberSettings() *MemberUpdate
ClearMemberSettings clears all "member_settings" edges to the MemberSetting entity.
func (*MemberUpdate) ClearMemberSnippetDocs ¶ added in v1.0.9
func (mu *MemberUpdate) ClearMemberSnippetDocs() *MemberUpdate
ClearMemberSnippetDocs clears all "member_snippet_docs" edges to the SnippetDocument entity.
func (*MemberUpdate) ClearMemberSnippetFolders ¶ added in v1.0.9
func (mu *MemberUpdate) ClearMemberSnippetFolders() *MemberUpdate
ClearMemberSnippetFolders clears all "member_snippet_folders" edges to the SnippetFolder entity.
func (*MemberUpdate) ClearMemberSnippetTags ¶ added in v1.0.9
func (mu *MemberUpdate) ClearMemberSnippetTags() *MemberUpdate
ClearMemberSnippetTags clears all "member_snippet_tags" edges to the SnippetTag entity.
func (*MemberUpdate) ClearMemberSnippets ¶ added in v1.0.9
func (mu *MemberUpdate) ClearMemberSnippets() *MemberUpdate
ClearMemberSnippets clears all "member_snippets" edges to the Snippet entity.
func (*MemberUpdate) ClearPassword ¶ added in v1.0.4
func (mu *MemberUpdate) ClearPassword() *MemberUpdate
ClearPassword clears the value of the "password" field.
func (*MemberUpdate) ClearPhone ¶
func (mu *MemberUpdate) ClearPhone() *MemberUpdate
ClearPhone clears the value of the "phone" field.
func (*MemberUpdate) ClearStatus ¶
func (mu *MemberUpdate) ClearStatus() *MemberUpdate
ClearStatus clears the value of the "status" field.
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) RemoveMemberEmailIDs ¶ added in v1.0.8
func (mu *MemberUpdate) RemoveMemberEmailIDs(ids ...int) *MemberUpdate
RemoveMemberEmailIDs removes the "member_emails" edge to MemberEmail entities by IDs.
func (*MemberUpdate) RemoveMemberEmails ¶ added in v1.0.8
func (mu *MemberUpdate) RemoveMemberEmails(m ...*MemberEmail) *MemberUpdate
RemoveMemberEmails removes "member_emails" edges to MemberEmail entities.
func (*MemberUpdate) RemoveMemberSettingIDs ¶ added in v1.0.8
func (mu *MemberUpdate) RemoveMemberSettingIDs(ids ...int) *MemberUpdate
RemoveMemberSettingIDs removes the "member_settings" edge to MemberSetting entities by IDs.
func (*MemberUpdate) RemoveMemberSettings ¶ added in v1.0.8
func (mu *MemberUpdate) RemoveMemberSettings(m ...*MemberSetting) *MemberUpdate
RemoveMemberSettings removes "member_settings" edges to MemberSetting entities.
func (*MemberUpdate) RemoveMemberSnippetDocIDs ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippetDocIDs(ids ...int) *MemberUpdate
RemoveMemberSnippetDocIDs removes the "member_snippet_docs" edge to SnippetDocument entities by IDs.
func (*MemberUpdate) RemoveMemberSnippetDocs ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdate
RemoveMemberSnippetDocs removes "member_snippet_docs" edges to SnippetDocument entities.
func (*MemberUpdate) RemoveMemberSnippetFolderIDs ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippetFolderIDs(ids ...int) *MemberUpdate
RemoveMemberSnippetFolderIDs removes the "member_snippet_folders" edge to SnippetFolder entities by IDs.
func (*MemberUpdate) RemoveMemberSnippetFolders ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdate
RemoveMemberSnippetFolders removes "member_snippet_folders" edges to SnippetFolder entities.
func (*MemberUpdate) RemoveMemberSnippetIDs ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippetIDs(ids ...int) *MemberUpdate
RemoveMemberSnippetIDs removes the "member_snippets" edge to Snippet entities by IDs.
func (*MemberUpdate) RemoveMemberSnippetTagIDs ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippetTagIDs(ids ...int) *MemberUpdate
RemoveMemberSnippetTagIDs removes the "member_snippet_tags" edge to SnippetTag entities by IDs.
func (*MemberUpdate) RemoveMemberSnippetTags ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippetTags(s ...*SnippetTag) *MemberUpdate
RemoveMemberSnippetTags removes "member_snippet_tags" edges to SnippetTag entities.
func (*MemberUpdate) RemoveMemberSnippets ¶ added in v1.0.9
func (mu *MemberUpdate) RemoveMemberSnippets(s ...*Snippet) *MemberUpdate
RemoveMemberSnippets removes "member_snippets" edges to Snippet entities.
func (*MemberUpdate) Save ¶
func (mu *MemberUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MemberUpdate) SaveX ¶
func (mu *MemberUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemberUpdate) SetDeleteTime ¶
func (mu *MemberUpdate) SetDeleteTime(t time.Time) *MemberUpdate
SetDeleteTime sets the "delete_time" field.
func (*MemberUpdate) SetGroupID ¶ added in v1.0.2
func (mu *MemberUpdate) SetGroupID(i int) *MemberUpdate
SetGroupID sets the "group_id" field.
func (*MemberUpdate) SetGroups ¶ added in v1.0.9
func (mu *MemberUpdate) SetGroups(g *Group) *MemberUpdate
SetGroups sets the "groups" edge to the Group entity.
func (*MemberUpdate) SetGroupsID ¶ added in v1.0.9
func (mu *MemberUpdate) SetGroupsID(id int) *MemberUpdate
SetGroupsID sets the "groups" edge to the Group entity by ID.
func (*MemberUpdate) SetLastPwdAuth ¶
func (mu *MemberUpdate) SetLastPwdAuth(t time.Time) *MemberUpdate
SetLastPwdAuth sets the "last_pwd_auth" field.
func (*MemberUpdate) SetNickname ¶
func (mu *MemberUpdate) SetNickname(s string) *MemberUpdate
SetNickname sets the "nickname" field.
func (*MemberUpdate) SetNillableDeleteTime ¶
func (mu *MemberUpdate) SetNillableDeleteTime(t *time.Time) *MemberUpdate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*MemberUpdate) SetNillableGroupID ¶ added in v1.0.2
func (mu *MemberUpdate) SetNillableGroupID(i *int) *MemberUpdate
SetNillableGroupID sets the "group_id" field if the given value is not nil.
func (*MemberUpdate) SetNillableGroupsID ¶ added in v1.0.9
func (mu *MemberUpdate) SetNillableGroupsID(id *int) *MemberUpdate
SetNillableGroupsID sets the "groups" edge to the Group entity by ID if the given value is not nil.
func (*MemberUpdate) SetNillableLastPwdAuth ¶
func (mu *MemberUpdate) SetNillableLastPwdAuth(t *time.Time) *MemberUpdate
SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.
func (*MemberUpdate) SetNillablePassword ¶ added in v1.0.4
func (mu *MemberUpdate) SetNillablePassword(s *string) *MemberUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MemberUpdate) SetNillablePhone ¶
func (mu *MemberUpdate) SetNillablePhone(s *string) *MemberUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MemberUpdate) SetNillableStatus ¶
func (mu *MemberUpdate) SetNillableStatus(m *member.Status) *MemberUpdate
SetNillableStatus sets the "status" 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) SetPhone ¶
func (mu *MemberUpdate) SetPhone(s string) *MemberUpdate
SetPhone sets the "phone" field.
func (*MemberUpdate) SetSignature ¶
func (mu *MemberUpdate) SetSignature(s string) *MemberUpdate
SetSignature sets the "signature" field.
func (*MemberUpdate) SetStatus ¶
func (mu *MemberUpdate) SetStatus(m member.Status) *MemberUpdate
SetStatus sets the "status" field.
func (*MemberUpdate) SetUpdateTime ¶
func (mu *MemberUpdate) SetUpdateTime(t time.Time) *MemberUpdate
SetUpdateTime sets the "update_time" field.
func (*MemberUpdate) Where ¶
func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate
Where adds a new predicate for the MemberUpdate builder.
type MemberUpdateOne ¶
type MemberUpdateOne struct {
// contains filtered or unexported fields
}
MemberUpdateOne is the builder for updating a single Member entity.
func (*MemberUpdateOne) AddMemberEmailIDs ¶ added in v1.0.8
func (muo *MemberUpdateOne) AddMemberEmailIDs(ids ...int) *MemberUpdateOne
AddMemberEmailIDs adds the "member_emails" edge to the MemberEmail entity by IDs.
func (*MemberUpdateOne) AddMemberEmails ¶ added in v1.0.8
func (muo *MemberUpdateOne) AddMemberEmails(m ...*MemberEmail) *MemberUpdateOne
AddMemberEmails adds the "member_emails" edges to the MemberEmail entity.
func (*MemberUpdateOne) AddMemberSettingIDs ¶ added in v1.0.8
func (muo *MemberUpdateOne) AddMemberSettingIDs(ids ...int) *MemberUpdateOne
AddMemberSettingIDs adds the "member_settings" edge to the MemberSetting entity by IDs.
func (*MemberUpdateOne) AddMemberSettings ¶ added in v1.0.8
func (muo *MemberUpdateOne) AddMemberSettings(m ...*MemberSetting) *MemberUpdateOne
AddMemberSettings adds the "member_settings" edges to the MemberSetting entity.
func (*MemberUpdateOne) AddMemberSnippetDocIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippetDocIDs(ids ...int) *MemberUpdateOne
AddMemberSnippetDocIDs adds the "member_snippet_docs" edge to the SnippetDocument entity by IDs.
func (*MemberUpdateOne) AddMemberSnippetDocs ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdateOne
AddMemberSnippetDocs adds the "member_snippet_docs" edges to the SnippetDocument entity.
func (*MemberUpdateOne) AddMemberSnippetFolderIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippetFolderIDs(ids ...int) *MemberUpdateOne
AddMemberSnippetFolderIDs adds the "member_snippet_folders" edge to the SnippetFolder entity by IDs.
func (*MemberUpdateOne) AddMemberSnippetFolders ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdateOne
AddMemberSnippetFolders adds the "member_snippet_folders" edges to the SnippetFolder entity.
func (*MemberUpdateOne) AddMemberSnippetIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippetIDs(ids ...int) *MemberUpdateOne
AddMemberSnippetIDs adds the "member_snippets" edge to the Snippet entity by IDs.
func (*MemberUpdateOne) AddMemberSnippetTagIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippetTagIDs(ids ...int) *MemberUpdateOne
AddMemberSnippetTagIDs adds the "member_snippet_tags" edge to the SnippetTag entity by IDs.
func (*MemberUpdateOne) AddMemberSnippetTags ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippetTags(s ...*SnippetTag) *MemberUpdateOne
AddMemberSnippetTags adds the "member_snippet_tags" edges to the SnippetTag entity.
func (*MemberUpdateOne) AddMemberSnippets ¶ added in v1.0.9
func (muo *MemberUpdateOne) AddMemberSnippets(s ...*Snippet) *MemberUpdateOne
AddMemberSnippets adds the "member_snippets" edges to the Snippet entity.
func (*MemberUpdateOne) ClearDeleteTime ¶
func (muo *MemberUpdateOne) ClearDeleteTime() *MemberUpdateOne
ClearDeleteTime clears the value of the "delete_time" field.
func (*MemberUpdateOne) ClearGroupID ¶ added in v1.0.2
func (muo *MemberUpdateOne) ClearGroupID() *MemberUpdateOne
ClearGroupID clears the value of the "group_id" field.
func (*MemberUpdateOne) ClearGroups ¶ added in v1.0.9
func (muo *MemberUpdateOne) ClearGroups() *MemberUpdateOne
ClearGroups clears the "groups" edge to the Group entity.
func (*MemberUpdateOne) ClearLastPwdAuth ¶
func (muo *MemberUpdateOne) ClearLastPwdAuth() *MemberUpdateOne
ClearLastPwdAuth clears the value of the "last_pwd_auth" field.
func (*MemberUpdateOne) ClearMemberEmails ¶ added in v1.0.8
func (muo *MemberUpdateOne) ClearMemberEmails() *MemberUpdateOne
ClearMemberEmails clears all "member_emails" edges to the MemberEmail entity.
func (*MemberUpdateOne) ClearMemberSettings ¶ added in v1.0.8
func (muo *MemberUpdateOne) ClearMemberSettings() *MemberUpdateOne
ClearMemberSettings clears all "member_settings" edges to the MemberSetting entity.
func (*MemberUpdateOne) ClearMemberSnippetDocs ¶ added in v1.0.9
func (muo *MemberUpdateOne) ClearMemberSnippetDocs() *MemberUpdateOne
ClearMemberSnippetDocs clears all "member_snippet_docs" edges to the SnippetDocument entity.
func (*MemberUpdateOne) ClearMemberSnippetFolders ¶ added in v1.0.9
func (muo *MemberUpdateOne) ClearMemberSnippetFolders() *MemberUpdateOne
ClearMemberSnippetFolders clears all "member_snippet_folders" edges to the SnippetFolder entity.
func (*MemberUpdateOne) ClearMemberSnippetTags ¶ added in v1.0.9
func (muo *MemberUpdateOne) ClearMemberSnippetTags() *MemberUpdateOne
ClearMemberSnippetTags clears all "member_snippet_tags" edges to the SnippetTag entity.
func (*MemberUpdateOne) ClearMemberSnippets ¶ added in v1.0.9
func (muo *MemberUpdateOne) ClearMemberSnippets() *MemberUpdateOne
ClearMemberSnippets clears all "member_snippets" edges to the Snippet entity.
func (*MemberUpdateOne) ClearPassword ¶ added in v1.0.4
func (muo *MemberUpdateOne) ClearPassword() *MemberUpdateOne
ClearPassword clears the value of the "password" field.
func (*MemberUpdateOne) ClearPhone ¶
func (muo *MemberUpdateOne) ClearPhone() *MemberUpdateOne
ClearPhone clears the value of the "phone" field.
func (*MemberUpdateOne) ClearStatus ¶
func (muo *MemberUpdateOne) ClearStatus() *MemberUpdateOne
ClearStatus clears the value of the "status" field.
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) RemoveMemberEmailIDs ¶ added in v1.0.8
func (muo *MemberUpdateOne) RemoveMemberEmailIDs(ids ...int) *MemberUpdateOne
RemoveMemberEmailIDs removes the "member_emails" edge to MemberEmail entities by IDs.
func (*MemberUpdateOne) RemoveMemberEmails ¶ added in v1.0.8
func (muo *MemberUpdateOne) RemoveMemberEmails(m ...*MemberEmail) *MemberUpdateOne
RemoveMemberEmails removes "member_emails" edges to MemberEmail entities.
func (*MemberUpdateOne) RemoveMemberSettingIDs ¶ added in v1.0.8
func (muo *MemberUpdateOne) RemoveMemberSettingIDs(ids ...int) *MemberUpdateOne
RemoveMemberSettingIDs removes the "member_settings" edge to MemberSetting entities by IDs.
func (*MemberUpdateOne) RemoveMemberSettings ¶ added in v1.0.8
func (muo *MemberUpdateOne) RemoveMemberSettings(m ...*MemberSetting) *MemberUpdateOne
RemoveMemberSettings removes "member_settings" edges to MemberSetting entities.
func (*MemberUpdateOne) RemoveMemberSnippetDocIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippetDocIDs(ids ...int) *MemberUpdateOne
RemoveMemberSnippetDocIDs removes the "member_snippet_docs" edge to SnippetDocument entities by IDs.
func (*MemberUpdateOne) RemoveMemberSnippetDocs ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippetDocs(s ...*SnippetDocument) *MemberUpdateOne
RemoveMemberSnippetDocs removes "member_snippet_docs" edges to SnippetDocument entities.
func (*MemberUpdateOne) RemoveMemberSnippetFolderIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippetFolderIDs(ids ...int) *MemberUpdateOne
RemoveMemberSnippetFolderIDs removes the "member_snippet_folders" edge to SnippetFolder entities by IDs.
func (*MemberUpdateOne) RemoveMemberSnippetFolders ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippetFolders(s ...*SnippetFolder) *MemberUpdateOne
RemoveMemberSnippetFolders removes "member_snippet_folders" edges to SnippetFolder entities.
func (*MemberUpdateOne) RemoveMemberSnippetIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippetIDs(ids ...int) *MemberUpdateOne
RemoveMemberSnippetIDs removes the "member_snippets" edge to Snippet entities by IDs.
func (*MemberUpdateOne) RemoveMemberSnippetTagIDs ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippetTagIDs(ids ...int) *MemberUpdateOne
RemoveMemberSnippetTagIDs removes the "member_snippet_tags" edge to SnippetTag entities by IDs.
func (*MemberUpdateOne) RemoveMemberSnippetTags ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippetTags(s ...*SnippetTag) *MemberUpdateOne
RemoveMemberSnippetTags removes "member_snippet_tags" edges to SnippetTag entities.
func (*MemberUpdateOne) RemoveMemberSnippets ¶ added in v1.0.9
func (muo *MemberUpdateOne) RemoveMemberSnippets(s ...*Snippet) *MemberUpdateOne
RemoveMemberSnippets removes "member_snippets" edges to Snippet entities.
func (*MemberUpdateOne) Save ¶
func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)
Save executes the query and returns the updated Member entity.
func (*MemberUpdateOne) SaveX ¶
func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member
SaveX is like Save, but panics if an error occurs.
func (*MemberUpdateOne) Select ¶
func (muo *MemberUpdateOne) Select(field string, fields ...string) *MemberUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MemberUpdateOne) SetDeleteTime ¶
func (muo *MemberUpdateOne) SetDeleteTime(t time.Time) *MemberUpdateOne
SetDeleteTime sets the "delete_time" field.
func (*MemberUpdateOne) SetGroupID ¶ added in v1.0.2
func (muo *MemberUpdateOne) SetGroupID(i int) *MemberUpdateOne
SetGroupID sets the "group_id" field.
func (*MemberUpdateOne) SetGroups ¶ added in v1.0.9
func (muo *MemberUpdateOne) SetGroups(g *Group) *MemberUpdateOne
SetGroups sets the "groups" edge to the Group entity.
func (*MemberUpdateOne) SetGroupsID ¶ added in v1.0.9
func (muo *MemberUpdateOne) SetGroupsID(id int) *MemberUpdateOne
SetGroupsID sets the "groups" edge to the Group entity by ID.
func (*MemberUpdateOne) SetLastPwdAuth ¶
func (muo *MemberUpdateOne) SetLastPwdAuth(t time.Time) *MemberUpdateOne
SetLastPwdAuth sets the "last_pwd_auth" field.
func (*MemberUpdateOne) SetNickname ¶
func (muo *MemberUpdateOne) SetNickname(s string) *MemberUpdateOne
SetNickname sets the "nickname" field.
func (*MemberUpdateOne) SetNillableDeleteTime ¶
func (muo *MemberUpdateOne) SetNillableDeleteTime(t *time.Time) *MemberUpdateOne
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableGroupID ¶ added in v1.0.2
func (muo *MemberUpdateOne) SetNillableGroupID(i *int) *MemberUpdateOne
SetNillableGroupID sets the "group_id" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableGroupsID ¶ added in v1.0.9
func (muo *MemberUpdateOne) SetNillableGroupsID(id *int) *MemberUpdateOne
SetNillableGroupsID sets the "groups" edge to the Group entity by ID if the given value is not nil.
func (*MemberUpdateOne) SetNillableLastPwdAuth ¶
func (muo *MemberUpdateOne) SetNillableLastPwdAuth(t *time.Time) *MemberUpdateOne
SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.
func (*MemberUpdateOne) SetNillablePassword ¶ added in v1.0.4
func (muo *MemberUpdateOne) SetNillablePassword(s *string) *MemberUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MemberUpdateOne) SetNillablePhone ¶
func (muo *MemberUpdateOne) SetNillablePhone(s *string) *MemberUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableStatus ¶
func (muo *MemberUpdateOne) SetNillableStatus(m *member.Status) *MemberUpdateOne
SetNillableStatus sets the "status" 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) SetPhone ¶
func (muo *MemberUpdateOne) SetPhone(s string) *MemberUpdateOne
SetPhone sets the "phone" field.
func (*MemberUpdateOne) SetSignature ¶
func (muo *MemberUpdateOne) SetSignature(s string) *MemberUpdateOne
SetSignature sets the "signature" field.
func (*MemberUpdateOne) SetStatus ¶
func (muo *MemberUpdateOne) SetStatus(m member.Status) *MemberUpdateOne
SetStatus sets the "status" field.
func (*MemberUpdateOne) SetUpdateTime ¶
func (muo *MemberUpdateOne) SetUpdateTime(t time.Time) *MemberUpdateOne
SetUpdateTime sets the "update_time" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type 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 Snippet ¶ added in v1.0.8
type Snippet struct { // ID of the ent. ID int `json:"id,omitempty"` // Sn holds the value of the "sn" field. Sn string `json:"sn,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"owner_id,omitempty"` // Title holds the value of the "title" field. Title *string `json:"title,omitempty"` // FolderID holds the value of the "folder_id" field. FolderID *int `json:"folder_id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SnippetQuery when eager-loading is set. Edges SnippetEdges `json:"edges"` // contains filtered or unexported fields }
Snippet is the model entity for the Snippet schema.
func (*Snippet) QuerySnippetDocs ¶ added in v1.0.8
func (s *Snippet) QuerySnippetDocs() *SnippetDocumentQuery
QuerySnippetDocs queries the "snippet_docs" edge of the Snippet entity.
func (*Snippet) QuerySnippetOwner ¶ added in v1.0.8
func (s *Snippet) QuerySnippetOwner() *MemberQuery
QuerySnippetOwner queries the "snippet_owner" edge of the Snippet entity.
func (*Snippet) QuerySnippetTags ¶ added in v1.0.9
func (s *Snippet) QuerySnippetTags() *SnippetTagQuery
QuerySnippetTags queries the "snippet_tags" edge of the Snippet entity.
func (*Snippet) Unwrap ¶ added in v1.0.8
Unwrap unwraps the Snippet entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Snippet) Update ¶ added in v1.0.8
func (s *Snippet) Update() *SnippetUpdateOne
Update returns a builder for updating this Snippet. Note that you need to call Snippet.Unwrap() before calling this method if this Snippet was returned from a transaction, and the transaction was committed or rolled back.
type SnippetClient ¶ added in v1.0.8
type SnippetClient struct {
// contains filtered or unexported fields
}
SnippetClient is a client for the Snippet schema.
func NewSnippetClient ¶ added in v1.0.8
func NewSnippetClient(c config) *SnippetClient
NewSnippetClient returns a client for the Snippet from the given config.
func (*SnippetClient) Create ¶ added in v1.0.8
func (c *SnippetClient) Create() *SnippetCreate
Create returns a create builder for Snippet.
func (*SnippetClient) CreateBulk ¶ added in v1.0.8
func (c *SnippetClient) CreateBulk(builders ...*SnippetCreate) *SnippetCreateBulk
CreateBulk returns a builder for creating a bulk of Snippet entities.
func (*SnippetClient) Delete ¶ added in v1.0.8
func (c *SnippetClient) Delete() *SnippetDelete
Delete returns a delete builder for Snippet.
func (*SnippetClient) DeleteOne ¶ added in v1.0.8
func (c *SnippetClient) DeleteOne(s *Snippet) *SnippetDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SnippetClient) DeleteOneID ¶ added in v1.0.8
func (c *SnippetClient) DeleteOneID(id int) *SnippetDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SnippetClient) GetX ¶ added in v1.0.8
func (c *SnippetClient) GetX(ctx context.Context, id int) *Snippet
GetX is like Get, but panics if an error occurs.
func (*SnippetClient) Hooks ¶ added in v1.0.8
func (c *SnippetClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SnippetClient) Query ¶ added in v1.0.8
func (c *SnippetClient) Query() *SnippetQuery
Query returns a query builder for Snippet.
func (*SnippetClient) QuerySnippetDocs ¶ added in v1.0.8
func (c *SnippetClient) QuerySnippetDocs(s *Snippet) *SnippetDocumentQuery
QuerySnippetDocs queries the snippet_docs edge of a Snippet.
func (*SnippetClient) QuerySnippetOwner ¶ added in v1.0.8
func (c *SnippetClient) QuerySnippetOwner(s *Snippet) *MemberQuery
QuerySnippetOwner queries the snippet_owner edge of a Snippet.
func (*SnippetClient) QuerySnippetTags ¶ added in v1.0.9
func (c *SnippetClient) QuerySnippetTags(s *Snippet) *SnippetTagQuery
QuerySnippetTags queries the snippet_tags edge of a Snippet.
func (*SnippetClient) Update ¶ added in v1.0.8
func (c *SnippetClient) Update() *SnippetUpdate
Update returns an update builder for Snippet.
func (*SnippetClient) UpdateOne ¶ added in v1.0.8
func (c *SnippetClient) UpdateOne(s *Snippet) *SnippetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SnippetClient) UpdateOneID ¶ added in v1.0.8
func (c *SnippetClient) UpdateOneID(id int) *SnippetUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SnippetClient) Use ¶ added in v1.0.8
func (c *SnippetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `snippet.Hooks(f(g(h())))`.
type SnippetCreate ¶ added in v1.0.8
type SnippetCreate struct {
// contains filtered or unexported fields
}
SnippetCreate is the builder for creating a Snippet entity.
func (*SnippetCreate) AddSnippetDocIDs ¶ added in v1.0.8
func (sc *SnippetCreate) AddSnippetDocIDs(ids ...int) *SnippetCreate
AddSnippetDocIDs adds the "snippet_docs" edge to the SnippetDocument entity by IDs.
func (*SnippetCreate) AddSnippetDocs ¶ added in v1.0.8
func (sc *SnippetCreate) AddSnippetDocs(s ...*SnippetDocument) *SnippetCreate
AddSnippetDocs adds the "snippet_docs" edges to the SnippetDocument entity.
func (*SnippetCreate) AddSnippetTagIDs ¶ added in v1.0.9
func (sc *SnippetCreate) AddSnippetTagIDs(ids ...int) *SnippetCreate
AddSnippetTagIDs adds the "snippet_tags" edge to the SnippetTag entity by IDs.
func (*SnippetCreate) AddSnippetTags ¶ added in v1.0.9
func (sc *SnippetCreate) AddSnippetTags(s ...*SnippetTag) *SnippetCreate
AddSnippetTags adds the "snippet_tags" edges to the SnippetTag entity.
func (*SnippetCreate) Mutation ¶ added in v1.0.8
func (sc *SnippetCreate) Mutation() *SnippetMutation
Mutation returns the SnippetMutation object of the builder.
func (*SnippetCreate) Save ¶ added in v1.0.8
func (sc *SnippetCreate) Save(ctx context.Context) (*Snippet, error)
Save creates the Snippet in the database.
func (*SnippetCreate) SaveX ¶ added in v1.0.8
func (sc *SnippetCreate) SaveX(ctx context.Context) *Snippet
SaveX calls Save and panics if Save returns an error.
func (*SnippetCreate) SetCreateTime ¶ added in v1.0.8
func (sc *SnippetCreate) SetCreateTime(t time.Time) *SnippetCreate
SetCreateTime sets the "create_time" field.
func (*SnippetCreate) SetFolderID ¶ added in v1.0.8
func (sc *SnippetCreate) SetFolderID(i int) *SnippetCreate
SetFolderID sets the "folder_id" field.
func (*SnippetCreate) SetID ¶ added in v1.0.8
func (sc *SnippetCreate) SetID(i int) *SnippetCreate
SetID sets the "id" field.
func (*SnippetCreate) SetNillableCreateTime ¶ added in v1.0.8
func (sc *SnippetCreate) SetNillableCreateTime(t *time.Time) *SnippetCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SnippetCreate) SetNillableFolderID ¶ added in v1.0.8
func (sc *SnippetCreate) SetNillableFolderID(i *int) *SnippetCreate
SetNillableFolderID sets the "folder_id" field if the given value is not nil.
func (*SnippetCreate) SetNillableSn ¶ added in v1.0.8
func (sc *SnippetCreate) SetNillableSn(s *string) *SnippetCreate
SetNillableSn sets the "sn" field if the given value is not nil.
func (*SnippetCreate) SetNillableTitle ¶ added in v1.0.8
func (sc *SnippetCreate) SetNillableTitle(s *string) *SnippetCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*SnippetCreate) SetNillableUpdateTime ¶ added in v1.0.8
func (sc *SnippetCreate) SetNillableUpdateTime(t *time.Time) *SnippetCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SnippetCreate) SetOwnerID ¶ added in v1.0.8
func (sc *SnippetCreate) SetOwnerID(i int) *SnippetCreate
SetOwnerID sets the "owner_id" field.
func (*SnippetCreate) SetSn ¶ added in v1.0.8
func (sc *SnippetCreate) SetSn(s string) *SnippetCreate
SetSn sets the "sn" field.
func (*SnippetCreate) SetSnippetOwner ¶ added in v1.0.8
func (sc *SnippetCreate) SetSnippetOwner(m *Member) *SnippetCreate
SetSnippetOwner sets the "snippet_owner" edge to the Member entity.
func (*SnippetCreate) SetSnippetOwnerID ¶ added in v1.0.8
func (sc *SnippetCreate) SetSnippetOwnerID(id int) *SnippetCreate
SetSnippetOwnerID sets the "snippet_owner" edge to the Member entity by ID.
func (*SnippetCreate) SetTitle ¶ added in v1.0.8
func (sc *SnippetCreate) SetTitle(s string) *SnippetCreate
SetTitle sets the "title" field.
func (*SnippetCreate) SetUpdateTime ¶ added in v1.0.8
func (sc *SnippetCreate) SetUpdateTime(t time.Time) *SnippetCreate
SetUpdateTime sets the "update_time" field.
type SnippetCreateBulk ¶ added in v1.0.8
type SnippetCreateBulk struct {
// contains filtered or unexported fields
}
SnippetCreateBulk is the builder for creating many Snippet entities in bulk.
type SnippetDelete ¶ added in v1.0.8
type SnippetDelete struct {
// contains filtered or unexported fields
}
SnippetDelete is the builder for deleting a Snippet entity.
func (*SnippetDelete) Exec ¶ added in v1.0.8
func (sd *SnippetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SnippetDelete) ExecX ¶ added in v1.0.8
func (sd *SnippetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SnippetDelete) Where ¶ added in v1.0.8
func (sd *SnippetDelete) Where(ps ...predicate.Snippet) *SnippetDelete
Where adds a new predicate to the SnippetDelete builder.
type SnippetDeleteOne ¶ added in v1.0.8
type SnippetDeleteOne struct {
// contains filtered or unexported fields
}
SnippetDeleteOne is the builder for deleting a single Snippet entity.
func (*SnippetDeleteOne) Exec ¶ added in v1.0.8
func (sdo *SnippetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SnippetDeleteOne) ExecX ¶ added in v1.0.8
func (sdo *SnippetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SnippetDocument ¶ added in v1.0.8
type SnippetDocument struct { // ID of the ent. ID int `json:"id,omitempty"` // SnippetID holds the value of the "snippet_id" field. SnippetID int `json:"snippet_id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"owner_id,omitempty"` // Language holds the value of the "language" field. Language string `json:"language,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Raw holds the value of the "raw" field. Raw string `json:"raw,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SnippetDocumentQuery when eager-loading is set. Edges SnippetDocumentEdges `json:"edges"` // contains filtered or unexported fields }
SnippetDocument is the model entity for the SnippetDocument schema.
func (*SnippetDocument) QueryDocOwner ¶ added in v1.0.8
func (sd *SnippetDocument) QueryDocOwner() *MemberQuery
QueryDocOwner queries the "doc_owner" edge of the SnippetDocument entity.
func (*SnippetDocument) QueryDocSnippet ¶ added in v1.0.8
func (sd *SnippetDocument) QueryDocSnippet() *SnippetQuery
QueryDocSnippet queries the "doc_snippet" edge of the SnippetDocument entity.
func (*SnippetDocument) String ¶ added in v1.0.8
func (sd *SnippetDocument) String() string
String implements the fmt.Stringer.
func (*SnippetDocument) Unwrap ¶ added in v1.0.8
func (sd *SnippetDocument) Unwrap() *SnippetDocument
Unwrap unwraps the SnippetDocument entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*SnippetDocument) Update ¶ added in v1.0.8
func (sd *SnippetDocument) Update() *SnippetDocumentUpdateOne
Update returns a builder for updating this SnippetDocument. Note that you need to call SnippetDocument.Unwrap() before calling this method if this SnippetDocument was returned from a transaction, and the transaction was committed or rolled back.
type SnippetDocumentClient ¶ added in v1.0.8
type SnippetDocumentClient struct {
// contains filtered or unexported fields
}
SnippetDocumentClient is a client for the SnippetDocument schema.
func NewSnippetDocumentClient ¶ added in v1.0.8
func NewSnippetDocumentClient(c config) *SnippetDocumentClient
NewSnippetDocumentClient returns a client for the SnippetDocument from the given config.
func (*SnippetDocumentClient) Create ¶ added in v1.0.8
func (c *SnippetDocumentClient) Create() *SnippetDocumentCreate
Create returns a create builder for SnippetDocument.
func (*SnippetDocumentClient) CreateBulk ¶ added in v1.0.8
func (c *SnippetDocumentClient) CreateBulk(builders ...*SnippetDocumentCreate) *SnippetDocumentCreateBulk
CreateBulk returns a builder for creating a bulk of SnippetDocument entities.
func (*SnippetDocumentClient) Delete ¶ added in v1.0.8
func (c *SnippetDocumentClient) Delete() *SnippetDocumentDelete
Delete returns a delete builder for SnippetDocument.
func (*SnippetDocumentClient) DeleteOne ¶ added in v1.0.8
func (c *SnippetDocumentClient) DeleteOne(sd *SnippetDocument) *SnippetDocumentDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SnippetDocumentClient) DeleteOneID ¶ added in v1.0.8
func (c *SnippetDocumentClient) DeleteOneID(id int) *SnippetDocumentDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SnippetDocumentClient) Get ¶ added in v1.0.8
func (c *SnippetDocumentClient) Get(ctx context.Context, id int) (*SnippetDocument, error)
Get returns a SnippetDocument entity by its id.
func (*SnippetDocumentClient) GetX ¶ added in v1.0.8
func (c *SnippetDocumentClient) GetX(ctx context.Context, id int) *SnippetDocument
GetX is like Get, but panics if an error occurs.
func (*SnippetDocumentClient) Hooks ¶ added in v1.0.8
func (c *SnippetDocumentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SnippetDocumentClient) Query ¶ added in v1.0.8
func (c *SnippetDocumentClient) Query() *SnippetDocumentQuery
Query returns a query builder for SnippetDocument.
func (*SnippetDocumentClient) QueryDocOwner ¶ added in v1.0.8
func (c *SnippetDocumentClient) QueryDocOwner(sd *SnippetDocument) *MemberQuery
QueryDocOwner queries the doc_owner edge of a SnippetDocument.
func (*SnippetDocumentClient) QueryDocSnippet ¶ added in v1.0.8
func (c *SnippetDocumentClient) QueryDocSnippet(sd *SnippetDocument) *SnippetQuery
QueryDocSnippet queries the doc_snippet edge of a SnippetDocument.
func (*SnippetDocumentClient) Update ¶ added in v1.0.8
func (c *SnippetDocumentClient) Update() *SnippetDocumentUpdate
Update returns an update builder for SnippetDocument.
func (*SnippetDocumentClient) UpdateOne ¶ added in v1.0.8
func (c *SnippetDocumentClient) UpdateOne(sd *SnippetDocument) *SnippetDocumentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SnippetDocumentClient) UpdateOneID ¶ added in v1.0.8
func (c *SnippetDocumentClient) UpdateOneID(id int) *SnippetDocumentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SnippetDocumentClient) Use ¶ added in v1.0.8
func (c *SnippetDocumentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `snippetdocument.Hooks(f(g(h())))`.
type SnippetDocumentCreate ¶ added in v1.0.8
type SnippetDocumentCreate struct {
// contains filtered or unexported fields
}
SnippetDocumentCreate is the builder for creating a SnippetDocument entity.
func (*SnippetDocumentCreate) Mutation ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) Mutation() *SnippetDocumentMutation
Mutation returns the SnippetDocumentMutation object of the builder.
func (*SnippetDocumentCreate) Save ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) Save(ctx context.Context) (*SnippetDocument, error)
Save creates the SnippetDocument in the database.
func (*SnippetDocumentCreate) SaveX ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SaveX(ctx context.Context) *SnippetDocument
SaveX calls Save and panics if Save returns an error.
func (*SnippetDocumentCreate) SetCreateTime ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetCreateTime(t time.Time) *SnippetDocumentCreate
SetCreateTime sets the "create_time" field.
func (*SnippetDocumentCreate) SetDescription ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetDescription(s string) *SnippetDocumentCreate
SetDescription sets the "description" field.
func (*SnippetDocumentCreate) SetDocOwner ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetDocOwner(m *Member) *SnippetDocumentCreate
SetDocOwner sets the "doc_owner" edge to the Member entity.
func (*SnippetDocumentCreate) SetDocOwnerID ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetDocOwnerID(id int) *SnippetDocumentCreate
SetDocOwnerID sets the "doc_owner" edge to the Member entity by ID.
func (*SnippetDocumentCreate) SetDocSnippet ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetDocSnippet(s *Snippet) *SnippetDocumentCreate
SetDocSnippet sets the "doc_snippet" edge to the Snippet entity.
func (*SnippetDocumentCreate) SetDocSnippetID ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetDocSnippetID(id int) *SnippetDocumentCreate
SetDocSnippetID sets the "doc_snippet" edge to the Snippet entity by ID.
func (*SnippetDocumentCreate) SetID ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetID(i int) *SnippetDocumentCreate
SetID sets the "id" field.
func (*SnippetDocumentCreate) SetLanguage ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetLanguage(s string) *SnippetDocumentCreate
SetLanguage sets the "language" field.
func (*SnippetDocumentCreate) SetNillableCreateTime ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetNillableCreateTime(t *time.Time) *SnippetDocumentCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SnippetDocumentCreate) SetNillableLanguage ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetNillableLanguage(s *string) *SnippetDocumentCreate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*SnippetDocumentCreate) SetNillableUpdateTime ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetNillableUpdateTime(t *time.Time) *SnippetDocumentCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SnippetDocumentCreate) SetOwnerID ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetOwnerID(i int) *SnippetDocumentCreate
SetOwnerID sets the "owner_id" field.
func (*SnippetDocumentCreate) SetRaw ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetRaw(s string) *SnippetDocumentCreate
SetRaw sets the "raw" field.
func (*SnippetDocumentCreate) SetSnippetID ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetSnippetID(i int) *SnippetDocumentCreate
SetSnippetID sets the "snippet_id" field.
func (*SnippetDocumentCreate) SetUpdateTime ¶ added in v1.0.8
func (sdc *SnippetDocumentCreate) SetUpdateTime(t time.Time) *SnippetDocumentCreate
SetUpdateTime sets the "update_time" field.
type SnippetDocumentCreateBulk ¶ added in v1.0.8
type SnippetDocumentCreateBulk struct {
// contains filtered or unexported fields
}
SnippetDocumentCreateBulk is the builder for creating many SnippetDocument entities in bulk.
func (*SnippetDocumentCreateBulk) Save ¶ added in v1.0.8
func (sdcb *SnippetDocumentCreateBulk) Save(ctx context.Context) ([]*SnippetDocument, error)
Save creates the SnippetDocument entities in the database.
func (*SnippetDocumentCreateBulk) SaveX ¶ added in v1.0.8
func (sdcb *SnippetDocumentCreateBulk) SaveX(ctx context.Context) []*SnippetDocument
SaveX is like Save, but panics if an error occurs.
type SnippetDocumentDelete ¶ added in v1.0.8
type SnippetDocumentDelete struct {
// contains filtered or unexported fields
}
SnippetDocumentDelete is the builder for deleting a SnippetDocument entity.
func (*SnippetDocumentDelete) Exec ¶ added in v1.0.8
func (sdd *SnippetDocumentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SnippetDocumentDelete) ExecX ¶ added in v1.0.8
func (sdd *SnippetDocumentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SnippetDocumentDelete) Where ¶ added in v1.0.8
func (sdd *SnippetDocumentDelete) Where(ps ...predicate.SnippetDocument) *SnippetDocumentDelete
Where adds a new predicate to the SnippetDocumentDelete builder.
type SnippetDocumentDeleteOne ¶ added in v1.0.8
type SnippetDocumentDeleteOne struct {
// contains filtered or unexported fields
}
SnippetDocumentDeleteOne is the builder for deleting a single SnippetDocument entity.
func (*SnippetDocumentDeleteOne) Exec ¶ added in v1.0.8
func (sddo *SnippetDocumentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SnippetDocumentDeleteOne) ExecX ¶ added in v1.0.8
func (sddo *SnippetDocumentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SnippetDocumentEdges ¶ added in v1.0.8
type SnippetDocumentEdges struct { // DocOwner holds the value of the doc_owner edge. DocOwner *Member `json:"doc_owner,omitempty"` // DocSnippet holds the value of the doc_snippet edge. DocSnippet *Snippet `json:"doc_snippet,omitempty"` // contains filtered or unexported fields }
SnippetDocumentEdges holds the relations/edges for other nodes in the graph.
func (SnippetDocumentEdges) DocOwnerOrErr ¶ added in v1.0.8
func (e SnippetDocumentEdges) DocOwnerOrErr() (*Member, error)
DocOwnerOrErr returns the DocOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SnippetDocumentEdges) DocSnippetOrErr ¶ added in v1.0.8
func (e SnippetDocumentEdges) DocSnippetOrErr() (*Snippet, error)
DocSnippetOrErr returns the DocSnippet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SnippetDocumentGroupBy ¶ added in v1.0.8
type SnippetDocumentGroupBy struct {
// contains filtered or unexported fields
}
SnippetDocumentGroupBy is the group-by builder for SnippetDocument entities.
func (*SnippetDocumentGroupBy) Aggregate ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Aggregate(fns ...AggregateFunc) *SnippetDocumentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SnippetDocumentGroupBy) Bool ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetDocumentGroupBy) BoolX ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetDocumentGroupBy) Bools ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetDocumentGroupBy) BoolsX ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetDocumentGroupBy) Float64 ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetDocumentGroupBy) Float64X ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetDocumentGroupBy) Float64s ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetDocumentGroupBy) Float64sX ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetDocumentGroupBy) Int ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetDocumentGroupBy) IntX ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetDocumentGroupBy) Ints ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetDocumentGroupBy) IntsX ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetDocumentGroupBy) Scan ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SnippetDocumentGroupBy) ScanX ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetDocumentGroupBy) String ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetDocumentGroupBy) StringX ¶ added in v1.0.8
func (sdgb *SnippetDocumentGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetDocumentMutation ¶ added in v1.0.8
type SnippetDocumentMutation struct {
// contains filtered or unexported fields
}
SnippetDocumentMutation represents an operation that mutates the SnippetDocument nodes in the graph.
func (*SnippetDocumentMutation) AddField ¶ added in v1.0.8
func (m *SnippetDocumentMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetDocumentMutation) AddedEdges ¶ added in v1.0.8
func (m *SnippetDocumentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SnippetDocumentMutation) AddedField ¶ added in v1.0.8
func (m *SnippetDocumentMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetDocumentMutation) AddedFields ¶ added in v1.0.8
func (m *SnippetDocumentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SnippetDocumentMutation) AddedIDs ¶ added in v1.0.8
func (m *SnippetDocumentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SnippetDocumentMutation) ClearDocOwner ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ClearDocOwner()
ClearDocOwner clears the "doc_owner" edge to the Member entity.
func (*SnippetDocumentMutation) ClearDocSnippet ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ClearDocSnippet()
ClearDocSnippet clears the "doc_snippet" edge to the Snippet entity.
func (*SnippetDocumentMutation) ClearEdge ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SnippetDocumentMutation) ClearField ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetDocumentMutation) ClearedEdges ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SnippetDocumentMutation) ClearedFields ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SnippetDocumentMutation) Client ¶ added in v1.0.8
func (m SnippetDocumentMutation) 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 (*SnippetDocumentMutation) CreateTime ¶ added in v1.0.8
func (m *SnippetDocumentMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SnippetDocumentMutation) Description ¶ added in v1.0.8
func (m *SnippetDocumentMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*SnippetDocumentMutation) DocOwnerCleared ¶ added in v1.0.8
func (m *SnippetDocumentMutation) DocOwnerCleared() bool
DocOwnerCleared reports if the "doc_owner" edge to the Member entity was cleared.
func (*SnippetDocumentMutation) DocOwnerID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) DocOwnerID() (id int, exists bool)
DocOwnerID returns the "doc_owner" edge ID in the mutation.
func (*SnippetDocumentMutation) DocOwnerIDs ¶ added in v1.0.8
func (m *SnippetDocumentMutation) DocOwnerIDs() (ids []int)
DocOwnerIDs returns the "doc_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DocOwnerID instead. It exists only for internal usage by the builders.
func (*SnippetDocumentMutation) DocSnippetCleared ¶ added in v1.0.8
func (m *SnippetDocumentMutation) DocSnippetCleared() bool
DocSnippetCleared reports if the "doc_snippet" edge to the Snippet entity was cleared.
func (*SnippetDocumentMutation) DocSnippetID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) DocSnippetID() (id int, exists bool)
DocSnippetID returns the "doc_snippet" edge ID in the mutation.
func (*SnippetDocumentMutation) DocSnippetIDs ¶ added in v1.0.8
func (m *SnippetDocumentMutation) DocSnippetIDs() (ids []int)
DocSnippetIDs returns the "doc_snippet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DocSnippetID instead. It exists only for internal usage by the builders.
func (*SnippetDocumentMutation) EdgeCleared ¶ added in v1.0.8
func (m *SnippetDocumentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SnippetDocumentMutation) Field ¶ added in v1.0.8
func (m *SnippetDocumentMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetDocumentMutation) FieldCleared ¶ added in v1.0.8
func (m *SnippetDocumentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SnippetDocumentMutation) Fields ¶ added in v1.0.8
func (m *SnippetDocumentMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SnippetDocumentMutation) ID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*SnippetDocumentMutation) Language ¶ added in v1.0.8
func (m *SnippetDocumentMutation) Language() (r string, exists bool)
Language returns the value of the "language" field in the mutation.
func (*SnippetDocumentMutation) OldCreateTime ¶ added in v1.0.8
OldCreateTime returns the old "create_time" field's value of the SnippetDocument entity. If the SnippetDocument object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetDocumentMutation) OldDescription ¶ added in v1.0.8
func (m *SnippetDocumentMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the SnippetDocument entity. If the SnippetDocument object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetDocumentMutation) OldField ¶ added in v1.0.8
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SnippetDocumentMutation) OldLanguage ¶ added in v1.0.8
func (m *SnippetDocumentMutation) OldLanguage(ctx context.Context) (v string, err error)
OldLanguage returns the old "language" field's value of the SnippetDocument entity. If the SnippetDocument object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetDocumentMutation) OldOwnerID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the SnippetDocument entity. If the SnippetDocument object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetDocumentMutation) OldRaw ¶ added in v1.0.8
func (m *SnippetDocumentMutation) OldRaw(ctx context.Context) (v string, err error)
OldRaw returns the old "raw" field's value of the SnippetDocument entity. If the SnippetDocument object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetDocumentMutation) OldSnippetID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) OldSnippetID(ctx context.Context) (v int, err error)
OldSnippetID returns the old "snippet_id" field's value of the SnippetDocument entity. If the SnippetDocument object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetDocumentMutation) OldUpdateTime ¶ added in v1.0.8
OldUpdateTime returns the old "update_time" field's value of the SnippetDocument entity. If the SnippetDocument object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetDocumentMutation) Op ¶ added in v1.0.8
func (m *SnippetDocumentMutation) Op() Op
Op returns the operation name.
func (*SnippetDocumentMutation) OwnerID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*SnippetDocumentMutation) Raw ¶ added in v1.0.8
func (m *SnippetDocumentMutation) Raw() (r string, exists bool)
Raw returns the value of the "raw" field in the mutation.
func (*SnippetDocumentMutation) RemovedEdges ¶ added in v1.0.8
func (m *SnippetDocumentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SnippetDocumentMutation) RemovedIDs ¶ added in v1.0.8
func (m *SnippetDocumentMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SnippetDocumentMutation) ResetCreateTime ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SnippetDocumentMutation) ResetDescription ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*SnippetDocumentMutation) ResetDocOwner ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetDocOwner()
ResetDocOwner resets all changes to the "doc_owner" edge.
func (*SnippetDocumentMutation) ResetDocSnippet ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetDocSnippet()
ResetDocSnippet resets all changes to the "doc_snippet" edge.
func (*SnippetDocumentMutation) ResetEdge ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SnippetDocumentMutation) ResetField ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetDocumentMutation) ResetLanguage ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetLanguage()
ResetLanguage resets all changes to the "language" field.
func (*SnippetDocumentMutation) ResetOwnerID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*SnippetDocumentMutation) ResetRaw ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetRaw()
ResetRaw resets all changes to the "raw" field.
func (*SnippetDocumentMutation) ResetSnippetID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetSnippetID()
ResetSnippetID resets all changes to the "snippet_id" field.
func (*SnippetDocumentMutation) ResetUpdateTime ¶ added in v1.0.8
func (m *SnippetDocumentMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SnippetDocumentMutation) SetCreateTime ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SnippetDocumentMutation) SetDescription ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*SnippetDocumentMutation) SetDocOwnerID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetDocOwnerID(id int)
SetDocOwnerID sets the "doc_owner" edge to the Member entity by id.
func (*SnippetDocumentMutation) SetDocSnippetID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetDocSnippetID(id int)
SetDocSnippetID sets the "doc_snippet" edge to the Snippet entity by id.
func (*SnippetDocumentMutation) SetField ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetDocumentMutation) SetID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SnippetDocument entities.
func (*SnippetDocumentMutation) SetLanguage ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetLanguage(s string)
SetLanguage sets the "language" field.
func (*SnippetDocumentMutation) SetOwnerID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*SnippetDocumentMutation) SetRaw ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetRaw(s string)
SetRaw sets the "raw" field.
func (*SnippetDocumentMutation) SetSnippetID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetSnippetID(i int)
SetSnippetID sets the "snippet_id" field.
func (*SnippetDocumentMutation) SetUpdateTime ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SnippetDocumentMutation) SnippetID ¶ added in v1.0.8
func (m *SnippetDocumentMutation) SnippetID() (r int, exists bool)
SnippetID returns the value of the "snippet_id" field in the mutation.
func (SnippetDocumentMutation) Tx ¶ added in v1.0.8
func (m SnippetDocumentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SnippetDocumentMutation) Type ¶ added in v1.0.8
func (m *SnippetDocumentMutation) Type() string
Type returns the node type of this mutation (SnippetDocument).
func (*SnippetDocumentMutation) UpdateTime ¶ added in v1.0.8
func (m *SnippetDocumentMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type SnippetDocumentQuery ¶ added in v1.0.8
type SnippetDocumentQuery struct {
// contains filtered or unexported fields
}
SnippetDocumentQuery is the builder for querying SnippetDocument entities.
func (*SnippetDocumentQuery) All ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) All(ctx context.Context) ([]*SnippetDocument, error)
All executes the query and returns a list of SnippetDocuments.
func (*SnippetDocumentQuery) AllX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) AllX(ctx context.Context) []*SnippetDocument
AllX is like All, but panics if an error occurs.
func (*SnippetDocumentQuery) Clone ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Clone() *SnippetDocumentQuery
Clone returns a duplicate of the SnippetDocumentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SnippetDocumentQuery) Count ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SnippetDocumentQuery) CountX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SnippetDocumentQuery) Exist ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SnippetDocumentQuery) ExistX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SnippetDocumentQuery) First ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) First(ctx context.Context) (*SnippetDocument, error)
First returns the first SnippetDocument entity from the query. Returns a *NotFoundError when no SnippetDocument was found.
func (*SnippetDocumentQuery) FirstID ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SnippetDocument ID from the query. Returns a *NotFoundError when no SnippetDocument ID was found.
func (*SnippetDocumentQuery) FirstIDX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SnippetDocumentQuery) FirstX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) FirstX(ctx context.Context) *SnippetDocument
FirstX is like First, but panics if an error occurs.
func (*SnippetDocumentQuery) GroupBy ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) GroupBy(field string, fields ...string) *SnippetDocumentGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { SnippetID int `json:"snippet_id,omitempty"` Count int `json:"count,omitempty"` } client.SnippetDocument.Query(). GroupBy(snippetdocument.FieldSnippetID). Aggregate(model.Count()). Scan(ctx, &v)
func (*SnippetDocumentQuery) IDs ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SnippetDocument IDs.
func (*SnippetDocumentQuery) IDsX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SnippetDocumentQuery) Limit ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Limit(limit int) *SnippetDocumentQuery
Limit adds a limit step to the query.
func (*SnippetDocumentQuery) Offset ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Offset(offset int) *SnippetDocumentQuery
Offset adds an offset step to the query.
func (*SnippetDocumentQuery) Only ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Only(ctx context.Context) (*SnippetDocument, error)
Only returns a single SnippetDocument entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SnippetDocument entity is not found. Returns a *NotFoundError when no SnippetDocument entities are found.
func (*SnippetDocumentQuery) OnlyID ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SnippetDocument ID in the query. Returns a *NotSingularError when exactly one SnippetDocument ID is not found. Returns a *NotFoundError when no entities are found.
func (*SnippetDocumentQuery) OnlyIDX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SnippetDocumentQuery) OnlyX ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) OnlyX(ctx context.Context) *SnippetDocument
OnlyX is like Only, but panics if an error occurs.
func (*SnippetDocumentQuery) Order ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Order(o ...OrderFunc) *SnippetDocumentQuery
Order adds an order step to the query.
func (*SnippetDocumentQuery) QueryDocOwner ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) QueryDocOwner() *MemberQuery
QueryDocOwner chains the current query on the "doc_owner" edge.
func (*SnippetDocumentQuery) QueryDocSnippet ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) QueryDocSnippet() *SnippetQuery
QueryDocSnippet chains the current query on the "doc_snippet" edge.
func (*SnippetDocumentQuery) Select ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Select(field string, fields ...string) *SnippetDocumentSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { SnippetID int `json:"snippet_id,omitempty"` } client.SnippetDocument.Query(). Select(snippetdocument.FieldSnippetID). Scan(ctx, &v)
func (*SnippetDocumentQuery) Unique ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Unique(unique bool) *SnippetDocumentQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SnippetDocumentQuery) Where ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) Where(ps ...predicate.SnippetDocument) *SnippetDocumentQuery
Where adds a new predicate for the SnippetDocumentQuery builder.
func (*SnippetDocumentQuery) WithDocOwner ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) WithDocOwner(opts ...func(*MemberQuery)) *SnippetDocumentQuery
WithDocOwner tells the query-builder to eager-load the nodes that are connected to the "doc_owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*SnippetDocumentQuery) WithDocSnippet ¶ added in v1.0.8
func (sdq *SnippetDocumentQuery) WithDocSnippet(opts ...func(*SnippetQuery)) *SnippetDocumentQuery
WithDocSnippet tells the query-builder to eager-load the nodes that are connected to the "doc_snippet" edge. The optional arguments are used to configure the query builder of the edge.
type SnippetDocumentSelect ¶ added in v1.0.8
type SnippetDocumentSelect struct { *SnippetDocumentQuery // contains filtered or unexported fields }
SnippetDocumentSelect is the builder for selecting fields of SnippetDocument entities.
func (*SnippetDocumentSelect) Bool ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SnippetDocumentSelect) BoolX ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetDocumentSelect) Bools ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SnippetDocumentSelect) BoolsX ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetDocumentSelect) Float64 ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SnippetDocumentSelect) Float64X ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetDocumentSelect) Float64s ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SnippetDocumentSelect) Float64sX ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetDocumentSelect) Int ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SnippetDocumentSelect) IntX ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetDocumentSelect) Ints ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SnippetDocumentSelect) IntsX ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetDocumentSelect) Scan ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SnippetDocumentSelect) ScanX ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetDocumentSelect) String ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SnippetDocumentSelect) StringX ¶ added in v1.0.8
func (sds *SnippetDocumentSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetDocumentUpdate ¶ added in v1.0.8
type SnippetDocumentUpdate struct {
// contains filtered or unexported fields
}
SnippetDocumentUpdate is the builder for updating SnippetDocument entities.
func (*SnippetDocumentUpdate) ClearDocOwner ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) ClearDocOwner() *SnippetDocumentUpdate
ClearDocOwner clears the "doc_owner" edge to the Member entity.
func (*SnippetDocumentUpdate) ClearDocSnippet ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) ClearDocSnippet() *SnippetDocumentUpdate
ClearDocSnippet clears the "doc_snippet" edge to the Snippet entity.
func (*SnippetDocumentUpdate) Exec ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SnippetDocumentUpdate) ExecX ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetDocumentUpdate) Mutation ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) Mutation() *SnippetDocumentMutation
Mutation returns the SnippetDocumentMutation object of the builder.
func (*SnippetDocumentUpdate) Save ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SnippetDocumentUpdate) SaveX ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SnippetDocumentUpdate) SetDescription ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetDescription(s string) *SnippetDocumentUpdate
SetDescription sets the "description" field.
func (*SnippetDocumentUpdate) SetDocOwner ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetDocOwner(m *Member) *SnippetDocumentUpdate
SetDocOwner sets the "doc_owner" edge to the Member entity.
func (*SnippetDocumentUpdate) SetDocOwnerID ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetDocOwnerID(id int) *SnippetDocumentUpdate
SetDocOwnerID sets the "doc_owner" edge to the Member entity by ID.
func (*SnippetDocumentUpdate) SetDocSnippet ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetDocSnippet(s *Snippet) *SnippetDocumentUpdate
SetDocSnippet sets the "doc_snippet" edge to the Snippet entity.
func (*SnippetDocumentUpdate) SetDocSnippetID ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetDocSnippetID(id int) *SnippetDocumentUpdate
SetDocSnippetID sets the "doc_snippet" edge to the Snippet entity by ID.
func (*SnippetDocumentUpdate) SetLanguage ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetLanguage(s string) *SnippetDocumentUpdate
SetLanguage sets the "language" field.
func (*SnippetDocumentUpdate) SetNillableLanguage ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetNillableLanguage(s *string) *SnippetDocumentUpdate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*SnippetDocumentUpdate) SetRaw ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetRaw(s string) *SnippetDocumentUpdate
SetRaw sets the "raw" field.
func (*SnippetDocumentUpdate) SetUpdateTime ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) SetUpdateTime(t time.Time) *SnippetDocumentUpdate
SetUpdateTime sets the "update_time" field.
func (*SnippetDocumentUpdate) Where ¶ added in v1.0.8
func (sdu *SnippetDocumentUpdate) Where(ps ...predicate.SnippetDocument) *SnippetDocumentUpdate
Where adds a new predicate for the SnippetDocumentUpdate builder.
type SnippetDocumentUpdateOne ¶ added in v1.0.8
type SnippetDocumentUpdateOne struct {
// contains filtered or unexported fields
}
SnippetDocumentUpdateOne is the builder for updating a single SnippetDocument entity.
func (*SnippetDocumentUpdateOne) ClearDocOwner ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) ClearDocOwner() *SnippetDocumentUpdateOne
ClearDocOwner clears the "doc_owner" edge to the Member entity.
func (*SnippetDocumentUpdateOne) ClearDocSnippet ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) ClearDocSnippet() *SnippetDocumentUpdateOne
ClearDocSnippet clears the "doc_snippet" edge to the Snippet entity.
func (*SnippetDocumentUpdateOne) Exec ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SnippetDocumentUpdateOne) ExecX ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetDocumentUpdateOne) Mutation ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) Mutation() *SnippetDocumentMutation
Mutation returns the SnippetDocumentMutation object of the builder.
func (*SnippetDocumentUpdateOne) Save ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) Save(ctx context.Context) (*SnippetDocument, error)
Save executes the query and returns the updated SnippetDocument entity.
func (*SnippetDocumentUpdateOne) SaveX ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SaveX(ctx context.Context) *SnippetDocument
SaveX is like Save, but panics if an error occurs.
func (*SnippetDocumentUpdateOne) Select ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) Select(field string, fields ...string) *SnippetDocumentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SnippetDocumentUpdateOne) SetDescription ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetDescription(s string) *SnippetDocumentUpdateOne
SetDescription sets the "description" field.
func (*SnippetDocumentUpdateOne) SetDocOwner ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetDocOwner(m *Member) *SnippetDocumentUpdateOne
SetDocOwner sets the "doc_owner" edge to the Member entity.
func (*SnippetDocumentUpdateOne) SetDocOwnerID ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetDocOwnerID(id int) *SnippetDocumentUpdateOne
SetDocOwnerID sets the "doc_owner" edge to the Member entity by ID.
func (*SnippetDocumentUpdateOne) SetDocSnippet ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetDocSnippet(s *Snippet) *SnippetDocumentUpdateOne
SetDocSnippet sets the "doc_snippet" edge to the Snippet entity.
func (*SnippetDocumentUpdateOne) SetDocSnippetID ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetDocSnippetID(id int) *SnippetDocumentUpdateOne
SetDocSnippetID sets the "doc_snippet" edge to the Snippet entity by ID.
func (*SnippetDocumentUpdateOne) SetLanguage ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetLanguage(s string) *SnippetDocumentUpdateOne
SetLanguage sets the "language" field.
func (*SnippetDocumentUpdateOne) SetNillableLanguage ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetNillableLanguage(s *string) *SnippetDocumentUpdateOne
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*SnippetDocumentUpdateOne) SetRaw ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetRaw(s string) *SnippetDocumentUpdateOne
SetRaw sets the "raw" field.
func (*SnippetDocumentUpdateOne) SetUpdateTime ¶ added in v1.0.8
func (sduo *SnippetDocumentUpdateOne) SetUpdateTime(t time.Time) *SnippetDocumentUpdateOne
SetUpdateTime sets the "update_time" field.
type SnippetDocuments ¶ added in v1.0.8
type SnippetDocuments []*SnippetDocument
SnippetDocuments is a parsable slice of SnippetDocument.
type SnippetEdges ¶ added in v1.0.8
type SnippetEdges struct { // SnippetOwner holds the value of the snippet_owner edge. SnippetOwner *Member `json:"snippet_owner,omitempty"` // SnippetDocs holds the value of the snippet_docs edge. SnippetDocs []*SnippetDocument `json:"snippet_docs,omitempty"` // SnippetTags holds the value of the snippet_tags edge. SnippetTags []*SnippetTag `json:"snippet_tags,omitempty"` // contains filtered or unexported fields }
SnippetEdges holds the relations/edges for other nodes in the graph.
func (SnippetEdges) SnippetDocsOrErr ¶ added in v1.0.8
func (e SnippetEdges) SnippetDocsOrErr() ([]*SnippetDocument, error)
SnippetDocsOrErr returns the SnippetDocs value or an error if the edge was not loaded in eager-loading.
func (SnippetEdges) SnippetOwnerOrErr ¶ added in v1.0.8
func (e SnippetEdges) SnippetOwnerOrErr() (*Member, error)
SnippetOwnerOrErr returns the SnippetOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SnippetEdges) SnippetTagsOrErr ¶ added in v1.0.9
func (e SnippetEdges) SnippetTagsOrErr() ([]*SnippetTag, error)
SnippetTagsOrErr returns the SnippetTags value or an error if the edge was not loaded in eager-loading.
type SnippetFolder ¶ added in v1.0.8
type SnippetFolder struct { // ID of the ent. ID int `json:"id,omitempty"` // Pid holds the value of the "pid" field. Pid *int `json:"pid,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"owner_id,omitempty"` // SnippetID holds the value of the "snippet_id" field. SnippetID int `json:"snippet_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // SnippetsTotal holds the value of the "snippets_total" field. SnippetsTotal int `json:"snippets_total,omitempty"` // Language holds the value of the "language" field. Language string `json:"language,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SnippetFolderQuery when eager-loading is set. Edges SnippetFolderEdges `json:"edges"` // contains filtered or unexported fields }
SnippetFolder is the model entity for the SnippetFolder schema.
func (*SnippetFolder) QueryFolderOwner ¶ added in v1.0.8
func (sf *SnippetFolder) QueryFolderOwner() *MemberQuery
QueryFolderOwner queries the "folder_owner" edge of the SnippetFolder entity.
func (*SnippetFolder) QuerySnippets ¶ added in v1.0.8
func (sf *SnippetFolder) QuerySnippets() *SnippetQuery
QuerySnippets queries the "snippets" edge of the SnippetFolder entity.
func (*SnippetFolder) String ¶ added in v1.0.8
func (sf *SnippetFolder) String() string
String implements the fmt.Stringer.
func (*SnippetFolder) Unwrap ¶ added in v1.0.8
func (sf *SnippetFolder) Unwrap() *SnippetFolder
Unwrap unwraps the SnippetFolder entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*SnippetFolder) Update ¶ added in v1.0.8
func (sf *SnippetFolder) Update() *SnippetFolderUpdateOne
Update returns a builder for updating this SnippetFolder. Note that you need to call SnippetFolder.Unwrap() before calling this method if this SnippetFolder was returned from a transaction, and the transaction was committed or rolled back.
type SnippetFolderClient ¶ added in v1.0.8
type SnippetFolderClient struct {
// contains filtered or unexported fields
}
SnippetFolderClient is a client for the SnippetFolder schema.
func NewSnippetFolderClient ¶ added in v1.0.8
func NewSnippetFolderClient(c config) *SnippetFolderClient
NewSnippetFolderClient returns a client for the SnippetFolder from the given config.
func (*SnippetFolderClient) Create ¶ added in v1.0.8
func (c *SnippetFolderClient) Create() *SnippetFolderCreate
Create returns a create builder for SnippetFolder.
func (*SnippetFolderClient) CreateBulk ¶ added in v1.0.8
func (c *SnippetFolderClient) CreateBulk(builders ...*SnippetFolderCreate) *SnippetFolderCreateBulk
CreateBulk returns a builder for creating a bulk of SnippetFolder entities.
func (*SnippetFolderClient) Delete ¶ added in v1.0.8
func (c *SnippetFolderClient) Delete() *SnippetFolderDelete
Delete returns a delete builder for SnippetFolder.
func (*SnippetFolderClient) DeleteOne ¶ added in v1.0.8
func (c *SnippetFolderClient) DeleteOne(sf *SnippetFolder) *SnippetFolderDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SnippetFolderClient) DeleteOneID ¶ added in v1.0.8
func (c *SnippetFolderClient) DeleteOneID(id int) *SnippetFolderDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SnippetFolderClient) Get ¶ added in v1.0.8
func (c *SnippetFolderClient) Get(ctx context.Context, id int) (*SnippetFolder, error)
Get returns a SnippetFolder entity by its id.
func (*SnippetFolderClient) GetX ¶ added in v1.0.8
func (c *SnippetFolderClient) GetX(ctx context.Context, id int) *SnippetFolder
GetX is like Get, but panics if an error occurs.
func (*SnippetFolderClient) Hooks ¶ added in v1.0.8
func (c *SnippetFolderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SnippetFolderClient) Query ¶ added in v1.0.8
func (c *SnippetFolderClient) Query() *SnippetFolderQuery
Query returns a query builder for SnippetFolder.
func (*SnippetFolderClient) QueryFolderOwner ¶ added in v1.0.8
func (c *SnippetFolderClient) QueryFolderOwner(sf *SnippetFolder) *MemberQuery
QueryFolderOwner queries the folder_owner edge of a SnippetFolder.
func (*SnippetFolderClient) QuerySnippets ¶ added in v1.0.8
func (c *SnippetFolderClient) QuerySnippets(sf *SnippetFolder) *SnippetQuery
QuerySnippets queries the snippets edge of a SnippetFolder.
func (*SnippetFolderClient) Update ¶ added in v1.0.8
func (c *SnippetFolderClient) Update() *SnippetFolderUpdate
Update returns an update builder for SnippetFolder.
func (*SnippetFolderClient) UpdateOne ¶ added in v1.0.8
func (c *SnippetFolderClient) UpdateOne(sf *SnippetFolder) *SnippetFolderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SnippetFolderClient) UpdateOneID ¶ added in v1.0.8
func (c *SnippetFolderClient) UpdateOneID(id int) *SnippetFolderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SnippetFolderClient) Use ¶ added in v1.0.8
func (c *SnippetFolderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `snippetfolder.Hooks(f(g(h())))`.
type SnippetFolderCreate ¶ added in v1.0.8
type SnippetFolderCreate struct {
// contains filtered or unexported fields
}
SnippetFolderCreate is the builder for creating a SnippetFolder entity.
func (*SnippetFolderCreate) AddSnippetIDs ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) AddSnippetIDs(ids ...int) *SnippetFolderCreate
AddSnippetIDs adds the "snippets" edge to the Snippet entity by IDs.
func (*SnippetFolderCreate) AddSnippets ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) AddSnippets(s ...*Snippet) *SnippetFolderCreate
AddSnippets adds the "snippets" edges to the Snippet entity.
func (*SnippetFolderCreate) Mutation ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) Mutation() *SnippetFolderMutation
Mutation returns the SnippetFolderMutation object of the builder.
func (*SnippetFolderCreate) Save ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) Save(ctx context.Context) (*SnippetFolder, error)
Save creates the SnippetFolder in the database.
func (*SnippetFolderCreate) SaveX ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SaveX(ctx context.Context) *SnippetFolder
SaveX calls Save and panics if Save returns an error.
func (*SnippetFolderCreate) SetCreateTime ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetCreateTime(t time.Time) *SnippetFolderCreate
SetCreateTime sets the "create_time" field.
func (*SnippetFolderCreate) SetFolderOwner ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetFolderOwner(m *Member) *SnippetFolderCreate
SetFolderOwner sets the "folder_owner" edge to the Member entity.
func (*SnippetFolderCreate) SetFolderOwnerID ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetFolderOwnerID(id int) *SnippetFolderCreate
SetFolderOwnerID sets the "folder_owner" edge to the Member entity by ID.
func (*SnippetFolderCreate) SetID ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetID(i int) *SnippetFolderCreate
SetID sets the "id" field.
func (*SnippetFolderCreate) SetLanguage ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetLanguage(s string) *SnippetFolderCreate
SetLanguage sets the "language" field.
func (*SnippetFolderCreate) SetName ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetName(s string) *SnippetFolderCreate
SetName sets the "name" field.
func (*SnippetFolderCreate) SetNillableCreateTime ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetNillableCreateTime(t *time.Time) *SnippetFolderCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SnippetFolderCreate) SetNillableLanguage ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetNillableLanguage(s *string) *SnippetFolderCreate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*SnippetFolderCreate) SetNillablePid ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetNillablePid(i *int) *SnippetFolderCreate
SetNillablePid sets the "pid" field if the given value is not nil.
func (*SnippetFolderCreate) SetNillableSnippetsTotal ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetNillableSnippetsTotal(i *int) *SnippetFolderCreate
SetNillableSnippetsTotal sets the "snippets_total" field if the given value is not nil.
func (*SnippetFolderCreate) SetNillableUpdateTime ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetNillableUpdateTime(t *time.Time) *SnippetFolderCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SnippetFolderCreate) SetOwnerID ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetOwnerID(i int) *SnippetFolderCreate
SetOwnerID sets the "owner_id" field.
func (*SnippetFolderCreate) SetPid ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetPid(i int) *SnippetFolderCreate
SetPid sets the "pid" field.
func (*SnippetFolderCreate) SetSnippetID ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetSnippetID(i int) *SnippetFolderCreate
SetSnippetID sets the "snippet_id" field.
func (*SnippetFolderCreate) SetSnippetsTotal ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetSnippetsTotal(i int) *SnippetFolderCreate
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetFolderCreate) SetUpdateTime ¶ added in v1.0.8
func (sfc *SnippetFolderCreate) SetUpdateTime(t time.Time) *SnippetFolderCreate
SetUpdateTime sets the "update_time" field.
type SnippetFolderCreateBulk ¶ added in v1.0.8
type SnippetFolderCreateBulk struct {
// contains filtered or unexported fields
}
SnippetFolderCreateBulk is the builder for creating many SnippetFolder entities in bulk.
func (*SnippetFolderCreateBulk) Save ¶ added in v1.0.8
func (sfcb *SnippetFolderCreateBulk) Save(ctx context.Context) ([]*SnippetFolder, error)
Save creates the SnippetFolder entities in the database.
func (*SnippetFolderCreateBulk) SaveX ¶ added in v1.0.8
func (sfcb *SnippetFolderCreateBulk) SaveX(ctx context.Context) []*SnippetFolder
SaveX is like Save, but panics if an error occurs.
type SnippetFolderDelete ¶ added in v1.0.8
type SnippetFolderDelete struct {
// contains filtered or unexported fields
}
SnippetFolderDelete is the builder for deleting a SnippetFolder entity.
func (*SnippetFolderDelete) Exec ¶ added in v1.0.8
func (sfd *SnippetFolderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SnippetFolderDelete) ExecX ¶ added in v1.0.8
func (sfd *SnippetFolderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SnippetFolderDelete) Where ¶ added in v1.0.8
func (sfd *SnippetFolderDelete) Where(ps ...predicate.SnippetFolder) *SnippetFolderDelete
Where adds a new predicate to the SnippetFolderDelete builder.
type SnippetFolderDeleteOne ¶ added in v1.0.8
type SnippetFolderDeleteOne struct {
// contains filtered or unexported fields
}
SnippetFolderDeleteOne is the builder for deleting a single SnippetFolder entity.
func (*SnippetFolderDeleteOne) Exec ¶ added in v1.0.8
func (sfdo *SnippetFolderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SnippetFolderDeleteOne) ExecX ¶ added in v1.0.8
func (sfdo *SnippetFolderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SnippetFolderEdges ¶ added in v1.0.8
type SnippetFolderEdges struct { // FolderOwner holds the value of the folder_owner edge. FolderOwner *Member `json:"folder_owner,omitempty"` // Snippets holds the value of the snippets edge. Snippets []*Snippet `json:"snippets,omitempty"` // contains filtered or unexported fields }
SnippetFolderEdges holds the relations/edges for other nodes in the graph.
func (SnippetFolderEdges) FolderOwnerOrErr ¶ added in v1.0.8
func (e SnippetFolderEdges) FolderOwnerOrErr() (*Member, error)
FolderOwnerOrErr returns the FolderOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SnippetFolderEdges) SnippetsOrErr ¶ added in v1.0.8
func (e SnippetFolderEdges) SnippetsOrErr() ([]*Snippet, error)
SnippetsOrErr returns the Snippets value or an error if the edge was not loaded in eager-loading.
type SnippetFolderGroupBy ¶ added in v1.0.8
type SnippetFolderGroupBy struct {
// contains filtered or unexported fields
}
SnippetFolderGroupBy is the group-by builder for SnippetFolder entities.
func (*SnippetFolderGroupBy) Aggregate ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Aggregate(fns ...AggregateFunc) *SnippetFolderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SnippetFolderGroupBy) Bool ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetFolderGroupBy) BoolX ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetFolderGroupBy) Bools ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetFolderGroupBy) BoolsX ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetFolderGroupBy) Float64 ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetFolderGroupBy) Float64X ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetFolderGroupBy) Float64s ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetFolderGroupBy) Float64sX ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetFolderGroupBy) Int ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetFolderGroupBy) IntX ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetFolderGroupBy) Ints ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetFolderGroupBy) IntsX ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetFolderGroupBy) Scan ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SnippetFolderGroupBy) ScanX ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetFolderGroupBy) String ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetFolderGroupBy) StringX ¶ added in v1.0.8
func (sfgb *SnippetFolderGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetFolderMutation ¶ added in v1.0.8
type SnippetFolderMutation struct {
// contains filtered or unexported fields
}
SnippetFolderMutation represents an operation that mutates the SnippetFolder nodes in the graph.
func (*SnippetFolderMutation) AddField ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetFolderMutation) AddPid ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddPid(i int)
AddPid adds i to the "pid" field.
func (*SnippetFolderMutation) AddSnippetID ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddSnippetID(i int)
AddSnippetID adds i to the "snippet_id" field.
func (*SnippetFolderMutation) AddSnippetIDs ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddSnippetIDs(ids ...int)
AddSnippetIDs adds the "snippets" edge to the Snippet entity by ids.
func (*SnippetFolderMutation) AddSnippetsTotal ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddSnippetsTotal(i int)
AddSnippetsTotal adds i to the "snippets_total" field.
func (*SnippetFolderMutation) AddedEdges ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SnippetFolderMutation) AddedField ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetFolderMutation) AddedFields ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SnippetFolderMutation) AddedIDs ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SnippetFolderMutation) AddedPid ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddedPid() (r int, exists bool)
AddedPid returns the value that was added to the "pid" field in this mutation.
func (*SnippetFolderMutation) AddedSnippetID ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddedSnippetID() (r int, exists bool)
AddedSnippetID returns the value that was added to the "snippet_id" field in this mutation.
func (*SnippetFolderMutation) AddedSnippetsTotal ¶ added in v1.0.8
func (m *SnippetFolderMutation) AddedSnippetsTotal() (r int, exists bool)
AddedSnippetsTotal returns the value that was added to the "snippets_total" field in this mutation.
func (*SnippetFolderMutation) ClearEdge ¶ added in v1.0.8
func (m *SnippetFolderMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SnippetFolderMutation) ClearField ¶ added in v1.0.8
func (m *SnippetFolderMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetFolderMutation) ClearFolderOwner ¶ added in v1.0.8
func (m *SnippetFolderMutation) ClearFolderOwner()
ClearFolderOwner clears the "folder_owner" edge to the Member entity.
func (*SnippetFolderMutation) ClearPid ¶ added in v1.0.8
func (m *SnippetFolderMutation) ClearPid()
ClearPid clears the value of the "pid" field.
func (*SnippetFolderMutation) ClearSnippets ¶ added in v1.0.8
func (m *SnippetFolderMutation) ClearSnippets()
ClearSnippets clears the "snippets" edge to the Snippet entity.
func (*SnippetFolderMutation) ClearedEdges ¶ added in v1.0.8
func (m *SnippetFolderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SnippetFolderMutation) ClearedFields ¶ added in v1.0.8
func (m *SnippetFolderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SnippetFolderMutation) Client ¶ added in v1.0.8
func (m SnippetFolderMutation) 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 (*SnippetFolderMutation) CreateTime ¶ added in v1.0.8
func (m *SnippetFolderMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SnippetFolderMutation) EdgeCleared ¶ added in v1.0.8
func (m *SnippetFolderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SnippetFolderMutation) Field ¶ added in v1.0.8
func (m *SnippetFolderMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetFolderMutation) FieldCleared ¶ added in v1.0.8
func (m *SnippetFolderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SnippetFolderMutation) Fields ¶ added in v1.0.8
func (m *SnippetFolderMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SnippetFolderMutation) FolderOwnerCleared ¶ added in v1.0.8
func (m *SnippetFolderMutation) FolderOwnerCleared() bool
FolderOwnerCleared reports if the "folder_owner" edge to the Member entity was cleared.
func (*SnippetFolderMutation) FolderOwnerID ¶ added in v1.0.8
func (m *SnippetFolderMutation) FolderOwnerID() (id int, exists bool)
FolderOwnerID returns the "folder_owner" edge ID in the mutation.
func (*SnippetFolderMutation) FolderOwnerIDs ¶ added in v1.0.8
func (m *SnippetFolderMutation) FolderOwnerIDs() (ids []int)
FolderOwnerIDs returns the "folder_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FolderOwnerID instead. It exists only for internal usage by the builders.
func (*SnippetFolderMutation) ID ¶ added in v1.0.8
func (m *SnippetFolderMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*SnippetFolderMutation) Language ¶ added in v1.0.8
func (m *SnippetFolderMutation) Language() (r string, exists bool)
Language returns the value of the "language" field in the mutation.
func (*SnippetFolderMutation) Name ¶ added in v1.0.8
func (m *SnippetFolderMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SnippetFolderMutation) OldCreateTime ¶ added in v1.0.8
OldCreateTime returns the old "create_time" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) OldField ¶ added in v1.0.8
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SnippetFolderMutation) OldLanguage ¶ added in v1.0.8
func (m *SnippetFolderMutation) OldLanguage(ctx context.Context) (v string, err error)
OldLanguage returns the old "language" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) OldName ¶ added in v1.0.8
func (m *SnippetFolderMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) OldOwnerID ¶ added in v1.0.8
func (m *SnippetFolderMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) OldPid ¶ added in v1.0.8
func (m *SnippetFolderMutation) OldPid(ctx context.Context) (v *int, err error)
OldPid returns the old "pid" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) OldSnippetID ¶ added in v1.0.8
func (m *SnippetFolderMutation) OldSnippetID(ctx context.Context) (v int, err error)
OldSnippetID returns the old "snippet_id" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) OldSnippetsTotal ¶ added in v1.0.8
func (m *SnippetFolderMutation) OldSnippetsTotal(ctx context.Context) (v int, err error)
OldSnippetsTotal returns the old "snippets_total" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) OldUpdateTime ¶ added in v1.0.8
OldUpdateTime returns the old "update_time" field's value of the SnippetFolder entity. If the SnippetFolder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetFolderMutation) Op ¶ added in v1.0.8
func (m *SnippetFolderMutation) Op() Op
Op returns the operation name.
func (*SnippetFolderMutation) OwnerID ¶ added in v1.0.8
func (m *SnippetFolderMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*SnippetFolderMutation) Pid ¶ added in v1.0.8
func (m *SnippetFolderMutation) Pid() (r int, exists bool)
Pid returns the value of the "pid" field in the mutation.
func (*SnippetFolderMutation) PidCleared ¶ added in v1.0.8
func (m *SnippetFolderMutation) PidCleared() bool
PidCleared returns if the "pid" field was cleared in this mutation.
func (*SnippetFolderMutation) RemoveSnippetIDs ¶ added in v1.0.8
func (m *SnippetFolderMutation) RemoveSnippetIDs(ids ...int)
RemoveSnippetIDs removes the "snippets" edge to the Snippet entity by IDs.
func (*SnippetFolderMutation) RemovedEdges ¶ added in v1.0.8
func (m *SnippetFolderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SnippetFolderMutation) RemovedIDs ¶ added in v1.0.8
func (m *SnippetFolderMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SnippetFolderMutation) RemovedSnippetsIDs ¶ added in v1.0.8
func (m *SnippetFolderMutation) RemovedSnippetsIDs() (ids []int)
RemovedSnippets returns the removed IDs of the "snippets" edge to the Snippet entity.
func (*SnippetFolderMutation) ResetCreateTime ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SnippetFolderMutation) ResetEdge ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SnippetFolderMutation) ResetField ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetFolderMutation) ResetFolderOwner ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetFolderOwner()
ResetFolderOwner resets all changes to the "folder_owner" edge.
func (*SnippetFolderMutation) ResetLanguage ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetLanguage()
ResetLanguage resets all changes to the "language" field.
func (*SnippetFolderMutation) ResetName ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SnippetFolderMutation) ResetOwnerID ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*SnippetFolderMutation) ResetPid ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetPid()
ResetPid resets all changes to the "pid" field.
func (*SnippetFolderMutation) ResetSnippetID ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetSnippetID()
ResetSnippetID resets all changes to the "snippet_id" field.
func (*SnippetFolderMutation) ResetSnippets ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetSnippets()
ResetSnippets resets all changes to the "snippets" edge.
func (*SnippetFolderMutation) ResetSnippetsTotal ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetSnippetsTotal()
ResetSnippetsTotal resets all changes to the "snippets_total" field.
func (*SnippetFolderMutation) ResetUpdateTime ¶ added in v1.0.8
func (m *SnippetFolderMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SnippetFolderMutation) SetCreateTime ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SnippetFolderMutation) SetField ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetFolderMutation) SetFolderOwnerID ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetFolderOwnerID(id int)
SetFolderOwnerID sets the "folder_owner" edge to the Member entity by id.
func (*SnippetFolderMutation) SetID ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SnippetFolder entities.
func (*SnippetFolderMutation) SetLanguage ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetLanguage(s string)
SetLanguage sets the "language" field.
func (*SnippetFolderMutation) SetName ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetName(s string)
SetName sets the "name" field.
func (*SnippetFolderMutation) SetOwnerID ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*SnippetFolderMutation) SetPid ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetPid(i int)
SetPid sets the "pid" field.
func (*SnippetFolderMutation) SetSnippetID ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetSnippetID(i int)
SetSnippetID sets the "snippet_id" field.
func (*SnippetFolderMutation) SetSnippetsTotal ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetSnippetsTotal(i int)
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetFolderMutation) SetUpdateTime ¶ added in v1.0.8
func (m *SnippetFolderMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SnippetFolderMutation) SnippetID ¶ added in v1.0.8
func (m *SnippetFolderMutation) SnippetID() (r int, exists bool)
SnippetID returns the value of the "snippet_id" field in the mutation.
func (*SnippetFolderMutation) SnippetsCleared ¶ added in v1.0.8
func (m *SnippetFolderMutation) SnippetsCleared() bool
SnippetsCleared reports if the "snippets" edge to the Snippet entity was cleared.
func (*SnippetFolderMutation) SnippetsIDs ¶ added in v1.0.8
func (m *SnippetFolderMutation) SnippetsIDs() (ids []int)
SnippetsIDs returns the "snippets" edge IDs in the mutation.
func (*SnippetFolderMutation) SnippetsTotal ¶ added in v1.0.8
func (m *SnippetFolderMutation) SnippetsTotal() (r int, exists bool)
SnippetsTotal returns the value of the "snippets_total" field in the mutation.
func (SnippetFolderMutation) Tx ¶ added in v1.0.8
func (m SnippetFolderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SnippetFolderMutation) Type ¶ added in v1.0.8
func (m *SnippetFolderMutation) Type() string
Type returns the node type of this mutation (SnippetFolder).
func (*SnippetFolderMutation) UpdateTime ¶ added in v1.0.8
func (m *SnippetFolderMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type SnippetFolderQuery ¶ added in v1.0.8
type SnippetFolderQuery struct {
// contains filtered or unexported fields
}
SnippetFolderQuery is the builder for querying SnippetFolder entities.
func (*SnippetFolderQuery) All ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) All(ctx context.Context) ([]*SnippetFolder, error)
All executes the query and returns a list of SnippetFolders.
func (*SnippetFolderQuery) AllX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) AllX(ctx context.Context) []*SnippetFolder
AllX is like All, but panics if an error occurs.
func (*SnippetFolderQuery) Clone ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Clone() *SnippetFolderQuery
Clone returns a duplicate of the SnippetFolderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SnippetFolderQuery) Count ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SnippetFolderQuery) CountX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SnippetFolderQuery) Exist ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SnippetFolderQuery) ExistX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SnippetFolderQuery) First ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) First(ctx context.Context) (*SnippetFolder, error)
First returns the first SnippetFolder entity from the query. Returns a *NotFoundError when no SnippetFolder was found.
func (*SnippetFolderQuery) FirstID ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SnippetFolder ID from the query. Returns a *NotFoundError when no SnippetFolder ID was found.
func (*SnippetFolderQuery) FirstIDX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SnippetFolderQuery) FirstX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) FirstX(ctx context.Context) *SnippetFolder
FirstX is like First, but panics if an error occurs.
func (*SnippetFolderQuery) GroupBy ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) GroupBy(field string, fields ...string) *SnippetFolderGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Pid int `json:"pid,omitempty"` Count int `json:"count,omitempty"` } client.SnippetFolder.Query(). GroupBy(snippetfolder.FieldPid). Aggregate(model.Count()). Scan(ctx, &v)
func (*SnippetFolderQuery) IDs ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SnippetFolder IDs.
func (*SnippetFolderQuery) IDsX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SnippetFolderQuery) Limit ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Limit(limit int) *SnippetFolderQuery
Limit adds a limit step to the query.
func (*SnippetFolderQuery) Offset ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Offset(offset int) *SnippetFolderQuery
Offset adds an offset step to the query.
func (*SnippetFolderQuery) Only ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Only(ctx context.Context) (*SnippetFolder, error)
Only returns a single SnippetFolder entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SnippetFolder entity is not found. Returns a *NotFoundError when no SnippetFolder entities are found.
func (*SnippetFolderQuery) OnlyID ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SnippetFolder ID in the query. Returns a *NotSingularError when exactly one SnippetFolder ID is not found. Returns a *NotFoundError when no entities are found.
func (*SnippetFolderQuery) OnlyIDX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SnippetFolderQuery) OnlyX ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) OnlyX(ctx context.Context) *SnippetFolder
OnlyX is like Only, but panics if an error occurs.
func (*SnippetFolderQuery) Order ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Order(o ...OrderFunc) *SnippetFolderQuery
Order adds an order step to the query.
func (*SnippetFolderQuery) QueryFolderOwner ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) QueryFolderOwner() *MemberQuery
QueryFolderOwner chains the current query on the "folder_owner" edge.
func (*SnippetFolderQuery) QuerySnippets ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) QuerySnippets() *SnippetQuery
QuerySnippets chains the current query on the "snippets" edge.
func (*SnippetFolderQuery) Select ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Select(field string, fields ...string) *SnippetFolderSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Pid int `json:"pid,omitempty"` } client.SnippetFolder.Query(). Select(snippetfolder.FieldPid). Scan(ctx, &v)
func (*SnippetFolderQuery) Unique ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Unique(unique bool) *SnippetFolderQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SnippetFolderQuery) Where ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) Where(ps ...predicate.SnippetFolder) *SnippetFolderQuery
Where adds a new predicate for the SnippetFolderQuery builder.
func (*SnippetFolderQuery) WithFolderOwner ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) WithFolderOwner(opts ...func(*MemberQuery)) *SnippetFolderQuery
WithFolderOwner tells the query-builder to eager-load the nodes that are connected to the "folder_owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*SnippetFolderQuery) WithSnippets ¶ added in v1.0.8
func (sfq *SnippetFolderQuery) WithSnippets(opts ...func(*SnippetQuery)) *SnippetFolderQuery
WithSnippets tells the query-builder to eager-load the nodes that are connected to the "snippets" edge. The optional arguments are used to configure the query builder of the edge.
type SnippetFolderSelect ¶ added in v1.0.8
type SnippetFolderSelect struct { *SnippetFolderQuery // contains filtered or unexported fields }
SnippetFolderSelect is the builder for selecting fields of SnippetFolder entities.
func (*SnippetFolderSelect) Bool ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SnippetFolderSelect) BoolX ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetFolderSelect) Bools ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SnippetFolderSelect) BoolsX ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetFolderSelect) Float64 ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SnippetFolderSelect) Float64X ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetFolderSelect) Float64s ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SnippetFolderSelect) Float64sX ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetFolderSelect) Int ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SnippetFolderSelect) IntX ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetFolderSelect) Ints ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SnippetFolderSelect) IntsX ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetFolderSelect) Scan ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SnippetFolderSelect) ScanX ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetFolderSelect) String ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SnippetFolderSelect) StringX ¶ added in v1.0.8
func (sfs *SnippetFolderSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetFolderUpdate ¶ added in v1.0.8
type SnippetFolderUpdate struct {
// contains filtered or unexported fields
}
SnippetFolderUpdate is the builder for updating SnippetFolder entities.
func (*SnippetFolderUpdate) AddPid ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) AddPid(i int) *SnippetFolderUpdate
AddPid adds i to the "pid" field.
func (*SnippetFolderUpdate) AddSnippetIDs ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) AddSnippetIDs(ids ...int) *SnippetFolderUpdate
AddSnippetIDs adds the "snippets" edge to the Snippet entity by IDs.
func (*SnippetFolderUpdate) AddSnippets ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) AddSnippets(s ...*Snippet) *SnippetFolderUpdate
AddSnippets adds the "snippets" edges to the Snippet entity.
func (*SnippetFolderUpdate) AddSnippetsTotal ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) AddSnippetsTotal(i int) *SnippetFolderUpdate
AddSnippetsTotal adds i to the "snippets_total" field.
func (*SnippetFolderUpdate) ClearFolderOwner ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) ClearFolderOwner() *SnippetFolderUpdate
ClearFolderOwner clears the "folder_owner" edge to the Member entity.
func (*SnippetFolderUpdate) ClearPid ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) ClearPid() *SnippetFolderUpdate
ClearPid clears the value of the "pid" field.
func (*SnippetFolderUpdate) ClearSnippets ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) ClearSnippets() *SnippetFolderUpdate
ClearSnippets clears all "snippets" edges to the Snippet entity.
func (*SnippetFolderUpdate) Exec ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SnippetFolderUpdate) ExecX ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetFolderUpdate) Mutation ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) Mutation() *SnippetFolderMutation
Mutation returns the SnippetFolderMutation object of the builder.
func (*SnippetFolderUpdate) RemoveSnippetIDs ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) RemoveSnippetIDs(ids ...int) *SnippetFolderUpdate
RemoveSnippetIDs removes the "snippets" edge to Snippet entities by IDs.
func (*SnippetFolderUpdate) RemoveSnippets ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) RemoveSnippets(s ...*Snippet) *SnippetFolderUpdate
RemoveSnippets removes "snippets" edges to Snippet entities.
func (*SnippetFolderUpdate) Save ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SnippetFolderUpdate) SaveX ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SnippetFolderUpdate) SetFolderOwner ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetFolderOwner(m *Member) *SnippetFolderUpdate
SetFolderOwner sets the "folder_owner" edge to the Member entity.
func (*SnippetFolderUpdate) SetFolderOwnerID ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetFolderOwnerID(id int) *SnippetFolderUpdate
SetFolderOwnerID sets the "folder_owner" edge to the Member entity by ID.
func (*SnippetFolderUpdate) SetLanguage ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetLanguage(s string) *SnippetFolderUpdate
SetLanguage sets the "language" field.
func (*SnippetFolderUpdate) SetName ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetName(s string) *SnippetFolderUpdate
SetName sets the "name" field.
func (*SnippetFolderUpdate) SetNillableLanguage ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetNillableLanguage(s *string) *SnippetFolderUpdate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*SnippetFolderUpdate) SetNillablePid ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetNillablePid(i *int) *SnippetFolderUpdate
SetNillablePid sets the "pid" field if the given value is not nil.
func (*SnippetFolderUpdate) SetNillableSnippetsTotal ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetNillableSnippetsTotal(i *int) *SnippetFolderUpdate
SetNillableSnippetsTotal sets the "snippets_total" field if the given value is not nil.
func (*SnippetFolderUpdate) SetPid ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetPid(i int) *SnippetFolderUpdate
SetPid sets the "pid" field.
func (*SnippetFolderUpdate) SetSnippetsTotal ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetSnippetsTotal(i int) *SnippetFolderUpdate
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetFolderUpdate) SetUpdateTime ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) SetUpdateTime(t time.Time) *SnippetFolderUpdate
SetUpdateTime sets the "update_time" field.
func (*SnippetFolderUpdate) Where ¶ added in v1.0.8
func (sfu *SnippetFolderUpdate) Where(ps ...predicate.SnippetFolder) *SnippetFolderUpdate
Where adds a new predicate for the SnippetFolderUpdate builder.
type SnippetFolderUpdateOne ¶ added in v1.0.8
type SnippetFolderUpdateOne struct {
// contains filtered or unexported fields
}
SnippetFolderUpdateOne is the builder for updating a single SnippetFolder entity.
func (*SnippetFolderUpdateOne) AddPid ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) AddPid(i int) *SnippetFolderUpdateOne
AddPid adds i to the "pid" field.
func (*SnippetFolderUpdateOne) AddSnippetIDs ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) AddSnippetIDs(ids ...int) *SnippetFolderUpdateOne
AddSnippetIDs adds the "snippets" edge to the Snippet entity by IDs.
func (*SnippetFolderUpdateOne) AddSnippets ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) AddSnippets(s ...*Snippet) *SnippetFolderUpdateOne
AddSnippets adds the "snippets" edges to the Snippet entity.
func (*SnippetFolderUpdateOne) AddSnippetsTotal ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) AddSnippetsTotal(i int) *SnippetFolderUpdateOne
AddSnippetsTotal adds i to the "snippets_total" field.
func (*SnippetFolderUpdateOne) ClearFolderOwner ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) ClearFolderOwner() *SnippetFolderUpdateOne
ClearFolderOwner clears the "folder_owner" edge to the Member entity.
func (*SnippetFolderUpdateOne) ClearPid ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) ClearPid() *SnippetFolderUpdateOne
ClearPid clears the value of the "pid" field.
func (*SnippetFolderUpdateOne) ClearSnippets ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) ClearSnippets() *SnippetFolderUpdateOne
ClearSnippets clears all "snippets" edges to the Snippet entity.
func (*SnippetFolderUpdateOne) Exec ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SnippetFolderUpdateOne) ExecX ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetFolderUpdateOne) Mutation ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) Mutation() *SnippetFolderMutation
Mutation returns the SnippetFolderMutation object of the builder.
func (*SnippetFolderUpdateOne) RemoveSnippetIDs ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) RemoveSnippetIDs(ids ...int) *SnippetFolderUpdateOne
RemoveSnippetIDs removes the "snippets" edge to Snippet entities by IDs.
func (*SnippetFolderUpdateOne) RemoveSnippets ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) RemoveSnippets(s ...*Snippet) *SnippetFolderUpdateOne
RemoveSnippets removes "snippets" edges to Snippet entities.
func (*SnippetFolderUpdateOne) Save ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) Save(ctx context.Context) (*SnippetFolder, error)
Save executes the query and returns the updated SnippetFolder entity.
func (*SnippetFolderUpdateOne) SaveX ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SaveX(ctx context.Context) *SnippetFolder
SaveX is like Save, but panics if an error occurs.
func (*SnippetFolderUpdateOne) Select ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) Select(field string, fields ...string) *SnippetFolderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SnippetFolderUpdateOne) SetFolderOwner ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetFolderOwner(m *Member) *SnippetFolderUpdateOne
SetFolderOwner sets the "folder_owner" edge to the Member entity.
func (*SnippetFolderUpdateOne) SetFolderOwnerID ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetFolderOwnerID(id int) *SnippetFolderUpdateOne
SetFolderOwnerID sets the "folder_owner" edge to the Member entity by ID.
func (*SnippetFolderUpdateOne) SetLanguage ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetLanguage(s string) *SnippetFolderUpdateOne
SetLanguage sets the "language" field.
func (*SnippetFolderUpdateOne) SetName ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetName(s string) *SnippetFolderUpdateOne
SetName sets the "name" field.
func (*SnippetFolderUpdateOne) SetNillableLanguage ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetNillableLanguage(s *string) *SnippetFolderUpdateOne
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*SnippetFolderUpdateOne) SetNillablePid ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetNillablePid(i *int) *SnippetFolderUpdateOne
SetNillablePid sets the "pid" field if the given value is not nil.
func (*SnippetFolderUpdateOne) SetNillableSnippetsTotal ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetNillableSnippetsTotal(i *int) *SnippetFolderUpdateOne
SetNillableSnippetsTotal sets the "snippets_total" field if the given value is not nil.
func (*SnippetFolderUpdateOne) SetPid ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetPid(i int) *SnippetFolderUpdateOne
SetPid sets the "pid" field.
func (*SnippetFolderUpdateOne) SetSnippetsTotal ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetSnippetsTotal(i int) *SnippetFolderUpdateOne
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetFolderUpdateOne) SetUpdateTime ¶ added in v1.0.8
func (sfuo *SnippetFolderUpdateOne) SetUpdateTime(t time.Time) *SnippetFolderUpdateOne
SetUpdateTime sets the "update_time" field.
type SnippetFolders ¶ added in v1.0.8
type SnippetFolders []*SnippetFolder
SnippetFolders is a parsable slice of SnippetFolder.
type SnippetGroupBy ¶ added in v1.0.8
type SnippetGroupBy struct {
// contains filtered or unexported fields
}
SnippetGroupBy is the group-by builder for Snippet entities.
func (*SnippetGroupBy) Aggregate ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Aggregate(fns ...AggregateFunc) *SnippetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SnippetGroupBy) Bool ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetGroupBy) BoolX ¶ added in v1.0.8
func (sgb *SnippetGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetGroupBy) Bools ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetGroupBy) BoolsX ¶ added in v1.0.8
func (sgb *SnippetGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetGroupBy) Float64 ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetGroupBy) Float64X ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetGroupBy) Float64s ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetGroupBy) Float64sX ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetGroupBy) Int ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetGroupBy) IntX ¶ added in v1.0.8
func (sgb *SnippetGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetGroupBy) Ints ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetGroupBy) IntsX ¶ added in v1.0.8
func (sgb *SnippetGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetGroupBy) Scan ¶ added in v1.0.8
func (sgb *SnippetGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SnippetGroupBy) ScanX ¶ added in v1.0.8
func (sgb *SnippetGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetGroupBy) String ¶ added in v1.0.8
func (sgb *SnippetGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetGroupBy) StringX ¶ added in v1.0.8
func (sgb *SnippetGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetMutation ¶ added in v1.0.8
type SnippetMutation struct {
// contains filtered or unexported fields
}
SnippetMutation represents an operation that mutates the Snippet nodes in the graph.
func (*SnippetMutation) AddField ¶ added in v1.0.8
func (m *SnippetMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetMutation) AddFolderID ¶ added in v1.0.8
func (m *SnippetMutation) AddFolderID(i int)
AddFolderID adds i to the "folder_id" field.
func (*SnippetMutation) AddSnippetDocIDs ¶ added in v1.0.8
func (m *SnippetMutation) AddSnippetDocIDs(ids ...int)
AddSnippetDocIDs adds the "snippet_docs" edge to the SnippetDocument entity by ids.
func (*SnippetMutation) AddSnippetTagIDs ¶ added in v1.0.9
func (m *SnippetMutation) AddSnippetTagIDs(ids ...int)
AddSnippetTagIDs adds the "snippet_tags" edge to the SnippetTag entity by ids.
func (*SnippetMutation) AddedEdges ¶ added in v1.0.8
func (m *SnippetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SnippetMutation) AddedField ¶ added in v1.0.8
func (m *SnippetMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetMutation) AddedFields ¶ added in v1.0.8
func (m *SnippetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SnippetMutation) AddedFolderID ¶ added in v1.0.8
func (m *SnippetMutation) AddedFolderID() (r int, exists bool)
AddedFolderID returns the value that was added to the "folder_id" field in this mutation.
func (*SnippetMutation) AddedIDs ¶ added in v1.0.8
func (m *SnippetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SnippetMutation) ClearEdge ¶ added in v1.0.8
func (m *SnippetMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SnippetMutation) ClearField ¶ added in v1.0.8
func (m *SnippetMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetMutation) ClearFolderID ¶ added in v1.0.8
func (m *SnippetMutation) ClearFolderID()
ClearFolderID clears the value of the "folder_id" field.
func (*SnippetMutation) ClearSnippetDocs ¶ added in v1.0.8
func (m *SnippetMutation) ClearSnippetDocs()
ClearSnippetDocs clears the "snippet_docs" edge to the SnippetDocument entity.
func (*SnippetMutation) ClearSnippetOwner ¶ added in v1.0.8
func (m *SnippetMutation) ClearSnippetOwner()
ClearSnippetOwner clears the "snippet_owner" edge to the Member entity.
func (*SnippetMutation) ClearSnippetTags ¶ added in v1.0.9
func (m *SnippetMutation) ClearSnippetTags()
ClearSnippetTags clears the "snippet_tags" edge to the SnippetTag entity.
func (*SnippetMutation) ClearTitle ¶ added in v1.0.8
func (m *SnippetMutation) ClearTitle()
ClearTitle clears the value of the "title" field.
func (*SnippetMutation) ClearedEdges ¶ added in v1.0.8
func (m *SnippetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SnippetMutation) ClearedFields ¶ added in v1.0.8
func (m *SnippetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SnippetMutation) Client ¶ added in v1.0.8
func (m SnippetMutation) 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 (*SnippetMutation) CreateTime ¶ added in v1.0.8
func (m *SnippetMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SnippetMutation) EdgeCleared ¶ added in v1.0.8
func (m *SnippetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SnippetMutation) Field ¶ added in v1.0.8
func (m *SnippetMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetMutation) FieldCleared ¶ added in v1.0.8
func (m *SnippetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SnippetMutation) Fields ¶ added in v1.0.8
func (m *SnippetMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SnippetMutation) FolderID ¶ added in v1.0.8
func (m *SnippetMutation) FolderID() (r int, exists bool)
FolderID returns the value of the "folder_id" field in the mutation.
func (*SnippetMutation) FolderIDCleared ¶ added in v1.0.8
func (m *SnippetMutation) FolderIDCleared() bool
FolderIDCleared returns if the "folder_id" field was cleared in this mutation.
func (*SnippetMutation) ID ¶ added in v1.0.8
func (m *SnippetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*SnippetMutation) OldCreateTime ¶ added in v1.0.8
OldCreateTime returns the old "create_time" field's value of the Snippet entity. If the Snippet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetMutation) OldField ¶ added in v1.0.8
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SnippetMutation) OldFolderID ¶ added in v1.0.8
func (m *SnippetMutation) OldFolderID(ctx context.Context) (v *int, err error)
OldFolderID returns the old "folder_id" field's value of the Snippet entity. If the Snippet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetMutation) OldOwnerID ¶ added in v1.0.8
func (m *SnippetMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the Snippet entity. If the Snippet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetMutation) OldSn ¶ added in v1.0.8
func (m *SnippetMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" field's value of the Snippet entity. If the Snippet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetMutation) OldTitle ¶ added in v1.0.8
func (m *SnippetMutation) OldTitle(ctx context.Context) (v *string, err error)
OldTitle returns the old "title" field's value of the Snippet entity. If the Snippet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetMutation) OldUpdateTime ¶ added in v1.0.8
OldUpdateTime returns the old "update_time" field's value of the Snippet entity. If the Snippet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetMutation) Op ¶ added in v1.0.8
func (m *SnippetMutation) Op() Op
Op returns the operation name.
func (*SnippetMutation) OwnerID ¶ added in v1.0.8
func (m *SnippetMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*SnippetMutation) RemoveSnippetDocIDs ¶ added in v1.0.8
func (m *SnippetMutation) RemoveSnippetDocIDs(ids ...int)
RemoveSnippetDocIDs removes the "snippet_docs" edge to the SnippetDocument entity by IDs.
func (*SnippetMutation) RemoveSnippetTagIDs ¶ added in v1.0.9
func (m *SnippetMutation) RemoveSnippetTagIDs(ids ...int)
RemoveSnippetTagIDs removes the "snippet_tags" edge to the SnippetTag entity by IDs.
func (*SnippetMutation) RemovedEdges ¶ added in v1.0.8
func (m *SnippetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SnippetMutation) RemovedIDs ¶ added in v1.0.8
func (m *SnippetMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SnippetMutation) RemovedSnippetDocsIDs ¶ added in v1.0.8
func (m *SnippetMutation) RemovedSnippetDocsIDs() (ids []int)
RemovedSnippetDocs returns the removed IDs of the "snippet_docs" edge to the SnippetDocument entity.
func (*SnippetMutation) RemovedSnippetTagsIDs ¶ added in v1.0.9
func (m *SnippetMutation) RemovedSnippetTagsIDs() (ids []int)
RemovedSnippetTags returns the removed IDs of the "snippet_tags" edge to the SnippetTag entity.
func (*SnippetMutation) ResetCreateTime ¶ added in v1.0.8
func (m *SnippetMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SnippetMutation) ResetEdge ¶ added in v1.0.8
func (m *SnippetMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SnippetMutation) ResetField ¶ added in v1.0.8
func (m *SnippetMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetMutation) ResetFolderID ¶ added in v1.0.8
func (m *SnippetMutation) ResetFolderID()
ResetFolderID resets all changes to the "folder_id" field.
func (*SnippetMutation) ResetOwnerID ¶ added in v1.0.8
func (m *SnippetMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*SnippetMutation) ResetSn ¶ added in v1.0.8
func (m *SnippetMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*SnippetMutation) ResetSnippetDocs ¶ added in v1.0.8
func (m *SnippetMutation) ResetSnippetDocs()
ResetSnippetDocs resets all changes to the "snippet_docs" edge.
func (*SnippetMutation) ResetSnippetOwner ¶ added in v1.0.8
func (m *SnippetMutation) ResetSnippetOwner()
ResetSnippetOwner resets all changes to the "snippet_owner" edge.
func (*SnippetMutation) ResetSnippetTags ¶ added in v1.0.9
func (m *SnippetMutation) ResetSnippetTags()
ResetSnippetTags resets all changes to the "snippet_tags" edge.
func (*SnippetMutation) ResetTitle ¶ added in v1.0.8
func (m *SnippetMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*SnippetMutation) ResetUpdateTime ¶ added in v1.0.8
func (m *SnippetMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SnippetMutation) SetCreateTime ¶ added in v1.0.8
func (m *SnippetMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SnippetMutation) SetField ¶ added in v1.0.8
func (m *SnippetMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetMutation) SetFolderID ¶ added in v1.0.8
func (m *SnippetMutation) SetFolderID(i int)
SetFolderID sets the "folder_id" field.
func (*SnippetMutation) SetID ¶ added in v1.0.8
func (m *SnippetMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Snippet entities.
func (*SnippetMutation) SetOwnerID ¶ added in v1.0.8
func (m *SnippetMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*SnippetMutation) SetSn ¶ added in v1.0.8
func (m *SnippetMutation) SetSn(s string)
SetSn sets the "sn" field.
func (*SnippetMutation) SetSnippetOwnerID ¶ added in v1.0.8
func (m *SnippetMutation) SetSnippetOwnerID(id int)
SetSnippetOwnerID sets the "snippet_owner" edge to the Member entity by id.
func (*SnippetMutation) SetTitle ¶ added in v1.0.8
func (m *SnippetMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*SnippetMutation) SetUpdateTime ¶ added in v1.0.8
func (m *SnippetMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SnippetMutation) Sn ¶ added in v1.0.8
func (m *SnippetMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" field in the mutation.
func (*SnippetMutation) SnippetDocsCleared ¶ added in v1.0.8
func (m *SnippetMutation) SnippetDocsCleared() bool
SnippetDocsCleared reports if the "snippet_docs" edge to the SnippetDocument entity was cleared.
func (*SnippetMutation) SnippetDocsIDs ¶ added in v1.0.8
func (m *SnippetMutation) SnippetDocsIDs() (ids []int)
SnippetDocsIDs returns the "snippet_docs" edge IDs in the mutation.
func (*SnippetMutation) SnippetOwnerCleared ¶ added in v1.0.8
func (m *SnippetMutation) SnippetOwnerCleared() bool
SnippetOwnerCleared reports if the "snippet_owner" edge to the Member entity was cleared.
func (*SnippetMutation) SnippetOwnerID ¶ added in v1.0.8
func (m *SnippetMutation) SnippetOwnerID() (id int, exists bool)
SnippetOwnerID returns the "snippet_owner" edge ID in the mutation.
func (*SnippetMutation) SnippetOwnerIDs ¶ added in v1.0.8
func (m *SnippetMutation) SnippetOwnerIDs() (ids []int)
SnippetOwnerIDs returns the "snippet_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SnippetOwnerID instead. It exists only for internal usage by the builders.
func (*SnippetMutation) SnippetTagsCleared ¶ added in v1.0.9
func (m *SnippetMutation) SnippetTagsCleared() bool
SnippetTagsCleared reports if the "snippet_tags" edge to the SnippetTag entity was cleared.
func (*SnippetMutation) SnippetTagsIDs ¶ added in v1.0.9
func (m *SnippetMutation) SnippetTagsIDs() (ids []int)
SnippetTagsIDs returns the "snippet_tags" edge IDs in the mutation.
func (*SnippetMutation) Title ¶ added in v1.0.8
func (m *SnippetMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*SnippetMutation) TitleCleared ¶ added in v1.0.8
func (m *SnippetMutation) TitleCleared() bool
TitleCleared returns if the "title" field was cleared in this mutation.
func (SnippetMutation) Tx ¶ added in v1.0.8
func (m SnippetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SnippetMutation) Type ¶ added in v1.0.8
func (m *SnippetMutation) Type() string
Type returns the node type of this mutation (Snippet).
func (*SnippetMutation) UpdateTime ¶ added in v1.0.8
func (m *SnippetMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type SnippetQuery ¶ added in v1.0.8
type SnippetQuery struct {
// contains filtered or unexported fields
}
SnippetQuery is the builder for querying Snippet entities.
func (*SnippetQuery) All ¶ added in v1.0.8
func (sq *SnippetQuery) All(ctx context.Context) ([]*Snippet, error)
All executes the query and returns a list of Snippets.
func (*SnippetQuery) AllX ¶ added in v1.0.8
func (sq *SnippetQuery) AllX(ctx context.Context) []*Snippet
AllX is like All, but panics if an error occurs.
func (*SnippetQuery) Clone ¶ added in v1.0.8
func (sq *SnippetQuery) Clone() *SnippetQuery
Clone returns a duplicate of the SnippetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SnippetQuery) Count ¶ added in v1.0.8
func (sq *SnippetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SnippetQuery) CountX ¶ added in v1.0.8
func (sq *SnippetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SnippetQuery) Exist ¶ added in v1.0.8
func (sq *SnippetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SnippetQuery) ExistX ¶ added in v1.0.8
func (sq *SnippetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SnippetQuery) First ¶ added in v1.0.8
func (sq *SnippetQuery) First(ctx context.Context) (*Snippet, error)
First returns the first Snippet entity from the query. Returns a *NotFoundError when no Snippet was found.
func (*SnippetQuery) FirstID ¶ added in v1.0.8
func (sq *SnippetQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Snippet ID from the query. Returns a *NotFoundError when no Snippet ID was found.
func (*SnippetQuery) FirstIDX ¶ added in v1.0.8
func (sq *SnippetQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SnippetQuery) FirstX ¶ added in v1.0.8
func (sq *SnippetQuery) FirstX(ctx context.Context) *Snippet
FirstX is like First, but panics if an error occurs.
func (*SnippetQuery) GroupBy ¶ added in v1.0.8
func (sq *SnippetQuery) GroupBy(field string, fields ...string) *SnippetGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Sn string `json:"sn,omitempty"` Count int `json:"count,omitempty"` } client.Snippet.Query(). GroupBy(snippet.FieldSn). Aggregate(model.Count()). Scan(ctx, &v)
func (*SnippetQuery) IDs ¶ added in v1.0.8
func (sq *SnippetQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Snippet IDs.
func (*SnippetQuery) IDsX ¶ added in v1.0.8
func (sq *SnippetQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SnippetQuery) Limit ¶ added in v1.0.8
func (sq *SnippetQuery) Limit(limit int) *SnippetQuery
Limit adds a limit step to the query.
func (*SnippetQuery) Offset ¶ added in v1.0.8
func (sq *SnippetQuery) Offset(offset int) *SnippetQuery
Offset adds an offset step to the query.
func (*SnippetQuery) Only ¶ added in v1.0.8
func (sq *SnippetQuery) Only(ctx context.Context) (*Snippet, error)
Only returns a single Snippet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Snippet entity is not found. Returns a *NotFoundError when no Snippet entities are found.
func (*SnippetQuery) OnlyID ¶ added in v1.0.8
func (sq *SnippetQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Snippet ID in the query. Returns a *NotSingularError when exactly one Snippet ID is not found. Returns a *NotFoundError when no entities are found.
func (*SnippetQuery) OnlyIDX ¶ added in v1.0.8
func (sq *SnippetQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SnippetQuery) OnlyX ¶ added in v1.0.8
func (sq *SnippetQuery) OnlyX(ctx context.Context) *Snippet
OnlyX is like Only, but panics if an error occurs.
func (*SnippetQuery) Order ¶ added in v1.0.8
func (sq *SnippetQuery) Order(o ...OrderFunc) *SnippetQuery
Order adds an order step to the query.
func (*SnippetQuery) QuerySnippetDocs ¶ added in v1.0.8
func (sq *SnippetQuery) QuerySnippetDocs() *SnippetDocumentQuery
QuerySnippetDocs chains the current query on the "snippet_docs" edge.
func (*SnippetQuery) QuerySnippetOwner ¶ added in v1.0.8
func (sq *SnippetQuery) QuerySnippetOwner() *MemberQuery
QuerySnippetOwner chains the current query on the "snippet_owner" edge.
func (*SnippetQuery) QuerySnippetTags ¶ added in v1.0.9
func (sq *SnippetQuery) QuerySnippetTags() *SnippetTagQuery
QuerySnippetTags chains the current query on the "snippet_tags" edge.
func (*SnippetQuery) Select ¶ added in v1.0.8
func (sq *SnippetQuery) Select(field string, fields ...string) *SnippetSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Sn string `json:"sn,omitempty"` } client.Snippet.Query(). Select(snippet.FieldSn). Scan(ctx, &v)
func (*SnippetQuery) Unique ¶ added in v1.0.8
func (sq *SnippetQuery) Unique(unique bool) *SnippetQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SnippetQuery) Where ¶ added in v1.0.8
func (sq *SnippetQuery) Where(ps ...predicate.Snippet) *SnippetQuery
Where adds a new predicate for the SnippetQuery builder.
func (*SnippetQuery) WithSnippetDocs ¶ added in v1.0.8
func (sq *SnippetQuery) WithSnippetDocs(opts ...func(*SnippetDocumentQuery)) *SnippetQuery
WithSnippetDocs tells the query-builder to eager-load the nodes that are connected to the "snippet_docs" edge. The optional arguments are used to configure the query builder of the edge.
func (*SnippetQuery) WithSnippetOwner ¶ added in v1.0.8
func (sq *SnippetQuery) WithSnippetOwner(opts ...func(*MemberQuery)) *SnippetQuery
WithSnippetOwner tells the query-builder to eager-load the nodes that are connected to the "snippet_owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*SnippetQuery) WithSnippetTags ¶ added in v1.0.9
func (sq *SnippetQuery) WithSnippetTags(opts ...func(*SnippetTagQuery)) *SnippetQuery
WithSnippetTags tells the query-builder to eager-load the nodes that are connected to the "snippet_tags" edge. The optional arguments are used to configure the query builder of the edge.
type SnippetSelect ¶ added in v1.0.8
type SnippetSelect struct { *SnippetQuery // contains filtered or unexported fields }
SnippetSelect is the builder for selecting fields of Snippet entities.
func (*SnippetSelect) Bool ¶ added in v1.0.8
func (ss *SnippetSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SnippetSelect) BoolX ¶ added in v1.0.8
func (ss *SnippetSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetSelect) Bools ¶ added in v1.0.8
func (ss *SnippetSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SnippetSelect) BoolsX ¶ added in v1.0.8
func (ss *SnippetSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetSelect) Float64 ¶ added in v1.0.8
func (ss *SnippetSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SnippetSelect) Float64X ¶ added in v1.0.8
func (ss *SnippetSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetSelect) Float64s ¶ added in v1.0.8
func (ss *SnippetSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SnippetSelect) Float64sX ¶ added in v1.0.8
func (ss *SnippetSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetSelect) Int ¶ added in v1.0.8
func (ss *SnippetSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SnippetSelect) IntX ¶ added in v1.0.8
func (ss *SnippetSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetSelect) Ints ¶ added in v1.0.8
func (ss *SnippetSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SnippetSelect) IntsX ¶ added in v1.0.8
func (ss *SnippetSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetSelect) Scan ¶ added in v1.0.8
func (ss *SnippetSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SnippetSelect) ScanX ¶ added in v1.0.8
func (ss *SnippetSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetSelect) String ¶ added in v1.0.8
func (ss *SnippetSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SnippetSelect) StringX ¶ added in v1.0.8
func (ss *SnippetSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetTag ¶ added in v1.0.8
type SnippetTag struct { // ID of the ent. ID int `json:"id,omitempty"` // SnippetID holds the value of the "snippet_id" field. SnippetID int `json:"snippet_id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"owner_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // SnippetsTotal holds the value of the "snippets_total" field. SnippetsTotal int `json:"snippets_total,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SnippetTagQuery when eager-loading is set. Edges SnippetTagEdges `json:"edges"` // contains filtered or unexported fields }
SnippetTag is the model entity for the SnippetTag schema.
func (*SnippetTag) QueryTagOwner ¶ added in v1.0.8
func (st *SnippetTag) QueryTagOwner() *MemberQuery
QueryTagOwner queries the "tag_owner" edge of the SnippetTag entity.
func (*SnippetTag) QueryTagSnippet ¶ added in v1.0.9
func (st *SnippetTag) QueryTagSnippet() *SnippetQuery
QueryTagSnippet queries the "tag_snippet" edge of the SnippetTag entity.
func (*SnippetTag) String ¶ added in v1.0.8
func (st *SnippetTag) String() string
String implements the fmt.Stringer.
func (*SnippetTag) Unwrap ¶ added in v1.0.8
func (st *SnippetTag) Unwrap() *SnippetTag
Unwrap unwraps the SnippetTag entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*SnippetTag) Update ¶ added in v1.0.8
func (st *SnippetTag) Update() *SnippetTagUpdateOne
Update returns a builder for updating this SnippetTag. Note that you need to call SnippetTag.Unwrap() before calling this method if this SnippetTag was returned from a transaction, and the transaction was committed or rolled back.
type SnippetTagClient ¶ added in v1.0.8
type SnippetTagClient struct {
// contains filtered or unexported fields
}
SnippetTagClient is a client for the SnippetTag schema.
func NewSnippetTagClient ¶ added in v1.0.8
func NewSnippetTagClient(c config) *SnippetTagClient
NewSnippetTagClient returns a client for the SnippetTag from the given config.
func (*SnippetTagClient) Create ¶ added in v1.0.8
func (c *SnippetTagClient) Create() *SnippetTagCreate
Create returns a create builder for SnippetTag.
func (*SnippetTagClient) CreateBulk ¶ added in v1.0.8
func (c *SnippetTagClient) CreateBulk(builders ...*SnippetTagCreate) *SnippetTagCreateBulk
CreateBulk returns a builder for creating a bulk of SnippetTag entities.
func (*SnippetTagClient) Delete ¶ added in v1.0.8
func (c *SnippetTagClient) Delete() *SnippetTagDelete
Delete returns a delete builder for SnippetTag.
func (*SnippetTagClient) DeleteOne ¶ added in v1.0.8
func (c *SnippetTagClient) DeleteOne(st *SnippetTag) *SnippetTagDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SnippetTagClient) DeleteOneID ¶ added in v1.0.8
func (c *SnippetTagClient) DeleteOneID(id int) *SnippetTagDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SnippetTagClient) Get ¶ added in v1.0.8
func (c *SnippetTagClient) Get(ctx context.Context, id int) (*SnippetTag, error)
Get returns a SnippetTag entity by its id.
func (*SnippetTagClient) GetX ¶ added in v1.0.8
func (c *SnippetTagClient) GetX(ctx context.Context, id int) *SnippetTag
GetX is like Get, but panics if an error occurs.
func (*SnippetTagClient) Hooks ¶ added in v1.0.8
func (c *SnippetTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SnippetTagClient) Query ¶ added in v1.0.8
func (c *SnippetTagClient) Query() *SnippetTagQuery
Query returns a query builder for SnippetTag.
func (*SnippetTagClient) QueryTagOwner ¶ added in v1.0.8
func (c *SnippetTagClient) QueryTagOwner(st *SnippetTag) *MemberQuery
QueryTagOwner queries the tag_owner edge of a SnippetTag.
func (*SnippetTagClient) QueryTagSnippet ¶ added in v1.0.9
func (c *SnippetTagClient) QueryTagSnippet(st *SnippetTag) *SnippetQuery
QueryTagSnippet queries the tag_snippet edge of a SnippetTag.
func (*SnippetTagClient) Update ¶ added in v1.0.8
func (c *SnippetTagClient) Update() *SnippetTagUpdate
Update returns an update builder for SnippetTag.
func (*SnippetTagClient) UpdateOne ¶ added in v1.0.8
func (c *SnippetTagClient) UpdateOne(st *SnippetTag) *SnippetTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SnippetTagClient) UpdateOneID ¶ added in v1.0.8
func (c *SnippetTagClient) UpdateOneID(id int) *SnippetTagUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SnippetTagClient) Use ¶ added in v1.0.8
func (c *SnippetTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `snippettag.Hooks(f(g(h())))`.
type SnippetTagCreate ¶ added in v1.0.8
type SnippetTagCreate struct {
// contains filtered or unexported fields
}
SnippetTagCreate is the builder for creating a SnippetTag entity.
func (*SnippetTagCreate) Mutation ¶ added in v1.0.8
func (stc *SnippetTagCreate) Mutation() *SnippetTagMutation
Mutation returns the SnippetTagMutation object of the builder.
func (*SnippetTagCreate) Save ¶ added in v1.0.8
func (stc *SnippetTagCreate) Save(ctx context.Context) (*SnippetTag, error)
Save creates the SnippetTag in the database.
func (*SnippetTagCreate) SaveX ¶ added in v1.0.8
func (stc *SnippetTagCreate) SaveX(ctx context.Context) *SnippetTag
SaveX calls Save and panics if Save returns an error.
func (*SnippetTagCreate) SetCreateTime ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetCreateTime(t time.Time) *SnippetTagCreate
SetCreateTime sets the "create_time" field.
func (*SnippetTagCreate) SetID ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetID(i int) *SnippetTagCreate
SetID sets the "id" field.
func (*SnippetTagCreate) SetName ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetName(s string) *SnippetTagCreate
SetName sets the "name" field.
func (*SnippetTagCreate) SetNillableCreateTime ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetNillableCreateTime(t *time.Time) *SnippetTagCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SnippetTagCreate) SetNillableSnippetsTotal ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetNillableSnippetsTotal(i *int) *SnippetTagCreate
SetNillableSnippetsTotal sets the "snippets_total" field if the given value is not nil.
func (*SnippetTagCreate) SetNillableUpdateTime ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetNillableUpdateTime(t *time.Time) *SnippetTagCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SnippetTagCreate) SetOwnerID ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetOwnerID(i int) *SnippetTagCreate
SetOwnerID sets the "owner_id" field.
func (*SnippetTagCreate) SetSnippetID ¶ added in v1.0.9
func (stc *SnippetTagCreate) SetSnippetID(i int) *SnippetTagCreate
SetSnippetID sets the "snippet_id" field.
func (*SnippetTagCreate) SetSnippetsTotal ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetSnippetsTotal(i int) *SnippetTagCreate
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetTagCreate) SetTagOwner ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetTagOwner(m *Member) *SnippetTagCreate
SetTagOwner sets the "tag_owner" edge to the Member entity.
func (*SnippetTagCreate) SetTagOwnerID ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetTagOwnerID(id int) *SnippetTagCreate
SetTagOwnerID sets the "tag_owner" edge to the Member entity by ID.
func (*SnippetTagCreate) SetTagSnippet ¶ added in v1.0.9
func (stc *SnippetTagCreate) SetTagSnippet(s *Snippet) *SnippetTagCreate
SetTagSnippet sets the "tag_snippet" edge to the Snippet entity.
func (*SnippetTagCreate) SetTagSnippetID ¶ added in v1.0.9
func (stc *SnippetTagCreate) SetTagSnippetID(id int) *SnippetTagCreate
SetTagSnippetID sets the "tag_snippet" edge to the Snippet entity by ID.
func (*SnippetTagCreate) SetUpdateTime ¶ added in v1.0.8
func (stc *SnippetTagCreate) SetUpdateTime(t time.Time) *SnippetTagCreate
SetUpdateTime sets the "update_time" field.
type SnippetTagCreateBulk ¶ added in v1.0.8
type SnippetTagCreateBulk struct {
// contains filtered or unexported fields
}
SnippetTagCreateBulk is the builder for creating many SnippetTag entities in bulk.
func (*SnippetTagCreateBulk) Save ¶ added in v1.0.8
func (stcb *SnippetTagCreateBulk) Save(ctx context.Context) ([]*SnippetTag, error)
Save creates the SnippetTag entities in the database.
func (*SnippetTagCreateBulk) SaveX ¶ added in v1.0.8
func (stcb *SnippetTagCreateBulk) SaveX(ctx context.Context) []*SnippetTag
SaveX is like Save, but panics if an error occurs.
type SnippetTagDelete ¶ added in v1.0.8
type SnippetTagDelete struct {
// contains filtered or unexported fields
}
SnippetTagDelete is the builder for deleting a SnippetTag entity.
func (*SnippetTagDelete) Exec ¶ added in v1.0.8
func (std *SnippetTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SnippetTagDelete) ExecX ¶ added in v1.0.8
func (std *SnippetTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SnippetTagDelete) Where ¶ added in v1.0.8
func (std *SnippetTagDelete) Where(ps ...predicate.SnippetTag) *SnippetTagDelete
Where adds a new predicate to the SnippetTagDelete builder.
type SnippetTagDeleteOne ¶ added in v1.0.8
type SnippetTagDeleteOne struct {
// contains filtered or unexported fields
}
SnippetTagDeleteOne is the builder for deleting a single SnippetTag entity.
func (*SnippetTagDeleteOne) Exec ¶ added in v1.0.8
func (stdo *SnippetTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SnippetTagDeleteOne) ExecX ¶ added in v1.0.8
func (stdo *SnippetTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SnippetTagEdges ¶ added in v1.0.8
type SnippetTagEdges struct { // TagOwner holds the value of the tag_owner edge. TagOwner *Member `json:"tag_owner,omitempty"` // TagSnippet holds the value of the tag_snippet edge. TagSnippet *Snippet `json:"tag_snippet,omitempty"` // contains filtered or unexported fields }
SnippetTagEdges holds the relations/edges for other nodes in the graph.
func (SnippetTagEdges) TagOwnerOrErr ¶ added in v1.0.8
func (e SnippetTagEdges) TagOwnerOrErr() (*Member, error)
TagOwnerOrErr returns the TagOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SnippetTagEdges) TagSnippetOrErr ¶ added in v1.0.9
func (e SnippetTagEdges) TagSnippetOrErr() (*Snippet, error)
TagSnippetOrErr returns the TagSnippet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SnippetTagGroupBy ¶ added in v1.0.8
type SnippetTagGroupBy struct {
// contains filtered or unexported fields
}
SnippetTagGroupBy is the group-by builder for SnippetTag entities.
func (*SnippetTagGroupBy) Aggregate ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Aggregate(fns ...AggregateFunc) *SnippetTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SnippetTagGroupBy) Bool ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetTagGroupBy) BoolX ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetTagGroupBy) Bools ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetTagGroupBy) BoolsX ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetTagGroupBy) Float64 ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetTagGroupBy) Float64X ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetTagGroupBy) Float64s ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetTagGroupBy) Float64sX ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetTagGroupBy) Int ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetTagGroupBy) IntX ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetTagGroupBy) Ints ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*SnippetTagGroupBy) IntsX ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetTagGroupBy) Scan ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SnippetTagGroupBy) ScanX ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetTagGroupBy) String ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SnippetTagGroupBy) StringX ¶ added in v1.0.8
func (stgb *SnippetTagGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetTagMutation ¶ added in v1.0.8
type SnippetTagMutation struct {
// contains filtered or unexported fields
}
SnippetTagMutation represents an operation that mutates the SnippetTag nodes in the graph.
func (*SnippetTagMutation) AddField ¶ added in v1.0.8
func (m *SnippetTagMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetTagMutation) AddSnippetsTotal ¶ added in v1.0.8
func (m *SnippetTagMutation) AddSnippetsTotal(i int)
AddSnippetsTotal adds i to the "snippets_total" field.
func (*SnippetTagMutation) AddedEdges ¶ added in v1.0.8
func (m *SnippetTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SnippetTagMutation) AddedField ¶ added in v1.0.8
func (m *SnippetTagMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetTagMutation) AddedFields ¶ added in v1.0.8
func (m *SnippetTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SnippetTagMutation) AddedIDs ¶ added in v1.0.8
func (m *SnippetTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SnippetTagMutation) AddedSnippetsTotal ¶ added in v1.0.8
func (m *SnippetTagMutation) AddedSnippetsTotal() (r int, exists bool)
AddedSnippetsTotal returns the value that was added to the "snippets_total" field in this mutation.
func (*SnippetTagMutation) ClearEdge ¶ added in v1.0.8
func (m *SnippetTagMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SnippetTagMutation) ClearField ¶ added in v1.0.8
func (m *SnippetTagMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetTagMutation) ClearTagOwner ¶ added in v1.0.8
func (m *SnippetTagMutation) ClearTagOwner()
ClearTagOwner clears the "tag_owner" edge to the Member entity.
func (*SnippetTagMutation) ClearTagSnippet ¶ added in v1.0.9
func (m *SnippetTagMutation) ClearTagSnippet()
ClearTagSnippet clears the "tag_snippet" edge to the Snippet entity.
func (*SnippetTagMutation) ClearedEdges ¶ added in v1.0.8
func (m *SnippetTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SnippetTagMutation) ClearedFields ¶ added in v1.0.8
func (m *SnippetTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SnippetTagMutation) Client ¶ added in v1.0.8
func (m SnippetTagMutation) 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 (*SnippetTagMutation) CreateTime ¶ added in v1.0.8
func (m *SnippetTagMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SnippetTagMutation) EdgeCleared ¶ added in v1.0.8
func (m *SnippetTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SnippetTagMutation) Field ¶ added in v1.0.8
func (m *SnippetTagMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SnippetTagMutation) FieldCleared ¶ added in v1.0.8
func (m *SnippetTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SnippetTagMutation) Fields ¶ added in v1.0.8
func (m *SnippetTagMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SnippetTagMutation) ID ¶ added in v1.0.8
func (m *SnippetTagMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*SnippetTagMutation) Name ¶ added in v1.0.8
func (m *SnippetTagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SnippetTagMutation) OldCreateTime ¶ added in v1.0.8
OldCreateTime returns the old "create_time" field's value of the SnippetTag entity. If the SnippetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetTagMutation) OldField ¶ added in v1.0.8
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SnippetTagMutation) OldName ¶ added in v1.0.8
func (m *SnippetTagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the SnippetTag entity. If the SnippetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetTagMutation) OldOwnerID ¶ added in v1.0.8
func (m *SnippetTagMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the SnippetTag entity. If the SnippetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetTagMutation) OldSnippetID ¶ added in v1.0.9
func (m *SnippetTagMutation) OldSnippetID(ctx context.Context) (v int, err error)
OldSnippetID returns the old "snippet_id" field's value of the SnippetTag entity. If the SnippetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetTagMutation) OldSnippetsTotal ¶ added in v1.0.8
func (m *SnippetTagMutation) OldSnippetsTotal(ctx context.Context) (v int, err error)
OldSnippetsTotal returns the old "snippets_total" field's value of the SnippetTag entity. If the SnippetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetTagMutation) OldUpdateTime ¶ added in v1.0.8
OldUpdateTime returns the old "update_time" field's value of the SnippetTag entity. If the SnippetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SnippetTagMutation) Op ¶ added in v1.0.8
func (m *SnippetTagMutation) Op() Op
Op returns the operation name.
func (*SnippetTagMutation) OwnerID ¶ added in v1.0.8
func (m *SnippetTagMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*SnippetTagMutation) RemovedEdges ¶ added in v1.0.8
func (m *SnippetTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SnippetTagMutation) RemovedIDs ¶ added in v1.0.8
func (m *SnippetTagMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SnippetTagMutation) ResetCreateTime ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SnippetTagMutation) ResetEdge ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SnippetTagMutation) ResetField ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SnippetTagMutation) ResetName ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SnippetTagMutation) ResetOwnerID ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*SnippetTagMutation) ResetSnippetID ¶ added in v1.0.9
func (m *SnippetTagMutation) ResetSnippetID()
ResetSnippetID resets all changes to the "snippet_id" field.
func (*SnippetTagMutation) ResetSnippetsTotal ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetSnippetsTotal()
ResetSnippetsTotal resets all changes to the "snippets_total" field.
func (*SnippetTagMutation) ResetTagOwner ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetTagOwner()
ResetTagOwner resets all changes to the "tag_owner" edge.
func (*SnippetTagMutation) ResetTagSnippet ¶ added in v1.0.9
func (m *SnippetTagMutation) ResetTagSnippet()
ResetTagSnippet resets all changes to the "tag_snippet" edge.
func (*SnippetTagMutation) ResetUpdateTime ¶ added in v1.0.8
func (m *SnippetTagMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SnippetTagMutation) SetCreateTime ¶ added in v1.0.8
func (m *SnippetTagMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SnippetTagMutation) SetField ¶ added in v1.0.8
func (m *SnippetTagMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SnippetTagMutation) SetID ¶ added in v1.0.8
func (m *SnippetTagMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SnippetTag entities.
func (*SnippetTagMutation) SetName ¶ added in v1.0.8
func (m *SnippetTagMutation) SetName(s string)
SetName sets the "name" field.
func (*SnippetTagMutation) SetOwnerID ¶ added in v1.0.8
func (m *SnippetTagMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*SnippetTagMutation) SetSnippetID ¶ added in v1.0.9
func (m *SnippetTagMutation) SetSnippetID(i int)
SetSnippetID sets the "snippet_id" field.
func (*SnippetTagMutation) SetSnippetsTotal ¶ added in v1.0.8
func (m *SnippetTagMutation) SetSnippetsTotal(i int)
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetTagMutation) SetTagOwnerID ¶ added in v1.0.8
func (m *SnippetTagMutation) SetTagOwnerID(id int)
SetTagOwnerID sets the "tag_owner" edge to the Member entity by id.
func (*SnippetTagMutation) SetTagSnippetID ¶ added in v1.0.9
func (m *SnippetTagMutation) SetTagSnippetID(id int)
SetTagSnippetID sets the "tag_snippet" edge to the Snippet entity by id.
func (*SnippetTagMutation) SetUpdateTime ¶ added in v1.0.8
func (m *SnippetTagMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SnippetTagMutation) SnippetID ¶ added in v1.0.9
func (m *SnippetTagMutation) SnippetID() (r int, exists bool)
SnippetID returns the value of the "snippet_id" field in the mutation.
func (*SnippetTagMutation) SnippetsTotal ¶ added in v1.0.8
func (m *SnippetTagMutation) SnippetsTotal() (r int, exists bool)
SnippetsTotal returns the value of the "snippets_total" field in the mutation.
func (*SnippetTagMutation) TagOwnerCleared ¶ added in v1.0.8
func (m *SnippetTagMutation) TagOwnerCleared() bool
TagOwnerCleared reports if the "tag_owner" edge to the Member entity was cleared.
func (*SnippetTagMutation) TagOwnerID ¶ added in v1.0.8
func (m *SnippetTagMutation) TagOwnerID() (id int, exists bool)
TagOwnerID returns the "tag_owner" edge ID in the mutation.
func (*SnippetTagMutation) TagOwnerIDs ¶ added in v1.0.8
func (m *SnippetTagMutation) TagOwnerIDs() (ids []int)
TagOwnerIDs returns the "tag_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TagOwnerID instead. It exists only for internal usage by the builders.
func (*SnippetTagMutation) TagSnippetCleared ¶ added in v1.0.9
func (m *SnippetTagMutation) TagSnippetCleared() bool
TagSnippetCleared reports if the "tag_snippet" edge to the Snippet entity was cleared.
func (*SnippetTagMutation) TagSnippetID ¶ added in v1.0.9
func (m *SnippetTagMutation) TagSnippetID() (id int, exists bool)
TagSnippetID returns the "tag_snippet" edge ID in the mutation.
func (*SnippetTagMutation) TagSnippetIDs ¶ added in v1.0.9
func (m *SnippetTagMutation) TagSnippetIDs() (ids []int)
TagSnippetIDs returns the "tag_snippet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TagSnippetID instead. It exists only for internal usage by the builders.
func (SnippetTagMutation) Tx ¶ added in v1.0.8
func (m SnippetTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SnippetTagMutation) Type ¶ added in v1.0.8
func (m *SnippetTagMutation) Type() string
Type returns the node type of this mutation (SnippetTag).
func (*SnippetTagMutation) UpdateTime ¶ added in v1.0.8
func (m *SnippetTagMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type SnippetTagQuery ¶ added in v1.0.8
type SnippetTagQuery struct {
// contains filtered or unexported fields
}
SnippetTagQuery is the builder for querying SnippetTag entities.
func (*SnippetTagQuery) All ¶ added in v1.0.8
func (stq *SnippetTagQuery) All(ctx context.Context) ([]*SnippetTag, error)
All executes the query and returns a list of SnippetTags.
func (*SnippetTagQuery) AllX ¶ added in v1.0.8
func (stq *SnippetTagQuery) AllX(ctx context.Context) []*SnippetTag
AllX is like All, but panics if an error occurs.
func (*SnippetTagQuery) Clone ¶ added in v1.0.8
func (stq *SnippetTagQuery) Clone() *SnippetTagQuery
Clone returns a duplicate of the SnippetTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SnippetTagQuery) Count ¶ added in v1.0.8
func (stq *SnippetTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SnippetTagQuery) CountX ¶ added in v1.0.8
func (stq *SnippetTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SnippetTagQuery) Exist ¶ added in v1.0.8
func (stq *SnippetTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SnippetTagQuery) ExistX ¶ added in v1.0.8
func (stq *SnippetTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SnippetTagQuery) First ¶ added in v1.0.8
func (stq *SnippetTagQuery) First(ctx context.Context) (*SnippetTag, error)
First returns the first SnippetTag entity from the query. Returns a *NotFoundError when no SnippetTag was found.
func (*SnippetTagQuery) FirstID ¶ added in v1.0.8
func (stq *SnippetTagQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SnippetTag ID from the query. Returns a *NotFoundError when no SnippetTag ID was found.
func (*SnippetTagQuery) FirstIDX ¶ added in v1.0.8
func (stq *SnippetTagQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SnippetTagQuery) FirstX ¶ added in v1.0.8
func (stq *SnippetTagQuery) FirstX(ctx context.Context) *SnippetTag
FirstX is like First, but panics if an error occurs.
func (*SnippetTagQuery) GroupBy ¶ added in v1.0.8
func (stq *SnippetTagQuery) GroupBy(field string, fields ...string) *SnippetTagGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { SnippetID int `json:"snippet_id,omitempty"` Count int `json:"count,omitempty"` } client.SnippetTag.Query(). GroupBy(snippettag.FieldSnippetID). Aggregate(model.Count()). Scan(ctx, &v)
func (*SnippetTagQuery) IDs ¶ added in v1.0.8
func (stq *SnippetTagQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SnippetTag IDs.
func (*SnippetTagQuery) IDsX ¶ added in v1.0.8
func (stq *SnippetTagQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SnippetTagQuery) Limit ¶ added in v1.0.8
func (stq *SnippetTagQuery) Limit(limit int) *SnippetTagQuery
Limit adds a limit step to the query.
func (*SnippetTagQuery) Offset ¶ added in v1.0.8
func (stq *SnippetTagQuery) Offset(offset int) *SnippetTagQuery
Offset adds an offset step to the query.
func (*SnippetTagQuery) Only ¶ added in v1.0.8
func (stq *SnippetTagQuery) Only(ctx context.Context) (*SnippetTag, error)
Only returns a single SnippetTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SnippetTag entity is not found. Returns a *NotFoundError when no SnippetTag entities are found.
func (*SnippetTagQuery) OnlyID ¶ added in v1.0.8
func (stq *SnippetTagQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SnippetTag ID in the query. Returns a *NotSingularError when exactly one SnippetTag ID is not found. Returns a *NotFoundError when no entities are found.
func (*SnippetTagQuery) OnlyIDX ¶ added in v1.0.8
func (stq *SnippetTagQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SnippetTagQuery) OnlyX ¶ added in v1.0.8
func (stq *SnippetTagQuery) OnlyX(ctx context.Context) *SnippetTag
OnlyX is like Only, but panics if an error occurs.
func (*SnippetTagQuery) Order ¶ added in v1.0.8
func (stq *SnippetTagQuery) Order(o ...OrderFunc) *SnippetTagQuery
Order adds an order step to the query.
func (*SnippetTagQuery) QueryTagOwner ¶ added in v1.0.8
func (stq *SnippetTagQuery) QueryTagOwner() *MemberQuery
QueryTagOwner chains the current query on the "tag_owner" edge.
func (*SnippetTagQuery) QueryTagSnippet ¶ added in v1.0.9
func (stq *SnippetTagQuery) QueryTagSnippet() *SnippetQuery
QueryTagSnippet chains the current query on the "tag_snippet" edge.
func (*SnippetTagQuery) Select ¶ added in v1.0.8
func (stq *SnippetTagQuery) Select(field string, fields ...string) *SnippetTagSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { SnippetID int `json:"snippet_id,omitempty"` } client.SnippetTag.Query(). Select(snippettag.FieldSnippetID). Scan(ctx, &v)
func (*SnippetTagQuery) Unique ¶ added in v1.0.8
func (stq *SnippetTagQuery) Unique(unique bool) *SnippetTagQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SnippetTagQuery) Where ¶ added in v1.0.8
func (stq *SnippetTagQuery) Where(ps ...predicate.SnippetTag) *SnippetTagQuery
Where adds a new predicate for the SnippetTagQuery builder.
func (*SnippetTagQuery) WithTagOwner ¶ added in v1.0.8
func (stq *SnippetTagQuery) WithTagOwner(opts ...func(*MemberQuery)) *SnippetTagQuery
WithTagOwner tells the query-builder to eager-load the nodes that are connected to the "tag_owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*SnippetTagQuery) WithTagSnippet ¶ added in v1.0.9
func (stq *SnippetTagQuery) WithTagSnippet(opts ...func(*SnippetQuery)) *SnippetTagQuery
WithTagSnippet tells the query-builder to eager-load the nodes that are connected to the "tag_snippet" edge. The optional arguments are used to configure the query builder of the edge.
type SnippetTagSelect ¶ added in v1.0.8
type SnippetTagSelect struct { *SnippetTagQuery // contains filtered or unexported fields }
SnippetTagSelect is the builder for selecting fields of SnippetTag entities.
func (*SnippetTagSelect) Bool ¶ added in v1.0.8
func (sts *SnippetTagSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SnippetTagSelect) BoolX ¶ added in v1.0.8
func (sts *SnippetTagSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SnippetTagSelect) Bools ¶ added in v1.0.8
func (sts *SnippetTagSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SnippetTagSelect) BoolsX ¶ added in v1.0.8
func (sts *SnippetTagSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SnippetTagSelect) Float64 ¶ added in v1.0.8
func (sts *SnippetTagSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SnippetTagSelect) Float64X ¶ added in v1.0.8
func (sts *SnippetTagSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SnippetTagSelect) Float64s ¶ added in v1.0.8
func (sts *SnippetTagSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SnippetTagSelect) Float64sX ¶ added in v1.0.8
func (sts *SnippetTagSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SnippetTagSelect) Int ¶ added in v1.0.8
func (sts *SnippetTagSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SnippetTagSelect) IntX ¶ added in v1.0.8
func (sts *SnippetTagSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SnippetTagSelect) Ints ¶ added in v1.0.8
func (sts *SnippetTagSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SnippetTagSelect) IntsX ¶ added in v1.0.8
func (sts *SnippetTagSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SnippetTagSelect) Scan ¶ added in v1.0.8
func (sts *SnippetTagSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SnippetTagSelect) ScanX ¶ added in v1.0.8
func (sts *SnippetTagSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SnippetTagSelect) String ¶ added in v1.0.8
func (sts *SnippetTagSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SnippetTagSelect) StringX ¶ added in v1.0.8
func (sts *SnippetTagSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SnippetTagUpdate ¶ added in v1.0.8
type SnippetTagUpdate struct {
// contains filtered or unexported fields
}
SnippetTagUpdate is the builder for updating SnippetTag entities.
func (*SnippetTagUpdate) AddSnippetsTotal ¶ added in v1.0.8
func (stu *SnippetTagUpdate) AddSnippetsTotal(i int) *SnippetTagUpdate
AddSnippetsTotal adds i to the "snippets_total" field.
func (*SnippetTagUpdate) ClearTagOwner ¶ added in v1.0.8
func (stu *SnippetTagUpdate) ClearTagOwner() *SnippetTagUpdate
ClearTagOwner clears the "tag_owner" edge to the Member entity.
func (*SnippetTagUpdate) ClearTagSnippet ¶ added in v1.0.9
func (stu *SnippetTagUpdate) ClearTagSnippet() *SnippetTagUpdate
ClearTagSnippet clears the "tag_snippet" edge to the Snippet entity.
func (*SnippetTagUpdate) Exec ¶ added in v1.0.8
func (stu *SnippetTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SnippetTagUpdate) ExecX ¶ added in v1.0.8
func (stu *SnippetTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetTagUpdate) Mutation ¶ added in v1.0.8
func (stu *SnippetTagUpdate) Mutation() *SnippetTagMutation
Mutation returns the SnippetTagMutation object of the builder.
func (*SnippetTagUpdate) Save ¶ added in v1.0.8
func (stu *SnippetTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SnippetTagUpdate) SaveX ¶ added in v1.0.8
func (stu *SnippetTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SnippetTagUpdate) SetName ¶ added in v1.0.8
func (stu *SnippetTagUpdate) SetName(s string) *SnippetTagUpdate
SetName sets the "name" field.
func (*SnippetTagUpdate) SetNillableSnippetsTotal ¶ added in v1.0.8
func (stu *SnippetTagUpdate) SetNillableSnippetsTotal(i *int) *SnippetTagUpdate
SetNillableSnippetsTotal sets the "snippets_total" field if the given value is not nil.
func (*SnippetTagUpdate) SetSnippetsTotal ¶ added in v1.0.8
func (stu *SnippetTagUpdate) SetSnippetsTotal(i int) *SnippetTagUpdate
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetTagUpdate) SetTagOwner ¶ added in v1.0.8
func (stu *SnippetTagUpdate) SetTagOwner(m *Member) *SnippetTagUpdate
SetTagOwner sets the "tag_owner" edge to the Member entity.
func (*SnippetTagUpdate) SetTagOwnerID ¶ added in v1.0.8
func (stu *SnippetTagUpdate) SetTagOwnerID(id int) *SnippetTagUpdate
SetTagOwnerID sets the "tag_owner" edge to the Member entity by ID.
func (*SnippetTagUpdate) SetTagSnippet ¶ added in v1.0.9
func (stu *SnippetTagUpdate) SetTagSnippet(s *Snippet) *SnippetTagUpdate
SetTagSnippet sets the "tag_snippet" edge to the Snippet entity.
func (*SnippetTagUpdate) SetTagSnippetID ¶ added in v1.0.9
func (stu *SnippetTagUpdate) SetTagSnippetID(id int) *SnippetTagUpdate
SetTagSnippetID sets the "tag_snippet" edge to the Snippet entity by ID.
func (*SnippetTagUpdate) SetUpdateTime ¶ added in v1.0.8
func (stu *SnippetTagUpdate) SetUpdateTime(t time.Time) *SnippetTagUpdate
SetUpdateTime sets the "update_time" field.
func (*SnippetTagUpdate) Where ¶ added in v1.0.8
func (stu *SnippetTagUpdate) Where(ps ...predicate.SnippetTag) *SnippetTagUpdate
Where adds a new predicate for the SnippetTagUpdate builder.
type SnippetTagUpdateOne ¶ added in v1.0.8
type SnippetTagUpdateOne struct {
// contains filtered or unexported fields
}
SnippetTagUpdateOne is the builder for updating a single SnippetTag entity.
func (*SnippetTagUpdateOne) AddSnippetsTotal ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) AddSnippetsTotal(i int) *SnippetTagUpdateOne
AddSnippetsTotal adds i to the "snippets_total" field.
func (*SnippetTagUpdateOne) ClearTagOwner ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) ClearTagOwner() *SnippetTagUpdateOne
ClearTagOwner clears the "tag_owner" edge to the Member entity.
func (*SnippetTagUpdateOne) ClearTagSnippet ¶ added in v1.0.9
func (stuo *SnippetTagUpdateOne) ClearTagSnippet() *SnippetTagUpdateOne
ClearTagSnippet clears the "tag_snippet" edge to the Snippet entity.
func (*SnippetTagUpdateOne) Exec ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SnippetTagUpdateOne) ExecX ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetTagUpdateOne) Mutation ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) Mutation() *SnippetTagMutation
Mutation returns the SnippetTagMutation object of the builder.
func (*SnippetTagUpdateOne) Save ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) Save(ctx context.Context) (*SnippetTag, error)
Save executes the query and returns the updated SnippetTag entity.
func (*SnippetTagUpdateOne) SaveX ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) SaveX(ctx context.Context) *SnippetTag
SaveX is like Save, but panics if an error occurs.
func (*SnippetTagUpdateOne) Select ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) Select(field string, fields ...string) *SnippetTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SnippetTagUpdateOne) SetName ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) SetName(s string) *SnippetTagUpdateOne
SetName sets the "name" field.
func (*SnippetTagUpdateOne) SetNillableSnippetsTotal ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) SetNillableSnippetsTotal(i *int) *SnippetTagUpdateOne
SetNillableSnippetsTotal sets the "snippets_total" field if the given value is not nil.
func (*SnippetTagUpdateOne) SetSnippetsTotal ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) SetSnippetsTotal(i int) *SnippetTagUpdateOne
SetSnippetsTotal sets the "snippets_total" field.
func (*SnippetTagUpdateOne) SetTagOwner ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) SetTagOwner(m *Member) *SnippetTagUpdateOne
SetTagOwner sets the "tag_owner" edge to the Member entity.
func (*SnippetTagUpdateOne) SetTagOwnerID ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) SetTagOwnerID(id int) *SnippetTagUpdateOne
SetTagOwnerID sets the "tag_owner" edge to the Member entity by ID.
func (*SnippetTagUpdateOne) SetTagSnippet ¶ added in v1.0.9
func (stuo *SnippetTagUpdateOne) SetTagSnippet(s *Snippet) *SnippetTagUpdateOne
SetTagSnippet sets the "tag_snippet" edge to the Snippet entity.
func (*SnippetTagUpdateOne) SetTagSnippetID ¶ added in v1.0.9
func (stuo *SnippetTagUpdateOne) SetTagSnippetID(id int) *SnippetTagUpdateOne
SetTagSnippetID sets the "tag_snippet" edge to the Snippet entity by ID.
func (*SnippetTagUpdateOne) SetUpdateTime ¶ added in v1.0.8
func (stuo *SnippetTagUpdateOne) SetUpdateTime(t time.Time) *SnippetTagUpdateOne
SetUpdateTime sets the "update_time" field.
type SnippetTags ¶ added in v1.0.8
type SnippetTags []*SnippetTag
SnippetTags is a parsable slice of SnippetTag.
type SnippetUpdate ¶ added in v1.0.8
type SnippetUpdate struct {
// contains filtered or unexported fields
}
SnippetUpdate is the builder for updating Snippet entities.
func (*SnippetUpdate) AddFolderID ¶ added in v1.0.8
func (su *SnippetUpdate) AddFolderID(i int) *SnippetUpdate
AddFolderID adds i to the "folder_id" field.
func (*SnippetUpdate) AddSnippetDocIDs ¶ added in v1.0.8
func (su *SnippetUpdate) AddSnippetDocIDs(ids ...int) *SnippetUpdate
AddSnippetDocIDs adds the "snippet_docs" edge to the SnippetDocument entity by IDs.
func (*SnippetUpdate) AddSnippetDocs ¶ added in v1.0.8
func (su *SnippetUpdate) AddSnippetDocs(s ...*SnippetDocument) *SnippetUpdate
AddSnippetDocs adds the "snippet_docs" edges to the SnippetDocument entity.
func (*SnippetUpdate) AddSnippetTagIDs ¶ added in v1.0.9
func (su *SnippetUpdate) AddSnippetTagIDs(ids ...int) *SnippetUpdate
AddSnippetTagIDs adds the "snippet_tags" edge to the SnippetTag entity by IDs.
func (*SnippetUpdate) AddSnippetTags ¶ added in v1.0.9
func (su *SnippetUpdate) AddSnippetTags(s ...*SnippetTag) *SnippetUpdate
AddSnippetTags adds the "snippet_tags" edges to the SnippetTag entity.
func (*SnippetUpdate) ClearFolderID ¶ added in v1.0.8
func (su *SnippetUpdate) ClearFolderID() *SnippetUpdate
ClearFolderID clears the value of the "folder_id" field.
func (*SnippetUpdate) ClearSnippetDocs ¶ added in v1.0.8
func (su *SnippetUpdate) ClearSnippetDocs() *SnippetUpdate
ClearSnippetDocs clears all "snippet_docs" edges to the SnippetDocument entity.
func (*SnippetUpdate) ClearSnippetOwner ¶ added in v1.0.8
func (su *SnippetUpdate) ClearSnippetOwner() *SnippetUpdate
ClearSnippetOwner clears the "snippet_owner" edge to the Member entity.
func (*SnippetUpdate) ClearSnippetTags ¶ added in v1.0.9
func (su *SnippetUpdate) ClearSnippetTags() *SnippetUpdate
ClearSnippetTags clears all "snippet_tags" edges to the SnippetTag entity.
func (*SnippetUpdate) ClearTitle ¶ added in v1.0.8
func (su *SnippetUpdate) ClearTitle() *SnippetUpdate
ClearTitle clears the value of the "title" field.
func (*SnippetUpdate) Exec ¶ added in v1.0.8
func (su *SnippetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SnippetUpdate) ExecX ¶ added in v1.0.8
func (su *SnippetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetUpdate) Mutation ¶ added in v1.0.8
func (su *SnippetUpdate) Mutation() *SnippetMutation
Mutation returns the SnippetMutation object of the builder.
func (*SnippetUpdate) RemoveSnippetDocIDs ¶ added in v1.0.8
func (su *SnippetUpdate) RemoveSnippetDocIDs(ids ...int) *SnippetUpdate
RemoveSnippetDocIDs removes the "snippet_docs" edge to SnippetDocument entities by IDs.
func (*SnippetUpdate) RemoveSnippetDocs ¶ added in v1.0.8
func (su *SnippetUpdate) RemoveSnippetDocs(s ...*SnippetDocument) *SnippetUpdate
RemoveSnippetDocs removes "snippet_docs" edges to SnippetDocument entities.
func (*SnippetUpdate) RemoveSnippetTagIDs ¶ added in v1.0.9
func (su *SnippetUpdate) RemoveSnippetTagIDs(ids ...int) *SnippetUpdate
RemoveSnippetTagIDs removes the "snippet_tags" edge to SnippetTag entities by IDs.
func (*SnippetUpdate) RemoveSnippetTags ¶ added in v1.0.9
func (su *SnippetUpdate) RemoveSnippetTags(s ...*SnippetTag) *SnippetUpdate
RemoveSnippetTags removes "snippet_tags" edges to SnippetTag entities.
func (*SnippetUpdate) Save ¶ added in v1.0.8
func (su *SnippetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SnippetUpdate) SaveX ¶ added in v1.0.8
func (su *SnippetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SnippetUpdate) SetFolderID ¶ added in v1.0.8
func (su *SnippetUpdate) SetFolderID(i int) *SnippetUpdate
SetFolderID sets the "folder_id" field.
func (*SnippetUpdate) SetNillableFolderID ¶ added in v1.0.8
func (su *SnippetUpdate) SetNillableFolderID(i *int) *SnippetUpdate
SetNillableFolderID sets the "folder_id" field if the given value is not nil.
func (*SnippetUpdate) SetNillableTitle ¶ added in v1.0.8
func (su *SnippetUpdate) SetNillableTitle(s *string) *SnippetUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*SnippetUpdate) SetOwnerID ¶ added in v1.0.8
func (su *SnippetUpdate) SetOwnerID(i int) *SnippetUpdate
SetOwnerID sets the "owner_id" field.
func (*SnippetUpdate) SetSnippetOwner ¶ added in v1.0.8
func (su *SnippetUpdate) SetSnippetOwner(m *Member) *SnippetUpdate
SetSnippetOwner sets the "snippet_owner" edge to the Member entity.
func (*SnippetUpdate) SetSnippetOwnerID ¶ added in v1.0.8
func (su *SnippetUpdate) SetSnippetOwnerID(id int) *SnippetUpdate
SetSnippetOwnerID sets the "snippet_owner" edge to the Member entity by ID.
func (*SnippetUpdate) SetTitle ¶ added in v1.0.8
func (su *SnippetUpdate) SetTitle(s string) *SnippetUpdate
SetTitle sets the "title" field.
func (*SnippetUpdate) SetUpdateTime ¶ added in v1.0.8
func (su *SnippetUpdate) SetUpdateTime(t time.Time) *SnippetUpdate
SetUpdateTime sets the "update_time" field.
func (*SnippetUpdate) Where ¶ added in v1.0.8
func (su *SnippetUpdate) Where(ps ...predicate.Snippet) *SnippetUpdate
Where adds a new predicate for the SnippetUpdate builder.
type SnippetUpdateOne ¶ added in v1.0.8
type SnippetUpdateOne struct {
// contains filtered or unexported fields
}
SnippetUpdateOne is the builder for updating a single Snippet entity.
func (*SnippetUpdateOne) AddFolderID ¶ added in v1.0.8
func (suo *SnippetUpdateOne) AddFolderID(i int) *SnippetUpdateOne
AddFolderID adds i to the "folder_id" field.
func (*SnippetUpdateOne) AddSnippetDocIDs ¶ added in v1.0.8
func (suo *SnippetUpdateOne) AddSnippetDocIDs(ids ...int) *SnippetUpdateOne
AddSnippetDocIDs adds the "snippet_docs" edge to the SnippetDocument entity by IDs.
func (*SnippetUpdateOne) AddSnippetDocs ¶ added in v1.0.8
func (suo *SnippetUpdateOne) AddSnippetDocs(s ...*SnippetDocument) *SnippetUpdateOne
AddSnippetDocs adds the "snippet_docs" edges to the SnippetDocument entity.
func (*SnippetUpdateOne) AddSnippetTagIDs ¶ added in v1.0.9
func (suo *SnippetUpdateOne) AddSnippetTagIDs(ids ...int) *SnippetUpdateOne
AddSnippetTagIDs adds the "snippet_tags" edge to the SnippetTag entity by IDs.
func (*SnippetUpdateOne) AddSnippetTags ¶ added in v1.0.9
func (suo *SnippetUpdateOne) AddSnippetTags(s ...*SnippetTag) *SnippetUpdateOne
AddSnippetTags adds the "snippet_tags" edges to the SnippetTag entity.
func (*SnippetUpdateOne) ClearFolderID ¶ added in v1.0.8
func (suo *SnippetUpdateOne) ClearFolderID() *SnippetUpdateOne
ClearFolderID clears the value of the "folder_id" field.
func (*SnippetUpdateOne) ClearSnippetDocs ¶ added in v1.0.8
func (suo *SnippetUpdateOne) ClearSnippetDocs() *SnippetUpdateOne
ClearSnippetDocs clears all "snippet_docs" edges to the SnippetDocument entity.
func (*SnippetUpdateOne) ClearSnippetOwner ¶ added in v1.0.8
func (suo *SnippetUpdateOne) ClearSnippetOwner() *SnippetUpdateOne
ClearSnippetOwner clears the "snippet_owner" edge to the Member entity.
func (*SnippetUpdateOne) ClearSnippetTags ¶ added in v1.0.9
func (suo *SnippetUpdateOne) ClearSnippetTags() *SnippetUpdateOne
ClearSnippetTags clears all "snippet_tags" edges to the SnippetTag entity.
func (*SnippetUpdateOne) ClearTitle ¶ added in v1.0.8
func (suo *SnippetUpdateOne) ClearTitle() *SnippetUpdateOne
ClearTitle clears the value of the "title" field.
func (*SnippetUpdateOne) Exec ¶ added in v1.0.8
func (suo *SnippetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SnippetUpdateOne) ExecX ¶ added in v1.0.8
func (suo *SnippetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SnippetUpdateOne) Mutation ¶ added in v1.0.8
func (suo *SnippetUpdateOne) Mutation() *SnippetMutation
Mutation returns the SnippetMutation object of the builder.
func (*SnippetUpdateOne) RemoveSnippetDocIDs ¶ added in v1.0.8
func (suo *SnippetUpdateOne) RemoveSnippetDocIDs(ids ...int) *SnippetUpdateOne
RemoveSnippetDocIDs removes the "snippet_docs" edge to SnippetDocument entities by IDs.
func (*SnippetUpdateOne) RemoveSnippetDocs ¶ added in v1.0.8
func (suo *SnippetUpdateOne) RemoveSnippetDocs(s ...*SnippetDocument) *SnippetUpdateOne
RemoveSnippetDocs removes "snippet_docs" edges to SnippetDocument entities.
func (*SnippetUpdateOne) RemoveSnippetTagIDs ¶ added in v1.0.9
func (suo *SnippetUpdateOne) RemoveSnippetTagIDs(ids ...int) *SnippetUpdateOne
RemoveSnippetTagIDs removes the "snippet_tags" edge to SnippetTag entities by IDs.
func (*SnippetUpdateOne) RemoveSnippetTags ¶ added in v1.0.9
func (suo *SnippetUpdateOne) RemoveSnippetTags(s ...*SnippetTag) *SnippetUpdateOne
RemoveSnippetTags removes "snippet_tags" edges to SnippetTag entities.
func (*SnippetUpdateOne) Save ¶ added in v1.0.8
func (suo *SnippetUpdateOne) Save(ctx context.Context) (*Snippet, error)
Save executes the query and returns the updated Snippet entity.
func (*SnippetUpdateOne) SaveX ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SaveX(ctx context.Context) *Snippet
SaveX is like Save, but panics if an error occurs.
func (*SnippetUpdateOne) Select ¶ added in v1.0.8
func (suo *SnippetUpdateOne) Select(field string, fields ...string) *SnippetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SnippetUpdateOne) SetFolderID ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetFolderID(i int) *SnippetUpdateOne
SetFolderID sets the "folder_id" field.
func (*SnippetUpdateOne) SetNillableFolderID ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetNillableFolderID(i *int) *SnippetUpdateOne
SetNillableFolderID sets the "folder_id" field if the given value is not nil.
func (*SnippetUpdateOne) SetNillableTitle ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetNillableTitle(s *string) *SnippetUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*SnippetUpdateOne) SetOwnerID ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetOwnerID(i int) *SnippetUpdateOne
SetOwnerID sets the "owner_id" field.
func (*SnippetUpdateOne) SetSnippetOwner ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetSnippetOwner(m *Member) *SnippetUpdateOne
SetSnippetOwner sets the "snippet_owner" edge to the Member entity.
func (*SnippetUpdateOne) SetSnippetOwnerID ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetSnippetOwnerID(id int) *SnippetUpdateOne
SetSnippetOwnerID sets the "snippet_owner" edge to the Member entity by ID.
func (*SnippetUpdateOne) SetTitle ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetTitle(s string) *SnippetUpdateOne
SetTitle sets the "title" field.
func (*SnippetUpdateOne) SetUpdateTime ¶ added in v1.0.8
func (suo *SnippetUpdateOne) SetUpdateTime(t time.Time) *SnippetUpdateOne
SetUpdateTime sets the "update_time" field.
type SystemSetting ¶ added in v1.0.5
type SystemSetting struct { // ID of the ent. ID int `json:"id,omitempty"` // Space holds the value of the "space" field. Space *systemsetting.Space `json:"space,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"` // Typeof holds the value of the "typeof" field. Typeof string `json:"typeof,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // contains filtered or unexported fields }
SystemSetting is the model entity for the SystemSetting schema.
func (*SystemSetting) String ¶ added in v1.0.5
func (ss *SystemSetting) String() string
String implements the fmt.Stringer.
func (*SystemSetting) Unwrap ¶ added in v1.0.5
func (ss *SystemSetting) Unwrap() *SystemSetting
Unwrap unwraps the SystemSetting entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*SystemSetting) Update ¶ added in v1.0.5
func (ss *SystemSetting) Update() *SystemSettingUpdateOne
Update returns a builder for updating this SystemSetting. Note that you need to call SystemSetting.Unwrap() before calling this method if this SystemSetting was returned from a transaction, and the transaction was committed or rolled back.
type SystemSettingClient ¶ added in v1.0.5
type SystemSettingClient struct {
// contains filtered or unexported fields
}
SystemSettingClient is a client for the SystemSetting schema.
func NewSystemSettingClient ¶ added in v1.0.5
func NewSystemSettingClient(c config) *SystemSettingClient
NewSystemSettingClient returns a client for the SystemSetting from the given config.
func (*SystemSettingClient) Create ¶ added in v1.0.5
func (c *SystemSettingClient) Create() *SystemSettingCreate
Create returns a create builder for SystemSetting.
func (*SystemSettingClient) CreateBulk ¶ added in v1.0.5
func (c *SystemSettingClient) CreateBulk(builders ...*SystemSettingCreate) *SystemSettingCreateBulk
CreateBulk returns a builder for creating a bulk of SystemSetting entities.
func (*SystemSettingClient) Delete ¶ added in v1.0.5
func (c *SystemSettingClient) Delete() *SystemSettingDelete
Delete returns a delete builder for SystemSetting.
func (*SystemSettingClient) DeleteOne ¶ added in v1.0.5
func (c *SystemSettingClient) DeleteOne(ss *SystemSetting) *SystemSettingDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SystemSettingClient) DeleteOneID ¶ added in v1.0.5
func (c *SystemSettingClient) DeleteOneID(id int) *SystemSettingDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SystemSettingClient) Get ¶ added in v1.0.5
func (c *SystemSettingClient) Get(ctx context.Context, id int) (*SystemSetting, error)
Get returns a SystemSetting entity by its id.
func (*SystemSettingClient) GetX ¶ added in v1.0.5
func (c *SystemSettingClient) GetX(ctx context.Context, id int) *SystemSetting
GetX is like Get, but panics if an error occurs.
func (*SystemSettingClient) Hooks ¶ added in v1.0.5
func (c *SystemSettingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SystemSettingClient) Query ¶ added in v1.0.5
func (c *SystemSettingClient) Query() *SystemSettingQuery
Query returns a query builder for SystemSetting.
func (*SystemSettingClient) Update ¶ added in v1.0.5
func (c *SystemSettingClient) Update() *SystemSettingUpdate
Update returns an update builder for SystemSetting.
func (*SystemSettingClient) UpdateOne ¶ added in v1.0.5
func (c *SystemSettingClient) UpdateOne(ss *SystemSetting) *SystemSettingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SystemSettingClient) UpdateOneID ¶ added in v1.0.5
func (c *SystemSettingClient) UpdateOneID(id int) *SystemSettingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SystemSettingClient) Use ¶ added in v1.0.5
func (c *SystemSettingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `systemsetting.Hooks(f(g(h())))`.
type SystemSettingCreate ¶ added in v1.0.5
type SystemSettingCreate struct {
// contains filtered or unexported fields
}
SystemSettingCreate is the builder for creating a SystemSetting entity.
func (*SystemSettingCreate) Mutation ¶ added in v1.0.5
func (ssc *SystemSettingCreate) Mutation() *SystemSettingMutation
Mutation returns the SystemSettingMutation object of the builder.
func (*SystemSettingCreate) Save ¶ added in v1.0.5
func (ssc *SystemSettingCreate) Save(ctx context.Context) (*SystemSetting, error)
Save creates the SystemSetting in the database.
func (*SystemSettingCreate) SaveX ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SaveX(ctx context.Context) *SystemSetting
SaveX calls Save and panics if Save returns an error.
func (*SystemSettingCreate) SetID ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetID(i int) *SystemSettingCreate
SetID sets the "id" field.
func (*SystemSettingCreate) SetKey ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetKey(s string) *SystemSettingCreate
SetKey sets the "key" field.
func (*SystemSettingCreate) SetNillableSpace ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetNillableSpace(s *systemsetting.Space) *SystemSettingCreate
SetNillableSpace sets the "space" field if the given value is not nil.
func (*SystemSettingCreate) SetNillableTypeof ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetNillableTypeof(s *string) *SystemSettingCreate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*SystemSettingCreate) SetNillableUpdateTime ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetNillableUpdateTime(t *time.Time) *SystemSettingCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SystemSettingCreate) SetNillableValue ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetNillableValue(s *string) *SystemSettingCreate
SetNillableValue sets the "value" field if the given value is not nil.
func (*SystemSettingCreate) SetSpace ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetSpace(s systemsetting.Space) *SystemSettingCreate
SetSpace sets the "space" field.
func (*SystemSettingCreate) SetTypeof ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetTypeof(s string) *SystemSettingCreate
SetTypeof sets the "typeof" field.
func (*SystemSettingCreate) SetUpdateTime ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetUpdateTime(t time.Time) *SystemSettingCreate
SetUpdateTime sets the "update_time" field.
func (*SystemSettingCreate) SetValue ¶ added in v1.0.5
func (ssc *SystemSettingCreate) SetValue(s string) *SystemSettingCreate
SetValue sets the "value" field.
type SystemSettingCreateBulk ¶ added in v1.0.5
type SystemSettingCreateBulk struct {
// contains filtered or unexported fields
}
SystemSettingCreateBulk is the builder for creating many SystemSetting entities in bulk.
func (*SystemSettingCreateBulk) Save ¶ added in v1.0.5
func (sscb *SystemSettingCreateBulk) Save(ctx context.Context) ([]*SystemSetting, error)
Save creates the SystemSetting entities in the database.
func (*SystemSettingCreateBulk) SaveX ¶ added in v1.0.5
func (sscb *SystemSettingCreateBulk) SaveX(ctx context.Context) []*SystemSetting
SaveX is like Save, but panics if an error occurs.
type SystemSettingDelete ¶ added in v1.0.5
type SystemSettingDelete struct {
// contains filtered or unexported fields
}
SystemSettingDelete is the builder for deleting a SystemSetting entity.
func (*SystemSettingDelete) Exec ¶ added in v1.0.5
func (ssd *SystemSettingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SystemSettingDelete) ExecX ¶ added in v1.0.5
func (ssd *SystemSettingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SystemSettingDelete) Where ¶ added in v1.0.5
func (ssd *SystemSettingDelete) Where(ps ...predicate.SystemSetting) *SystemSettingDelete
Where adds a new predicate to the SystemSettingDelete builder.
type SystemSettingDeleteOne ¶ added in v1.0.5
type SystemSettingDeleteOne struct {
// contains filtered or unexported fields
}
SystemSettingDeleteOne is the builder for deleting a single SystemSetting entity.
func (*SystemSettingDeleteOne) Exec ¶ added in v1.0.5
func (ssdo *SystemSettingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SystemSettingDeleteOne) ExecX ¶ added in v1.0.5
func (ssdo *SystemSettingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SystemSettingGroupBy ¶ added in v1.0.5
type SystemSettingGroupBy struct {
// contains filtered or unexported fields
}
SystemSettingGroupBy is the group-by builder for SystemSetting entities.
func (*SystemSettingGroupBy) Aggregate ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Aggregate(fns ...AggregateFunc) *SystemSettingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SystemSettingGroupBy) Bool ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) BoolX ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SystemSettingGroupBy) Bools ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) BoolsX ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SystemSettingGroupBy) Float64 ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) Float64X ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SystemSettingGroupBy) Float64s ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) Float64sX ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SystemSettingGroupBy) Int ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) IntX ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SystemSettingGroupBy) Ints ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) IntsX ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SystemSettingGroupBy) Scan ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SystemSettingGroupBy) ScanX ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SystemSettingGroupBy) String ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) StringX ¶ added in v1.0.5
func (ssgb *SystemSettingGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SystemSettingMutation ¶ added in v1.0.5
type SystemSettingMutation struct {
// contains filtered or unexported fields
}
SystemSettingMutation represents an operation that mutates the SystemSetting nodes in the graph.
func (*SystemSettingMutation) AddField ¶ added in v1.0.5
func (m *SystemSettingMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SystemSettingMutation) AddedEdges ¶ added in v1.0.5
func (m *SystemSettingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SystemSettingMutation) AddedField ¶ added in v1.0.5
func (m *SystemSettingMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SystemSettingMutation) AddedFields ¶ added in v1.0.5
func (m *SystemSettingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SystemSettingMutation) AddedIDs ¶ added in v1.0.5
func (m *SystemSettingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SystemSettingMutation) ClearEdge ¶ added in v1.0.5
func (m *SystemSettingMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SystemSettingMutation) ClearField ¶ added in v1.0.5
func (m *SystemSettingMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SystemSettingMutation) ClearSpace ¶ added in v1.0.5
func (m *SystemSettingMutation) ClearSpace()
ClearSpace clears the value of the "space" field.
func (*SystemSettingMutation) ClearValue ¶ added in v1.0.5
func (m *SystemSettingMutation) ClearValue()
ClearValue clears the value of the "value" field.
func (*SystemSettingMutation) ClearedEdges ¶ added in v1.0.5
func (m *SystemSettingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SystemSettingMutation) ClearedFields ¶ added in v1.0.5
func (m *SystemSettingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SystemSettingMutation) Client ¶ added in v1.0.5
func (m SystemSettingMutation) 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 (*SystemSettingMutation) EdgeCleared ¶ added in v1.0.5
func (m *SystemSettingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SystemSettingMutation) Field ¶ added in v1.0.5
func (m *SystemSettingMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SystemSettingMutation) FieldCleared ¶ added in v1.0.5
func (m *SystemSettingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SystemSettingMutation) Fields ¶ added in v1.0.5
func (m *SystemSettingMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SystemSettingMutation) ID ¶ added in v1.0.5
func (m *SystemSettingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*SystemSettingMutation) Key ¶ added in v1.0.5
func (m *SystemSettingMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*SystemSettingMutation) OldField ¶ added in v1.0.5
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SystemSettingMutation) OldKey ¶ added in v1.0.5
func (m *SystemSettingMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the SystemSetting entity. If the SystemSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SystemSettingMutation) OldSpace ¶ added in v1.0.5
func (m *SystemSettingMutation) OldSpace(ctx context.Context) (v *systemsetting.Space, err error)
OldSpace returns the old "space" field's value of the SystemSetting entity. If the SystemSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SystemSettingMutation) OldTypeof ¶ added in v1.0.5
func (m *SystemSettingMutation) OldTypeof(ctx context.Context) (v string, err error)
OldTypeof returns the old "typeof" field's value of the SystemSetting entity. If the SystemSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SystemSettingMutation) OldUpdateTime ¶ added in v1.0.5
OldUpdateTime returns the old "update_time" field's value of the SystemSetting entity. If the SystemSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SystemSettingMutation) OldValue ¶ added in v1.0.5
func (m *SystemSettingMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the SystemSetting entity. If the SystemSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SystemSettingMutation) Op ¶ added in v1.0.5
func (m *SystemSettingMutation) Op() Op
Op returns the operation name.
func (*SystemSettingMutation) RemovedEdges ¶ added in v1.0.5
func (m *SystemSettingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SystemSettingMutation) RemovedIDs ¶ added in v1.0.5
func (m *SystemSettingMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SystemSettingMutation) ResetEdge ¶ added in v1.0.5
func (m *SystemSettingMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SystemSettingMutation) ResetField ¶ added in v1.0.5
func (m *SystemSettingMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SystemSettingMutation) ResetKey ¶ added in v1.0.5
func (m *SystemSettingMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*SystemSettingMutation) ResetSpace ¶ added in v1.0.5
func (m *SystemSettingMutation) ResetSpace()
ResetSpace resets all changes to the "space" field.
func (*SystemSettingMutation) ResetTypeof ¶ added in v1.0.5
func (m *SystemSettingMutation) ResetTypeof()
ResetTypeof resets all changes to the "typeof" field.
func (*SystemSettingMutation) ResetUpdateTime ¶ added in v1.0.5
func (m *SystemSettingMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SystemSettingMutation) ResetValue ¶ added in v1.0.5
func (m *SystemSettingMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*SystemSettingMutation) SetField ¶ added in v1.0.5
func (m *SystemSettingMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SystemSettingMutation) SetID ¶ added in v1.0.5
func (m *SystemSettingMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SystemSetting entities.
func (*SystemSettingMutation) SetKey ¶ added in v1.0.5
func (m *SystemSettingMutation) SetKey(s string)
SetKey sets the "key" field.
func (*SystemSettingMutation) SetSpace ¶ added in v1.0.5
func (m *SystemSettingMutation) SetSpace(s systemsetting.Space)
SetSpace sets the "space" field.
func (*SystemSettingMutation) SetTypeof ¶ added in v1.0.5
func (m *SystemSettingMutation) SetTypeof(s string)
SetTypeof sets the "typeof" field.
func (*SystemSettingMutation) SetUpdateTime ¶ added in v1.0.5
func (m *SystemSettingMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SystemSettingMutation) SetValue ¶ added in v1.0.5
func (m *SystemSettingMutation) SetValue(s string)
SetValue sets the "value" field.
func (*SystemSettingMutation) Space ¶ added in v1.0.5
func (m *SystemSettingMutation) Space() (r systemsetting.Space, exists bool)
Space returns the value of the "space" field in the mutation.
func (*SystemSettingMutation) SpaceCleared ¶ added in v1.0.5
func (m *SystemSettingMutation) SpaceCleared() bool
SpaceCleared returns if the "space" field was cleared in this mutation.
func (SystemSettingMutation) Tx ¶ added in v1.0.5
func (m SystemSettingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SystemSettingMutation) Type ¶ added in v1.0.5
func (m *SystemSettingMutation) Type() string
Type returns the node type of this mutation (SystemSetting).
func (*SystemSettingMutation) Typeof ¶ added in v1.0.5
func (m *SystemSettingMutation) Typeof() (r string, exists bool)
Typeof returns the value of the "typeof" field in the mutation.
func (*SystemSettingMutation) UpdateTime ¶ added in v1.0.5
func (m *SystemSettingMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*SystemSettingMutation) Value ¶ added in v1.0.5
func (m *SystemSettingMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*SystemSettingMutation) ValueCleared ¶ added in v1.0.5
func (m *SystemSettingMutation) ValueCleared() bool
ValueCleared returns if the "value" field was cleared in this mutation.
type SystemSettingQuery ¶ added in v1.0.5
type SystemSettingQuery struct {
// contains filtered or unexported fields
}
SystemSettingQuery is the builder for querying SystemSetting entities.
func (*SystemSettingQuery) All ¶ added in v1.0.5
func (ssq *SystemSettingQuery) All(ctx context.Context) ([]*SystemSetting, error)
All executes the query and returns a list of SystemSettings.
func (*SystemSettingQuery) AllX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) AllX(ctx context.Context) []*SystemSetting
AllX is like All, but panics if an error occurs.
func (*SystemSettingQuery) Clone ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Clone() *SystemSettingQuery
Clone returns a duplicate of the SystemSettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SystemSettingQuery) Count ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SystemSettingQuery) CountX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SystemSettingQuery) Exist ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SystemSettingQuery) ExistX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SystemSettingQuery) First ¶ added in v1.0.5
func (ssq *SystemSettingQuery) First(ctx context.Context) (*SystemSetting, error)
First returns the first SystemSetting entity from the query. Returns a *NotFoundError when no SystemSetting was found.
func (*SystemSettingQuery) FirstID ¶ added in v1.0.5
func (ssq *SystemSettingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SystemSetting ID from the query. Returns a *NotFoundError when no SystemSetting ID was found.
func (*SystemSettingQuery) FirstIDX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SystemSettingQuery) FirstX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) FirstX(ctx context.Context) *SystemSetting
FirstX is like First, but panics if an error occurs.
func (*SystemSettingQuery) GroupBy ¶ added in v1.0.5
func (ssq *SystemSettingQuery) GroupBy(field string, fields ...string) *SystemSettingGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Space systemsetting.Space `json:"space,omitempty"` Count int `json:"count,omitempty"` } client.SystemSetting.Query(). GroupBy(systemsetting.FieldSpace). Aggregate(model.Count()). Scan(ctx, &v)
func (*SystemSettingQuery) IDs ¶ added in v1.0.5
func (ssq *SystemSettingQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SystemSetting IDs.
func (*SystemSettingQuery) IDsX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SystemSettingQuery) Limit ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Limit(limit int) *SystemSettingQuery
Limit adds a limit step to the query.
func (*SystemSettingQuery) Offset ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Offset(offset int) *SystemSettingQuery
Offset adds an offset step to the query.
func (*SystemSettingQuery) Only ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Only(ctx context.Context) (*SystemSetting, error)
Only returns a single SystemSetting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SystemSetting entity is not found. Returns a *NotFoundError when no SystemSetting entities are found.
func (*SystemSettingQuery) OnlyID ¶ added in v1.0.5
func (ssq *SystemSettingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SystemSetting ID in the query. Returns a *NotSingularError when exactly one SystemSetting ID is not found. Returns a *NotFoundError when no entities are found.
func (*SystemSettingQuery) OnlyIDX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SystemSettingQuery) OnlyX ¶ added in v1.0.5
func (ssq *SystemSettingQuery) OnlyX(ctx context.Context) *SystemSetting
OnlyX is like Only, but panics if an error occurs.
func (*SystemSettingQuery) Order ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Order(o ...OrderFunc) *SystemSettingQuery
Order adds an order step to the query.
func (*SystemSettingQuery) Select ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Select(field string, fields ...string) *SystemSettingSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Space systemsetting.Space `json:"space,omitempty"` } client.SystemSetting.Query(). Select(systemsetting.FieldSpace). Scan(ctx, &v)
func (*SystemSettingQuery) Unique ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Unique(unique bool) *SystemSettingQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SystemSettingQuery) Where ¶ added in v1.0.5
func (ssq *SystemSettingQuery) Where(ps ...predicate.SystemSetting) *SystemSettingQuery
Where adds a new predicate for the SystemSettingQuery builder.
type SystemSettingSelect ¶ added in v1.0.5
type SystemSettingSelect struct { *SystemSettingQuery // contains filtered or unexported fields }
SystemSettingSelect is the builder for selecting fields of SystemSetting entities.
func (*SystemSettingSelect) Bool ¶ added in v1.0.5
func (sss *SystemSettingSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) BoolX ¶ added in v1.0.5
func (sss *SystemSettingSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SystemSettingSelect) Bools ¶ added in v1.0.5
func (sss *SystemSettingSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) BoolsX ¶ added in v1.0.5
func (sss *SystemSettingSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SystemSettingSelect) Float64 ¶ added in v1.0.5
func (sss *SystemSettingSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) Float64X ¶ added in v1.0.5
func (sss *SystemSettingSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SystemSettingSelect) Float64s ¶ added in v1.0.5
func (sss *SystemSettingSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) Float64sX ¶ added in v1.0.5
func (sss *SystemSettingSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SystemSettingSelect) Int ¶ added in v1.0.5
func (sss *SystemSettingSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) IntX ¶ added in v1.0.5
func (sss *SystemSettingSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SystemSettingSelect) Ints ¶ added in v1.0.5
func (sss *SystemSettingSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) IntsX ¶ added in v1.0.5
func (sss *SystemSettingSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SystemSettingSelect) Scan ¶ added in v1.0.5
func (sss *SystemSettingSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SystemSettingSelect) ScanX ¶ added in v1.0.5
func (sss *SystemSettingSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SystemSettingSelect) String ¶ added in v1.0.5
func (sss *SystemSettingSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) StringX ¶ added in v1.0.5
func (sss *SystemSettingSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SystemSettingUpdate ¶ added in v1.0.5
type SystemSettingUpdate struct {
// contains filtered or unexported fields
}
SystemSettingUpdate is the builder for updating SystemSetting entities.
func (*SystemSettingUpdate) ClearSpace ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) ClearSpace() *SystemSettingUpdate
ClearSpace clears the value of the "space" field.
func (*SystemSettingUpdate) ClearValue ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) ClearValue() *SystemSettingUpdate
ClearValue clears the value of the "value" field.
func (*SystemSettingUpdate) Exec ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SystemSettingUpdate) ExecX ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SystemSettingUpdate) Mutation ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) Mutation() *SystemSettingMutation
Mutation returns the SystemSettingMutation object of the builder.
func (*SystemSettingUpdate) Save ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SystemSettingUpdate) SaveX ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SystemSettingUpdate) SetKey ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetKey(s string) *SystemSettingUpdate
SetKey sets the "key" field.
func (*SystemSettingUpdate) SetNillableSpace ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdate
SetNillableSpace sets the "space" field if the given value is not nil.
func (*SystemSettingUpdate) SetNillableTypeof ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetNillableTypeof(s *string) *SystemSettingUpdate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*SystemSettingUpdate) SetNillableValue ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetNillableValue(s *string) *SystemSettingUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*SystemSettingUpdate) SetSpace ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetSpace(s systemsetting.Space) *SystemSettingUpdate
SetSpace sets the "space" field.
func (*SystemSettingUpdate) SetTypeof ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetTypeof(s string) *SystemSettingUpdate
SetTypeof sets the "typeof" field.
func (*SystemSettingUpdate) SetUpdateTime ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetUpdateTime(t time.Time) *SystemSettingUpdate
SetUpdateTime sets the "update_time" field.
func (*SystemSettingUpdate) SetValue ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) SetValue(s string) *SystemSettingUpdate
SetValue sets the "value" field.
func (*SystemSettingUpdate) Where ¶ added in v1.0.5
func (ssu *SystemSettingUpdate) Where(ps ...predicate.SystemSetting) *SystemSettingUpdate
Where adds a new predicate for the SystemSettingUpdate builder.
type SystemSettingUpdateOne ¶ added in v1.0.5
type SystemSettingUpdateOne struct {
// contains filtered or unexported fields
}
SystemSettingUpdateOne is the builder for updating a single SystemSetting entity.
func (*SystemSettingUpdateOne) ClearSpace ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) ClearSpace() *SystemSettingUpdateOne
ClearSpace clears the value of the "space" field.
func (*SystemSettingUpdateOne) ClearValue ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) ClearValue() *SystemSettingUpdateOne
ClearValue clears the value of the "value" field.
func (*SystemSettingUpdateOne) Exec ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SystemSettingUpdateOne) ExecX ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SystemSettingUpdateOne) Mutation ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) Mutation() *SystemSettingMutation
Mutation returns the SystemSettingMutation object of the builder.
func (*SystemSettingUpdateOne) Save ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) Save(ctx context.Context) (*SystemSetting, error)
Save executes the query and returns the updated SystemSetting entity.
func (*SystemSettingUpdateOne) SaveX ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SaveX(ctx context.Context) *SystemSetting
SaveX is like Save, but panics if an error occurs.
func (*SystemSettingUpdateOne) Select ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) Select(field string, fields ...string) *SystemSettingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SystemSettingUpdateOne) SetKey ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetKey(s string) *SystemSettingUpdateOne
SetKey sets the "key" field.
func (*SystemSettingUpdateOne) SetNillableSpace ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdateOne
SetNillableSpace sets the "space" field if the given value is not nil.
func (*SystemSettingUpdateOne) SetNillableTypeof ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetNillableTypeof(s *string) *SystemSettingUpdateOne
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*SystemSettingUpdateOne) SetNillableValue ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetNillableValue(s *string) *SystemSettingUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*SystemSettingUpdateOne) SetSpace ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetSpace(s systemsetting.Space) *SystemSettingUpdateOne
SetSpace sets the "space" field.
func (*SystemSettingUpdateOne) SetTypeof ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetTypeof(s string) *SystemSettingUpdateOne
SetTypeof sets the "typeof" field.
func (*SystemSettingUpdateOne) SetUpdateTime ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetUpdateTime(t time.Time) *SystemSettingUpdateOne
SetUpdateTime sets the "update_time" field.
func (*SystemSettingUpdateOne) SetValue ¶ added in v1.0.5
func (ssuo *SystemSettingUpdateOne) SetValue(s string) *SystemSettingUpdateOne
SetValue sets the "value" field.
type SystemSettings ¶ added in v1.0.5
type SystemSettings []*SystemSetting
SystemSettings is a parsable slice of SystemSetting.
type Tx ¶
type Tx struct { // Group is the client for interacting with the Group builders. Group *GroupClient // Member is the client for interacting with the Member builders. Member *MemberClient // MemberEmail is the client for interacting with the MemberEmail builders. MemberEmail *MemberEmailClient // MemberSecurityLog is the client for interacting with the MemberSecurityLog builders. MemberSecurityLog *MemberSecurityLogClient // MemberSetting is the client for interacting with the MemberSetting builders. MemberSetting *MemberSettingClient // Snippet is the client for interacting with the Snippet builders. Snippet *SnippetClient // SnippetDocument is the client for interacting with the SnippetDocument builders. SnippetDocument *SnippetDocumentClient // SnippetFolder is the client for interacting with the SnippetFolder builders. SnippetFolder *SnippetFolderClient // SnippetTag is the client for interacting with the SnippetTag builders. SnippetTag *SnippetTagClient // SystemSetting is the client for interacting with the SystemSetting builders. SystemSetting *SystemSettingClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field 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
¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- member.go
- member_create.go
- member_delete.go
- member_query.go
- member_update.go
- memberemail.go
- memberemail_create.go
- memberemail_delete.go
- memberemail_query.go
- memberemail_update.go
- membersecuritylog.go
- membersecuritylog_create.go
- membersecuritylog_delete.go
- membersecuritylog_query.go
- membersecuritylog_update.go
- membersetting.go
- membersetting_create.go
- membersetting_delete.go
- membersetting_query.go
- membersetting_update.go
- mutation.go
- runtime.go
- snippet.go
- snippet_create.go
- snippet_delete.go
- snippet_query.go
- snippet_update.go
- snippetdocument.go
- snippetdocument_create.go
- snippetdocument_delete.go
- snippetdocument_query.go
- snippetdocument_update.go
- snippetfolder.go
- snippetfolder_create.go
- snippetfolder_delete.go
- snippetfolder_query.go
- snippetfolder_update.go
- snippettag.go
- snippettag_create.go
- snippettag_delete.go
- snippettag_query.go
- snippettag_update.go
- systemsetting.go
- systemsetting_create.go
- systemsetting_delete.go
- systemsetting_query.go
- systemsetting_update.go
- tx.go
- version.go