Documentation ¶
Index ¶
- Constants
- Variables
- func EntOpToHistoryOp(op ent.Op) enthistory.OpType
- 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 Change
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- func (c *Client) WithHistory()
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Document
- type DocumentClient
- func (c *DocumentClient) Create() *DocumentCreate
- func (c *DocumentClient) CreateBulk(builders ...*DocumentCreate) *DocumentCreateBulk
- func (c *DocumentClient) Delete() *DocumentDelete
- func (c *DocumentClient) DeleteOne(d *Document) *DocumentDeleteOne
- func (c *DocumentClient) DeleteOneID(id int) *DocumentDeleteOne
- func (c *DocumentClient) Get(ctx context.Context, id int) (*Document, error)
- func (c *DocumentClient) GetX(ctx context.Context, id int) *Document
- func (c *DocumentClient) Hooks() []Hook
- func (c *DocumentClient) Intercept(interceptors ...Interceptor)
- func (c *DocumentClient) Interceptors() []Interceptor
- func (c *DocumentClient) Query() *DocumentQuery
- func (c *DocumentClient) QuerySearch(d *Document) *DocumentSearchQuery
- func (c *DocumentClient) QueryUser(d *Document) *UserQuery
- func (c *DocumentClient) Update() *DocumentUpdate
- func (c *DocumentClient) UpdateOne(d *Document) *DocumentUpdateOne
- func (c *DocumentClient) UpdateOneID(id int) *DocumentUpdateOne
- func (c *DocumentClient) Use(hooks ...Hook)
- type DocumentCreate
- func (dc *DocumentCreate) Exec(ctx context.Context) error
- func (dc *DocumentCreate) ExecX(ctx context.Context)
- func (dc *DocumentCreate) Mutation() *DocumentMutation
- func (dc *DocumentCreate) Save(ctx context.Context) (*Document, error)
- func (dc *DocumentCreate) SaveX(ctx context.Context) *Document
- func (dc *DocumentCreate) SetContent(s string) *DocumentCreate
- func (dc *DocumentCreate) SetContentHash(s string) *DocumentCreate
- func (dc *DocumentCreate) SetCreatedAt(t time.Time) *DocumentCreate
- func (dc *DocumentCreate) SetDescription(s string) *DocumentCreate
- func (dc *DocumentCreate) SetFilename(s string) *DocumentCreate
- func (dc *DocumentCreate) SetFiletype(t types.Filetype) *DocumentCreate
- func (dc *DocumentCreate) SetNillableContent(s *string) *DocumentCreate
- func (dc *DocumentCreate) SetNillableContentHash(s *string) *DocumentCreate
- func (dc *DocumentCreate) SetNillableCreatedAt(t *time.Time) *DocumentCreate
- func (dc *DocumentCreate) SetNillableSearchID(id *int) *DocumentCreate
- func (dc *DocumentCreate) SetNillableUUID(u *uuid.UUID) *DocumentCreate
- func (dc *DocumentCreate) SetNillableUpdatedAt(t *time.Time) *DocumentCreate
- func (dc *DocumentCreate) SetSearch(d *DocumentSearch) *DocumentCreate
- func (dc *DocumentCreate) SetSearchID(id int) *DocumentCreate
- func (dc *DocumentCreate) SetTitle(s string) *DocumentCreate
- func (dc *DocumentCreate) SetUUID(u uuid.UUID) *DocumentCreate
- func (dc *DocumentCreate) SetUpdatedAt(t time.Time) *DocumentCreate
- func (dc *DocumentCreate) SetUser(u *User) *DocumentCreate
- func (dc *DocumentCreate) SetUserID(id int) *DocumentCreate
- type DocumentCreateBulk
- type DocumentDelete
- type DocumentDeleteOne
- type DocumentEdges
- type DocumentGroupBy
- func (dgb *DocumentGroupBy) Aggregate(fns ...AggregateFunc) *DocumentGroupBy
- func (s *DocumentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentGroupBy) BoolX(ctx context.Context) bool
- func (s *DocumentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DocumentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentGroupBy) Float64X(ctx context.Context) float64
- func (s *DocumentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DocumentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentGroupBy) IntX(ctx context.Context) int
- func (s *DocumentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DocumentGroupBy) Scan(ctx context.Context, v any) error
- func (s *DocumentGroupBy) ScanX(ctx context.Context, v any)
- func (s *DocumentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DocumentGroupBy) StringX(ctx context.Context) string
- func (s *DocumentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentGroupBy) StringsX(ctx context.Context) []string
- type DocumentHistories
- type DocumentHistory
- func (dh *DocumentHistory) Diff(history *DocumentHistory) (*HistoryDiff[DocumentHistory], error)
- func (dh *DocumentHistory) Next(ctx context.Context) (*DocumentHistory, error)
- func (dh *DocumentHistory) Prev(ctx context.Context) (*DocumentHistory, error)
- func (dh *DocumentHistory) Restore(ctx context.Context) (*Document, error)
- func (dh *DocumentHistory) String() string
- func (dh *DocumentHistory) Unwrap() *DocumentHistory
- func (dh *DocumentHistory) Update() *DocumentHistoryUpdateOne
- type DocumentHistoryClient
- func (c *DocumentHistoryClient) Create() *DocumentHistoryCreate
- func (c *DocumentHistoryClient) CreateBulk(builders ...*DocumentHistoryCreate) *DocumentHistoryCreateBulk
- func (c *DocumentHistoryClient) Delete() *DocumentHistoryDelete
- func (c *DocumentHistoryClient) DeleteOne(dh *DocumentHistory) *DocumentHistoryDeleteOne
- func (c *DocumentHistoryClient) DeleteOneID(id int) *DocumentHistoryDeleteOne
- func (c *DocumentHistoryClient) Get(ctx context.Context, id int) (*DocumentHistory, error)
- func (c *DocumentHistoryClient) GetX(ctx context.Context, id int) *DocumentHistory
- func (c *DocumentHistoryClient) Hooks() []Hook
- func (c *DocumentHistoryClient) Intercept(interceptors ...Interceptor)
- func (c *DocumentHistoryClient) Interceptors() []Interceptor
- func (c *DocumentHistoryClient) Query() *DocumentHistoryQuery
- func (c *DocumentHistoryClient) Update() *DocumentHistoryUpdate
- func (c *DocumentHistoryClient) UpdateOne(dh *DocumentHistory) *DocumentHistoryUpdateOne
- func (c *DocumentHistoryClient) UpdateOneID(id int) *DocumentHistoryUpdateOne
- func (c *DocumentHistoryClient) Use(hooks ...Hook)
- type DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) Exec(ctx context.Context) error
- func (dhc *DocumentHistoryCreate) ExecX(ctx context.Context)
- func (dhc *DocumentHistoryCreate) Mutation() *DocumentHistoryMutation
- func (dhc *DocumentHistoryCreate) Save(ctx context.Context) (*DocumentHistory, error)
- func (dhc *DocumentHistoryCreate) SaveX(ctx context.Context) *DocumentHistory
- func (dhc *DocumentHistoryCreate) SetContent(s string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetContentHash(s string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetCreatedAt(t time.Time) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetDescription(s string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetFilename(s string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetFiletype(t types.Filetype) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetHistoryTime(t time.Time) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableContent(s *string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableContentHash(s *string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableCreatedAt(t *time.Time) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableHistoryTime(t *time.Time) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableRef(i *int) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableUUID(u *uuid.UUID) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableUpdatedAt(t *time.Time) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetNillableUpdatedBy(s *string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetOperation(et enthistory.OpType) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetRef(i int) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetTitle(s string) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetUUID(u uuid.UUID) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetUpdatedAt(t time.Time) *DocumentHistoryCreate
- func (dhc *DocumentHistoryCreate) SetUpdatedBy(s string) *DocumentHistoryCreate
- type DocumentHistoryCreateBulk
- func (dhcb *DocumentHistoryCreateBulk) Exec(ctx context.Context) error
- func (dhcb *DocumentHistoryCreateBulk) ExecX(ctx context.Context)
- func (dhcb *DocumentHistoryCreateBulk) Save(ctx context.Context) ([]*DocumentHistory, error)
- func (dhcb *DocumentHistoryCreateBulk) SaveX(ctx context.Context) []*DocumentHistory
- type DocumentHistoryDelete
- type DocumentHistoryDeleteOne
- type DocumentHistoryGroupBy
- func (dhgb *DocumentHistoryGroupBy) Aggregate(fns ...AggregateFunc) *DocumentHistoryGroupBy
- func (s *DocumentHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentHistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *DocumentHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentHistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DocumentHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentHistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *DocumentHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentHistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DocumentHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentHistoryGroupBy) IntX(ctx context.Context) int
- func (s *DocumentHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentHistoryGroupBy) IntsX(ctx context.Context) []int
- func (dhgb *DocumentHistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *DocumentHistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *DocumentHistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DocumentHistoryGroupBy) StringX(ctx context.Context) string
- func (s *DocumentHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentHistoryGroupBy) StringsX(ctx context.Context) []string
- type DocumentHistoryMutation
- func (m *DocumentHistoryMutation) AddField(name string, value ent.Value) error
- func (m *DocumentHistoryMutation) AddRef(i int)
- func (m *DocumentHistoryMutation) AddedEdges() []string
- func (m *DocumentHistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *DocumentHistoryMutation) AddedFields() []string
- func (m *DocumentHistoryMutation) AddedIDs(name string) []ent.Value
- func (m *DocumentHistoryMutation) AddedRef() (r int, exists bool)
- func (m *DocumentHistoryMutation) ClearContent()
- func (m *DocumentHistoryMutation) ClearContentHash()
- func (m *DocumentHistoryMutation) ClearEdge(name string) error
- func (m *DocumentHistoryMutation) ClearField(name string) error
- func (m *DocumentHistoryMutation) ClearRef()
- func (m *DocumentHistoryMutation) ClearUpdatedBy()
- func (m *DocumentHistoryMutation) ClearedEdges() []string
- func (m *DocumentHistoryMutation) ClearedFields() []string
- func (m DocumentHistoryMutation) Client() *Client
- func (m *DocumentHistoryMutation) Content() (r string, exists bool)
- func (m *DocumentHistoryMutation) ContentCleared() bool
- func (m *DocumentHistoryMutation) ContentHash() (r string, exists bool)
- func (m *DocumentHistoryMutation) ContentHashCleared() bool
- func (m *DocumentHistoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DocumentHistoryMutation) Description() (r string, exists bool)
- func (m *DocumentHistoryMutation) EdgeCleared(name string) bool
- func (m *DocumentHistoryMutation) Field(name string) (ent.Value, bool)
- func (m *DocumentHistoryMutation) FieldCleared(name string) bool
- func (m *DocumentHistoryMutation) Fields() []string
- func (m *DocumentHistoryMutation) Filename() (r string, exists bool)
- func (m *DocumentHistoryMutation) Filetype() (r types.Filetype, exists bool)
- func (m *DocumentHistoryMutation) HistoryTime() (r time.Time, exists bool)
- func (m *DocumentHistoryMutation) ID() (id int, exists bool)
- func (m *DocumentHistoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DocumentHistoryMutation) OldContent(ctx context.Context) (v *string, err error)
- func (m *DocumentHistoryMutation) OldContentHash(ctx context.Context) (v string, err error)
- func (m *DocumentHistoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentHistoryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *DocumentHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DocumentHistoryMutation) OldFilename(ctx context.Context) (v string, err error)
- func (m *DocumentHistoryMutation) OldFiletype(ctx context.Context) (v types.Filetype, err error)
- func (m *DocumentHistoryMutation) OldHistoryTime(ctx context.Context) (v time.Time, err error)
- func (m *DocumentHistoryMutation) OldOperation(ctx context.Context) (v enthistory.OpType, err error)
- func (m *DocumentHistoryMutation) OldRef(ctx context.Context) (v int, err error)
- func (m *DocumentHistoryMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *DocumentHistoryMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *DocumentHistoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentHistoryMutation) OldUpdatedBy(ctx context.Context) (v *string, err error)
- func (m *DocumentHistoryMutation) Op() Op
- func (m *DocumentHistoryMutation) Operation() (r enthistory.OpType, exists bool)
- func (m *DocumentHistoryMutation) Ref() (r int, exists bool)
- func (m *DocumentHistoryMutation) RefCleared() bool
- func (m *DocumentHistoryMutation) RemovedEdges() []string
- func (m *DocumentHistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *DocumentHistoryMutation) ResetContent()
- func (m *DocumentHistoryMutation) ResetContentHash()
- func (m *DocumentHistoryMutation) ResetCreatedAt()
- func (m *DocumentHistoryMutation) ResetDescription()
- func (m *DocumentHistoryMutation) ResetEdge(name string) error
- func (m *DocumentHistoryMutation) ResetField(name string) error
- func (m *DocumentHistoryMutation) ResetFilename()
- func (m *DocumentHistoryMutation) ResetFiletype()
- func (m *DocumentHistoryMutation) ResetHistoryTime()
- func (m *DocumentHistoryMutation) ResetOperation()
- func (m *DocumentHistoryMutation) ResetRef()
- func (m *DocumentHistoryMutation) ResetTitle()
- func (m *DocumentHistoryMutation) ResetUUID()
- func (m *DocumentHistoryMutation) ResetUpdatedAt()
- func (m *DocumentHistoryMutation) ResetUpdatedBy()
- func (m *DocumentHistoryMutation) SetContent(s string)
- func (m *DocumentHistoryMutation) SetContentHash(s string)
- func (m *DocumentHistoryMutation) SetCreatedAt(t time.Time)
- func (m *DocumentHistoryMutation) SetDescription(s string)
- func (m *DocumentHistoryMutation) SetField(name string, value ent.Value) error
- func (m *DocumentHistoryMutation) SetFilename(s string)
- func (m *DocumentHistoryMutation) SetFiletype(t types.Filetype)
- func (m *DocumentHistoryMutation) SetHistoryTime(t time.Time)
- func (m *DocumentHistoryMutation) SetOp(op Op)
- func (m *DocumentHistoryMutation) SetOperation(et enthistory.OpType)
- func (m *DocumentHistoryMutation) SetRef(i int)
- func (m *DocumentHistoryMutation) SetTitle(s string)
- func (m *DocumentHistoryMutation) SetUUID(u uuid.UUID)
- func (m *DocumentHistoryMutation) SetUpdatedAt(t time.Time)
- func (m *DocumentHistoryMutation) SetUpdatedBy(s string)
- func (m *DocumentHistoryMutation) Title() (r string, exists bool)
- func (m DocumentHistoryMutation) Tx() (*Tx, error)
- func (m *DocumentHistoryMutation) Type() string
- func (m *DocumentHistoryMutation) UUID() (r uuid.UUID, exists bool)
- func (m *DocumentHistoryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DocumentHistoryMutation) UpdatedBy() (r string, exists bool)
- func (m *DocumentHistoryMutation) UpdatedByCleared() bool
- func (m *DocumentHistoryMutation) Where(ps ...predicate.DocumentHistory)
- func (m *DocumentHistoryMutation) WhereP(ps ...func(*sql.Selector))
- type DocumentHistoryQuery
- func (dhq *DocumentHistoryQuery) Aggregate(fns ...AggregateFunc) *DocumentHistorySelect
- func (dhq *DocumentHistoryQuery) All(ctx context.Context) ([]*DocumentHistory, error)
- func (dhq *DocumentHistoryQuery) AllX(ctx context.Context) []*DocumentHistory
- func (dhq *DocumentHistoryQuery) AsOf(ctx context.Context, time time.Time) (*DocumentHistory, error)
- func (dhq *DocumentHistoryQuery) Clone() *DocumentHistoryQuery
- func (dhq *DocumentHistoryQuery) Count(ctx context.Context) (int, error)
- func (dhq *DocumentHistoryQuery) CountX(ctx context.Context) int
- func (dhq *DocumentHistoryQuery) Earliest(ctx context.Context) (*DocumentHistory, error)
- func (dhq *DocumentHistoryQuery) Exist(ctx context.Context) (bool, error)
- func (dhq *DocumentHistoryQuery) ExistX(ctx context.Context) bool
- func (dhq *DocumentHistoryQuery) First(ctx context.Context) (*DocumentHistory, error)
- func (dhq *DocumentHistoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (dhq *DocumentHistoryQuery) FirstIDX(ctx context.Context) int
- func (dhq *DocumentHistoryQuery) FirstX(ctx context.Context) *DocumentHistory
- func (dhq *DocumentHistoryQuery) GroupBy(field string, fields ...string) *DocumentHistoryGroupBy
- func (dhq *DocumentHistoryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dhq *DocumentHistoryQuery) IDsX(ctx context.Context) []int
- func (dhq *DocumentHistoryQuery) Latest(ctx context.Context) (*DocumentHistory, error)
- func (dhq *DocumentHistoryQuery) Limit(limit int) *DocumentHistoryQuery
- func (dhq *DocumentHistoryQuery) Modify(modifiers ...func(s *sql.Selector)) *DocumentHistorySelect
- func (dhq *DocumentHistoryQuery) Offset(offset int) *DocumentHistoryQuery
- func (dhq *DocumentHistoryQuery) Only(ctx context.Context) (*DocumentHistory, error)
- func (dhq *DocumentHistoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dhq *DocumentHistoryQuery) OnlyIDX(ctx context.Context) int
- func (dhq *DocumentHistoryQuery) OnlyX(ctx context.Context) *DocumentHistory
- func (dhq *DocumentHistoryQuery) Order(o ...OrderFunc) *DocumentHistoryQuery
- func (dhq *DocumentHistoryQuery) Select(fields ...string) *DocumentHistorySelect
- func (dhq *DocumentHistoryQuery) Unique(unique bool) *DocumentHistoryQuery
- func (dhq *DocumentHistoryQuery) Where(ps ...predicate.DocumentHistory) *DocumentHistoryQuery
- type DocumentHistorySelect
- func (dhs *DocumentHistorySelect) Aggregate(fns ...AggregateFunc) *DocumentHistorySelect
- func (s *DocumentHistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentHistorySelect) BoolX(ctx context.Context) bool
- func (s *DocumentHistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentHistorySelect) BoolsX(ctx context.Context) []bool
- func (s *DocumentHistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentHistorySelect) Float64X(ctx context.Context) float64
- func (s *DocumentHistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentHistorySelect) Float64sX(ctx context.Context) []float64
- func (s *DocumentHistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentHistorySelect) IntX(ctx context.Context) int
- func (s *DocumentHistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentHistorySelect) IntsX(ctx context.Context) []int
- func (dhs *DocumentHistorySelect) Modify(modifiers ...func(s *sql.Selector)) *DocumentHistorySelect
- func (dhs *DocumentHistorySelect) Scan(ctx context.Context, v any) error
- func (s *DocumentHistorySelect) ScanX(ctx context.Context, v any)
- func (s *DocumentHistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *DocumentHistorySelect) StringX(ctx context.Context) string
- func (s *DocumentHistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentHistorySelect) StringsX(ctx context.Context) []string
- type DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) ClearContent() *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) ClearContentHash() *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) Exec(ctx context.Context) error
- func (dhu *DocumentHistoryUpdate) ExecX(ctx context.Context)
- func (dhu *DocumentHistoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) Mutation() *DocumentHistoryMutation
- func (dhu *DocumentHistoryUpdate) Save(ctx context.Context) (int, error)
- func (dhu *DocumentHistoryUpdate) SaveX(ctx context.Context) int
- func (dhu *DocumentHistoryUpdate) SetContent(s string) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetContentHash(s string) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetDescription(s string) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetFilename(s string) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetFiletype(t types.Filetype) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetNillableContent(s *string) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetNillableContentHash(s *string) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetNillableUUID(u *uuid.UUID) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetTitle(s string) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetUUID(u uuid.UUID) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) SetUpdatedAt(t time.Time) *DocumentHistoryUpdate
- func (dhu *DocumentHistoryUpdate) Where(ps ...predicate.DocumentHistory) *DocumentHistoryUpdate
- type DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) ClearContent() *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) ClearContentHash() *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) Exec(ctx context.Context) error
- func (dhuo *DocumentHistoryUpdateOne) ExecX(ctx context.Context)
- func (dhuo *DocumentHistoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) Mutation() *DocumentHistoryMutation
- func (dhuo *DocumentHistoryUpdateOne) Save(ctx context.Context) (*DocumentHistory, error)
- func (dhuo *DocumentHistoryUpdateOne) SaveX(ctx context.Context) *DocumentHistory
- func (dhuo *DocumentHistoryUpdateOne) Select(field string, fields ...string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetContent(s string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetContentHash(s string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetDescription(s string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetFilename(s string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetFiletype(t types.Filetype) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetNillableContent(s *string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetNillableContentHash(s *string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetNillableUUID(u *uuid.UUID) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetTitle(s string) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetUUID(u uuid.UUID) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) SetUpdatedAt(t time.Time) *DocumentHistoryUpdateOne
- func (dhuo *DocumentHistoryUpdateOne) Where(ps ...predicate.DocumentHistory) *DocumentHistoryUpdateOne
- type DocumentMutation
- func (m *DocumentMutation) AddField(name string, value ent.Value) error
- func (m *DocumentMutation) AddedEdges() []string
- func (m *DocumentMutation) AddedField(name string) (ent.Value, bool)
- func (m *DocumentMutation) AddedFields() []string
- func (m *DocumentMutation) AddedIDs(name string) []ent.Value
- func (m *DocumentMutation) ClearContent()
- func (m *DocumentMutation) ClearContentHash()
- func (m *DocumentMutation) ClearEdge(name string) error
- func (m *DocumentMutation) ClearField(name string) error
- func (m *DocumentMutation) ClearSearch()
- func (m *DocumentMutation) ClearUser()
- func (m *DocumentMutation) ClearedEdges() []string
- func (m *DocumentMutation) ClearedFields() []string
- func (m DocumentMutation) Client() *Client
- func (m *DocumentMutation) Content() (r string, exists bool)
- func (m *DocumentMutation) ContentCleared() bool
- func (m *DocumentMutation) ContentHash() (r string, exists bool)
- func (m *DocumentMutation) ContentHashCleared() bool
- func (m *DocumentMutation) CreateHistoryFromCreate(ctx context.Context) error
- func (m *DocumentMutation) CreateHistoryFromDelete(ctx context.Context) error
- func (m *DocumentMutation) CreateHistoryFromUpdate(ctx context.Context) error
- func (m *DocumentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DocumentMutation) Description() (r string, exists bool)
- func (m *DocumentMutation) EdgeCleared(name string) bool
- func (m *DocumentMutation) Field(name string) (ent.Value, bool)
- func (m *DocumentMutation) FieldCleared(name string) bool
- func (m *DocumentMutation) Fields() []string
- func (m *DocumentMutation) Filename() (r string, exists bool)
- func (m *DocumentMutation) Filetype() (r types.Filetype, exists bool)
- func (m *DocumentMutation) ID() (id int, exists bool)
- func (m *DocumentMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DocumentMutation) OldContent(ctx context.Context) (v *string, err error)
- func (m *DocumentMutation) OldContentHash(ctx context.Context) (v string, err error)
- func (m *DocumentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *DocumentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DocumentMutation) OldFilename(ctx context.Context) (v string, err error)
- func (m *DocumentMutation) OldFiletype(ctx context.Context) (v types.Filetype, err error)
- func (m *DocumentMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *DocumentMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *DocumentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentMutation) Op() Op
- func (m *DocumentMutation) RemovedEdges() []string
- func (m *DocumentMutation) RemovedIDs(name string) []ent.Value
- func (m *DocumentMutation) ResetContent()
- func (m *DocumentMutation) ResetContentHash()
- func (m *DocumentMutation) ResetCreatedAt()
- func (m *DocumentMutation) ResetDescription()
- func (m *DocumentMutation) ResetEdge(name string) error
- func (m *DocumentMutation) ResetField(name string) error
- func (m *DocumentMutation) ResetFilename()
- func (m *DocumentMutation) ResetFiletype()
- func (m *DocumentMutation) ResetSearch()
- func (m *DocumentMutation) ResetTitle()
- func (m *DocumentMutation) ResetUUID()
- func (m *DocumentMutation) ResetUpdatedAt()
- func (m *DocumentMutation) ResetUser()
- func (m *DocumentMutation) SearchCleared() bool
- func (m *DocumentMutation) SearchID() (id int, exists bool)
- func (m *DocumentMutation) SearchIDs() (ids []int)
- func (m *DocumentMutation) SetContent(s string)
- func (m *DocumentMutation) SetContentHash(s string)
- func (m *DocumentMutation) SetCreatedAt(t time.Time)
- func (m *DocumentMutation) SetDescription(s string)
- func (m *DocumentMutation) SetField(name string, value ent.Value) error
- func (m *DocumentMutation) SetFilename(s string)
- func (m *DocumentMutation) SetFiletype(t types.Filetype)
- func (m *DocumentMutation) SetOp(op Op)
- func (m *DocumentMutation) SetSearchID(id int)
- func (m *DocumentMutation) SetTitle(s string)
- func (m *DocumentMutation) SetUUID(u uuid.UUID)
- func (m *DocumentMutation) SetUpdatedAt(t time.Time)
- func (m *DocumentMutation) SetUserID(id int)
- func (m *DocumentMutation) Title() (r string, exists bool)
- func (m DocumentMutation) Tx() (*Tx, error)
- func (m *DocumentMutation) Type() string
- func (m *DocumentMutation) UUID() (r uuid.UUID, exists bool)
- func (m *DocumentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DocumentMutation) UserCleared() bool
- func (m *DocumentMutation) UserID() (id int, exists bool)
- func (m *DocumentMutation) UserIDs() (ids []int)
- func (m *DocumentMutation) Where(ps ...predicate.Document)
- func (m *DocumentMutation) WhereP(ps ...func(*sql.Selector))
- type DocumentQuery
- func (dq *DocumentQuery) Aggregate(fns ...AggregateFunc) *DocumentSelect
- func (dq *DocumentQuery) All(ctx context.Context) ([]*Document, error)
- func (dq *DocumentQuery) AllX(ctx context.Context) []*Document
- func (dq *DocumentQuery) Clone() *DocumentQuery
- func (dq *DocumentQuery) Count(ctx context.Context) (int, error)
- func (dq *DocumentQuery) CountX(ctx context.Context) int
- func (dq *DocumentQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DocumentQuery) ExistX(ctx context.Context) bool
- func (dq *DocumentQuery) First(ctx context.Context) (*Document, error)
- func (dq *DocumentQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DocumentQuery) FirstIDX(ctx context.Context) int
- func (dq *DocumentQuery) FirstX(ctx context.Context) *Document
- func (dq *DocumentQuery) GroupBy(field string, fields ...string) *DocumentGroupBy
- func (dq *DocumentQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dq *DocumentQuery) IDsX(ctx context.Context) []int
- func (dq *DocumentQuery) Limit(limit int) *DocumentQuery
- func (dq *DocumentQuery) Modify(modifiers ...func(s *sql.Selector)) *DocumentSelect
- func (dq *DocumentQuery) Offset(offset int) *DocumentQuery
- func (dq *DocumentQuery) Only(ctx context.Context) (*Document, error)
- func (dq *DocumentQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DocumentQuery) OnlyIDX(ctx context.Context) int
- func (dq *DocumentQuery) OnlyX(ctx context.Context) *Document
- func (dq *DocumentQuery) Order(o ...OrderFunc) *DocumentQuery
- func (dq *DocumentQuery) QuerySearch() *DocumentSearchQuery
- func (dq *DocumentQuery) QueryUser() *UserQuery
- func (dq *DocumentQuery) Select(fields ...string) *DocumentSelect
- func (dq *DocumentQuery) Unique(unique bool) *DocumentQuery
- func (dq *DocumentQuery) Where(ps ...predicate.Document) *DocumentQuery
- func (dq *DocumentQuery) WithSearch(opts ...func(*DocumentSearchQuery)) *DocumentQuery
- func (dq *DocumentQuery) WithUser(opts ...func(*UserQuery)) *DocumentQuery
- type DocumentSearch
- type DocumentSearchClient
- func (c *DocumentSearchClient) Create() *DocumentSearchCreate
- func (c *DocumentSearchClient) CreateBulk(builders ...*DocumentSearchCreate) *DocumentSearchCreateBulk
- func (c *DocumentSearchClient) Delete() *DocumentSearchDelete
- func (c *DocumentSearchClient) DeleteOne(ds *DocumentSearch) *DocumentSearchDeleteOne
- func (c *DocumentSearchClient) DeleteOneID(id int) *DocumentSearchDeleteOne
- func (c *DocumentSearchClient) Get(ctx context.Context, id int) (*DocumentSearch, error)
- func (c *DocumentSearchClient) GetX(ctx context.Context, id int) *DocumentSearch
- func (c *DocumentSearchClient) Hooks() []Hook
- func (c *DocumentSearchClient) Intercept(interceptors ...Interceptor)
- func (c *DocumentSearchClient) Interceptors() []Interceptor
- func (c *DocumentSearchClient) Query() *DocumentSearchQuery
- func (c *DocumentSearchClient) QueryDocument(ds *DocumentSearch) *DocumentQuery
- func (c *DocumentSearchClient) Update() *DocumentSearchUpdate
- func (c *DocumentSearchClient) UpdateOne(ds *DocumentSearch) *DocumentSearchUpdateOne
- func (c *DocumentSearchClient) UpdateOneID(id int) *DocumentSearchUpdateOne
- func (c *DocumentSearchClient) Use(hooks ...Hook)
- type DocumentSearchCreate
- func (dsc *DocumentSearchCreate) Exec(ctx context.Context) error
- func (dsc *DocumentSearchCreate) ExecX(ctx context.Context)
- func (dsc *DocumentSearchCreate) Mutation() *DocumentSearchMutation
- func (dsc *DocumentSearchCreate) Save(ctx context.Context) (*DocumentSearch, error)
- func (dsc *DocumentSearchCreate) SaveX(ctx context.Context) *DocumentSearch
- func (dsc *DocumentSearchCreate) SetCreatedAt(t time.Time) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetDocument(d *Document) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetDocumentID(i int) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetNillableCreatedAt(t *time.Time) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetNillableUUID(u *uuid.UUID) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetNillableUpdatedAt(t *time.Time) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetTs(tv *types.TsVector) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetUUID(u uuid.UUID) *DocumentSearchCreate
- func (dsc *DocumentSearchCreate) SetUpdatedAt(t time.Time) *DocumentSearchCreate
- type DocumentSearchCreateBulk
- func (dscb *DocumentSearchCreateBulk) Exec(ctx context.Context) error
- func (dscb *DocumentSearchCreateBulk) ExecX(ctx context.Context)
- func (dscb *DocumentSearchCreateBulk) Save(ctx context.Context) ([]*DocumentSearch, error)
- func (dscb *DocumentSearchCreateBulk) SaveX(ctx context.Context) []*DocumentSearch
- type DocumentSearchDelete
- type DocumentSearchDeleteOne
- type DocumentSearchEdges
- type DocumentSearchGroupBy
- func (dsgb *DocumentSearchGroupBy) Aggregate(fns ...AggregateFunc) *DocumentSearchGroupBy
- func (s *DocumentSearchGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentSearchGroupBy) BoolX(ctx context.Context) bool
- func (s *DocumentSearchGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentSearchGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DocumentSearchGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentSearchGroupBy) Float64X(ctx context.Context) float64
- func (s *DocumentSearchGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentSearchGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DocumentSearchGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentSearchGroupBy) IntX(ctx context.Context) int
- func (s *DocumentSearchGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentSearchGroupBy) IntsX(ctx context.Context) []int
- func (dsgb *DocumentSearchGroupBy) Scan(ctx context.Context, v any) error
- func (s *DocumentSearchGroupBy) ScanX(ctx context.Context, v any)
- func (s *DocumentSearchGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DocumentSearchGroupBy) StringX(ctx context.Context) string
- func (s *DocumentSearchGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentSearchGroupBy) StringsX(ctx context.Context) []string
- type DocumentSearchMutation
- func (m *DocumentSearchMutation) AddField(name string, value ent.Value) error
- func (m *DocumentSearchMutation) AddedEdges() []string
- func (m *DocumentSearchMutation) AddedField(name string) (ent.Value, bool)
- func (m *DocumentSearchMutation) AddedFields() []string
- func (m *DocumentSearchMutation) AddedIDs(name string) []ent.Value
- func (m *DocumentSearchMutation) ClearDocument()
- func (m *DocumentSearchMutation) ClearEdge(name string) error
- func (m *DocumentSearchMutation) ClearField(name string) error
- func (m *DocumentSearchMutation) ClearedEdges() []string
- func (m *DocumentSearchMutation) ClearedFields() []string
- func (m DocumentSearchMutation) Client() *Client
- func (m *DocumentSearchMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DocumentSearchMutation) DocumentCleared() bool
- func (m *DocumentSearchMutation) DocumentID() (r int, exists bool)
- func (m *DocumentSearchMutation) DocumentIDs() (ids []int)
- func (m *DocumentSearchMutation) EdgeCleared(name string) bool
- func (m *DocumentSearchMutation) Field(name string) (ent.Value, bool)
- func (m *DocumentSearchMutation) FieldCleared(name string) bool
- func (m *DocumentSearchMutation) Fields() []string
- func (m *DocumentSearchMutation) ID() (id int, exists bool)
- func (m *DocumentSearchMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DocumentSearchMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentSearchMutation) OldDocumentID(ctx context.Context) (v int, err error)
- func (m *DocumentSearchMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DocumentSearchMutation) OldTs(ctx context.Context) (v *types.TsVector, err error)
- func (m *DocumentSearchMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *DocumentSearchMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentSearchMutation) Op() Op
- func (m *DocumentSearchMutation) RemovedEdges() []string
- func (m *DocumentSearchMutation) RemovedIDs(name string) []ent.Value
- func (m *DocumentSearchMutation) ResetCreatedAt()
- func (m *DocumentSearchMutation) ResetDocument()
- func (m *DocumentSearchMutation) ResetDocumentID()
- func (m *DocumentSearchMutation) ResetEdge(name string) error
- func (m *DocumentSearchMutation) ResetField(name string) error
- func (m *DocumentSearchMutation) ResetTs()
- func (m *DocumentSearchMutation) ResetUUID()
- func (m *DocumentSearchMutation) ResetUpdatedAt()
- func (m *DocumentSearchMutation) SetCreatedAt(t time.Time)
- func (m *DocumentSearchMutation) SetDocumentID(i int)
- func (m *DocumentSearchMutation) SetField(name string, value ent.Value) error
- func (m *DocumentSearchMutation) SetOp(op Op)
- func (m *DocumentSearchMutation) SetTs(tv *types.TsVector)
- func (m *DocumentSearchMutation) SetUUID(u uuid.UUID)
- func (m *DocumentSearchMutation) SetUpdatedAt(t time.Time)
- func (m *DocumentSearchMutation) Ts() (r *types.TsVector, exists bool)
- func (m DocumentSearchMutation) Tx() (*Tx, error)
- func (m *DocumentSearchMutation) Type() string
- func (m *DocumentSearchMutation) UUID() (r uuid.UUID, exists bool)
- func (m *DocumentSearchMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DocumentSearchMutation) Where(ps ...predicate.DocumentSearch)
- func (m *DocumentSearchMutation) WhereP(ps ...func(*sql.Selector))
- type DocumentSearchQuery
- func (dsq *DocumentSearchQuery) Aggregate(fns ...AggregateFunc) *DocumentSearchSelect
- func (dsq *DocumentSearchQuery) All(ctx context.Context) ([]*DocumentSearch, error)
- func (dsq *DocumentSearchQuery) AllX(ctx context.Context) []*DocumentSearch
- func (dsq *DocumentSearchQuery) Clone() *DocumentSearchQuery
- func (dsq *DocumentSearchQuery) Count(ctx context.Context) (int, error)
- func (dsq *DocumentSearchQuery) CountX(ctx context.Context) int
- func (dsq *DocumentSearchQuery) Exist(ctx context.Context) (bool, error)
- func (dsq *DocumentSearchQuery) ExistX(ctx context.Context) bool
- func (dsq *DocumentSearchQuery) First(ctx context.Context) (*DocumentSearch, error)
- func (dsq *DocumentSearchQuery) FirstID(ctx context.Context) (id int, err error)
- func (dsq *DocumentSearchQuery) FirstIDX(ctx context.Context) int
- func (dsq *DocumentSearchQuery) FirstX(ctx context.Context) *DocumentSearch
- func (dsq *DocumentSearchQuery) GroupBy(field string, fields ...string) *DocumentSearchGroupBy
- func (dsq *DocumentSearchQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dsq *DocumentSearchQuery) IDsX(ctx context.Context) []int
- func (dsq *DocumentSearchQuery) Limit(limit int) *DocumentSearchQuery
- func (dsq *DocumentSearchQuery) Modify(modifiers ...func(s *sql.Selector)) *DocumentSearchSelect
- func (dsq *DocumentSearchQuery) Offset(offset int) *DocumentSearchQuery
- func (dsq *DocumentSearchQuery) Only(ctx context.Context) (*DocumentSearch, error)
- func (dsq *DocumentSearchQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dsq *DocumentSearchQuery) OnlyIDX(ctx context.Context) int
- func (dsq *DocumentSearchQuery) OnlyX(ctx context.Context) *DocumentSearch
- func (dsq *DocumentSearchQuery) Order(o ...OrderFunc) *DocumentSearchQuery
- func (dsq *DocumentSearchQuery) QueryDocument() *DocumentQuery
- func (dsq *DocumentSearchQuery) Select(fields ...string) *DocumentSearchSelect
- func (dsq *DocumentSearchQuery) Unique(unique bool) *DocumentSearchQuery
- func (dsq *DocumentSearchQuery) Where(ps ...predicate.DocumentSearch) *DocumentSearchQuery
- func (dsq *DocumentSearchQuery) WithDocument(opts ...func(*DocumentQuery)) *DocumentSearchQuery
- type DocumentSearchSelect
- func (dss *DocumentSearchSelect) Aggregate(fns ...AggregateFunc) *DocumentSearchSelect
- func (s *DocumentSearchSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentSearchSelect) BoolX(ctx context.Context) bool
- func (s *DocumentSearchSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentSearchSelect) BoolsX(ctx context.Context) []bool
- func (s *DocumentSearchSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentSearchSelect) Float64X(ctx context.Context) float64
- func (s *DocumentSearchSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentSearchSelect) Float64sX(ctx context.Context) []float64
- func (s *DocumentSearchSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentSearchSelect) IntX(ctx context.Context) int
- func (s *DocumentSearchSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentSearchSelect) IntsX(ctx context.Context) []int
- func (dss *DocumentSearchSelect) Modify(modifiers ...func(s *sql.Selector)) *DocumentSearchSelect
- func (dss *DocumentSearchSelect) Scan(ctx context.Context, v any) error
- func (s *DocumentSearchSelect) ScanX(ctx context.Context, v any)
- func (s *DocumentSearchSelect) String(ctx context.Context) (_ string, err error)
- func (s *DocumentSearchSelect) StringX(ctx context.Context) string
- func (s *DocumentSearchSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentSearchSelect) StringsX(ctx context.Context) []string
- type DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) ClearDocument() *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) Exec(ctx context.Context) error
- func (dsu *DocumentSearchUpdate) ExecX(ctx context.Context)
- func (dsu *DocumentSearchUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) Mutation() *DocumentSearchMutation
- func (dsu *DocumentSearchUpdate) Save(ctx context.Context) (int, error)
- func (dsu *DocumentSearchUpdate) SaveX(ctx context.Context) int
- func (dsu *DocumentSearchUpdate) SetDocument(d *Document) *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) SetDocumentID(i int) *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) SetNillableUUID(u *uuid.UUID) *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) SetTs(tv *types.TsVector) *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) SetUUID(u uuid.UUID) *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) SetUpdatedAt(t time.Time) *DocumentSearchUpdate
- func (dsu *DocumentSearchUpdate) Where(ps ...predicate.DocumentSearch) *DocumentSearchUpdate
- type DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) ClearDocument() *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) Exec(ctx context.Context) error
- func (dsuo *DocumentSearchUpdateOne) ExecX(ctx context.Context)
- func (dsuo *DocumentSearchUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) Mutation() *DocumentSearchMutation
- func (dsuo *DocumentSearchUpdateOne) Save(ctx context.Context) (*DocumentSearch, error)
- func (dsuo *DocumentSearchUpdateOne) SaveX(ctx context.Context) *DocumentSearch
- func (dsuo *DocumentSearchUpdateOne) Select(field string, fields ...string) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) SetDocument(d *Document) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) SetDocumentID(i int) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) SetNillableUUID(u *uuid.UUID) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) SetTs(tv *types.TsVector) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) SetUUID(u uuid.UUID) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) SetUpdatedAt(t time.Time) *DocumentSearchUpdateOne
- func (dsuo *DocumentSearchUpdateOne) Where(ps ...predicate.DocumentSearch) *DocumentSearchUpdateOne
- type DocumentSearches
- type DocumentSelect
- func (ds *DocumentSelect) Aggregate(fns ...AggregateFunc) *DocumentSelect
- func (s *DocumentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentSelect) BoolX(ctx context.Context) bool
- func (s *DocumentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentSelect) BoolsX(ctx context.Context) []bool
- func (s *DocumentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentSelect) Float64X(ctx context.Context) float64
- func (s *DocumentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentSelect) Float64sX(ctx context.Context) []float64
- func (s *DocumentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentSelect) IntX(ctx context.Context) int
- func (s *DocumentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentSelect) IntsX(ctx context.Context) []int
- func (ds *DocumentSelect) Modify(modifiers ...func(s *sql.Selector)) *DocumentSelect
- func (ds *DocumentSelect) Scan(ctx context.Context, v any) error
- func (s *DocumentSelect) ScanX(ctx context.Context, v any)
- func (s *DocumentSelect) String(ctx context.Context) (_ string, err error)
- func (s *DocumentSelect) StringX(ctx context.Context) string
- func (s *DocumentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentSelect) StringsX(ctx context.Context) []string
- type DocumentUpdate
- func (du *DocumentUpdate) ClearContent() *DocumentUpdate
- func (du *DocumentUpdate) ClearContentHash() *DocumentUpdate
- func (du *DocumentUpdate) ClearSearch() *DocumentUpdate
- func (du *DocumentUpdate) ClearUser() *DocumentUpdate
- func (du *DocumentUpdate) Exec(ctx context.Context) error
- func (du *DocumentUpdate) ExecX(ctx context.Context)
- func (du *DocumentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentUpdate
- func (du *DocumentUpdate) Mutation() *DocumentMutation
- func (du *DocumentUpdate) Save(ctx context.Context) (int, error)
- func (du *DocumentUpdate) SaveX(ctx context.Context) int
- func (du *DocumentUpdate) SetContent(s string) *DocumentUpdate
- func (du *DocumentUpdate) SetContentHash(s string) *DocumentUpdate
- func (du *DocumentUpdate) SetDescription(s string) *DocumentUpdate
- func (du *DocumentUpdate) SetFilename(s string) *DocumentUpdate
- func (du *DocumentUpdate) SetFiletype(t types.Filetype) *DocumentUpdate
- func (du *DocumentUpdate) SetNillableContent(s *string) *DocumentUpdate
- func (du *DocumentUpdate) SetNillableContentHash(s *string) *DocumentUpdate
- func (du *DocumentUpdate) SetNillableSearchID(id *int) *DocumentUpdate
- func (du *DocumentUpdate) SetNillableUUID(u *uuid.UUID) *DocumentUpdate
- func (du *DocumentUpdate) SetSearch(d *DocumentSearch) *DocumentUpdate
- func (du *DocumentUpdate) SetSearchID(id int) *DocumentUpdate
- func (du *DocumentUpdate) SetTitle(s string) *DocumentUpdate
- func (du *DocumentUpdate) SetUUID(u uuid.UUID) *DocumentUpdate
- func (du *DocumentUpdate) SetUpdatedAt(t time.Time) *DocumentUpdate
- func (du *DocumentUpdate) SetUser(u *User) *DocumentUpdate
- func (du *DocumentUpdate) SetUserID(id int) *DocumentUpdate
- func (du *DocumentUpdate) Where(ps ...predicate.Document) *DocumentUpdate
- type DocumentUpdateOne
- func (duo *DocumentUpdateOne) ClearContent() *DocumentUpdateOne
- func (duo *DocumentUpdateOne) ClearContentHash() *DocumentUpdateOne
- func (duo *DocumentUpdateOne) ClearSearch() *DocumentUpdateOne
- func (duo *DocumentUpdateOne) ClearUser() *DocumentUpdateOne
- func (duo *DocumentUpdateOne) Exec(ctx context.Context) error
- func (duo *DocumentUpdateOne) ExecX(ctx context.Context)
- func (duo *DocumentUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) Mutation() *DocumentMutation
- func (duo *DocumentUpdateOne) Save(ctx context.Context) (*Document, error)
- func (duo *DocumentUpdateOne) SaveX(ctx context.Context) *Document
- func (duo *DocumentUpdateOne) Select(field string, fields ...string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetContent(s string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetContentHash(s string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetDescription(s string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetFilename(s string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetFiletype(t types.Filetype) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetNillableContent(s *string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetNillableContentHash(s *string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetNillableSearchID(id *int) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetNillableUUID(u *uuid.UUID) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetSearch(d *DocumentSearch) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetSearchID(id int) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetTitle(s string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetUUID(u uuid.UUID) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetUpdatedAt(t time.Time) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetUser(u *User) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetUserID(id int) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) Where(ps ...predicate.Document) *DocumentUpdateOne
- type Documents
- type HistoryDiff
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryDocuments(u *User) *DocumentQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddDocumentIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddDocuments(d ...*Document) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetFirstName(s string) *UserCreate
- func (uc *UserCreate) SetIsAdmin(b bool) *UserCreate
- func (uc *UserCreate) SetLastName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableIsAdmin(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableUUID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetUUID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserHistories
- type UserHistory
- func (uh *UserHistory) Diff(history *UserHistory) (*HistoryDiff[UserHistory], error)
- func (uh *UserHistory) Next(ctx context.Context) (*UserHistory, error)
- func (uh *UserHistory) Prev(ctx context.Context) (*UserHistory, error)
- func (uh *UserHistory) Restore(ctx context.Context) (*User, error)
- func (uh *UserHistory) String() string
- func (uh *UserHistory) Unwrap() *UserHistory
- func (uh *UserHistory) Update() *UserHistoryUpdateOne
- type UserHistoryClient
- func (c *UserHistoryClient) Create() *UserHistoryCreate
- func (c *UserHistoryClient) CreateBulk(builders ...*UserHistoryCreate) *UserHistoryCreateBulk
- func (c *UserHistoryClient) Delete() *UserHistoryDelete
- func (c *UserHistoryClient) DeleteOne(uh *UserHistory) *UserHistoryDeleteOne
- func (c *UserHistoryClient) DeleteOneID(id int) *UserHistoryDeleteOne
- func (c *UserHistoryClient) Get(ctx context.Context, id int) (*UserHistory, error)
- func (c *UserHistoryClient) GetX(ctx context.Context, id int) *UserHistory
- func (c *UserHistoryClient) Hooks() []Hook
- func (c *UserHistoryClient) Intercept(interceptors ...Interceptor)
- func (c *UserHistoryClient) Interceptors() []Interceptor
- func (c *UserHistoryClient) Query() *UserHistoryQuery
- func (c *UserHistoryClient) Update() *UserHistoryUpdate
- func (c *UserHistoryClient) UpdateOne(uh *UserHistory) *UserHistoryUpdateOne
- func (c *UserHistoryClient) UpdateOneID(id int) *UserHistoryUpdateOne
- func (c *UserHistoryClient) Use(hooks ...Hook)
- type UserHistoryCreate
- func (uhc *UserHistoryCreate) Exec(ctx context.Context) error
- func (uhc *UserHistoryCreate) ExecX(ctx context.Context)
- func (uhc *UserHistoryCreate) Mutation() *UserHistoryMutation
- func (uhc *UserHistoryCreate) Save(ctx context.Context) (*UserHistory, error)
- func (uhc *UserHistoryCreate) SaveX(ctx context.Context) *UserHistory
- func (uhc *UserHistoryCreate) SetCreatedAt(t time.Time) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetEmail(s string) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetFirstName(s string) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetHistoryTime(t time.Time) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetIsAdmin(b bool) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetLastName(s string) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetNillableCreatedAt(t *time.Time) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetNillableHistoryTime(t *time.Time) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetNillableIsAdmin(b *bool) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetNillableRef(i *int) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetNillableUUID(u *uuid.UUID) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetNillableUpdatedAt(t *time.Time) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetNillableUpdatedBy(s *string) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetOperation(et enthistory.OpType) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetPassword(s string) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetRef(i int) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetUUID(u uuid.UUID) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetUpdatedAt(t time.Time) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetUpdatedBy(s string) *UserHistoryCreate
- func (uhc *UserHistoryCreate) SetUsername(s string) *UserHistoryCreate
- type UserHistoryCreateBulk
- type UserHistoryDelete
- type UserHistoryDeleteOne
- type UserHistoryGroupBy
- func (uhgb *UserHistoryGroupBy) Aggregate(fns ...AggregateFunc) *UserHistoryGroupBy
- func (s *UserHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserHistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *UserHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserHistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserHistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *UserHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserHistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserHistoryGroupBy) IntX(ctx context.Context) int
- func (s *UserHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserHistoryGroupBy) IntsX(ctx context.Context) []int
- func (uhgb *UserHistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserHistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserHistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserHistoryGroupBy) StringX(ctx context.Context) string
- func (s *UserHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserHistoryGroupBy) StringsX(ctx context.Context) []string
- type UserHistoryMutation
- func (m *UserHistoryMutation) AddField(name string, value ent.Value) error
- func (m *UserHistoryMutation) AddRef(i int)
- func (m *UserHistoryMutation) AddedEdges() []string
- func (m *UserHistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserHistoryMutation) AddedFields() []string
- func (m *UserHistoryMutation) AddedIDs(name string) []ent.Value
- func (m *UserHistoryMutation) AddedRef() (r int, exists bool)
- func (m *UserHistoryMutation) ClearEdge(name string) error
- func (m *UserHistoryMutation) ClearField(name string) error
- func (m *UserHistoryMutation) ClearIsAdmin()
- func (m *UserHistoryMutation) ClearRef()
- func (m *UserHistoryMutation) ClearUpdatedBy()
- func (m *UserHistoryMutation) ClearedEdges() []string
- func (m *UserHistoryMutation) ClearedFields() []string
- func (m UserHistoryMutation) Client() *Client
- func (m *UserHistoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserHistoryMutation) EdgeCleared(name string) bool
- func (m *UserHistoryMutation) Email() (r string, exists bool)
- func (m *UserHistoryMutation) Field(name string) (ent.Value, bool)
- func (m *UserHistoryMutation) FieldCleared(name string) bool
- func (m *UserHistoryMutation) Fields() []string
- func (m *UserHistoryMutation) FirstName() (r string, exists bool)
- func (m *UserHistoryMutation) HistoryTime() (r time.Time, exists bool)
- func (m *UserHistoryMutation) ID() (id int, exists bool)
- func (m *UserHistoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserHistoryMutation) IsAdmin() (r bool, exists bool)
- func (m *UserHistoryMutation) IsAdminCleared() bool
- func (m *UserHistoryMutation) LastName() (r string, exists bool)
- func (m *UserHistoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserHistoryMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserHistoryMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *UserHistoryMutation) OldHistoryTime(ctx context.Context) (v time.Time, err error)
- func (m *UserHistoryMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
- func (m *UserHistoryMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *UserHistoryMutation) OldOperation(ctx context.Context) (v enthistory.OpType, err error)
- func (m *UserHistoryMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserHistoryMutation) OldRef(ctx context.Context) (v int, err error)
- func (m *UserHistoryMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserHistoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserHistoryMutation) OldUpdatedBy(ctx context.Context) (v *string, err error)
- func (m *UserHistoryMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserHistoryMutation) Op() Op
- func (m *UserHistoryMutation) Operation() (r enthistory.OpType, exists bool)
- func (m *UserHistoryMutation) Password() (r string, exists bool)
- func (m *UserHistoryMutation) Ref() (r int, exists bool)
- func (m *UserHistoryMutation) RefCleared() bool
- func (m *UserHistoryMutation) RemovedEdges() []string
- func (m *UserHistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *UserHistoryMutation) ResetCreatedAt()
- func (m *UserHistoryMutation) ResetEdge(name string) error
- func (m *UserHistoryMutation) ResetEmail()
- func (m *UserHistoryMutation) ResetField(name string) error
- func (m *UserHistoryMutation) ResetFirstName()
- func (m *UserHistoryMutation) ResetHistoryTime()
- func (m *UserHistoryMutation) ResetIsAdmin()
- func (m *UserHistoryMutation) ResetLastName()
- func (m *UserHistoryMutation) ResetOperation()
- func (m *UserHistoryMutation) ResetPassword()
- func (m *UserHistoryMutation) ResetRef()
- func (m *UserHistoryMutation) ResetUUID()
- func (m *UserHistoryMutation) ResetUpdatedAt()
- func (m *UserHistoryMutation) ResetUpdatedBy()
- func (m *UserHistoryMutation) ResetUsername()
- func (m *UserHistoryMutation) SetCreatedAt(t time.Time)
- func (m *UserHistoryMutation) SetEmail(s string)
- func (m *UserHistoryMutation) SetField(name string, value ent.Value) error
- func (m *UserHistoryMutation) SetFirstName(s string)
- func (m *UserHistoryMutation) SetHistoryTime(t time.Time)
- func (m *UserHistoryMutation) SetIsAdmin(b bool)
- func (m *UserHistoryMutation) SetLastName(s string)
- func (m *UserHistoryMutation) SetOp(op Op)
- func (m *UserHistoryMutation) SetOperation(et enthistory.OpType)
- func (m *UserHistoryMutation) SetPassword(s string)
- func (m *UserHistoryMutation) SetRef(i int)
- func (m *UserHistoryMutation) SetUUID(u uuid.UUID)
- func (m *UserHistoryMutation) SetUpdatedAt(t time.Time)
- func (m *UserHistoryMutation) SetUpdatedBy(s string)
- func (m *UserHistoryMutation) SetUsername(s string)
- func (m UserHistoryMutation) Tx() (*Tx, error)
- func (m *UserHistoryMutation) Type() string
- func (m *UserHistoryMutation) UUID() (r uuid.UUID, exists bool)
- func (m *UserHistoryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserHistoryMutation) UpdatedBy() (r string, exists bool)
- func (m *UserHistoryMutation) UpdatedByCleared() bool
- func (m *UserHistoryMutation) Username() (r string, exists bool)
- func (m *UserHistoryMutation) Where(ps ...predicate.UserHistory)
- func (m *UserHistoryMutation) WhereP(ps ...func(*sql.Selector))
- type UserHistoryQuery
- func (uhq *UserHistoryQuery) Aggregate(fns ...AggregateFunc) *UserHistorySelect
- func (uhq *UserHistoryQuery) All(ctx context.Context) ([]*UserHistory, error)
- func (uhq *UserHistoryQuery) AllX(ctx context.Context) []*UserHistory
- func (uhq *UserHistoryQuery) AsOf(ctx context.Context, time time.Time) (*UserHistory, error)
- func (uhq *UserHistoryQuery) Clone() *UserHistoryQuery
- func (uhq *UserHistoryQuery) Count(ctx context.Context) (int, error)
- func (uhq *UserHistoryQuery) CountX(ctx context.Context) int
- func (uhq *UserHistoryQuery) Earliest(ctx context.Context) (*UserHistory, error)
- func (uhq *UserHistoryQuery) Exist(ctx context.Context) (bool, error)
- func (uhq *UserHistoryQuery) ExistX(ctx context.Context) bool
- func (uhq *UserHistoryQuery) First(ctx context.Context) (*UserHistory, error)
- func (uhq *UserHistoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (uhq *UserHistoryQuery) FirstIDX(ctx context.Context) int
- func (uhq *UserHistoryQuery) FirstX(ctx context.Context) *UserHistory
- func (uhq *UserHistoryQuery) GroupBy(field string, fields ...string) *UserHistoryGroupBy
- func (uhq *UserHistoryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uhq *UserHistoryQuery) IDsX(ctx context.Context) []int
- func (uhq *UserHistoryQuery) Latest(ctx context.Context) (*UserHistory, error)
- func (uhq *UserHistoryQuery) Limit(limit int) *UserHistoryQuery
- func (uhq *UserHistoryQuery) Modify(modifiers ...func(s *sql.Selector)) *UserHistorySelect
- func (uhq *UserHistoryQuery) Offset(offset int) *UserHistoryQuery
- func (uhq *UserHistoryQuery) Only(ctx context.Context) (*UserHistory, error)
- func (uhq *UserHistoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uhq *UserHistoryQuery) OnlyIDX(ctx context.Context) int
- func (uhq *UserHistoryQuery) OnlyX(ctx context.Context) *UserHistory
- func (uhq *UserHistoryQuery) Order(o ...OrderFunc) *UserHistoryQuery
- func (uhq *UserHistoryQuery) Select(fields ...string) *UserHistorySelect
- func (uhq *UserHistoryQuery) Unique(unique bool) *UserHistoryQuery
- func (uhq *UserHistoryQuery) Where(ps ...predicate.UserHistory) *UserHistoryQuery
- type UserHistorySelect
- func (uhs *UserHistorySelect) Aggregate(fns ...AggregateFunc) *UserHistorySelect
- func (s *UserHistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserHistorySelect) BoolX(ctx context.Context) bool
- func (s *UserHistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserHistorySelect) BoolsX(ctx context.Context) []bool
- func (s *UserHistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserHistorySelect) Float64X(ctx context.Context) float64
- func (s *UserHistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserHistorySelect) Float64sX(ctx context.Context) []float64
- func (s *UserHistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserHistorySelect) IntX(ctx context.Context) int
- func (s *UserHistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserHistorySelect) IntsX(ctx context.Context) []int
- func (uhs *UserHistorySelect) Modify(modifiers ...func(s *sql.Selector)) *UserHistorySelect
- func (uhs *UserHistorySelect) Scan(ctx context.Context, v any) error
- func (s *UserHistorySelect) ScanX(ctx context.Context, v any)
- func (s *UserHistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *UserHistorySelect) StringX(ctx context.Context) string
- func (s *UserHistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserHistorySelect) StringsX(ctx context.Context) []string
- type UserHistoryUpdate
- func (uhu *UserHistoryUpdate) ClearIsAdmin() *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) Exec(ctx context.Context) error
- func (uhu *UserHistoryUpdate) ExecX(ctx context.Context)
- func (uhu *UserHistoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) Mutation() *UserHistoryMutation
- func (uhu *UserHistoryUpdate) Save(ctx context.Context) (int, error)
- func (uhu *UserHistoryUpdate) SaveX(ctx context.Context) int
- func (uhu *UserHistoryUpdate) SetEmail(s string) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetFirstName(s string) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetIsAdmin(b bool) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetLastName(s string) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetNillableIsAdmin(b *bool) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetNillableUUID(u *uuid.UUID) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetPassword(s string) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetUUID(u uuid.UUID) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetUpdatedAt(t time.Time) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) SetUsername(s string) *UserHistoryUpdate
- func (uhu *UserHistoryUpdate) Where(ps ...predicate.UserHistory) *UserHistoryUpdate
- type UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) ClearIsAdmin() *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) Exec(ctx context.Context) error
- func (uhuo *UserHistoryUpdateOne) ExecX(ctx context.Context)
- func (uhuo *UserHistoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) Mutation() *UserHistoryMutation
- func (uhuo *UserHistoryUpdateOne) Save(ctx context.Context) (*UserHistory, error)
- func (uhuo *UserHistoryUpdateOne) SaveX(ctx context.Context) *UserHistory
- func (uhuo *UserHistoryUpdateOne) Select(field string, fields ...string) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetEmail(s string) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetFirstName(s string) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetIsAdmin(b bool) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetLastName(s string) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetNillableIsAdmin(b *bool) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetNillableUUID(u *uuid.UUID) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetPassword(s string) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetUUID(u uuid.UUID) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetUpdatedAt(t time.Time) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) SetUsername(s string) *UserHistoryUpdateOne
- func (uhuo *UserHistoryUpdateOne) Where(ps ...predicate.UserHistory) *UserHistoryUpdateOne
- type UserMutation
- func (m *UserMutation) AddDocumentIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearDocuments()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearIsAdmin()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateHistoryFromCreate(ctx context.Context) error
- func (m *UserMutation) CreateHistoryFromDelete(ctx context.Context) error
- func (m *UserMutation) CreateHistoryFromUpdate(ctx context.Context) error
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) DocumentsCleared() bool
- func (m *UserMutation) DocumentsIDs() (ids []int)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FirstName() (r string, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) IsAdmin() (r bool, exists bool)
- func (m *UserMutation) IsAdminCleared() bool
- func (m *UserMutation) LastName() (r string, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemoveDocumentIDs(ids ...int)
- func (m *UserMutation) RemovedDocumentsIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDocuments()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFirstName()
- func (m *UserMutation) ResetIsAdmin()
- func (m *UserMutation) ResetLastName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetUUID()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFirstName(s string)
- func (m *UserMutation) SetIsAdmin(b bool)
- func (m *UserMutation) SetLastName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetUUID(u uuid.UUID)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UUID() (r uuid.UUID, exists bool)
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryDocuments() *DocumentQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithDocuments(opts ...func(*DocumentQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddDocumentIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddDocuments(d ...*Document) *UserUpdate
- func (uu *UserUpdate) ClearDocuments() *UserUpdate
- func (uu *UserUpdate) ClearIsAdmin() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveDocumentIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveDocuments(d ...*Document) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
- func (uu *UserUpdate) SetIsAdmin(b bool) *UserUpdate
- func (uu *UserUpdate) SetLastName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableIsAdmin(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableUUID(u *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetUUID(u uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddDocumentIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDocuments(d ...*Document) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDocuments() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearIsAdmin() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveDocumentIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveDocuments(d ...*Document) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsAdmin(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsAdmin(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUUID(u *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUUID(u uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- 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. TypeDocument = "Document" TypeDocumentHistory = "DocumentHistory" TypeDocumentSearch = "DocumentSearch" TypeUser = "User" TypeUserHistory = "UserHistory" )
Variables ¶
var ( MismatchedRefError = errors.New("cannot take diff of histories with different Refs") IdenticalHistoryError = errors.New("cannot take diff of identical history") )
Functions ¶
func EntOpToHistoryOp ¶
func EntOpToHistoryOp(op ent.Op) enthistory.OpType
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Document is the client for interacting with the Document builders. Document *DocumentClient // DocumentHistory is the client for interacting with the DocumentHistory builders. DocumentHistory *DocumentHistoryClient // DocumentSearch is the client for interacting with the DocumentSearch builders. DocumentSearch *DocumentSearchClient // User is the client for interacting with the User builders. User *UserClient // UserHistory is the client for interacting with the UserHistory builders. UserHistory *UserHistoryClient // 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(). Document. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) Tx ¶
Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.
func (*Client) Use ¶
Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.
func (*Client) WithHistory ¶
func (c *Client) WithHistory()
withHistory adds the history hooks to the appropriate schemas - generated by enthistory
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Document ¶
type Document struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Filename holds the value of the "filename" field. Filename string `json:"filename,omitempty"` // Filetype holds the value of the "filetype" field. Filetype types.Filetype `json:"filetype,omitempty"` // Content holds the value of the "content" field. Content *string `json:"content,omitempty"` // ContentHash holds the value of the "content_hash" field. ContentHash string `json:"content_hash,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DocumentQuery when eager-loading is set. Edges DocumentEdges `json:"edges"` // contains filtered or unexported fields }
Document is the model entity for the Document schema.
func (*Document) History ¶
func (d *Document) History() *DocumentHistoryQuery
func (*Document) QuerySearch ¶
func (d *Document) QuerySearch() *DocumentSearchQuery
QuerySearch queries the "search" edge of the Document entity.
func (*Document) Unwrap ¶
Unwrap unwraps the Document 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 (*Document) Update ¶
func (d *Document) Update() *DocumentUpdateOne
Update returns a builder for updating this Document. Note that you need to call Document.Unwrap() before calling this method if this Document was returned from a transaction, and the transaction was committed or rolled back.
type DocumentClient ¶
type DocumentClient struct {
// contains filtered or unexported fields
}
DocumentClient is a client for the Document schema.
func NewDocumentClient ¶
func NewDocumentClient(c config) *DocumentClient
NewDocumentClient returns a client for the Document from the given config.
func (*DocumentClient) Create ¶
func (c *DocumentClient) Create() *DocumentCreate
Create returns a builder for creating a Document entity.
func (*DocumentClient) CreateBulk ¶
func (c *DocumentClient) CreateBulk(builders ...*DocumentCreate) *DocumentCreateBulk
CreateBulk returns a builder for creating a bulk of Document entities.
func (*DocumentClient) Delete ¶
func (c *DocumentClient) Delete() *DocumentDelete
Delete returns a delete builder for Document.
func (*DocumentClient) DeleteOne ¶
func (c *DocumentClient) DeleteOne(d *Document) *DocumentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DocumentClient) DeleteOneID ¶
func (c *DocumentClient) DeleteOneID(id int) *DocumentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DocumentClient) GetX ¶
func (c *DocumentClient) GetX(ctx context.Context, id int) *Document
GetX is like Get, but panics if an error occurs.
func (*DocumentClient) Hooks ¶
func (c *DocumentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DocumentClient) Intercept ¶
func (c *DocumentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `document.Intercept(f(g(h())))`.
func (*DocumentClient) Interceptors ¶
func (c *DocumentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DocumentClient) Query ¶
func (c *DocumentClient) Query() *DocumentQuery
Query returns a query builder for Document.
func (*DocumentClient) QuerySearch ¶
func (c *DocumentClient) QuerySearch(d *Document) *DocumentSearchQuery
QuerySearch queries the search edge of a Document.
func (*DocumentClient) QueryUser ¶
func (c *DocumentClient) QueryUser(d *Document) *UserQuery
QueryUser queries the user edge of a Document.
func (*DocumentClient) Update ¶
func (c *DocumentClient) Update() *DocumentUpdate
Update returns an update builder for Document.
func (*DocumentClient) UpdateOne ¶
func (c *DocumentClient) UpdateOne(d *Document) *DocumentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DocumentClient) UpdateOneID ¶
func (c *DocumentClient) UpdateOneID(id int) *DocumentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DocumentClient) Use ¶
func (c *DocumentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `document.Hooks(f(g(h())))`.
type DocumentCreate ¶
type DocumentCreate struct {
// contains filtered or unexported fields
}
DocumentCreate is the builder for creating a Document entity.
func (*DocumentCreate) Exec ¶
func (dc *DocumentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentCreate) ExecX ¶
func (dc *DocumentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentCreate) Mutation ¶
func (dc *DocumentCreate) Mutation() *DocumentMutation
Mutation returns the DocumentMutation object of the builder.
func (*DocumentCreate) Save ¶
func (dc *DocumentCreate) Save(ctx context.Context) (*Document, error)
Save creates the Document in the database.
func (*DocumentCreate) SaveX ¶
func (dc *DocumentCreate) SaveX(ctx context.Context) *Document
SaveX calls Save and panics if Save returns an error.
func (*DocumentCreate) SetContent ¶
func (dc *DocumentCreate) SetContent(s string) *DocumentCreate
SetContent sets the "content" field.
func (*DocumentCreate) SetContentHash ¶
func (dc *DocumentCreate) SetContentHash(s string) *DocumentCreate
SetContentHash sets the "content_hash" field.
func (*DocumentCreate) SetCreatedAt ¶
func (dc *DocumentCreate) SetCreatedAt(t time.Time) *DocumentCreate
SetCreatedAt sets the "created_at" field.
func (*DocumentCreate) SetDescription ¶
func (dc *DocumentCreate) SetDescription(s string) *DocumentCreate
SetDescription sets the "description" field.
func (*DocumentCreate) SetFilename ¶
func (dc *DocumentCreate) SetFilename(s string) *DocumentCreate
SetFilename sets the "filename" field.
func (*DocumentCreate) SetFiletype ¶
func (dc *DocumentCreate) SetFiletype(t types.Filetype) *DocumentCreate
SetFiletype sets the "filetype" field.
func (*DocumentCreate) SetNillableContent ¶
func (dc *DocumentCreate) SetNillableContent(s *string) *DocumentCreate
SetNillableContent sets the "content" field if the given value is not nil.
func (*DocumentCreate) SetNillableContentHash ¶
func (dc *DocumentCreate) SetNillableContentHash(s *string) *DocumentCreate
SetNillableContentHash sets the "content_hash" field if the given value is not nil.
func (*DocumentCreate) SetNillableCreatedAt ¶
func (dc *DocumentCreate) SetNillableCreatedAt(t *time.Time) *DocumentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DocumentCreate) SetNillableSearchID ¶
func (dc *DocumentCreate) SetNillableSearchID(id *int) *DocumentCreate
SetNillableSearchID sets the "search" edge to the DocumentSearch entity by ID if the given value is not nil.
func (*DocumentCreate) SetNillableUUID ¶
func (dc *DocumentCreate) SetNillableUUID(u *uuid.UUID) *DocumentCreate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentCreate) SetNillableUpdatedAt ¶
func (dc *DocumentCreate) SetNillableUpdatedAt(t *time.Time) *DocumentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DocumentCreate) SetSearch ¶
func (dc *DocumentCreate) SetSearch(d *DocumentSearch) *DocumentCreate
SetSearch sets the "search" edge to the DocumentSearch entity.
func (*DocumentCreate) SetSearchID ¶
func (dc *DocumentCreate) SetSearchID(id int) *DocumentCreate
SetSearchID sets the "search" edge to the DocumentSearch entity by ID.
func (*DocumentCreate) SetTitle ¶
func (dc *DocumentCreate) SetTitle(s string) *DocumentCreate
SetTitle sets the "title" field.
func (*DocumentCreate) SetUUID ¶
func (dc *DocumentCreate) SetUUID(u uuid.UUID) *DocumentCreate
SetUUID sets the "uuid" field.
func (*DocumentCreate) SetUpdatedAt ¶
func (dc *DocumentCreate) SetUpdatedAt(t time.Time) *DocumentCreate
SetUpdatedAt sets the "updated_at" field.
func (*DocumentCreate) SetUser ¶
func (dc *DocumentCreate) SetUser(u *User) *DocumentCreate
SetUser sets the "user" edge to the User entity.
func (*DocumentCreate) SetUserID ¶
func (dc *DocumentCreate) SetUserID(id int) *DocumentCreate
SetUserID sets the "user" edge to the User entity by ID.
type DocumentCreateBulk ¶
type DocumentCreateBulk struct {
// contains filtered or unexported fields
}
DocumentCreateBulk is the builder for creating many Document entities in bulk.
func (*DocumentCreateBulk) Exec ¶
func (dcb *DocumentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentCreateBulk) ExecX ¶
func (dcb *DocumentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DocumentDelete ¶
type DocumentDelete struct {
// contains filtered or unexported fields
}
DocumentDelete is the builder for deleting a Document entity.
func (*DocumentDelete) Exec ¶
func (dd *DocumentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DocumentDelete) ExecX ¶
func (dd *DocumentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DocumentDelete) Where ¶
func (dd *DocumentDelete) Where(ps ...predicate.Document) *DocumentDelete
Where appends a list predicates to the DocumentDelete builder.
type DocumentDeleteOne ¶
type DocumentDeleteOne struct {
// contains filtered or unexported fields
}
DocumentDeleteOne is the builder for deleting a single Document entity.
func (*DocumentDeleteOne) Exec ¶
func (ddo *DocumentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DocumentDeleteOne) ExecX ¶
func (ddo *DocumentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentDeleteOne) Where ¶
func (ddo *DocumentDeleteOne) Where(ps ...predicate.Document) *DocumentDeleteOne
Where appends a list predicates to the DocumentDelete builder.
type DocumentEdges ¶
type DocumentEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Search holds the value of the search edge. Search *DocumentSearch `json:"search,omitempty"` // contains filtered or unexported fields }
DocumentEdges holds the relations/edges for other nodes in the graph.
func (DocumentEdges) SearchOrErr ¶
func (e DocumentEdges) SearchOrErr() (*DocumentSearch, error)
SearchOrErr returns the Search value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DocumentEdges) UserOrErr ¶
func (e DocumentEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DocumentGroupBy ¶
type DocumentGroupBy struct {
// contains filtered or unexported fields
}
DocumentGroupBy is the group-by builder for Document entities.
func (*DocumentGroupBy) Aggregate ¶
func (dgb *DocumentGroupBy) Aggregate(fns ...AggregateFunc) *DocumentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DocumentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Scan ¶
func (dgb *DocumentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentHistories ¶
type DocumentHistories []*DocumentHistory
DocumentHistories is a parsable slice of DocumentHistory.
type DocumentHistory ¶
type DocumentHistory struct { // ID of the ent. ID int `json:"id,omitempty"` // HistoryTime holds the value of the "history_time" field. HistoryTime time.Time `json:"history_time,omitempty"` // Ref holds the value of the "ref" field. Ref int `json:"ref,omitempty"` // Operation holds the value of the "operation" field. Operation enthistory.OpType `json:"operation,omitempty"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy *string `json:"updated_by,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Filename holds the value of the "filename" field. Filename string `json:"filename,omitempty"` // Filetype holds the value of the "filetype" field. Filetype types.Filetype `json:"filetype,omitempty"` // Content holds the value of the "content" field. Content *string `json:"content,omitempty"` // ContentHash holds the value of the "content_hash" field. ContentHash string `json:"content_hash,omitempty"` // contains filtered or unexported fields }
DocumentHistory is the model entity for the DocumentHistory schema.
func (*DocumentHistory) Diff ¶
func (dh *DocumentHistory) Diff(history *DocumentHistory) (*HistoryDiff[DocumentHistory], error)
func (*DocumentHistory) Next ¶
func (dh *DocumentHistory) Next(ctx context.Context) (*DocumentHistory, error)
func (*DocumentHistory) Prev ¶
func (dh *DocumentHistory) Prev(ctx context.Context) (*DocumentHistory, error)
func (*DocumentHistory) Restore ¶
func (dh *DocumentHistory) Restore(ctx context.Context) (*Document, error)
func (*DocumentHistory) String ¶
func (dh *DocumentHistory) String() string
String implements the fmt.Stringer.
func (*DocumentHistory) Unwrap ¶
func (dh *DocumentHistory) Unwrap() *DocumentHistory
Unwrap unwraps the DocumentHistory 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 (*DocumentHistory) Update ¶
func (dh *DocumentHistory) Update() *DocumentHistoryUpdateOne
Update returns a builder for updating this DocumentHistory. Note that you need to call DocumentHistory.Unwrap() before calling this method if this DocumentHistory was returned from a transaction, and the transaction was committed or rolled back.
type DocumentHistoryClient ¶
type DocumentHistoryClient struct {
// contains filtered or unexported fields
}
DocumentHistoryClient is a client for the DocumentHistory schema.
func NewDocumentHistoryClient ¶
func NewDocumentHistoryClient(c config) *DocumentHistoryClient
NewDocumentHistoryClient returns a client for the DocumentHistory from the given config.
func (*DocumentHistoryClient) Create ¶
func (c *DocumentHistoryClient) Create() *DocumentHistoryCreate
Create returns a builder for creating a DocumentHistory entity.
func (*DocumentHistoryClient) CreateBulk ¶
func (c *DocumentHistoryClient) CreateBulk(builders ...*DocumentHistoryCreate) *DocumentHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of DocumentHistory entities.
func (*DocumentHistoryClient) Delete ¶
func (c *DocumentHistoryClient) Delete() *DocumentHistoryDelete
Delete returns a delete builder for DocumentHistory.
func (*DocumentHistoryClient) DeleteOne ¶
func (c *DocumentHistoryClient) DeleteOne(dh *DocumentHistory) *DocumentHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DocumentHistoryClient) DeleteOneID ¶
func (c *DocumentHistoryClient) DeleteOneID(id int) *DocumentHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DocumentHistoryClient) Get ¶
func (c *DocumentHistoryClient) Get(ctx context.Context, id int) (*DocumentHistory, error)
Get returns a DocumentHistory entity by its id.
func (*DocumentHistoryClient) GetX ¶
func (c *DocumentHistoryClient) GetX(ctx context.Context, id int) *DocumentHistory
GetX is like Get, but panics if an error occurs.
func (*DocumentHistoryClient) Hooks ¶
func (c *DocumentHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DocumentHistoryClient) Intercept ¶
func (c *DocumentHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `documenthistory.Intercept(f(g(h())))`.
func (*DocumentHistoryClient) Interceptors ¶
func (c *DocumentHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DocumentHistoryClient) Query ¶
func (c *DocumentHistoryClient) Query() *DocumentHistoryQuery
Query returns a query builder for DocumentHistory.
func (*DocumentHistoryClient) Update ¶
func (c *DocumentHistoryClient) Update() *DocumentHistoryUpdate
Update returns an update builder for DocumentHistory.
func (*DocumentHistoryClient) UpdateOne ¶
func (c *DocumentHistoryClient) UpdateOne(dh *DocumentHistory) *DocumentHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DocumentHistoryClient) UpdateOneID ¶
func (c *DocumentHistoryClient) UpdateOneID(id int) *DocumentHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DocumentHistoryClient) Use ¶
func (c *DocumentHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `documenthistory.Hooks(f(g(h())))`.
type DocumentHistoryCreate ¶
type DocumentHistoryCreate struct {
// contains filtered or unexported fields
}
DocumentHistoryCreate is the builder for creating a DocumentHistory entity.
func (*DocumentHistoryCreate) Exec ¶
func (dhc *DocumentHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentHistoryCreate) ExecX ¶
func (dhc *DocumentHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentHistoryCreate) Mutation ¶
func (dhc *DocumentHistoryCreate) Mutation() *DocumentHistoryMutation
Mutation returns the DocumentHistoryMutation object of the builder.
func (*DocumentHistoryCreate) Save ¶
func (dhc *DocumentHistoryCreate) Save(ctx context.Context) (*DocumentHistory, error)
Save creates the DocumentHistory in the database.
func (*DocumentHistoryCreate) SaveX ¶
func (dhc *DocumentHistoryCreate) SaveX(ctx context.Context) *DocumentHistory
SaveX calls Save and panics if Save returns an error.
func (*DocumentHistoryCreate) SetContent ¶
func (dhc *DocumentHistoryCreate) SetContent(s string) *DocumentHistoryCreate
SetContent sets the "content" field.
func (*DocumentHistoryCreate) SetContentHash ¶
func (dhc *DocumentHistoryCreate) SetContentHash(s string) *DocumentHistoryCreate
SetContentHash sets the "content_hash" field.
func (*DocumentHistoryCreate) SetCreatedAt ¶
func (dhc *DocumentHistoryCreate) SetCreatedAt(t time.Time) *DocumentHistoryCreate
SetCreatedAt sets the "created_at" field.
func (*DocumentHistoryCreate) SetDescription ¶
func (dhc *DocumentHistoryCreate) SetDescription(s string) *DocumentHistoryCreate
SetDescription sets the "description" field.
func (*DocumentHistoryCreate) SetFilename ¶
func (dhc *DocumentHistoryCreate) SetFilename(s string) *DocumentHistoryCreate
SetFilename sets the "filename" field.
func (*DocumentHistoryCreate) SetFiletype ¶
func (dhc *DocumentHistoryCreate) SetFiletype(t types.Filetype) *DocumentHistoryCreate
SetFiletype sets the "filetype" field.
func (*DocumentHistoryCreate) SetHistoryTime ¶
func (dhc *DocumentHistoryCreate) SetHistoryTime(t time.Time) *DocumentHistoryCreate
SetHistoryTime sets the "history_time" field.
func (*DocumentHistoryCreate) SetNillableContent ¶
func (dhc *DocumentHistoryCreate) SetNillableContent(s *string) *DocumentHistoryCreate
SetNillableContent sets the "content" field if the given value is not nil.
func (*DocumentHistoryCreate) SetNillableContentHash ¶
func (dhc *DocumentHistoryCreate) SetNillableContentHash(s *string) *DocumentHistoryCreate
SetNillableContentHash sets the "content_hash" field if the given value is not nil.
func (*DocumentHistoryCreate) SetNillableCreatedAt ¶
func (dhc *DocumentHistoryCreate) SetNillableCreatedAt(t *time.Time) *DocumentHistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DocumentHistoryCreate) SetNillableHistoryTime ¶
func (dhc *DocumentHistoryCreate) SetNillableHistoryTime(t *time.Time) *DocumentHistoryCreate
SetNillableHistoryTime sets the "history_time" field if the given value is not nil.
func (*DocumentHistoryCreate) SetNillableRef ¶
func (dhc *DocumentHistoryCreate) SetNillableRef(i *int) *DocumentHistoryCreate
SetNillableRef sets the "ref" field if the given value is not nil.
func (*DocumentHistoryCreate) SetNillableUUID ¶
func (dhc *DocumentHistoryCreate) SetNillableUUID(u *uuid.UUID) *DocumentHistoryCreate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentHistoryCreate) SetNillableUpdatedAt ¶
func (dhc *DocumentHistoryCreate) SetNillableUpdatedAt(t *time.Time) *DocumentHistoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DocumentHistoryCreate) SetNillableUpdatedBy ¶
func (dhc *DocumentHistoryCreate) SetNillableUpdatedBy(s *string) *DocumentHistoryCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*DocumentHistoryCreate) SetOperation ¶
func (dhc *DocumentHistoryCreate) SetOperation(et enthistory.OpType) *DocumentHistoryCreate
SetOperation sets the "operation" field.
func (*DocumentHistoryCreate) SetRef ¶
func (dhc *DocumentHistoryCreate) SetRef(i int) *DocumentHistoryCreate
SetRef sets the "ref" field.
func (*DocumentHistoryCreate) SetTitle ¶
func (dhc *DocumentHistoryCreate) SetTitle(s string) *DocumentHistoryCreate
SetTitle sets the "title" field.
func (*DocumentHistoryCreate) SetUUID ¶
func (dhc *DocumentHistoryCreate) SetUUID(u uuid.UUID) *DocumentHistoryCreate
SetUUID sets the "uuid" field.
func (*DocumentHistoryCreate) SetUpdatedAt ¶
func (dhc *DocumentHistoryCreate) SetUpdatedAt(t time.Time) *DocumentHistoryCreate
SetUpdatedAt sets the "updated_at" field.
func (*DocumentHistoryCreate) SetUpdatedBy ¶
func (dhc *DocumentHistoryCreate) SetUpdatedBy(s string) *DocumentHistoryCreate
SetUpdatedBy sets the "updated_by" field.
type DocumentHistoryCreateBulk ¶
type DocumentHistoryCreateBulk struct {
// contains filtered or unexported fields
}
DocumentHistoryCreateBulk is the builder for creating many DocumentHistory entities in bulk.
func (*DocumentHistoryCreateBulk) Exec ¶
func (dhcb *DocumentHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentHistoryCreateBulk) ExecX ¶
func (dhcb *DocumentHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentHistoryCreateBulk) Save ¶
func (dhcb *DocumentHistoryCreateBulk) Save(ctx context.Context) ([]*DocumentHistory, error)
Save creates the DocumentHistory entities in the database.
func (*DocumentHistoryCreateBulk) SaveX ¶
func (dhcb *DocumentHistoryCreateBulk) SaveX(ctx context.Context) []*DocumentHistory
SaveX is like Save, but panics if an error occurs.
type DocumentHistoryDelete ¶
type DocumentHistoryDelete struct {
// contains filtered or unexported fields
}
DocumentHistoryDelete is the builder for deleting a DocumentHistory entity.
func (*DocumentHistoryDelete) Exec ¶
func (dhd *DocumentHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DocumentHistoryDelete) ExecX ¶
func (dhd *DocumentHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DocumentHistoryDelete) Where ¶
func (dhd *DocumentHistoryDelete) Where(ps ...predicate.DocumentHistory) *DocumentHistoryDelete
Where appends a list predicates to the DocumentHistoryDelete builder.
type DocumentHistoryDeleteOne ¶
type DocumentHistoryDeleteOne struct {
// contains filtered or unexported fields
}
DocumentHistoryDeleteOne is the builder for deleting a single DocumentHistory entity.
func (*DocumentHistoryDeleteOne) Exec ¶
func (dhdo *DocumentHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DocumentHistoryDeleteOne) ExecX ¶
func (dhdo *DocumentHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentHistoryDeleteOne) Where ¶
func (dhdo *DocumentHistoryDeleteOne) Where(ps ...predicate.DocumentHistory) *DocumentHistoryDeleteOne
Where appends a list predicates to the DocumentHistoryDelete builder.
type DocumentHistoryGroupBy ¶
type DocumentHistoryGroupBy struct {
// contains filtered or unexported fields
}
DocumentHistoryGroupBy is the group-by builder for DocumentHistory entities.
func (*DocumentHistoryGroupBy) Aggregate ¶
func (dhgb *DocumentHistoryGroupBy) Aggregate(fns ...AggregateFunc) *DocumentHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DocumentHistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentHistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentHistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentHistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentHistoryGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DocumentHistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentHistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentHistoryGroupBy) Scan ¶
func (dhgb *DocumentHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentHistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentHistoryMutation ¶
type DocumentHistoryMutation struct {
// contains filtered or unexported fields
}
DocumentHistoryMutation represents an operation that mutates the DocumentHistory nodes in the graph.
func (*DocumentHistoryMutation) AddField ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) AddRef ¶
func (m *DocumentHistoryMutation) AddRef(i int)
AddRef adds i to the "ref" field.
func (*DocumentHistoryMutation) AddedEdges ¶
func (m *DocumentHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DocumentHistoryMutation) AddedField ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) AddedFields ¶
func (m *DocumentHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DocumentHistoryMutation) AddedIDs ¶
func (m *DocumentHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DocumentHistoryMutation) AddedRef ¶
func (m *DocumentHistoryMutation) AddedRef() (r int, exists bool)
AddedRef returns the value that was added to the "ref" field in this mutation.
func (*DocumentHistoryMutation) ClearContent ¶
func (m *DocumentHistoryMutation) ClearContent()
ClearContent clears the value of the "content" field.
func (*DocumentHistoryMutation) ClearContentHash ¶
func (m *DocumentHistoryMutation) ClearContentHash()
ClearContentHash clears the value of the "content_hash" field.
func (*DocumentHistoryMutation) ClearEdge ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) ClearField ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) ClearRef ¶
func (m *DocumentHistoryMutation) ClearRef()
ClearRef clears the value of the "ref" field.
func (*DocumentHistoryMutation) ClearUpdatedBy ¶
func (m *DocumentHistoryMutation) ClearUpdatedBy()
ClearUpdatedBy clears the value of the "updated_by" field.
func (*DocumentHistoryMutation) ClearedEdges ¶
func (m *DocumentHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DocumentHistoryMutation) ClearedFields ¶
func (m *DocumentHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DocumentHistoryMutation) Client ¶
func (m DocumentHistoryMutation) 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 (*DocumentHistoryMutation) Content ¶
func (m *DocumentHistoryMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*DocumentHistoryMutation) ContentCleared ¶
func (m *DocumentHistoryMutation) ContentCleared() bool
ContentCleared returns if the "content" field was cleared in this mutation.
func (*DocumentHistoryMutation) ContentHash ¶
func (m *DocumentHistoryMutation) ContentHash() (r string, exists bool)
ContentHash returns the value of the "content_hash" field in the mutation.
func (*DocumentHistoryMutation) ContentHashCleared ¶
func (m *DocumentHistoryMutation) ContentHashCleared() bool
ContentHashCleared returns if the "content_hash" field was cleared in this mutation.
func (*DocumentHistoryMutation) CreatedAt ¶
func (m *DocumentHistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DocumentHistoryMutation) Description ¶
func (m *DocumentHistoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*DocumentHistoryMutation) EdgeCleared ¶
func (m *DocumentHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DocumentHistoryMutation) Field ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) FieldCleared ¶
func (m *DocumentHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DocumentHistoryMutation) Fields ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) Filename ¶
func (m *DocumentHistoryMutation) Filename() (r string, exists bool)
Filename returns the value of the "filename" field in the mutation.
func (*DocumentHistoryMutation) Filetype ¶
func (m *DocumentHistoryMutation) Filetype() (r types.Filetype, exists bool)
Filetype returns the value of the "filetype" field in the mutation.
func (*DocumentHistoryMutation) HistoryTime ¶
func (m *DocumentHistoryMutation) HistoryTime() (r time.Time, exists bool)
HistoryTime returns the value of the "history_time" field in the mutation.
func (*DocumentHistoryMutation) ID ¶
func (m *DocumentHistoryMutation) 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 or after it was returned from the database.
func (*DocumentHistoryMutation) IDs ¶
func (m *DocumentHistoryMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DocumentHistoryMutation) OldContent ¶
func (m *DocumentHistoryMutation) OldContent(ctx context.Context) (v *string, err error)
OldContent returns the old "content" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldContentHash ¶
func (m *DocumentHistoryMutation) OldContentHash(ctx context.Context) (v string, err error)
OldContentHash returns the old "content_hash" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldDescription ¶
func (m *DocumentHistoryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) 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 (*DocumentHistoryMutation) OldFilename ¶
func (m *DocumentHistoryMutation) OldFilename(ctx context.Context) (v string, err error)
OldFilename returns the old "filename" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldFiletype ¶
OldFiletype returns the old "filetype" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldHistoryTime ¶
OldHistoryTime returns the old "history_time" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldOperation ¶
func (m *DocumentHistoryMutation) OldOperation(ctx context.Context) (v enthistory.OpType, err error)
OldOperation returns the old "operation" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldRef ¶
func (m *DocumentHistoryMutation) OldRef(ctx context.Context) (v int, err error)
OldRef returns the old "ref" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldTitle ¶
func (m *DocumentHistoryMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) OldUpdatedBy ¶
func (m *DocumentHistoryMutation) OldUpdatedBy(ctx context.Context) (v *string, err error)
OldUpdatedBy returns the old "updated_by" field's value of the DocumentHistory entity. If the DocumentHistory 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 (*DocumentHistoryMutation) Op ¶
func (m *DocumentHistoryMutation) Op() Op
Op returns the operation name.
func (*DocumentHistoryMutation) Operation ¶
func (m *DocumentHistoryMutation) Operation() (r enthistory.OpType, exists bool)
Operation returns the value of the "operation" field in the mutation.
func (*DocumentHistoryMutation) Ref ¶
func (m *DocumentHistoryMutation) Ref() (r int, exists bool)
Ref returns the value of the "ref" field in the mutation.
func (*DocumentHistoryMutation) RefCleared ¶
func (m *DocumentHistoryMutation) RefCleared() bool
RefCleared returns if the "ref" field was cleared in this mutation.
func (*DocumentHistoryMutation) RemovedEdges ¶
func (m *DocumentHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DocumentHistoryMutation) RemovedIDs ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) ResetContent ¶
func (m *DocumentHistoryMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*DocumentHistoryMutation) ResetContentHash ¶
func (m *DocumentHistoryMutation) ResetContentHash()
ResetContentHash resets all changes to the "content_hash" field.
func (*DocumentHistoryMutation) ResetCreatedAt ¶
func (m *DocumentHistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DocumentHistoryMutation) ResetDescription ¶
func (m *DocumentHistoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*DocumentHistoryMutation) ResetEdge ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) ResetField ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) ResetFilename ¶
func (m *DocumentHistoryMutation) ResetFilename()
ResetFilename resets all changes to the "filename" field.
func (*DocumentHistoryMutation) ResetFiletype ¶
func (m *DocumentHistoryMutation) ResetFiletype()
ResetFiletype resets all changes to the "filetype" field.
func (*DocumentHistoryMutation) ResetHistoryTime ¶
func (m *DocumentHistoryMutation) ResetHistoryTime()
ResetHistoryTime resets all changes to the "history_time" field.
func (*DocumentHistoryMutation) ResetOperation ¶
func (m *DocumentHistoryMutation) ResetOperation()
ResetOperation resets all changes to the "operation" field.
func (*DocumentHistoryMutation) ResetRef ¶
func (m *DocumentHistoryMutation) ResetRef()
ResetRef resets all changes to the "ref" field.
func (*DocumentHistoryMutation) ResetTitle ¶
func (m *DocumentHistoryMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*DocumentHistoryMutation) ResetUUID ¶
func (m *DocumentHistoryMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*DocumentHistoryMutation) ResetUpdatedAt ¶
func (m *DocumentHistoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DocumentHistoryMutation) ResetUpdatedBy ¶
func (m *DocumentHistoryMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*DocumentHistoryMutation) SetContent ¶
func (m *DocumentHistoryMutation) SetContent(s string)
SetContent sets the "content" field.
func (*DocumentHistoryMutation) SetContentHash ¶
func (m *DocumentHistoryMutation) SetContentHash(s string)
SetContentHash sets the "content_hash" field.
func (*DocumentHistoryMutation) SetCreatedAt ¶
func (m *DocumentHistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DocumentHistoryMutation) SetDescription ¶
func (m *DocumentHistoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*DocumentHistoryMutation) SetField ¶
func (m *DocumentHistoryMutation) 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 (*DocumentHistoryMutation) SetFilename ¶
func (m *DocumentHistoryMutation) SetFilename(s string)
SetFilename sets the "filename" field.
func (*DocumentHistoryMutation) SetFiletype ¶
func (m *DocumentHistoryMutation) SetFiletype(t types.Filetype)
SetFiletype sets the "filetype" field.
func (*DocumentHistoryMutation) SetHistoryTime ¶
func (m *DocumentHistoryMutation) SetHistoryTime(t time.Time)
SetHistoryTime sets the "history_time" field.
func (*DocumentHistoryMutation) SetOp ¶
func (m *DocumentHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DocumentHistoryMutation) SetOperation ¶
func (m *DocumentHistoryMutation) SetOperation(et enthistory.OpType)
SetOperation sets the "operation" field.
func (*DocumentHistoryMutation) SetRef ¶
func (m *DocumentHistoryMutation) SetRef(i int)
SetRef sets the "ref" field.
func (*DocumentHistoryMutation) SetTitle ¶
func (m *DocumentHistoryMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*DocumentHistoryMutation) SetUUID ¶
func (m *DocumentHistoryMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*DocumentHistoryMutation) SetUpdatedAt ¶
func (m *DocumentHistoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DocumentHistoryMutation) SetUpdatedBy ¶
func (m *DocumentHistoryMutation) SetUpdatedBy(s string)
SetUpdatedBy sets the "updated_by" field.
func (*DocumentHistoryMutation) Title ¶
func (m *DocumentHistoryMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (DocumentHistoryMutation) Tx ¶
func (m DocumentHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DocumentHistoryMutation) Type ¶
func (m *DocumentHistoryMutation) Type() string
Type returns the node type of this mutation (DocumentHistory).
func (*DocumentHistoryMutation) UUID ¶
func (m *DocumentHistoryMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*DocumentHistoryMutation) UpdatedAt ¶
func (m *DocumentHistoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DocumentHistoryMutation) UpdatedBy ¶
func (m *DocumentHistoryMutation) UpdatedBy() (r string, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*DocumentHistoryMutation) UpdatedByCleared ¶
func (m *DocumentHistoryMutation) UpdatedByCleared() bool
UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.
func (*DocumentHistoryMutation) Where ¶
func (m *DocumentHistoryMutation) Where(ps ...predicate.DocumentHistory)
Where appends a list predicates to the DocumentHistoryMutation builder.
func (*DocumentHistoryMutation) WhereP ¶
func (m *DocumentHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DocumentHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DocumentHistoryQuery ¶
type DocumentHistoryQuery struct {
// contains filtered or unexported fields
}
DocumentHistoryQuery is the builder for querying DocumentHistory entities.
func (*DocumentHistoryQuery) Aggregate ¶
func (dhq *DocumentHistoryQuery) Aggregate(fns ...AggregateFunc) *DocumentHistorySelect
Aggregate returns a DocumentHistorySelect configured with the given aggregations.
func (*DocumentHistoryQuery) All ¶
func (dhq *DocumentHistoryQuery) All(ctx context.Context) ([]*DocumentHistory, error)
All executes the query and returns a list of DocumentHistories.
func (*DocumentHistoryQuery) AllX ¶
func (dhq *DocumentHistoryQuery) AllX(ctx context.Context) []*DocumentHistory
AllX is like All, but panics if an error occurs.
func (*DocumentHistoryQuery) AsOf ¶
func (dhq *DocumentHistoryQuery) AsOf(ctx context.Context, time time.Time) (*DocumentHistory, error)
func (*DocumentHistoryQuery) Clone ¶
func (dhq *DocumentHistoryQuery) Clone() *DocumentHistoryQuery
Clone returns a duplicate of the DocumentHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DocumentHistoryQuery) Count ¶
func (dhq *DocumentHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DocumentHistoryQuery) CountX ¶
func (dhq *DocumentHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DocumentHistoryQuery) Earliest ¶
func (dhq *DocumentHistoryQuery) Earliest(ctx context.Context) (*DocumentHistory, error)
func (*DocumentHistoryQuery) Exist ¶
func (dhq *DocumentHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DocumentHistoryQuery) ExistX ¶
func (dhq *DocumentHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DocumentHistoryQuery) First ¶
func (dhq *DocumentHistoryQuery) First(ctx context.Context) (*DocumentHistory, error)
First returns the first DocumentHistory entity from the query. Returns a *NotFoundError when no DocumentHistory was found.
func (*DocumentHistoryQuery) FirstID ¶
func (dhq *DocumentHistoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DocumentHistory ID from the query. Returns a *NotFoundError when no DocumentHistory ID was found.
func (*DocumentHistoryQuery) FirstIDX ¶
func (dhq *DocumentHistoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DocumentHistoryQuery) FirstX ¶
func (dhq *DocumentHistoryQuery) FirstX(ctx context.Context) *DocumentHistory
FirstX is like First, but panics if an error occurs.
func (*DocumentHistoryQuery) GroupBy ¶
func (dhq *DocumentHistoryQuery) GroupBy(field string, fields ...string) *DocumentHistoryGroupBy
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 { HistoryTime time.Time `json:"history_time,omitempty"` Count int `json:"count,omitempty"` } client.DocumentHistory.Query(). GroupBy(documenthistory.FieldHistoryTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DocumentHistoryQuery) IDs ¶
func (dhq *DocumentHistoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of DocumentHistory IDs.
func (*DocumentHistoryQuery) IDsX ¶
func (dhq *DocumentHistoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DocumentHistoryQuery) Latest ¶
func (dhq *DocumentHistoryQuery) Latest(ctx context.Context) (*DocumentHistory, error)
func (*DocumentHistoryQuery) Limit ¶
func (dhq *DocumentHistoryQuery) Limit(limit int) *DocumentHistoryQuery
Limit the number of records to be returned by this query.
func (*DocumentHistoryQuery) Modify ¶
func (dhq *DocumentHistoryQuery) Modify(modifiers ...func(s *sql.Selector)) *DocumentHistorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DocumentHistoryQuery) Offset ¶
func (dhq *DocumentHistoryQuery) Offset(offset int) *DocumentHistoryQuery
Offset to start from.
func (*DocumentHistoryQuery) Only ¶
func (dhq *DocumentHistoryQuery) Only(ctx context.Context) (*DocumentHistory, error)
Only returns a single DocumentHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DocumentHistory entity is found. Returns a *NotFoundError when no DocumentHistory entities are found.
func (*DocumentHistoryQuery) OnlyID ¶
func (dhq *DocumentHistoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DocumentHistory ID in the query. Returns a *NotSingularError when more than one DocumentHistory ID is found. Returns a *NotFoundError when no entities are found.
func (*DocumentHistoryQuery) OnlyIDX ¶
func (dhq *DocumentHistoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DocumentHistoryQuery) OnlyX ¶
func (dhq *DocumentHistoryQuery) OnlyX(ctx context.Context) *DocumentHistory
OnlyX is like Only, but panics if an error occurs.
func (*DocumentHistoryQuery) Order ¶
func (dhq *DocumentHistoryQuery) Order(o ...OrderFunc) *DocumentHistoryQuery
Order specifies how the records should be ordered.
func (*DocumentHistoryQuery) Select ¶
func (dhq *DocumentHistoryQuery) Select(fields ...string) *DocumentHistorySelect
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 { HistoryTime time.Time `json:"history_time,omitempty"` } client.DocumentHistory.Query(). Select(documenthistory.FieldHistoryTime). Scan(ctx, &v)
func (*DocumentHistoryQuery) Unique ¶
func (dhq *DocumentHistoryQuery) Unique(unique bool) *DocumentHistoryQuery
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 (*DocumentHistoryQuery) Where ¶
func (dhq *DocumentHistoryQuery) Where(ps ...predicate.DocumentHistory) *DocumentHistoryQuery
Where adds a new predicate for the DocumentHistoryQuery builder.
type DocumentHistorySelect ¶
type DocumentHistorySelect struct { *DocumentHistoryQuery // contains filtered or unexported fields }
DocumentHistorySelect is the builder for selecting fields of DocumentHistory entities.
func (*DocumentHistorySelect) Aggregate ¶
func (dhs *DocumentHistorySelect) Aggregate(fns ...AggregateFunc) *DocumentHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*DocumentHistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentHistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentHistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentHistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentHistorySelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DocumentHistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentHistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentHistorySelect) Modify ¶
func (dhs *DocumentHistorySelect) Modify(modifiers ...func(s *sql.Selector)) *DocumentHistorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DocumentHistorySelect) Scan ¶
func (dhs *DocumentHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentHistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentHistoryUpdate ¶
type DocumentHistoryUpdate struct {
// contains filtered or unexported fields
}
DocumentHistoryUpdate is the builder for updating DocumentHistory entities.
func (*DocumentHistoryUpdate) ClearContent ¶
func (dhu *DocumentHistoryUpdate) ClearContent() *DocumentHistoryUpdate
ClearContent clears the value of the "content" field.
func (*DocumentHistoryUpdate) ClearContentHash ¶
func (dhu *DocumentHistoryUpdate) ClearContentHash() *DocumentHistoryUpdate
ClearContentHash clears the value of the "content_hash" field.
func (*DocumentHistoryUpdate) Exec ¶
func (dhu *DocumentHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentHistoryUpdate) ExecX ¶
func (dhu *DocumentHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentHistoryUpdate) Modify ¶
func (dhu *DocumentHistoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentHistoryUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DocumentHistoryUpdate) Mutation ¶
func (dhu *DocumentHistoryUpdate) Mutation() *DocumentHistoryMutation
Mutation returns the DocumentHistoryMutation object of the builder.
func (*DocumentHistoryUpdate) Save ¶
func (dhu *DocumentHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DocumentHistoryUpdate) SaveX ¶
func (dhu *DocumentHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DocumentHistoryUpdate) SetContent ¶
func (dhu *DocumentHistoryUpdate) SetContent(s string) *DocumentHistoryUpdate
SetContent sets the "content" field.
func (*DocumentHistoryUpdate) SetContentHash ¶
func (dhu *DocumentHistoryUpdate) SetContentHash(s string) *DocumentHistoryUpdate
SetContentHash sets the "content_hash" field.
func (*DocumentHistoryUpdate) SetDescription ¶
func (dhu *DocumentHistoryUpdate) SetDescription(s string) *DocumentHistoryUpdate
SetDescription sets the "description" field.
func (*DocumentHistoryUpdate) SetFilename ¶
func (dhu *DocumentHistoryUpdate) SetFilename(s string) *DocumentHistoryUpdate
SetFilename sets the "filename" field.
func (*DocumentHistoryUpdate) SetFiletype ¶
func (dhu *DocumentHistoryUpdate) SetFiletype(t types.Filetype) *DocumentHistoryUpdate
SetFiletype sets the "filetype" field.
func (*DocumentHistoryUpdate) SetNillableContent ¶
func (dhu *DocumentHistoryUpdate) SetNillableContent(s *string) *DocumentHistoryUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*DocumentHistoryUpdate) SetNillableContentHash ¶
func (dhu *DocumentHistoryUpdate) SetNillableContentHash(s *string) *DocumentHistoryUpdate
SetNillableContentHash sets the "content_hash" field if the given value is not nil.
func (*DocumentHistoryUpdate) SetNillableUUID ¶
func (dhu *DocumentHistoryUpdate) SetNillableUUID(u *uuid.UUID) *DocumentHistoryUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentHistoryUpdate) SetTitle ¶
func (dhu *DocumentHistoryUpdate) SetTitle(s string) *DocumentHistoryUpdate
SetTitle sets the "title" field.
func (*DocumentHistoryUpdate) SetUUID ¶
func (dhu *DocumentHistoryUpdate) SetUUID(u uuid.UUID) *DocumentHistoryUpdate
SetUUID sets the "uuid" field.
func (*DocumentHistoryUpdate) SetUpdatedAt ¶
func (dhu *DocumentHistoryUpdate) SetUpdatedAt(t time.Time) *DocumentHistoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DocumentHistoryUpdate) Where ¶
func (dhu *DocumentHistoryUpdate) Where(ps ...predicate.DocumentHistory) *DocumentHistoryUpdate
Where appends a list predicates to the DocumentHistoryUpdate builder.
type DocumentHistoryUpdateOne ¶
type DocumentHistoryUpdateOne struct {
// contains filtered or unexported fields
}
DocumentHistoryUpdateOne is the builder for updating a single DocumentHistory entity.
func (*DocumentHistoryUpdateOne) ClearContent ¶
func (dhuo *DocumentHistoryUpdateOne) ClearContent() *DocumentHistoryUpdateOne
ClearContent clears the value of the "content" field.
func (*DocumentHistoryUpdateOne) ClearContentHash ¶
func (dhuo *DocumentHistoryUpdateOne) ClearContentHash() *DocumentHistoryUpdateOne
ClearContentHash clears the value of the "content_hash" field.
func (*DocumentHistoryUpdateOne) Exec ¶
func (dhuo *DocumentHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DocumentHistoryUpdateOne) ExecX ¶
func (dhuo *DocumentHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentHistoryUpdateOne) Modify ¶
func (dhuo *DocumentHistoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentHistoryUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DocumentHistoryUpdateOne) Mutation ¶
func (dhuo *DocumentHistoryUpdateOne) Mutation() *DocumentHistoryMutation
Mutation returns the DocumentHistoryMutation object of the builder.
func (*DocumentHistoryUpdateOne) Save ¶
func (dhuo *DocumentHistoryUpdateOne) Save(ctx context.Context) (*DocumentHistory, error)
Save executes the query and returns the updated DocumentHistory entity.
func (*DocumentHistoryUpdateOne) SaveX ¶
func (dhuo *DocumentHistoryUpdateOne) SaveX(ctx context.Context) *DocumentHistory
SaveX is like Save, but panics if an error occurs.
func (*DocumentHistoryUpdateOne) Select ¶
func (dhuo *DocumentHistoryUpdateOne) Select(field string, fields ...string) *DocumentHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DocumentHistoryUpdateOne) SetContent ¶
func (dhuo *DocumentHistoryUpdateOne) SetContent(s string) *DocumentHistoryUpdateOne
SetContent sets the "content" field.
func (*DocumentHistoryUpdateOne) SetContentHash ¶
func (dhuo *DocumentHistoryUpdateOne) SetContentHash(s string) *DocumentHistoryUpdateOne
SetContentHash sets the "content_hash" field.
func (*DocumentHistoryUpdateOne) SetDescription ¶
func (dhuo *DocumentHistoryUpdateOne) SetDescription(s string) *DocumentHistoryUpdateOne
SetDescription sets the "description" field.
func (*DocumentHistoryUpdateOne) SetFilename ¶
func (dhuo *DocumentHistoryUpdateOne) SetFilename(s string) *DocumentHistoryUpdateOne
SetFilename sets the "filename" field.
func (*DocumentHistoryUpdateOne) SetFiletype ¶
func (dhuo *DocumentHistoryUpdateOne) SetFiletype(t types.Filetype) *DocumentHistoryUpdateOne
SetFiletype sets the "filetype" field.
func (*DocumentHistoryUpdateOne) SetNillableContent ¶
func (dhuo *DocumentHistoryUpdateOne) SetNillableContent(s *string) *DocumentHistoryUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*DocumentHistoryUpdateOne) SetNillableContentHash ¶
func (dhuo *DocumentHistoryUpdateOne) SetNillableContentHash(s *string) *DocumentHistoryUpdateOne
SetNillableContentHash sets the "content_hash" field if the given value is not nil.
func (*DocumentHistoryUpdateOne) SetNillableUUID ¶
func (dhuo *DocumentHistoryUpdateOne) SetNillableUUID(u *uuid.UUID) *DocumentHistoryUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentHistoryUpdateOne) SetTitle ¶
func (dhuo *DocumentHistoryUpdateOne) SetTitle(s string) *DocumentHistoryUpdateOne
SetTitle sets the "title" field.
func (*DocumentHistoryUpdateOne) SetUUID ¶
func (dhuo *DocumentHistoryUpdateOne) SetUUID(u uuid.UUID) *DocumentHistoryUpdateOne
SetUUID sets the "uuid" field.
func (*DocumentHistoryUpdateOne) SetUpdatedAt ¶
func (dhuo *DocumentHistoryUpdateOne) SetUpdatedAt(t time.Time) *DocumentHistoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DocumentHistoryUpdateOne) Where ¶
func (dhuo *DocumentHistoryUpdateOne) Where(ps ...predicate.DocumentHistory) *DocumentHistoryUpdateOne
Where appends a list predicates to the DocumentHistoryUpdate builder.
type DocumentMutation ¶
type DocumentMutation struct {
// contains filtered or unexported fields
}
DocumentMutation represents an operation that mutates the Document nodes in the graph.
func (*DocumentMutation) AddField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) AddedEdges ¶
func (m *DocumentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DocumentMutation) AddedField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) AddedFields ¶
func (m *DocumentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DocumentMutation) AddedIDs ¶
func (m *DocumentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DocumentMutation) ClearContent ¶
func (m *DocumentMutation) ClearContent()
ClearContent clears the value of the "content" field.
func (*DocumentMutation) ClearContentHash ¶
func (m *DocumentMutation) ClearContentHash()
ClearContentHash clears the value of the "content_hash" field.
func (*DocumentMutation) ClearEdge ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ClearField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ClearSearch ¶
func (m *DocumentMutation) ClearSearch()
ClearSearch clears the "search" edge to the DocumentSearch entity.
func (*DocumentMutation) ClearUser ¶
func (m *DocumentMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*DocumentMutation) ClearedEdges ¶
func (m *DocumentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DocumentMutation) ClearedFields ¶
func (m *DocumentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DocumentMutation) Client ¶
func (m DocumentMutation) 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 (*DocumentMutation) Content ¶
func (m *DocumentMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*DocumentMutation) ContentCleared ¶
func (m *DocumentMutation) ContentCleared() bool
ContentCleared returns if the "content" field was cleared in this mutation.
func (*DocumentMutation) ContentHash ¶
func (m *DocumentMutation) ContentHash() (r string, exists bool)
ContentHash returns the value of the "content_hash" field in the mutation.
func (*DocumentMutation) ContentHashCleared ¶
func (m *DocumentMutation) ContentHashCleared() bool
ContentHashCleared returns if the "content_hash" field was cleared in this mutation.
func (*DocumentMutation) CreateHistoryFromCreate ¶
func (m *DocumentMutation) CreateHistoryFromCreate(ctx context.Context) error
func (*DocumentMutation) CreateHistoryFromDelete ¶
func (m *DocumentMutation) CreateHistoryFromDelete(ctx context.Context) error
func (*DocumentMutation) CreateHistoryFromUpdate ¶
func (m *DocumentMutation) CreateHistoryFromUpdate(ctx context.Context) error
func (*DocumentMutation) CreatedAt ¶
func (m *DocumentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DocumentMutation) Description ¶
func (m *DocumentMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*DocumentMutation) EdgeCleared ¶
func (m *DocumentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DocumentMutation) Field ¶
func (m *DocumentMutation) 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 (*DocumentMutation) FieldCleared ¶
func (m *DocumentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DocumentMutation) Fields ¶
func (m *DocumentMutation) 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 (*DocumentMutation) Filename ¶
func (m *DocumentMutation) Filename() (r string, exists bool)
Filename returns the value of the "filename" field in the mutation.
func (*DocumentMutation) Filetype ¶
func (m *DocumentMutation) Filetype() (r types.Filetype, exists bool)
Filetype returns the value of the "filetype" field in the mutation.
func (*DocumentMutation) ID ¶
func (m *DocumentMutation) 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 or after it was returned from the database.
func (*DocumentMutation) IDs ¶
func (m *DocumentMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DocumentMutation) OldContent ¶
func (m *DocumentMutation) OldContent(ctx context.Context) (v *string, err error)
OldContent returns the old "content" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldContentHash ¶
func (m *DocumentMutation) OldContentHash(ctx context.Context) (v string, err error)
OldContentHash returns the old "content_hash" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldDescription ¶
func (m *DocumentMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Document entity. If the Document 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 (*DocumentMutation) 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 (*DocumentMutation) OldFilename ¶
func (m *DocumentMutation) OldFilename(ctx context.Context) (v string, err error)
OldFilename returns the old "filename" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldFiletype ¶
OldFiletype returns the old "filetype" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldTitle ¶
func (m *DocumentMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Document entity. If the Document 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 (*DocumentMutation) RemovedEdges ¶
func (m *DocumentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DocumentMutation) RemovedIDs ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ResetContent ¶
func (m *DocumentMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*DocumentMutation) ResetContentHash ¶
func (m *DocumentMutation) ResetContentHash()
ResetContentHash resets all changes to the "content_hash" field.
func (*DocumentMutation) ResetCreatedAt ¶
func (m *DocumentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DocumentMutation) ResetDescription ¶
func (m *DocumentMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*DocumentMutation) ResetEdge ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ResetField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ResetFilename ¶
func (m *DocumentMutation) ResetFilename()
ResetFilename resets all changes to the "filename" field.
func (*DocumentMutation) ResetFiletype ¶
func (m *DocumentMutation) ResetFiletype()
ResetFiletype resets all changes to the "filetype" field.
func (*DocumentMutation) ResetSearch ¶
func (m *DocumentMutation) ResetSearch()
ResetSearch resets all changes to the "search" edge.
func (*DocumentMutation) ResetTitle ¶
func (m *DocumentMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*DocumentMutation) ResetUUID ¶
func (m *DocumentMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*DocumentMutation) ResetUpdatedAt ¶
func (m *DocumentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DocumentMutation) ResetUser ¶
func (m *DocumentMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*DocumentMutation) SearchCleared ¶
func (m *DocumentMutation) SearchCleared() bool
SearchCleared reports if the "search" edge to the DocumentSearch entity was cleared.
func (*DocumentMutation) SearchID ¶
func (m *DocumentMutation) SearchID() (id int, exists bool)
SearchID returns the "search" edge ID in the mutation.
func (*DocumentMutation) SearchIDs ¶
func (m *DocumentMutation) SearchIDs() (ids []int)
SearchIDs returns the "search" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SearchID instead. It exists only for internal usage by the builders.
func (*DocumentMutation) SetContent ¶
func (m *DocumentMutation) SetContent(s string)
SetContent sets the "content" field.
func (*DocumentMutation) SetContentHash ¶
func (m *DocumentMutation) SetContentHash(s string)
SetContentHash sets the "content_hash" field.
func (*DocumentMutation) SetCreatedAt ¶
func (m *DocumentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DocumentMutation) SetDescription ¶
func (m *DocumentMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*DocumentMutation) SetField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) SetFilename ¶
func (m *DocumentMutation) SetFilename(s string)
SetFilename sets the "filename" field.
func (*DocumentMutation) SetFiletype ¶
func (m *DocumentMutation) SetFiletype(t types.Filetype)
SetFiletype sets the "filetype" field.
func (*DocumentMutation) SetOp ¶
func (m *DocumentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DocumentMutation) SetSearchID ¶
func (m *DocumentMutation) SetSearchID(id int)
SetSearchID sets the "search" edge to the DocumentSearch entity by id.
func (*DocumentMutation) SetTitle ¶
func (m *DocumentMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*DocumentMutation) SetUUID ¶
func (m *DocumentMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*DocumentMutation) SetUpdatedAt ¶
func (m *DocumentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DocumentMutation) SetUserID ¶
func (m *DocumentMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*DocumentMutation) Title ¶
func (m *DocumentMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (DocumentMutation) Tx ¶
func (m DocumentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DocumentMutation) Type ¶
func (m *DocumentMutation) Type() string
Type returns the node type of this mutation (Document).
func (*DocumentMutation) UUID ¶
func (m *DocumentMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*DocumentMutation) UpdatedAt ¶
func (m *DocumentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DocumentMutation) UserCleared ¶
func (m *DocumentMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*DocumentMutation) UserID ¶
func (m *DocumentMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*DocumentMutation) UserIDs ¶
func (m *DocumentMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*DocumentMutation) Where ¶
func (m *DocumentMutation) Where(ps ...predicate.Document)
Where appends a list predicates to the DocumentMutation builder.
func (*DocumentMutation) WhereP ¶
func (m *DocumentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DocumentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DocumentQuery ¶
type DocumentQuery struct {
// contains filtered or unexported fields
}
DocumentQuery is the builder for querying Document entities.
func (*DocumentQuery) Aggregate ¶
func (dq *DocumentQuery) Aggregate(fns ...AggregateFunc) *DocumentSelect
Aggregate returns a DocumentSelect configured with the given aggregations.
func (*DocumentQuery) All ¶
func (dq *DocumentQuery) All(ctx context.Context) ([]*Document, error)
All executes the query and returns a list of Documents.
func (*DocumentQuery) AllX ¶
func (dq *DocumentQuery) AllX(ctx context.Context) []*Document
AllX is like All, but panics if an error occurs.
func (*DocumentQuery) Clone ¶
func (dq *DocumentQuery) Clone() *DocumentQuery
Clone returns a duplicate of the DocumentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DocumentQuery) Count ¶
func (dq *DocumentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DocumentQuery) CountX ¶
func (dq *DocumentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DocumentQuery) Exist ¶
func (dq *DocumentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DocumentQuery) ExistX ¶
func (dq *DocumentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DocumentQuery) First ¶
func (dq *DocumentQuery) First(ctx context.Context) (*Document, error)
First returns the first Document entity from the query. Returns a *NotFoundError when no Document was found.
func (*DocumentQuery) FirstID ¶
func (dq *DocumentQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Document ID from the query. Returns a *NotFoundError when no Document ID was found.
func (*DocumentQuery) FirstIDX ¶
func (dq *DocumentQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DocumentQuery) FirstX ¶
func (dq *DocumentQuery) FirstX(ctx context.Context) *Document
FirstX is like First, but panics if an error occurs.
func (*DocumentQuery) GroupBy ¶
func (dq *DocumentQuery) GroupBy(field string, fields ...string) *DocumentGroupBy
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 { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.Document.Query(). GroupBy(document.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DocumentQuery) IDs ¶
func (dq *DocumentQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Document IDs.
func (*DocumentQuery) IDsX ¶
func (dq *DocumentQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DocumentQuery) Limit ¶
func (dq *DocumentQuery) Limit(limit int) *DocumentQuery
Limit the number of records to be returned by this query.
func (*DocumentQuery) Modify ¶
func (dq *DocumentQuery) Modify(modifiers ...func(s *sql.Selector)) *DocumentSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DocumentQuery) Offset ¶
func (dq *DocumentQuery) Offset(offset int) *DocumentQuery
Offset to start from.
func (*DocumentQuery) Only ¶
func (dq *DocumentQuery) Only(ctx context.Context) (*Document, error)
Only returns a single Document entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Document entity is found. Returns a *NotFoundError when no Document entities are found.
func (*DocumentQuery) OnlyID ¶
func (dq *DocumentQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Document ID in the query. Returns a *NotSingularError when more than one Document ID is found. Returns a *NotFoundError when no entities are found.
func (*DocumentQuery) OnlyIDX ¶
func (dq *DocumentQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DocumentQuery) OnlyX ¶
func (dq *DocumentQuery) OnlyX(ctx context.Context) *Document
OnlyX is like Only, but panics if an error occurs.
func (*DocumentQuery) Order ¶
func (dq *DocumentQuery) Order(o ...OrderFunc) *DocumentQuery
Order specifies how the records should be ordered.
func (*DocumentQuery) QuerySearch ¶
func (dq *DocumentQuery) QuerySearch() *DocumentSearchQuery
QuerySearch chains the current query on the "search" edge.
func (*DocumentQuery) QueryUser ¶
func (dq *DocumentQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*DocumentQuery) Select ¶
func (dq *DocumentQuery) Select(fields ...string) *DocumentSelect
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 { UUID uuid.UUID `json:"uuid,omitempty"` } client.Document.Query(). Select(document.FieldUUID). Scan(ctx, &v)
func (*DocumentQuery) Unique ¶
func (dq *DocumentQuery) Unique(unique bool) *DocumentQuery
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 (*DocumentQuery) Where ¶
func (dq *DocumentQuery) Where(ps ...predicate.Document) *DocumentQuery
Where adds a new predicate for the DocumentQuery builder.
func (*DocumentQuery) WithSearch ¶
func (dq *DocumentQuery) WithSearch(opts ...func(*DocumentSearchQuery)) *DocumentQuery
WithSearch tells the query-builder to eager-load the nodes that are connected to the "search" edge. The optional arguments are used to configure the query builder of the edge.
func (*DocumentQuery) WithUser ¶
func (dq *DocumentQuery) WithUser(opts ...func(*UserQuery)) *DocumentQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type DocumentSearch ¶
type DocumentSearch struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DocumentID holds the value of the "document_id" field. DocumentID int `json:"document_id,omitempty"` // Ts holds the value of the "ts" field. Ts *types.TsVector `json:"ts,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DocumentSearchQuery when eager-loading is set. Edges DocumentSearchEdges `json:"edges"` // contains filtered or unexported fields }
DocumentSearch is the model entity for the DocumentSearch schema.
func (*DocumentSearch) QueryDocument ¶
func (ds *DocumentSearch) QueryDocument() *DocumentQuery
QueryDocument queries the "document" edge of the DocumentSearch entity.
func (*DocumentSearch) String ¶
func (ds *DocumentSearch) String() string
String implements the fmt.Stringer.
func (*DocumentSearch) Unwrap ¶
func (ds *DocumentSearch) Unwrap() *DocumentSearch
Unwrap unwraps the DocumentSearch 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 (*DocumentSearch) Update ¶
func (ds *DocumentSearch) Update() *DocumentSearchUpdateOne
Update returns a builder for updating this DocumentSearch. Note that you need to call DocumentSearch.Unwrap() before calling this method if this DocumentSearch was returned from a transaction, and the transaction was committed or rolled back.
type DocumentSearchClient ¶
type DocumentSearchClient struct {
// contains filtered or unexported fields
}
DocumentSearchClient is a client for the DocumentSearch schema.
func NewDocumentSearchClient ¶
func NewDocumentSearchClient(c config) *DocumentSearchClient
NewDocumentSearchClient returns a client for the DocumentSearch from the given config.
func (*DocumentSearchClient) Create ¶
func (c *DocumentSearchClient) Create() *DocumentSearchCreate
Create returns a builder for creating a DocumentSearch entity.
func (*DocumentSearchClient) CreateBulk ¶
func (c *DocumentSearchClient) CreateBulk(builders ...*DocumentSearchCreate) *DocumentSearchCreateBulk
CreateBulk returns a builder for creating a bulk of DocumentSearch entities.
func (*DocumentSearchClient) Delete ¶
func (c *DocumentSearchClient) Delete() *DocumentSearchDelete
Delete returns a delete builder for DocumentSearch.
func (*DocumentSearchClient) DeleteOne ¶
func (c *DocumentSearchClient) DeleteOne(ds *DocumentSearch) *DocumentSearchDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DocumentSearchClient) DeleteOneID ¶
func (c *DocumentSearchClient) DeleteOneID(id int) *DocumentSearchDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DocumentSearchClient) Get ¶
func (c *DocumentSearchClient) Get(ctx context.Context, id int) (*DocumentSearch, error)
Get returns a DocumentSearch entity by its id.
func (*DocumentSearchClient) GetX ¶
func (c *DocumentSearchClient) GetX(ctx context.Context, id int) *DocumentSearch
GetX is like Get, but panics if an error occurs.
func (*DocumentSearchClient) Hooks ¶
func (c *DocumentSearchClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DocumentSearchClient) Intercept ¶
func (c *DocumentSearchClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `documentsearch.Intercept(f(g(h())))`.
func (*DocumentSearchClient) Interceptors ¶
func (c *DocumentSearchClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DocumentSearchClient) Query ¶
func (c *DocumentSearchClient) Query() *DocumentSearchQuery
Query returns a query builder for DocumentSearch.
func (*DocumentSearchClient) QueryDocument ¶
func (c *DocumentSearchClient) QueryDocument(ds *DocumentSearch) *DocumentQuery
QueryDocument queries the document edge of a DocumentSearch.
func (*DocumentSearchClient) Update ¶
func (c *DocumentSearchClient) Update() *DocumentSearchUpdate
Update returns an update builder for DocumentSearch.
func (*DocumentSearchClient) UpdateOne ¶
func (c *DocumentSearchClient) UpdateOne(ds *DocumentSearch) *DocumentSearchUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DocumentSearchClient) UpdateOneID ¶
func (c *DocumentSearchClient) UpdateOneID(id int) *DocumentSearchUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DocumentSearchClient) Use ¶
func (c *DocumentSearchClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `documentsearch.Hooks(f(g(h())))`.
type DocumentSearchCreate ¶
type DocumentSearchCreate struct {
// contains filtered or unexported fields
}
DocumentSearchCreate is the builder for creating a DocumentSearch entity.
func (*DocumentSearchCreate) Exec ¶
func (dsc *DocumentSearchCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentSearchCreate) ExecX ¶
func (dsc *DocumentSearchCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentSearchCreate) Mutation ¶
func (dsc *DocumentSearchCreate) Mutation() *DocumentSearchMutation
Mutation returns the DocumentSearchMutation object of the builder.
func (*DocumentSearchCreate) Save ¶
func (dsc *DocumentSearchCreate) Save(ctx context.Context) (*DocumentSearch, error)
Save creates the DocumentSearch in the database.
func (*DocumentSearchCreate) SaveX ¶
func (dsc *DocumentSearchCreate) SaveX(ctx context.Context) *DocumentSearch
SaveX calls Save and panics if Save returns an error.
func (*DocumentSearchCreate) SetCreatedAt ¶
func (dsc *DocumentSearchCreate) SetCreatedAt(t time.Time) *DocumentSearchCreate
SetCreatedAt sets the "created_at" field.
func (*DocumentSearchCreate) SetDocument ¶
func (dsc *DocumentSearchCreate) SetDocument(d *Document) *DocumentSearchCreate
SetDocument sets the "document" edge to the Document entity.
func (*DocumentSearchCreate) SetDocumentID ¶
func (dsc *DocumentSearchCreate) SetDocumentID(i int) *DocumentSearchCreate
SetDocumentID sets the "document_id" field.
func (*DocumentSearchCreate) SetNillableCreatedAt ¶
func (dsc *DocumentSearchCreate) SetNillableCreatedAt(t *time.Time) *DocumentSearchCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DocumentSearchCreate) SetNillableUUID ¶
func (dsc *DocumentSearchCreate) SetNillableUUID(u *uuid.UUID) *DocumentSearchCreate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentSearchCreate) SetNillableUpdatedAt ¶
func (dsc *DocumentSearchCreate) SetNillableUpdatedAt(t *time.Time) *DocumentSearchCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DocumentSearchCreate) SetTs ¶
func (dsc *DocumentSearchCreate) SetTs(tv *types.TsVector) *DocumentSearchCreate
SetTs sets the "ts" field.
func (*DocumentSearchCreate) SetUUID ¶
func (dsc *DocumentSearchCreate) SetUUID(u uuid.UUID) *DocumentSearchCreate
SetUUID sets the "uuid" field.
func (*DocumentSearchCreate) SetUpdatedAt ¶
func (dsc *DocumentSearchCreate) SetUpdatedAt(t time.Time) *DocumentSearchCreate
SetUpdatedAt sets the "updated_at" field.
type DocumentSearchCreateBulk ¶
type DocumentSearchCreateBulk struct {
// contains filtered or unexported fields
}
DocumentSearchCreateBulk is the builder for creating many DocumentSearch entities in bulk.
func (*DocumentSearchCreateBulk) Exec ¶
func (dscb *DocumentSearchCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentSearchCreateBulk) ExecX ¶
func (dscb *DocumentSearchCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentSearchCreateBulk) Save ¶
func (dscb *DocumentSearchCreateBulk) Save(ctx context.Context) ([]*DocumentSearch, error)
Save creates the DocumentSearch entities in the database.
func (*DocumentSearchCreateBulk) SaveX ¶
func (dscb *DocumentSearchCreateBulk) SaveX(ctx context.Context) []*DocumentSearch
SaveX is like Save, but panics if an error occurs.
type DocumentSearchDelete ¶
type DocumentSearchDelete struct {
// contains filtered or unexported fields
}
DocumentSearchDelete is the builder for deleting a DocumentSearch entity.
func (*DocumentSearchDelete) Exec ¶
func (dsd *DocumentSearchDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DocumentSearchDelete) ExecX ¶
func (dsd *DocumentSearchDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DocumentSearchDelete) Where ¶
func (dsd *DocumentSearchDelete) Where(ps ...predicate.DocumentSearch) *DocumentSearchDelete
Where appends a list predicates to the DocumentSearchDelete builder.
type DocumentSearchDeleteOne ¶
type DocumentSearchDeleteOne struct {
// contains filtered or unexported fields
}
DocumentSearchDeleteOne is the builder for deleting a single DocumentSearch entity.
func (*DocumentSearchDeleteOne) Exec ¶
func (dsdo *DocumentSearchDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DocumentSearchDeleteOne) ExecX ¶
func (dsdo *DocumentSearchDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentSearchDeleteOne) Where ¶
func (dsdo *DocumentSearchDeleteOne) Where(ps ...predicate.DocumentSearch) *DocumentSearchDeleteOne
Where appends a list predicates to the DocumentSearchDelete builder.
type DocumentSearchEdges ¶
type DocumentSearchEdges struct { // Document holds the value of the document edge. Document *Document `json:"document,omitempty"` // contains filtered or unexported fields }
DocumentSearchEdges holds the relations/edges for other nodes in the graph.
func (DocumentSearchEdges) DocumentOrErr ¶
func (e DocumentSearchEdges) DocumentOrErr() (*Document, error)
DocumentOrErr returns the Document value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DocumentSearchGroupBy ¶
type DocumentSearchGroupBy struct {
// contains filtered or unexported fields
}
DocumentSearchGroupBy is the group-by builder for DocumentSearch entities.
func (*DocumentSearchGroupBy) Aggregate ¶
func (dsgb *DocumentSearchGroupBy) Aggregate(fns ...AggregateFunc) *DocumentSearchGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DocumentSearchGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentSearchGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentSearchGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentSearchGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentSearchGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DocumentSearchGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentSearchGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentSearchGroupBy) Scan ¶
func (dsgb *DocumentSearchGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentSearchGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentSearchMutation ¶
type DocumentSearchMutation struct {
// contains filtered or unexported fields
}
DocumentSearchMutation represents an operation that mutates the DocumentSearch nodes in the graph.
func (*DocumentSearchMutation) AddField ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) AddedEdges ¶
func (m *DocumentSearchMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DocumentSearchMutation) AddedField ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) AddedFields ¶
func (m *DocumentSearchMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DocumentSearchMutation) AddedIDs ¶
func (m *DocumentSearchMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DocumentSearchMutation) ClearDocument ¶
func (m *DocumentSearchMutation) ClearDocument()
ClearDocument clears the "document" edge to the Document entity.
func (*DocumentSearchMutation) ClearEdge ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) ClearField ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) ClearedEdges ¶
func (m *DocumentSearchMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DocumentSearchMutation) ClearedFields ¶
func (m *DocumentSearchMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DocumentSearchMutation) Client ¶
func (m DocumentSearchMutation) 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 (*DocumentSearchMutation) CreatedAt ¶
func (m *DocumentSearchMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DocumentSearchMutation) DocumentCleared ¶
func (m *DocumentSearchMutation) DocumentCleared() bool
DocumentCleared reports if the "document" edge to the Document entity was cleared.
func (*DocumentSearchMutation) DocumentID ¶
func (m *DocumentSearchMutation) DocumentID() (r int, exists bool)
DocumentID returns the value of the "document_id" field in the mutation.
func (*DocumentSearchMutation) DocumentIDs ¶
func (m *DocumentSearchMutation) DocumentIDs() (ids []int)
DocumentIDs returns the "document" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DocumentID instead. It exists only for internal usage by the builders.
func (*DocumentSearchMutation) EdgeCleared ¶
func (m *DocumentSearchMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DocumentSearchMutation) Field ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) FieldCleared ¶
func (m *DocumentSearchMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DocumentSearchMutation) Fields ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) ID ¶
func (m *DocumentSearchMutation) 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 or after it was returned from the database.
func (*DocumentSearchMutation) IDs ¶
func (m *DocumentSearchMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DocumentSearchMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DocumentSearch entity. If the DocumentSearch 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 (*DocumentSearchMutation) OldDocumentID ¶
func (m *DocumentSearchMutation) OldDocumentID(ctx context.Context) (v int, err error)
OldDocumentID returns the old "document_id" field's value of the DocumentSearch entity. If the DocumentSearch 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 (*DocumentSearchMutation) 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 (*DocumentSearchMutation) OldTs ¶
OldTs returns the old "ts" field's value of the DocumentSearch entity. If the DocumentSearch 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 (*DocumentSearchMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the DocumentSearch entity. If the DocumentSearch 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 (*DocumentSearchMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the DocumentSearch entity. If the DocumentSearch 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 (*DocumentSearchMutation) Op ¶
func (m *DocumentSearchMutation) Op() Op
Op returns the operation name.
func (*DocumentSearchMutation) RemovedEdges ¶
func (m *DocumentSearchMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DocumentSearchMutation) RemovedIDs ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) ResetCreatedAt ¶
func (m *DocumentSearchMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DocumentSearchMutation) ResetDocument ¶
func (m *DocumentSearchMutation) ResetDocument()
ResetDocument resets all changes to the "document" edge.
func (*DocumentSearchMutation) ResetDocumentID ¶
func (m *DocumentSearchMutation) ResetDocumentID()
ResetDocumentID resets all changes to the "document_id" field.
func (*DocumentSearchMutation) ResetEdge ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) ResetField ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) ResetTs ¶
func (m *DocumentSearchMutation) ResetTs()
ResetTs resets all changes to the "ts" field.
func (*DocumentSearchMutation) ResetUUID ¶
func (m *DocumentSearchMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*DocumentSearchMutation) ResetUpdatedAt ¶
func (m *DocumentSearchMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DocumentSearchMutation) SetCreatedAt ¶
func (m *DocumentSearchMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DocumentSearchMutation) SetDocumentID ¶
func (m *DocumentSearchMutation) SetDocumentID(i int)
SetDocumentID sets the "document_id" field.
func (*DocumentSearchMutation) SetField ¶
func (m *DocumentSearchMutation) 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 (*DocumentSearchMutation) SetOp ¶
func (m *DocumentSearchMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DocumentSearchMutation) SetTs ¶
func (m *DocumentSearchMutation) SetTs(tv *types.TsVector)
SetTs sets the "ts" field.
func (*DocumentSearchMutation) SetUUID ¶
func (m *DocumentSearchMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*DocumentSearchMutation) SetUpdatedAt ¶
func (m *DocumentSearchMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DocumentSearchMutation) Ts ¶
func (m *DocumentSearchMutation) Ts() (r *types.TsVector, exists bool)
Ts returns the value of the "ts" field in the mutation.
func (DocumentSearchMutation) Tx ¶
func (m DocumentSearchMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DocumentSearchMutation) Type ¶
func (m *DocumentSearchMutation) Type() string
Type returns the node type of this mutation (DocumentSearch).
func (*DocumentSearchMutation) UUID ¶
func (m *DocumentSearchMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*DocumentSearchMutation) UpdatedAt ¶
func (m *DocumentSearchMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DocumentSearchMutation) Where ¶
func (m *DocumentSearchMutation) Where(ps ...predicate.DocumentSearch)
Where appends a list predicates to the DocumentSearchMutation builder.
func (*DocumentSearchMutation) WhereP ¶
func (m *DocumentSearchMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DocumentSearchMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DocumentSearchQuery ¶
type DocumentSearchQuery struct {
// contains filtered or unexported fields
}
DocumentSearchQuery is the builder for querying DocumentSearch entities.
func (*DocumentSearchQuery) Aggregate ¶
func (dsq *DocumentSearchQuery) Aggregate(fns ...AggregateFunc) *DocumentSearchSelect
Aggregate returns a DocumentSearchSelect configured with the given aggregations.
func (*DocumentSearchQuery) All ¶
func (dsq *DocumentSearchQuery) All(ctx context.Context) ([]*DocumentSearch, error)
All executes the query and returns a list of DocumentSearches.
func (*DocumentSearchQuery) AllX ¶
func (dsq *DocumentSearchQuery) AllX(ctx context.Context) []*DocumentSearch
AllX is like All, but panics if an error occurs.
func (*DocumentSearchQuery) Clone ¶
func (dsq *DocumentSearchQuery) Clone() *DocumentSearchQuery
Clone returns a duplicate of the DocumentSearchQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DocumentSearchQuery) Count ¶
func (dsq *DocumentSearchQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DocumentSearchQuery) CountX ¶
func (dsq *DocumentSearchQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DocumentSearchQuery) Exist ¶
func (dsq *DocumentSearchQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DocumentSearchQuery) ExistX ¶
func (dsq *DocumentSearchQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DocumentSearchQuery) First ¶
func (dsq *DocumentSearchQuery) First(ctx context.Context) (*DocumentSearch, error)
First returns the first DocumentSearch entity from the query. Returns a *NotFoundError when no DocumentSearch was found.
func (*DocumentSearchQuery) FirstID ¶
func (dsq *DocumentSearchQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DocumentSearch ID from the query. Returns a *NotFoundError when no DocumentSearch ID was found.
func (*DocumentSearchQuery) FirstIDX ¶
func (dsq *DocumentSearchQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DocumentSearchQuery) FirstX ¶
func (dsq *DocumentSearchQuery) FirstX(ctx context.Context) *DocumentSearch
FirstX is like First, but panics if an error occurs.
func (*DocumentSearchQuery) GroupBy ¶
func (dsq *DocumentSearchQuery) GroupBy(field string, fields ...string) *DocumentSearchGroupBy
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 { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.DocumentSearch.Query(). GroupBy(documentsearch.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DocumentSearchQuery) IDs ¶
func (dsq *DocumentSearchQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of DocumentSearch IDs.
func (*DocumentSearchQuery) IDsX ¶
func (dsq *DocumentSearchQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DocumentSearchQuery) Limit ¶
func (dsq *DocumentSearchQuery) Limit(limit int) *DocumentSearchQuery
Limit the number of records to be returned by this query.
func (*DocumentSearchQuery) Modify ¶
func (dsq *DocumentSearchQuery) Modify(modifiers ...func(s *sql.Selector)) *DocumentSearchSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DocumentSearchQuery) Offset ¶
func (dsq *DocumentSearchQuery) Offset(offset int) *DocumentSearchQuery
Offset to start from.
func (*DocumentSearchQuery) Only ¶
func (dsq *DocumentSearchQuery) Only(ctx context.Context) (*DocumentSearch, error)
Only returns a single DocumentSearch entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DocumentSearch entity is found. Returns a *NotFoundError when no DocumentSearch entities are found.
func (*DocumentSearchQuery) OnlyID ¶
func (dsq *DocumentSearchQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DocumentSearch ID in the query. Returns a *NotSingularError when more than one DocumentSearch ID is found. Returns a *NotFoundError when no entities are found.
func (*DocumentSearchQuery) OnlyIDX ¶
func (dsq *DocumentSearchQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DocumentSearchQuery) OnlyX ¶
func (dsq *DocumentSearchQuery) OnlyX(ctx context.Context) *DocumentSearch
OnlyX is like Only, but panics if an error occurs.
func (*DocumentSearchQuery) Order ¶
func (dsq *DocumentSearchQuery) Order(o ...OrderFunc) *DocumentSearchQuery
Order specifies how the records should be ordered.
func (*DocumentSearchQuery) QueryDocument ¶
func (dsq *DocumentSearchQuery) QueryDocument() *DocumentQuery
QueryDocument chains the current query on the "document" edge.
func (*DocumentSearchQuery) Select ¶
func (dsq *DocumentSearchQuery) Select(fields ...string) *DocumentSearchSelect
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 { UUID uuid.UUID `json:"uuid,omitempty"` } client.DocumentSearch.Query(). Select(documentsearch.FieldUUID). Scan(ctx, &v)
func (*DocumentSearchQuery) Unique ¶
func (dsq *DocumentSearchQuery) Unique(unique bool) *DocumentSearchQuery
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 (*DocumentSearchQuery) Where ¶
func (dsq *DocumentSearchQuery) Where(ps ...predicate.DocumentSearch) *DocumentSearchQuery
Where adds a new predicate for the DocumentSearchQuery builder.
func (*DocumentSearchQuery) WithDocument ¶
func (dsq *DocumentSearchQuery) WithDocument(opts ...func(*DocumentQuery)) *DocumentSearchQuery
WithDocument tells the query-builder to eager-load the nodes that are connected to the "document" edge. The optional arguments are used to configure the query builder of the edge.
type DocumentSearchSelect ¶
type DocumentSearchSelect struct { *DocumentSearchQuery // contains filtered or unexported fields }
DocumentSearchSelect is the builder for selecting fields of DocumentSearch entities.
func (*DocumentSearchSelect) Aggregate ¶
func (dss *DocumentSearchSelect) Aggregate(fns ...AggregateFunc) *DocumentSearchSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DocumentSearchSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentSearchSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentSearchSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentSearchSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentSearchSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentSearchSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentSearchSelect) Modify ¶
func (dss *DocumentSearchSelect) Modify(modifiers ...func(s *sql.Selector)) *DocumentSearchSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DocumentSearchSelect) Scan ¶
func (dss *DocumentSearchSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentSearchSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentSearchUpdate ¶
type DocumentSearchUpdate struct {
// contains filtered or unexported fields
}
DocumentSearchUpdate is the builder for updating DocumentSearch entities.
func (*DocumentSearchUpdate) ClearDocument ¶
func (dsu *DocumentSearchUpdate) ClearDocument() *DocumentSearchUpdate
ClearDocument clears the "document" edge to the Document entity.
func (*DocumentSearchUpdate) Exec ¶
func (dsu *DocumentSearchUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentSearchUpdate) ExecX ¶
func (dsu *DocumentSearchUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentSearchUpdate) Modify ¶
func (dsu *DocumentSearchUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentSearchUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DocumentSearchUpdate) Mutation ¶
func (dsu *DocumentSearchUpdate) Mutation() *DocumentSearchMutation
Mutation returns the DocumentSearchMutation object of the builder.
func (*DocumentSearchUpdate) Save ¶
func (dsu *DocumentSearchUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DocumentSearchUpdate) SaveX ¶
func (dsu *DocumentSearchUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DocumentSearchUpdate) SetDocument ¶
func (dsu *DocumentSearchUpdate) SetDocument(d *Document) *DocumentSearchUpdate
SetDocument sets the "document" edge to the Document entity.
func (*DocumentSearchUpdate) SetDocumentID ¶
func (dsu *DocumentSearchUpdate) SetDocumentID(i int) *DocumentSearchUpdate
SetDocumentID sets the "document_id" field.
func (*DocumentSearchUpdate) SetNillableUUID ¶
func (dsu *DocumentSearchUpdate) SetNillableUUID(u *uuid.UUID) *DocumentSearchUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentSearchUpdate) SetTs ¶
func (dsu *DocumentSearchUpdate) SetTs(tv *types.TsVector) *DocumentSearchUpdate
SetTs sets the "ts" field.
func (*DocumentSearchUpdate) SetUUID ¶
func (dsu *DocumentSearchUpdate) SetUUID(u uuid.UUID) *DocumentSearchUpdate
SetUUID sets the "uuid" field.
func (*DocumentSearchUpdate) SetUpdatedAt ¶
func (dsu *DocumentSearchUpdate) SetUpdatedAt(t time.Time) *DocumentSearchUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DocumentSearchUpdate) Where ¶
func (dsu *DocumentSearchUpdate) Where(ps ...predicate.DocumentSearch) *DocumentSearchUpdate
Where appends a list predicates to the DocumentSearchUpdate builder.
type DocumentSearchUpdateOne ¶
type DocumentSearchUpdateOne struct {
// contains filtered or unexported fields
}
DocumentSearchUpdateOne is the builder for updating a single DocumentSearch entity.
func (*DocumentSearchUpdateOne) ClearDocument ¶
func (dsuo *DocumentSearchUpdateOne) ClearDocument() *DocumentSearchUpdateOne
ClearDocument clears the "document" edge to the Document entity.
func (*DocumentSearchUpdateOne) Exec ¶
func (dsuo *DocumentSearchUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DocumentSearchUpdateOne) ExecX ¶
func (dsuo *DocumentSearchUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentSearchUpdateOne) Modify ¶
func (dsuo *DocumentSearchUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentSearchUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DocumentSearchUpdateOne) Mutation ¶
func (dsuo *DocumentSearchUpdateOne) Mutation() *DocumentSearchMutation
Mutation returns the DocumentSearchMutation object of the builder.
func (*DocumentSearchUpdateOne) Save ¶
func (dsuo *DocumentSearchUpdateOne) Save(ctx context.Context) (*DocumentSearch, error)
Save executes the query and returns the updated DocumentSearch entity.
func (*DocumentSearchUpdateOne) SaveX ¶
func (dsuo *DocumentSearchUpdateOne) SaveX(ctx context.Context) *DocumentSearch
SaveX is like Save, but panics if an error occurs.
func (*DocumentSearchUpdateOne) Select ¶
func (dsuo *DocumentSearchUpdateOne) Select(field string, fields ...string) *DocumentSearchUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DocumentSearchUpdateOne) SetDocument ¶
func (dsuo *DocumentSearchUpdateOne) SetDocument(d *Document) *DocumentSearchUpdateOne
SetDocument sets the "document" edge to the Document entity.
func (*DocumentSearchUpdateOne) SetDocumentID ¶
func (dsuo *DocumentSearchUpdateOne) SetDocumentID(i int) *DocumentSearchUpdateOne
SetDocumentID sets the "document_id" field.
func (*DocumentSearchUpdateOne) SetNillableUUID ¶
func (dsuo *DocumentSearchUpdateOne) SetNillableUUID(u *uuid.UUID) *DocumentSearchUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentSearchUpdateOne) SetTs ¶
func (dsuo *DocumentSearchUpdateOne) SetTs(tv *types.TsVector) *DocumentSearchUpdateOne
SetTs sets the "ts" field.
func (*DocumentSearchUpdateOne) SetUUID ¶
func (dsuo *DocumentSearchUpdateOne) SetUUID(u uuid.UUID) *DocumentSearchUpdateOne
SetUUID sets the "uuid" field.
func (*DocumentSearchUpdateOne) SetUpdatedAt ¶
func (dsuo *DocumentSearchUpdateOne) SetUpdatedAt(t time.Time) *DocumentSearchUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DocumentSearchUpdateOne) Where ¶
func (dsuo *DocumentSearchUpdateOne) Where(ps ...predicate.DocumentSearch) *DocumentSearchUpdateOne
Where appends a list predicates to the DocumentSearchUpdate builder.
type DocumentSearches ¶
type DocumentSearches []*DocumentSearch
DocumentSearches is a parsable slice of DocumentSearch.
type DocumentSelect ¶
type DocumentSelect struct { *DocumentQuery // contains filtered or unexported fields }
DocumentSelect is the builder for selecting fields of Document entities.
func (*DocumentSelect) Aggregate ¶
func (ds *DocumentSelect) Aggregate(fns ...AggregateFunc) *DocumentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DocumentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Modify ¶
func (ds *DocumentSelect) Modify(modifiers ...func(s *sql.Selector)) *DocumentSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DocumentSelect) Scan ¶
func (ds *DocumentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentUpdate ¶
type DocumentUpdate struct {
// contains filtered or unexported fields
}
DocumentUpdate is the builder for updating Document entities.
func (*DocumentUpdate) ClearContent ¶
func (du *DocumentUpdate) ClearContent() *DocumentUpdate
ClearContent clears the value of the "content" field.
func (*DocumentUpdate) ClearContentHash ¶
func (du *DocumentUpdate) ClearContentHash() *DocumentUpdate
ClearContentHash clears the value of the "content_hash" field.
func (*DocumentUpdate) ClearSearch ¶
func (du *DocumentUpdate) ClearSearch() *DocumentUpdate
ClearSearch clears the "search" edge to the DocumentSearch entity.
func (*DocumentUpdate) ClearUser ¶
func (du *DocumentUpdate) ClearUser() *DocumentUpdate
ClearUser clears the "user" edge to the User entity.
func (*DocumentUpdate) Exec ¶
func (du *DocumentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentUpdate) ExecX ¶
func (du *DocumentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentUpdate) Modify ¶
func (du *DocumentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DocumentUpdate) Mutation ¶
func (du *DocumentUpdate) Mutation() *DocumentMutation
Mutation returns the DocumentMutation object of the builder.
func (*DocumentUpdate) Save ¶
func (du *DocumentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DocumentUpdate) SaveX ¶
func (du *DocumentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DocumentUpdate) SetContent ¶
func (du *DocumentUpdate) SetContent(s string) *DocumentUpdate
SetContent sets the "content" field.
func (*DocumentUpdate) SetContentHash ¶
func (du *DocumentUpdate) SetContentHash(s string) *DocumentUpdate
SetContentHash sets the "content_hash" field.
func (*DocumentUpdate) SetDescription ¶
func (du *DocumentUpdate) SetDescription(s string) *DocumentUpdate
SetDescription sets the "description" field.
func (*DocumentUpdate) SetFilename ¶
func (du *DocumentUpdate) SetFilename(s string) *DocumentUpdate
SetFilename sets the "filename" field.
func (*DocumentUpdate) SetFiletype ¶
func (du *DocumentUpdate) SetFiletype(t types.Filetype) *DocumentUpdate
SetFiletype sets the "filetype" field.
func (*DocumentUpdate) SetNillableContent ¶
func (du *DocumentUpdate) SetNillableContent(s *string) *DocumentUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*DocumentUpdate) SetNillableContentHash ¶
func (du *DocumentUpdate) SetNillableContentHash(s *string) *DocumentUpdate
SetNillableContentHash sets the "content_hash" field if the given value is not nil.
func (*DocumentUpdate) SetNillableSearchID ¶
func (du *DocumentUpdate) SetNillableSearchID(id *int) *DocumentUpdate
SetNillableSearchID sets the "search" edge to the DocumentSearch entity by ID if the given value is not nil.
func (*DocumentUpdate) SetNillableUUID ¶
func (du *DocumentUpdate) SetNillableUUID(u *uuid.UUID) *DocumentUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentUpdate) SetSearch ¶
func (du *DocumentUpdate) SetSearch(d *DocumentSearch) *DocumentUpdate
SetSearch sets the "search" edge to the DocumentSearch entity.
func (*DocumentUpdate) SetSearchID ¶
func (du *DocumentUpdate) SetSearchID(id int) *DocumentUpdate
SetSearchID sets the "search" edge to the DocumentSearch entity by ID.
func (*DocumentUpdate) SetTitle ¶
func (du *DocumentUpdate) SetTitle(s string) *DocumentUpdate
SetTitle sets the "title" field.
func (*DocumentUpdate) SetUUID ¶
func (du *DocumentUpdate) SetUUID(u uuid.UUID) *DocumentUpdate
SetUUID sets the "uuid" field.
func (*DocumentUpdate) SetUpdatedAt ¶
func (du *DocumentUpdate) SetUpdatedAt(t time.Time) *DocumentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DocumentUpdate) SetUser ¶
func (du *DocumentUpdate) SetUser(u *User) *DocumentUpdate
SetUser sets the "user" edge to the User entity.
func (*DocumentUpdate) SetUserID ¶
func (du *DocumentUpdate) SetUserID(id int) *DocumentUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*DocumentUpdate) Where ¶
func (du *DocumentUpdate) Where(ps ...predicate.Document) *DocumentUpdate
Where appends a list predicates to the DocumentUpdate builder.
type DocumentUpdateOne ¶
type DocumentUpdateOne struct {
// contains filtered or unexported fields
}
DocumentUpdateOne is the builder for updating a single Document entity.
func (*DocumentUpdateOne) ClearContent ¶
func (duo *DocumentUpdateOne) ClearContent() *DocumentUpdateOne
ClearContent clears the value of the "content" field.
func (*DocumentUpdateOne) ClearContentHash ¶
func (duo *DocumentUpdateOne) ClearContentHash() *DocumentUpdateOne
ClearContentHash clears the value of the "content_hash" field.
func (*DocumentUpdateOne) ClearSearch ¶
func (duo *DocumentUpdateOne) ClearSearch() *DocumentUpdateOne
ClearSearch clears the "search" edge to the DocumentSearch entity.
func (*DocumentUpdateOne) ClearUser ¶
func (duo *DocumentUpdateOne) ClearUser() *DocumentUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*DocumentUpdateOne) Exec ¶
func (duo *DocumentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DocumentUpdateOne) ExecX ¶
func (duo *DocumentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentUpdateOne) Modify ¶
func (duo *DocumentUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DocumentUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DocumentUpdateOne) Mutation ¶
func (duo *DocumentUpdateOne) Mutation() *DocumentMutation
Mutation returns the DocumentMutation object of the builder.
func (*DocumentUpdateOne) Save ¶
func (duo *DocumentUpdateOne) Save(ctx context.Context) (*Document, error)
Save executes the query and returns the updated Document entity.
func (*DocumentUpdateOne) SaveX ¶
func (duo *DocumentUpdateOne) SaveX(ctx context.Context) *Document
SaveX is like Save, but panics if an error occurs.
func (*DocumentUpdateOne) Select ¶
func (duo *DocumentUpdateOne) Select(field string, fields ...string) *DocumentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DocumentUpdateOne) SetContent ¶
func (duo *DocumentUpdateOne) SetContent(s string) *DocumentUpdateOne
SetContent sets the "content" field.
func (*DocumentUpdateOne) SetContentHash ¶
func (duo *DocumentUpdateOne) SetContentHash(s string) *DocumentUpdateOne
SetContentHash sets the "content_hash" field.
func (*DocumentUpdateOne) SetDescription ¶
func (duo *DocumentUpdateOne) SetDescription(s string) *DocumentUpdateOne
SetDescription sets the "description" field.
func (*DocumentUpdateOne) SetFilename ¶
func (duo *DocumentUpdateOne) SetFilename(s string) *DocumentUpdateOne
SetFilename sets the "filename" field.
func (*DocumentUpdateOne) SetFiletype ¶
func (duo *DocumentUpdateOne) SetFiletype(t types.Filetype) *DocumentUpdateOne
SetFiletype sets the "filetype" field.
func (*DocumentUpdateOne) SetNillableContent ¶
func (duo *DocumentUpdateOne) SetNillableContent(s *string) *DocumentUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*DocumentUpdateOne) SetNillableContentHash ¶
func (duo *DocumentUpdateOne) SetNillableContentHash(s *string) *DocumentUpdateOne
SetNillableContentHash sets the "content_hash" field if the given value is not nil.
func (*DocumentUpdateOne) SetNillableSearchID ¶
func (duo *DocumentUpdateOne) SetNillableSearchID(id *int) *DocumentUpdateOne
SetNillableSearchID sets the "search" edge to the DocumentSearch entity by ID if the given value is not nil.
func (*DocumentUpdateOne) SetNillableUUID ¶
func (duo *DocumentUpdateOne) SetNillableUUID(u *uuid.UUID) *DocumentUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DocumentUpdateOne) SetSearch ¶
func (duo *DocumentUpdateOne) SetSearch(d *DocumentSearch) *DocumentUpdateOne
SetSearch sets the "search" edge to the DocumentSearch entity.
func (*DocumentUpdateOne) SetSearchID ¶
func (duo *DocumentUpdateOne) SetSearchID(id int) *DocumentUpdateOne
SetSearchID sets the "search" edge to the DocumentSearch entity by ID.
func (*DocumentUpdateOne) SetTitle ¶
func (duo *DocumentUpdateOne) SetTitle(s string) *DocumentUpdateOne
SetTitle sets the "title" field.
func (*DocumentUpdateOne) SetUUID ¶
func (duo *DocumentUpdateOne) SetUUID(u uuid.UUID) *DocumentUpdateOne
SetUUID sets the "uuid" field.
func (*DocumentUpdateOne) SetUpdatedAt ¶
func (duo *DocumentUpdateOne) SetUpdatedAt(t time.Time) *DocumentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DocumentUpdateOne) SetUser ¶
func (duo *DocumentUpdateOne) SetUser(u *User) *DocumentUpdateOne
SetUser sets the "user" edge to the User entity.
func (*DocumentUpdateOne) SetUserID ¶
func (duo *DocumentUpdateOne) SetUserID(id int) *DocumentUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*DocumentUpdateOne) Where ¶
func (duo *DocumentUpdateOne) Where(ps ...predicate.Document) *DocumentUpdateOne
Where appends a list predicates to the DocumentUpdate builder.
type HistoryDiff ¶
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Document is the client for interacting with the Document builders. Document *DocumentClient // DocumentHistory is the client for interacting with the DocumentHistory builders. DocumentHistory *DocumentHistoryClient // DocumentSearch is the client for interacting with the DocumentSearch builders. DocumentSearch *DocumentSearchClient // User is the client for interacting with the User builders. User *UserClient // UserHistory is the client for interacting with the UserHistory builders. UserHistory *UserHistoryClient // 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 User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // IsAdmin holds the value of the "is_admin" field. IsAdmin bool `json:"is_admin,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) History ¶
func (u *User) History() *UserHistoryQuery
func (*User) QueryDocuments ¶
func (u *User) QueryDocuments() *DocumentQuery
QueryDocuments queries the "documents" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryDocuments ¶
func (c *UserClient) QueryDocuments(u *User) *DocumentQuery
QueryDocuments queries the documents edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddDocumentIDs ¶
func (uc *UserCreate) AddDocumentIDs(ids ...int) *UserCreate
AddDocumentIDs adds the "documents" edge to the Document entity by IDs.
func (*UserCreate) AddDocuments ¶
func (uc *UserCreate) AddDocuments(d ...*Document) *UserCreate
AddDocuments adds the "documents" edges to the Document entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetFirstName ¶
func (uc *UserCreate) SetFirstName(s string) *UserCreate
SetFirstName sets the "first_name" field.
func (*UserCreate) SetIsAdmin ¶
func (uc *UserCreate) SetIsAdmin(b bool) *UserCreate
SetIsAdmin sets the "is_admin" field.
func (*UserCreate) SetLastName ¶
func (uc *UserCreate) SetLastName(s string) *UserCreate
SetLastName sets the "last_name" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableIsAdmin ¶
func (uc *UserCreate) SetNillableIsAdmin(b *bool) *UserCreate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserCreate) SetNillableUUID ¶
func (uc *UserCreate) SetNillableUUID(u *uuid.UUID) *UserCreate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetUUID ¶
func (uc *UserCreate) SetUUID(u uuid.UUID) *UserCreate
SetUUID sets the "uuid" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Documents holds the value of the documents edge. Documents []*Document `json:"documents,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) DocumentsOrErr ¶
DocumentsOrErr returns the Documents value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserHistories ¶
type UserHistories []*UserHistory
UserHistories is a parsable slice of UserHistory.
type UserHistory ¶
type UserHistory struct { // ID of the ent. ID int `json:"id,omitempty"` // HistoryTime holds the value of the "history_time" field. HistoryTime time.Time `json:"history_time,omitempty"` // Ref holds the value of the "ref" field. Ref int `json:"ref,omitempty"` // Operation holds the value of the "operation" field. Operation enthistory.OpType `json:"operation,omitempty"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy *string `json:"updated_by,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // IsAdmin holds the value of the "is_admin" field. IsAdmin bool `json:"is_admin,omitempty"` // contains filtered or unexported fields }
UserHistory is the model entity for the UserHistory schema.
func (*UserHistory) Diff ¶
func (uh *UserHistory) Diff(history *UserHistory) (*HistoryDiff[UserHistory], error)
func (*UserHistory) Next ¶
func (uh *UserHistory) Next(ctx context.Context) (*UserHistory, error)
func (*UserHistory) Prev ¶
func (uh *UserHistory) Prev(ctx context.Context) (*UserHistory, error)
func (*UserHistory) String ¶
func (uh *UserHistory) String() string
String implements the fmt.Stringer.
func (*UserHistory) Unwrap ¶
func (uh *UserHistory) Unwrap() *UserHistory
Unwrap unwraps the UserHistory 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 (*UserHistory) Update ¶
func (uh *UserHistory) Update() *UserHistoryUpdateOne
Update returns a builder for updating this UserHistory. Note that you need to call UserHistory.Unwrap() before calling this method if this UserHistory was returned from a transaction, and the transaction was committed or rolled back.
type UserHistoryClient ¶
type UserHistoryClient struct {
// contains filtered or unexported fields
}
UserHistoryClient is a client for the UserHistory schema.
func NewUserHistoryClient ¶
func NewUserHistoryClient(c config) *UserHistoryClient
NewUserHistoryClient returns a client for the UserHistory from the given config.
func (*UserHistoryClient) Create ¶
func (c *UserHistoryClient) Create() *UserHistoryCreate
Create returns a builder for creating a UserHistory entity.
func (*UserHistoryClient) CreateBulk ¶
func (c *UserHistoryClient) CreateBulk(builders ...*UserHistoryCreate) *UserHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of UserHistory entities.
func (*UserHistoryClient) Delete ¶
func (c *UserHistoryClient) Delete() *UserHistoryDelete
Delete returns a delete builder for UserHistory.
func (*UserHistoryClient) DeleteOne ¶
func (c *UserHistoryClient) DeleteOne(uh *UserHistory) *UserHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserHistoryClient) DeleteOneID ¶
func (c *UserHistoryClient) DeleteOneID(id int) *UserHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserHistoryClient) Get ¶
func (c *UserHistoryClient) Get(ctx context.Context, id int) (*UserHistory, error)
Get returns a UserHistory entity by its id.
func (*UserHistoryClient) GetX ¶
func (c *UserHistoryClient) GetX(ctx context.Context, id int) *UserHistory
GetX is like Get, but panics if an error occurs.
func (*UserHistoryClient) Hooks ¶
func (c *UserHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserHistoryClient) Intercept ¶
func (c *UserHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userhistory.Intercept(f(g(h())))`.
func (*UserHistoryClient) Interceptors ¶
func (c *UserHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserHistoryClient) Query ¶
func (c *UserHistoryClient) Query() *UserHistoryQuery
Query returns a query builder for UserHistory.
func (*UserHistoryClient) Update ¶
func (c *UserHistoryClient) Update() *UserHistoryUpdate
Update returns an update builder for UserHistory.
func (*UserHistoryClient) UpdateOne ¶
func (c *UserHistoryClient) UpdateOne(uh *UserHistory) *UserHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserHistoryClient) UpdateOneID ¶
func (c *UserHistoryClient) UpdateOneID(id int) *UserHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserHistoryClient) Use ¶
func (c *UserHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userhistory.Hooks(f(g(h())))`.
type UserHistoryCreate ¶
type UserHistoryCreate struct {
// contains filtered or unexported fields
}
UserHistoryCreate is the builder for creating a UserHistory entity.
func (*UserHistoryCreate) Exec ¶
func (uhc *UserHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserHistoryCreate) ExecX ¶
func (uhc *UserHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserHistoryCreate) Mutation ¶
func (uhc *UserHistoryCreate) Mutation() *UserHistoryMutation
Mutation returns the UserHistoryMutation object of the builder.
func (*UserHistoryCreate) Save ¶
func (uhc *UserHistoryCreate) Save(ctx context.Context) (*UserHistory, error)
Save creates the UserHistory in the database.
func (*UserHistoryCreate) SaveX ¶
func (uhc *UserHistoryCreate) SaveX(ctx context.Context) *UserHistory
SaveX calls Save and panics if Save returns an error.
func (*UserHistoryCreate) SetCreatedAt ¶
func (uhc *UserHistoryCreate) SetCreatedAt(t time.Time) *UserHistoryCreate
SetCreatedAt sets the "created_at" field.
func (*UserHistoryCreate) SetEmail ¶
func (uhc *UserHistoryCreate) SetEmail(s string) *UserHistoryCreate
SetEmail sets the "email" field.
func (*UserHistoryCreate) SetFirstName ¶
func (uhc *UserHistoryCreate) SetFirstName(s string) *UserHistoryCreate
SetFirstName sets the "first_name" field.
func (*UserHistoryCreate) SetHistoryTime ¶
func (uhc *UserHistoryCreate) SetHistoryTime(t time.Time) *UserHistoryCreate
SetHistoryTime sets the "history_time" field.
func (*UserHistoryCreate) SetIsAdmin ¶
func (uhc *UserHistoryCreate) SetIsAdmin(b bool) *UserHistoryCreate
SetIsAdmin sets the "is_admin" field.
func (*UserHistoryCreate) SetLastName ¶
func (uhc *UserHistoryCreate) SetLastName(s string) *UserHistoryCreate
SetLastName sets the "last_name" field.
func (*UserHistoryCreate) SetNillableCreatedAt ¶
func (uhc *UserHistoryCreate) SetNillableCreatedAt(t *time.Time) *UserHistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserHistoryCreate) SetNillableHistoryTime ¶
func (uhc *UserHistoryCreate) SetNillableHistoryTime(t *time.Time) *UserHistoryCreate
SetNillableHistoryTime sets the "history_time" field if the given value is not nil.
func (*UserHistoryCreate) SetNillableIsAdmin ¶
func (uhc *UserHistoryCreate) SetNillableIsAdmin(b *bool) *UserHistoryCreate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserHistoryCreate) SetNillableRef ¶
func (uhc *UserHistoryCreate) SetNillableRef(i *int) *UserHistoryCreate
SetNillableRef sets the "ref" field if the given value is not nil.
func (*UserHistoryCreate) SetNillableUUID ¶
func (uhc *UserHistoryCreate) SetNillableUUID(u *uuid.UUID) *UserHistoryCreate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*UserHistoryCreate) SetNillableUpdatedAt ¶
func (uhc *UserHistoryCreate) SetNillableUpdatedAt(t *time.Time) *UserHistoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserHistoryCreate) SetNillableUpdatedBy ¶
func (uhc *UserHistoryCreate) SetNillableUpdatedBy(s *string) *UserHistoryCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*UserHistoryCreate) SetOperation ¶
func (uhc *UserHistoryCreate) SetOperation(et enthistory.OpType) *UserHistoryCreate
SetOperation sets the "operation" field.
func (*UserHistoryCreate) SetPassword ¶
func (uhc *UserHistoryCreate) SetPassword(s string) *UserHistoryCreate
SetPassword sets the "password" field.
func (*UserHistoryCreate) SetRef ¶
func (uhc *UserHistoryCreate) SetRef(i int) *UserHistoryCreate
SetRef sets the "ref" field.
func (*UserHistoryCreate) SetUUID ¶
func (uhc *UserHistoryCreate) SetUUID(u uuid.UUID) *UserHistoryCreate
SetUUID sets the "uuid" field.
func (*UserHistoryCreate) SetUpdatedAt ¶
func (uhc *UserHistoryCreate) SetUpdatedAt(t time.Time) *UserHistoryCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserHistoryCreate) SetUpdatedBy ¶
func (uhc *UserHistoryCreate) SetUpdatedBy(s string) *UserHistoryCreate
SetUpdatedBy sets the "updated_by" field.
func (*UserHistoryCreate) SetUsername ¶
func (uhc *UserHistoryCreate) SetUsername(s string) *UserHistoryCreate
SetUsername sets the "username" field.
type UserHistoryCreateBulk ¶
type UserHistoryCreateBulk struct {
// contains filtered or unexported fields
}
UserHistoryCreateBulk is the builder for creating many UserHistory entities in bulk.
func (*UserHistoryCreateBulk) Exec ¶
func (uhcb *UserHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserHistoryCreateBulk) ExecX ¶
func (uhcb *UserHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserHistoryCreateBulk) Save ¶
func (uhcb *UserHistoryCreateBulk) Save(ctx context.Context) ([]*UserHistory, error)
Save creates the UserHistory entities in the database.
func (*UserHistoryCreateBulk) SaveX ¶
func (uhcb *UserHistoryCreateBulk) SaveX(ctx context.Context) []*UserHistory
SaveX is like Save, but panics if an error occurs.
type UserHistoryDelete ¶
type UserHistoryDelete struct {
// contains filtered or unexported fields
}
UserHistoryDelete is the builder for deleting a UserHistory entity.
func (*UserHistoryDelete) Exec ¶
func (uhd *UserHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserHistoryDelete) ExecX ¶
func (uhd *UserHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserHistoryDelete) Where ¶
func (uhd *UserHistoryDelete) Where(ps ...predicate.UserHistory) *UserHistoryDelete
Where appends a list predicates to the UserHistoryDelete builder.
type UserHistoryDeleteOne ¶
type UserHistoryDeleteOne struct {
// contains filtered or unexported fields
}
UserHistoryDeleteOne is the builder for deleting a single UserHistory entity.
func (*UserHistoryDeleteOne) Exec ¶
func (uhdo *UserHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserHistoryDeleteOne) ExecX ¶
func (uhdo *UserHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserHistoryDeleteOne) Where ¶
func (uhdo *UserHistoryDeleteOne) Where(ps ...predicate.UserHistory) *UserHistoryDeleteOne
Where appends a list predicates to the UserHistoryDelete builder.
type UserHistoryGroupBy ¶
type UserHistoryGroupBy struct {
// contains filtered or unexported fields
}
UserHistoryGroupBy is the group-by builder for UserHistory entities.
func (*UserHistoryGroupBy) Aggregate ¶
func (uhgb *UserHistoryGroupBy) Aggregate(fns ...AggregateFunc) *UserHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserHistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserHistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserHistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserHistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserHistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserHistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserHistoryGroupBy) Scan ¶
func (uhgb *UserHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserHistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserHistoryMutation ¶
type UserHistoryMutation struct {
// contains filtered or unexported fields
}
UserHistoryMutation represents an operation that mutates the UserHistory nodes in the graph.
func (*UserHistoryMutation) AddField ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) AddRef ¶
func (m *UserHistoryMutation) AddRef(i int)
AddRef adds i to the "ref" field.
func (*UserHistoryMutation) AddedEdges ¶
func (m *UserHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserHistoryMutation) AddedField ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) AddedFields ¶
func (m *UserHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserHistoryMutation) AddedIDs ¶
func (m *UserHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserHistoryMutation) AddedRef ¶
func (m *UserHistoryMutation) AddedRef() (r int, exists bool)
AddedRef returns the value that was added to the "ref" field in this mutation.
func (*UserHistoryMutation) ClearEdge ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) ClearField ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) ClearIsAdmin ¶
func (m *UserHistoryMutation) ClearIsAdmin()
ClearIsAdmin clears the value of the "is_admin" field.
func (*UserHistoryMutation) ClearRef ¶
func (m *UserHistoryMutation) ClearRef()
ClearRef clears the value of the "ref" field.
func (*UserHistoryMutation) ClearUpdatedBy ¶
func (m *UserHistoryMutation) ClearUpdatedBy()
ClearUpdatedBy clears the value of the "updated_by" field.
func (*UserHistoryMutation) ClearedEdges ¶
func (m *UserHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserHistoryMutation) ClearedFields ¶
func (m *UserHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserHistoryMutation) Client ¶
func (m UserHistoryMutation) 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 (*UserHistoryMutation) CreatedAt ¶
func (m *UserHistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserHistoryMutation) EdgeCleared ¶
func (m *UserHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserHistoryMutation) Email ¶
func (m *UserHistoryMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserHistoryMutation) Field ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) FieldCleared ¶
func (m *UserHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserHistoryMutation) Fields ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) FirstName ¶
func (m *UserHistoryMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*UserHistoryMutation) HistoryTime ¶
func (m *UserHistoryMutation) HistoryTime() (r time.Time, exists bool)
HistoryTime returns the value of the "history_time" field in the mutation.
func (*UserHistoryMutation) ID ¶
func (m *UserHistoryMutation) 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 or after it was returned from the database.
func (*UserHistoryMutation) IDs ¶
func (m *UserHistoryMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserHistoryMutation) IsAdmin ¶
func (m *UserHistoryMutation) IsAdmin() (r bool, exists bool)
IsAdmin returns the value of the "is_admin" field in the mutation.
func (*UserHistoryMutation) IsAdminCleared ¶
func (m *UserHistoryMutation) IsAdminCleared() bool
IsAdminCleared returns if the "is_admin" field was cleared in this mutation.
func (*UserHistoryMutation) LastName ¶
func (m *UserHistoryMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*UserHistoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldEmail ¶
func (m *UserHistoryMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) 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 (*UserHistoryMutation) OldFirstName ¶
func (m *UserHistoryMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldHistoryTime ¶
OldHistoryTime returns the old "history_time" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldIsAdmin ¶
func (m *UserHistoryMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
OldIsAdmin returns the old "is_admin" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldLastName ¶
func (m *UserHistoryMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldOperation ¶
func (m *UserHistoryMutation) OldOperation(ctx context.Context) (v enthistory.OpType, err error)
OldOperation returns the old "operation" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldPassword ¶
func (m *UserHistoryMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldRef ¶
func (m *UserHistoryMutation) OldRef(ctx context.Context) (v int, err error)
OldRef returns the old "ref" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldUpdatedBy ¶
func (m *UserHistoryMutation) OldUpdatedBy(ctx context.Context) (v *string, err error)
OldUpdatedBy returns the old "updated_by" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) OldUsername ¶
func (m *UserHistoryMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the UserHistory entity. If the UserHistory 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 (*UserHistoryMutation) Op ¶
func (m *UserHistoryMutation) Op() Op
Op returns the operation name.
func (*UserHistoryMutation) Operation ¶
func (m *UserHistoryMutation) Operation() (r enthistory.OpType, exists bool)
Operation returns the value of the "operation" field in the mutation.
func (*UserHistoryMutation) Password ¶
func (m *UserHistoryMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserHistoryMutation) Ref ¶
func (m *UserHistoryMutation) Ref() (r int, exists bool)
Ref returns the value of the "ref" field in the mutation.
func (*UserHistoryMutation) RefCleared ¶
func (m *UserHistoryMutation) RefCleared() bool
RefCleared returns if the "ref" field was cleared in this mutation.
func (*UserHistoryMutation) RemovedEdges ¶
func (m *UserHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserHistoryMutation) RemovedIDs ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) ResetCreatedAt ¶
func (m *UserHistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserHistoryMutation) ResetEdge ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) ResetEmail ¶
func (m *UserHistoryMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserHistoryMutation) ResetField ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) ResetFirstName ¶
func (m *UserHistoryMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*UserHistoryMutation) ResetHistoryTime ¶
func (m *UserHistoryMutation) ResetHistoryTime()
ResetHistoryTime resets all changes to the "history_time" field.
func (*UserHistoryMutation) ResetIsAdmin ¶
func (m *UserHistoryMutation) ResetIsAdmin()
ResetIsAdmin resets all changes to the "is_admin" field.
func (*UserHistoryMutation) ResetLastName ¶
func (m *UserHistoryMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*UserHistoryMutation) ResetOperation ¶
func (m *UserHistoryMutation) ResetOperation()
ResetOperation resets all changes to the "operation" field.
func (*UserHistoryMutation) ResetPassword ¶
func (m *UserHistoryMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserHistoryMutation) ResetRef ¶
func (m *UserHistoryMutation) ResetRef()
ResetRef resets all changes to the "ref" field.
func (*UserHistoryMutation) ResetUUID ¶
func (m *UserHistoryMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*UserHistoryMutation) ResetUpdatedAt ¶
func (m *UserHistoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserHistoryMutation) ResetUpdatedBy ¶
func (m *UserHistoryMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*UserHistoryMutation) ResetUsername ¶
func (m *UserHistoryMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserHistoryMutation) SetCreatedAt ¶
func (m *UserHistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserHistoryMutation) SetEmail ¶
func (m *UserHistoryMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserHistoryMutation) SetField ¶
func (m *UserHistoryMutation) 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 (*UserHistoryMutation) SetFirstName ¶
func (m *UserHistoryMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*UserHistoryMutation) SetHistoryTime ¶
func (m *UserHistoryMutation) SetHistoryTime(t time.Time)
SetHistoryTime sets the "history_time" field.
func (*UserHistoryMutation) SetIsAdmin ¶
func (m *UserHistoryMutation) SetIsAdmin(b bool)
SetIsAdmin sets the "is_admin" field.
func (*UserHistoryMutation) SetLastName ¶
func (m *UserHistoryMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*UserHistoryMutation) SetOp ¶
func (m *UserHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserHistoryMutation) SetOperation ¶
func (m *UserHistoryMutation) SetOperation(et enthistory.OpType)
SetOperation sets the "operation" field.
func (*UserHistoryMutation) SetPassword ¶
func (m *UserHistoryMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserHistoryMutation) SetRef ¶
func (m *UserHistoryMutation) SetRef(i int)
SetRef sets the "ref" field.
func (*UserHistoryMutation) SetUUID ¶
func (m *UserHistoryMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*UserHistoryMutation) SetUpdatedAt ¶
func (m *UserHistoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserHistoryMutation) SetUpdatedBy ¶
func (m *UserHistoryMutation) SetUpdatedBy(s string)
SetUpdatedBy sets the "updated_by" field.
func (*UserHistoryMutation) SetUsername ¶
func (m *UserHistoryMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UserHistoryMutation) Tx ¶
func (m UserHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserHistoryMutation) Type ¶
func (m *UserHistoryMutation) Type() string
Type returns the node type of this mutation (UserHistory).
func (*UserHistoryMutation) UUID ¶
func (m *UserHistoryMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*UserHistoryMutation) UpdatedAt ¶
func (m *UserHistoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserHistoryMutation) UpdatedBy ¶
func (m *UserHistoryMutation) UpdatedBy() (r string, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*UserHistoryMutation) UpdatedByCleared ¶
func (m *UserHistoryMutation) UpdatedByCleared() bool
UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.
func (*UserHistoryMutation) Username ¶
func (m *UserHistoryMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserHistoryMutation) Where ¶
func (m *UserHistoryMutation) Where(ps ...predicate.UserHistory)
Where appends a list predicates to the UserHistoryMutation builder.
func (*UserHistoryMutation) WhereP ¶
func (m *UserHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserHistoryQuery ¶
type UserHistoryQuery struct {
// contains filtered or unexported fields
}
UserHistoryQuery is the builder for querying UserHistory entities.
func (*UserHistoryQuery) Aggregate ¶
func (uhq *UserHistoryQuery) Aggregate(fns ...AggregateFunc) *UserHistorySelect
Aggregate returns a UserHistorySelect configured with the given aggregations.
func (*UserHistoryQuery) All ¶
func (uhq *UserHistoryQuery) All(ctx context.Context) ([]*UserHistory, error)
All executes the query and returns a list of UserHistories.
func (*UserHistoryQuery) AllX ¶
func (uhq *UserHistoryQuery) AllX(ctx context.Context) []*UserHistory
AllX is like All, but panics if an error occurs.
func (*UserHistoryQuery) AsOf ¶
func (uhq *UserHistoryQuery) AsOf(ctx context.Context, time time.Time) (*UserHistory, error)
func (*UserHistoryQuery) Clone ¶
func (uhq *UserHistoryQuery) Clone() *UserHistoryQuery
Clone returns a duplicate of the UserHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserHistoryQuery) Count ¶
func (uhq *UserHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserHistoryQuery) CountX ¶
func (uhq *UserHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserHistoryQuery) Earliest ¶
func (uhq *UserHistoryQuery) Earliest(ctx context.Context) (*UserHistory, error)
func (*UserHistoryQuery) Exist ¶
func (uhq *UserHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserHistoryQuery) ExistX ¶
func (uhq *UserHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserHistoryQuery) First ¶
func (uhq *UserHistoryQuery) First(ctx context.Context) (*UserHistory, error)
First returns the first UserHistory entity from the query. Returns a *NotFoundError when no UserHistory was found.
func (*UserHistoryQuery) FirstID ¶
func (uhq *UserHistoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserHistory ID from the query. Returns a *NotFoundError when no UserHistory ID was found.
func (*UserHistoryQuery) FirstIDX ¶
func (uhq *UserHistoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserHistoryQuery) FirstX ¶
func (uhq *UserHistoryQuery) FirstX(ctx context.Context) *UserHistory
FirstX is like First, but panics if an error occurs.
func (*UserHistoryQuery) GroupBy ¶
func (uhq *UserHistoryQuery) GroupBy(field string, fields ...string) *UserHistoryGroupBy
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 { HistoryTime time.Time `json:"history_time,omitempty"` Count int `json:"count,omitempty"` } client.UserHistory.Query(). GroupBy(userhistory.FieldHistoryTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserHistoryQuery) IDs ¶
func (uhq *UserHistoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserHistory IDs.
func (*UserHistoryQuery) IDsX ¶
func (uhq *UserHistoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserHistoryQuery) Latest ¶
func (uhq *UserHistoryQuery) Latest(ctx context.Context) (*UserHistory, error)
func (*UserHistoryQuery) Limit ¶
func (uhq *UserHistoryQuery) Limit(limit int) *UserHistoryQuery
Limit the number of records to be returned by this query.
func (*UserHistoryQuery) Modify ¶
func (uhq *UserHistoryQuery) Modify(modifiers ...func(s *sql.Selector)) *UserHistorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*UserHistoryQuery) Offset ¶
func (uhq *UserHistoryQuery) Offset(offset int) *UserHistoryQuery
Offset to start from.
func (*UserHistoryQuery) Only ¶
func (uhq *UserHistoryQuery) Only(ctx context.Context) (*UserHistory, error)
Only returns a single UserHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserHistory entity is found. Returns a *NotFoundError when no UserHistory entities are found.
func (*UserHistoryQuery) OnlyID ¶
func (uhq *UserHistoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserHistory ID in the query. Returns a *NotSingularError when more than one UserHistory ID is found. Returns a *NotFoundError when no entities are found.
func (*UserHistoryQuery) OnlyIDX ¶
func (uhq *UserHistoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserHistoryQuery) OnlyX ¶
func (uhq *UserHistoryQuery) OnlyX(ctx context.Context) *UserHistory
OnlyX is like Only, but panics if an error occurs.
func (*UserHistoryQuery) Order ¶
func (uhq *UserHistoryQuery) Order(o ...OrderFunc) *UserHistoryQuery
Order specifies how the records should be ordered.
func (*UserHistoryQuery) Select ¶
func (uhq *UserHistoryQuery) Select(fields ...string) *UserHistorySelect
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 { HistoryTime time.Time `json:"history_time,omitempty"` } client.UserHistory.Query(). Select(userhistory.FieldHistoryTime). Scan(ctx, &v)
func (*UserHistoryQuery) Unique ¶
func (uhq *UserHistoryQuery) Unique(unique bool) *UserHistoryQuery
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 (*UserHistoryQuery) Where ¶
func (uhq *UserHistoryQuery) Where(ps ...predicate.UserHistory) *UserHistoryQuery
Where adds a new predicate for the UserHistoryQuery builder.
type UserHistorySelect ¶
type UserHistorySelect struct { *UserHistoryQuery // contains filtered or unexported fields }
UserHistorySelect is the builder for selecting fields of UserHistory entities.
func (*UserHistorySelect) Aggregate ¶
func (uhs *UserHistorySelect) Aggregate(fns ...AggregateFunc) *UserHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserHistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserHistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserHistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserHistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserHistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserHistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserHistorySelect) Modify ¶
func (uhs *UserHistorySelect) Modify(modifiers ...func(s *sql.Selector)) *UserHistorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*UserHistorySelect) Scan ¶
func (uhs *UserHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserHistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserHistoryUpdate ¶
type UserHistoryUpdate struct {
// contains filtered or unexported fields
}
UserHistoryUpdate is the builder for updating UserHistory entities.
func (*UserHistoryUpdate) ClearIsAdmin ¶
func (uhu *UserHistoryUpdate) ClearIsAdmin() *UserHistoryUpdate
ClearIsAdmin clears the value of the "is_admin" field.
func (*UserHistoryUpdate) Exec ¶
func (uhu *UserHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserHistoryUpdate) ExecX ¶
func (uhu *UserHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserHistoryUpdate) Modify ¶
func (uhu *UserHistoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserHistoryUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserHistoryUpdate) Mutation ¶
func (uhu *UserHistoryUpdate) Mutation() *UserHistoryMutation
Mutation returns the UserHistoryMutation object of the builder.
func (*UserHistoryUpdate) Save ¶
func (uhu *UserHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserHistoryUpdate) SaveX ¶
func (uhu *UserHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserHistoryUpdate) SetEmail ¶
func (uhu *UserHistoryUpdate) SetEmail(s string) *UserHistoryUpdate
SetEmail sets the "email" field.
func (*UserHistoryUpdate) SetFirstName ¶
func (uhu *UserHistoryUpdate) SetFirstName(s string) *UserHistoryUpdate
SetFirstName sets the "first_name" field.
func (*UserHistoryUpdate) SetIsAdmin ¶
func (uhu *UserHistoryUpdate) SetIsAdmin(b bool) *UserHistoryUpdate
SetIsAdmin sets the "is_admin" field.
func (*UserHistoryUpdate) SetLastName ¶
func (uhu *UserHistoryUpdate) SetLastName(s string) *UserHistoryUpdate
SetLastName sets the "last_name" field.
func (*UserHistoryUpdate) SetNillableIsAdmin ¶
func (uhu *UserHistoryUpdate) SetNillableIsAdmin(b *bool) *UserHistoryUpdate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserHistoryUpdate) SetNillableUUID ¶
func (uhu *UserHistoryUpdate) SetNillableUUID(u *uuid.UUID) *UserHistoryUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*UserHistoryUpdate) SetPassword ¶
func (uhu *UserHistoryUpdate) SetPassword(s string) *UserHistoryUpdate
SetPassword sets the "password" field.
func (*UserHistoryUpdate) SetUUID ¶
func (uhu *UserHistoryUpdate) SetUUID(u uuid.UUID) *UserHistoryUpdate
SetUUID sets the "uuid" field.
func (*UserHistoryUpdate) SetUpdatedAt ¶
func (uhu *UserHistoryUpdate) SetUpdatedAt(t time.Time) *UserHistoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserHistoryUpdate) SetUsername ¶
func (uhu *UserHistoryUpdate) SetUsername(s string) *UserHistoryUpdate
SetUsername sets the "username" field.
func (*UserHistoryUpdate) Where ¶
func (uhu *UserHistoryUpdate) Where(ps ...predicate.UserHistory) *UserHistoryUpdate
Where appends a list predicates to the UserHistoryUpdate builder.
type UserHistoryUpdateOne ¶
type UserHistoryUpdateOne struct {
// contains filtered or unexported fields
}
UserHistoryUpdateOne is the builder for updating a single UserHistory entity.
func (*UserHistoryUpdateOne) ClearIsAdmin ¶
func (uhuo *UserHistoryUpdateOne) ClearIsAdmin() *UserHistoryUpdateOne
ClearIsAdmin clears the value of the "is_admin" field.
func (*UserHistoryUpdateOne) Exec ¶
func (uhuo *UserHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserHistoryUpdateOne) ExecX ¶
func (uhuo *UserHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserHistoryUpdateOne) Modify ¶
func (uhuo *UserHistoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserHistoryUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserHistoryUpdateOne) Mutation ¶
func (uhuo *UserHistoryUpdateOne) Mutation() *UserHistoryMutation
Mutation returns the UserHistoryMutation object of the builder.
func (*UserHistoryUpdateOne) Save ¶
func (uhuo *UserHistoryUpdateOne) Save(ctx context.Context) (*UserHistory, error)
Save executes the query and returns the updated UserHistory entity.
func (*UserHistoryUpdateOne) SaveX ¶
func (uhuo *UserHistoryUpdateOne) SaveX(ctx context.Context) *UserHistory
SaveX is like Save, but panics if an error occurs.
func (*UserHistoryUpdateOne) Select ¶
func (uhuo *UserHistoryUpdateOne) Select(field string, fields ...string) *UserHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserHistoryUpdateOne) SetEmail ¶
func (uhuo *UserHistoryUpdateOne) SetEmail(s string) *UserHistoryUpdateOne
SetEmail sets the "email" field.
func (*UserHistoryUpdateOne) SetFirstName ¶
func (uhuo *UserHistoryUpdateOne) SetFirstName(s string) *UserHistoryUpdateOne
SetFirstName sets the "first_name" field.
func (*UserHistoryUpdateOne) SetIsAdmin ¶
func (uhuo *UserHistoryUpdateOne) SetIsAdmin(b bool) *UserHistoryUpdateOne
SetIsAdmin sets the "is_admin" field.
func (*UserHistoryUpdateOne) SetLastName ¶
func (uhuo *UserHistoryUpdateOne) SetLastName(s string) *UserHistoryUpdateOne
SetLastName sets the "last_name" field.
func (*UserHistoryUpdateOne) SetNillableIsAdmin ¶
func (uhuo *UserHistoryUpdateOne) SetNillableIsAdmin(b *bool) *UserHistoryUpdateOne
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserHistoryUpdateOne) SetNillableUUID ¶
func (uhuo *UserHistoryUpdateOne) SetNillableUUID(u *uuid.UUID) *UserHistoryUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*UserHistoryUpdateOne) SetPassword ¶
func (uhuo *UserHistoryUpdateOne) SetPassword(s string) *UserHistoryUpdateOne
SetPassword sets the "password" field.
func (*UserHistoryUpdateOne) SetUUID ¶
func (uhuo *UserHistoryUpdateOne) SetUUID(u uuid.UUID) *UserHistoryUpdateOne
SetUUID sets the "uuid" field.
func (*UserHistoryUpdateOne) SetUpdatedAt ¶
func (uhuo *UserHistoryUpdateOne) SetUpdatedAt(t time.Time) *UserHistoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserHistoryUpdateOne) SetUsername ¶
func (uhuo *UserHistoryUpdateOne) SetUsername(s string) *UserHistoryUpdateOne
SetUsername sets the "username" field.
func (*UserHistoryUpdateOne) Where ¶
func (uhuo *UserHistoryUpdateOne) Where(ps ...predicate.UserHistory) *UserHistoryUpdateOne
Where appends a list predicates to the UserHistoryUpdate builder.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddDocumentIDs ¶
func (m *UserMutation) AddDocumentIDs(ids ...int)
AddDocumentIDs adds the "documents" edge to the Document entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearDocuments ¶
func (m *UserMutation) ClearDocuments()
ClearDocuments clears the "documents" edge to the Document entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearIsAdmin ¶
func (m *UserMutation) ClearIsAdmin()
ClearIsAdmin clears the value of the "is_admin" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CreateHistoryFromCreate ¶
func (m *UserMutation) CreateHistoryFromCreate(ctx context.Context) error
func (*UserMutation) CreateHistoryFromDelete ¶
func (m *UserMutation) CreateHistoryFromDelete(ctx context.Context) error
func (*UserMutation) CreateHistoryFromUpdate ¶
func (m *UserMutation) CreateHistoryFromUpdate(ctx context.Context) error
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) DocumentsCleared ¶
func (m *UserMutation) DocumentsCleared() bool
DocumentsCleared reports if the "documents" edge to the Document entity was cleared.
func (*UserMutation) DocumentsIDs ¶
func (m *UserMutation) DocumentsIDs() (ids []int)
DocumentsIDs returns the "documents" edge IDs in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) FirstName ¶
func (m *UserMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) 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 or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IsAdmin ¶
func (m *UserMutation) IsAdmin() (r bool, exists bool)
IsAdmin returns the value of the "is_admin" field in the mutation.
func (*UserMutation) IsAdminCleared ¶
func (m *UserMutation) IsAdminCleared() bool
IsAdminCleared returns if the "is_admin" field was cleared in this mutation.
func (*UserMutation) LastName ¶
func (m *UserMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldFirstName ¶
func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the User entity. If the User 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 (*UserMutation) OldIsAdmin ¶
func (m *UserMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
OldIsAdmin returns the old "is_admin" field's value of the User entity. If the User 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 (*UserMutation) OldLastName ¶
func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the User entity. If the User 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 (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User 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 (*UserMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the User entity. If the User 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 (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User 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 (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User 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 (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveDocumentIDs ¶
func (m *UserMutation) RemoveDocumentIDs(ids ...int)
RemoveDocumentIDs removes the "documents" edge to the Document entity by IDs.
func (*UserMutation) RemovedDocumentsIDs ¶
func (m *UserMutation) RemovedDocumentsIDs() (ids []int)
RemovedDocuments returns the removed IDs of the "documents" edge to the Document entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDocuments ¶
func (m *UserMutation) ResetDocuments()
ResetDocuments resets all changes to the "documents" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetFirstName ¶
func (m *UserMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*UserMutation) ResetIsAdmin ¶
func (m *UserMutation) ResetIsAdmin()
ResetIsAdmin resets all changes to the "is_admin" field.
func (*UserMutation) ResetLastName ¶
func (m *UserMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetUUID ¶
func (m *UserMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetFirstName ¶
func (m *UserMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*UserMutation) SetIsAdmin ¶
func (m *UserMutation) SetIsAdmin(b bool)
SetIsAdmin sets the "is_admin" field.
func (*UserMutation) SetLastName ¶
func (m *UserMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetUUID ¶
func (m *UserMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UUID ¶
func (m *UserMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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 { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Modify ¶
func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryDocuments ¶
func (uq *UserQuery) QueryDocuments() *DocumentQuery
QueryDocuments chains the current query on the "documents" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
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 { UUID uuid.UUID `json:"uuid,omitempty"` } client.User.Query(). Select(user.FieldUUID). Scan(ctx, &v)
func (*UserQuery) Unique ¶
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 (*UserQuery) WithDocuments ¶
func (uq *UserQuery) WithDocuments(opts ...func(*DocumentQuery)) *UserQuery
WithDocuments tells the query-builder to eager-load the nodes that are connected to the "documents" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Modify ¶
func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddDocumentIDs ¶
func (uu *UserUpdate) AddDocumentIDs(ids ...int) *UserUpdate
AddDocumentIDs adds the "documents" edge to the Document entity by IDs.
func (*UserUpdate) AddDocuments ¶
func (uu *UserUpdate) AddDocuments(d ...*Document) *UserUpdate
AddDocuments adds the "documents" edges to the Document entity.
func (*UserUpdate) ClearDocuments ¶
func (uu *UserUpdate) ClearDocuments() *UserUpdate
ClearDocuments clears all "documents" edges to the Document entity.
func (*UserUpdate) ClearIsAdmin ¶
func (uu *UserUpdate) ClearIsAdmin() *UserUpdate
ClearIsAdmin clears the value of the "is_admin" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Modify ¶
func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveDocumentIDs ¶
func (uu *UserUpdate) RemoveDocumentIDs(ids ...int) *UserUpdate
RemoveDocumentIDs removes the "documents" edge to Document entities by IDs.
func (*UserUpdate) RemoveDocuments ¶
func (uu *UserUpdate) RemoveDocuments(d ...*Document) *UserUpdate
RemoveDocuments removes "documents" edges to Document entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetFirstName ¶
func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
SetFirstName sets the "first_name" field.
func (*UserUpdate) SetIsAdmin ¶
func (uu *UserUpdate) SetIsAdmin(b bool) *UserUpdate
SetIsAdmin sets the "is_admin" field.
func (*UserUpdate) SetLastName ¶
func (uu *UserUpdate) SetLastName(s string) *UserUpdate
SetLastName sets the "last_name" field.
func (*UserUpdate) SetNillableIsAdmin ¶
func (uu *UserUpdate) SetNillableIsAdmin(b *bool) *UserUpdate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserUpdate) SetNillableUUID ¶
func (uu *UserUpdate) SetNillableUUID(u *uuid.UUID) *UserUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetUUID ¶
func (uu *UserUpdate) SetUUID(u uuid.UUID) *UserUpdate
SetUUID sets the "uuid" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddDocumentIDs ¶
func (uuo *UserUpdateOne) AddDocumentIDs(ids ...int) *UserUpdateOne
AddDocumentIDs adds the "documents" edge to the Document entity by IDs.
func (*UserUpdateOne) AddDocuments ¶
func (uuo *UserUpdateOne) AddDocuments(d ...*Document) *UserUpdateOne
AddDocuments adds the "documents" edges to the Document entity.
func (*UserUpdateOne) ClearDocuments ¶
func (uuo *UserUpdateOne) ClearDocuments() *UserUpdateOne
ClearDocuments clears all "documents" edges to the Document entity.
func (*UserUpdateOne) ClearIsAdmin ¶
func (uuo *UserUpdateOne) ClearIsAdmin() *UserUpdateOne
ClearIsAdmin clears the value of the "is_admin" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Modify ¶
func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveDocumentIDs ¶
func (uuo *UserUpdateOne) RemoveDocumentIDs(ids ...int) *UserUpdateOne
RemoveDocumentIDs removes the "documents" edge to Document entities by IDs.
func (*UserUpdateOne) RemoveDocuments ¶
func (uuo *UserUpdateOne) RemoveDocuments(d ...*Document) *UserUpdateOne
RemoveDocuments removes "documents" edges to Document entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetFirstName ¶
func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
SetFirstName sets the "first_name" field.
func (*UserUpdateOne) SetIsAdmin ¶
func (uuo *UserUpdateOne) SetIsAdmin(b bool) *UserUpdateOne
SetIsAdmin sets the "is_admin" field.
func (*UserUpdateOne) SetLastName ¶
func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
SetLastName sets the "last_name" field.
func (*UserUpdateOne) SetNillableIsAdmin ¶
func (uuo *UserUpdateOne) SetNillableIsAdmin(b *bool) *UserUpdateOne
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUUID ¶
func (uuo *UserUpdateOne) SetNillableUUID(u *uuid.UUID) *UserUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetUUID ¶
func (uuo *UserUpdateOne) SetUUID(u uuid.UUID) *UserUpdateOne
SetUUID sets the "uuid" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- auditing.go
- client.go
- document.go
- document_create.go
- document_delete.go
- document_query.go
- document_update.go
- documenthistory.go
- documenthistory_create.go
- documenthistory_delete.go
- documenthistory_query.go
- documenthistory_update.go
- documentsearch.go
- documentsearch_create.go
- documentsearch_delete.go
- documentsearch_query.go
- documentsearch_update.go
- ent.go
- history_from_mutation.go
- history_query.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userhistory.go
- userhistory_create.go
- userhistory_delete.go
- userhistory_query.go
- userhistory_update.go