Versions in this module Expand all Collapse all v0 v0.1.7 Nov 1, 2023 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeEval + var DefaultEvalOrder = &EvalOrder + var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction") + func Asc(fields ...string) func(*sql.Selector) + func Desc(fields ...string) func(*sql.Selector) + 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 + func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error) + type AggregateFunc func(*sql.Selector) string + func As(fn AggregateFunc, end string) AggregateFunc + func Count() AggregateFunc + func Max(field string) AggregateFunc + func Mean(field string) AggregateFunc + func Min(field string) AggregateFunc + func Sum(field string) AggregateFunc + type Client struct + Eval *EvalClient + Schema *migrate.Schema + func FromContext(ctx context.Context) *Client + func NewClient(opts ...Option) *Client + func Open(driverName, dataSourceName string, options ...Option) (*Client, error) + 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) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error) + func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error) + func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error) + func (c *Client) Tx(ctx context.Context) (*Tx, error) + func (c *Client) Use(hooks ...Hook) + type CommitFunc func(context.Context, *Tx) error + func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error + type CommitHook func(Committer) Committer + type Committer interface + Commit func(context.Context, *Tx) error + type ConstraintError struct + func (e *ConstraintError) Unwrap() error + func (e ConstraintError) Error() string + type Cursor = entgql.Cursor[int] + type Eval struct + ID int + Result []string + Snippet string + Time string + func (e *Eval) String() string + func (e *Eval) ToEdge(order *EvalOrder) *EvalEdge + func (e *Eval) Unwrap() *Eval + func (e *Eval) Update() *EvalUpdateOne + func (e *Eval) Value(name string) (ent.Value, error) + func (n *Eval) IsNode() + type EvalClient struct + func NewEvalClient(c config) *EvalClient + func (c *EvalClient) Create() *EvalCreate + func (c *EvalClient) CreateBulk(builders ...*EvalCreate) *EvalCreateBulk + func (c *EvalClient) Delete() *EvalDelete + func (c *EvalClient) DeleteOne(e *Eval) *EvalDeleteOne + func (c *EvalClient) DeleteOneID(id int) *EvalDeleteOne + func (c *EvalClient) Get(ctx context.Context, id int) (*Eval, error) + func (c *EvalClient) GetX(ctx context.Context, id int) *Eval + func (c *EvalClient) Hooks() []Hook + func (c *EvalClient) Intercept(interceptors ...Interceptor) + func (c *EvalClient) Interceptors() []Interceptor + func (c *EvalClient) MapCreateBulk(slice any, setFunc func(*EvalCreate, int)) *EvalCreateBulk + func (c *EvalClient) Query() *EvalQuery + func (c *EvalClient) Update() *EvalUpdate + func (c *EvalClient) UpdateOne(e *Eval) *EvalUpdateOne + func (c *EvalClient) UpdateOneID(id int) *EvalUpdateOne + func (c *EvalClient) Use(hooks ...Hook) + type EvalConnection struct + Edges []*EvalEdge + PageInfo PageInfo + TotalCount int + type EvalCreate struct + func (ec *EvalCreate) Exec(ctx context.Context) error + func (ec *EvalCreate) ExecX(ctx context.Context) + func (ec *EvalCreate) Mutation() *EvalMutation + func (ec *EvalCreate) Save(ctx context.Context) (*Eval, error) + func (ec *EvalCreate) SaveX(ctx context.Context) *Eval + func (ec *EvalCreate) SetResult(s []string) *EvalCreate + func (ec *EvalCreate) SetSnippet(s string) *EvalCreate + func (ec *EvalCreate) SetTime(s string) *EvalCreate + type EvalCreateBulk struct + func (ecb *EvalCreateBulk) Exec(ctx context.Context) error + func (ecb *EvalCreateBulk) ExecX(ctx context.Context) + func (ecb *EvalCreateBulk) Save(ctx context.Context) ([]*Eval, error) + func (ecb *EvalCreateBulk) SaveX(ctx context.Context) []*Eval + type EvalDelete struct + func (ed *EvalDelete) Exec(ctx context.Context) (int, error) + func (ed *EvalDelete) ExecX(ctx context.Context) int + func (ed *EvalDelete) Where(ps ...predicate.Eval) *EvalDelete + type EvalDeleteOne struct + func (edo *EvalDeleteOne) Exec(ctx context.Context) error + func (edo *EvalDeleteOne) ExecX(ctx context.Context) + func (edo *EvalDeleteOne) Where(ps ...predicate.Eval) *EvalDeleteOne + type EvalEdge struct + Cursor Cursor + Node *Eval + type EvalGroupBy struct + func (egb *EvalGroupBy) Aggregate(fns ...AggregateFunc) *EvalGroupBy + func (egb *EvalGroupBy) Scan(ctx context.Context, v any) error + func (s *EvalGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *EvalGroupBy) BoolX(ctx context.Context) bool + func (s *EvalGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *EvalGroupBy) BoolsX(ctx context.Context) []bool + func (s *EvalGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *EvalGroupBy) Float64X(ctx context.Context) float64 + func (s *EvalGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *EvalGroupBy) Float64sX(ctx context.Context) []float64 + func (s *EvalGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *EvalGroupBy) IntX(ctx context.Context) int + func (s *EvalGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *EvalGroupBy) IntsX(ctx context.Context) []int + func (s *EvalGroupBy) ScanX(ctx context.Context, v any) + func (s *EvalGroupBy) String(ctx context.Context) (_ string, err error) + func (s *EvalGroupBy) StringX(ctx context.Context) string + func (s *EvalGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *EvalGroupBy) StringsX(ctx context.Context) []string + type EvalMutation struct + func (m *EvalMutation) AddField(name string, value ent.Value) error + func (m *EvalMutation) AddedEdges() []string + func (m *EvalMutation) AddedField(name string) (ent.Value, bool) + func (m *EvalMutation) AddedFields() []string + func (m *EvalMutation) AddedIDs(name string) []ent.Value + func (m *EvalMutation) AppendResult(s []string) + func (m *EvalMutation) AppendedResult() ([]string, bool) + func (m *EvalMutation) ClearEdge(name string) error + func (m *EvalMutation) ClearField(name string) error + func (m *EvalMutation) ClearedEdges() []string + func (m *EvalMutation) ClearedFields() []string + func (m *EvalMutation) EdgeCleared(name string) bool + func (m *EvalMutation) Field(name string) (ent.Value, bool) + func (m *EvalMutation) FieldCleared(name string) bool + func (m *EvalMutation) Fields() []string + func (m *EvalMutation) ID() (id int, exists bool) + func (m *EvalMutation) IDs(ctx context.Context) ([]int, error) + func (m *EvalMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *EvalMutation) OldResult(ctx context.Context) (v []string, err error) + func (m *EvalMutation) OldSnippet(ctx context.Context) (v string, err error) + func (m *EvalMutation) OldTime(ctx context.Context) (v string, err error) + func (m *EvalMutation) Op() Op + func (m *EvalMutation) RemovedEdges() []string + func (m *EvalMutation) RemovedIDs(name string) []ent.Value + func (m *EvalMutation) ResetEdge(name string) error + func (m *EvalMutation) ResetField(name string) error + func (m *EvalMutation) ResetResult() + func (m *EvalMutation) ResetSnippet() + func (m *EvalMutation) ResetTime() + func (m *EvalMutation) Result() (r []string, exists bool) + func (m *EvalMutation) SetField(name string, value ent.Value) error + func (m *EvalMutation) SetOp(op Op) + func (m *EvalMutation) SetResult(s []string) + func (m *EvalMutation) SetSnippet(s string) + func (m *EvalMutation) SetTime(s string) + func (m *EvalMutation) Snippet() (r string, exists bool) + func (m *EvalMutation) Time() (r string, exists bool) + func (m *EvalMutation) Type() string + func (m *EvalMutation) Where(ps ...predicate.Eval) + func (m *EvalMutation) WhereP(ps ...func(*sql.Selector)) + func (m EvalMutation) Client() *Client + func (m EvalMutation) Tx() (*Tx, error) + type EvalOrder struct + Direction OrderDirection + Field *EvalOrderField + type EvalOrderField struct + Value func(*Eval) (ent.Value, error) + type EvalPaginateOption func(*evalPager) error + func WithEvalFilter(filter func(*EvalQuery) (*EvalQuery, error)) EvalPaginateOption + func WithEvalOrder(order *EvalOrder) EvalPaginateOption + type EvalQuery struct + func (e *EvalQuery) CollectFields(ctx context.Context, satisfies ...string) (*EvalQuery, error) + func (e *EvalQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*EvalConnection, error) + func (eq *EvalQuery) Aggregate(fns ...AggregateFunc) *EvalSelect + func (eq *EvalQuery) All(ctx context.Context) ([]*Eval, error) + func (eq *EvalQuery) AllX(ctx context.Context) []*Eval + func (eq *EvalQuery) Clone() *EvalQuery + func (eq *EvalQuery) Count(ctx context.Context) (int, error) + func (eq *EvalQuery) CountX(ctx context.Context) int + func (eq *EvalQuery) Exist(ctx context.Context) (bool, error) + func (eq *EvalQuery) ExistX(ctx context.Context) bool + func (eq *EvalQuery) First(ctx context.Context) (*Eval, error) + func (eq *EvalQuery) FirstID(ctx context.Context) (id int, err error) + func (eq *EvalQuery) FirstIDX(ctx context.Context) int + func (eq *EvalQuery) FirstX(ctx context.Context) *Eval + func (eq *EvalQuery) GroupBy(field string, fields ...string) *EvalGroupBy + func (eq *EvalQuery) IDs(ctx context.Context) (ids []int, err error) + func (eq *EvalQuery) IDsX(ctx context.Context) []int + func (eq *EvalQuery) Limit(limit int) *EvalQuery + func (eq *EvalQuery) Offset(offset int) *EvalQuery + func (eq *EvalQuery) Only(ctx context.Context) (*Eval, error) + func (eq *EvalQuery) OnlyID(ctx context.Context) (id int, err error) + func (eq *EvalQuery) OnlyIDX(ctx context.Context) int + func (eq *EvalQuery) OnlyX(ctx context.Context) *Eval + func (eq *EvalQuery) Order(o ...eval.OrderOption) *EvalQuery + func (eq *EvalQuery) Select(fields ...string) *EvalSelect + func (eq *EvalQuery) Unique(unique bool) *EvalQuery + func (eq *EvalQuery) Where(ps ...predicate.Eval) *EvalQuery + type EvalSelect struct + func (es *EvalSelect) Aggregate(fns ...AggregateFunc) *EvalSelect + func (es *EvalSelect) Scan(ctx context.Context, v any) error + func (s *EvalSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *EvalSelect) BoolX(ctx context.Context) bool + func (s *EvalSelect) Bools(ctx context.Context) ([]bool, error) + func (s *EvalSelect) BoolsX(ctx context.Context) []bool + func (s *EvalSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *EvalSelect) Float64X(ctx context.Context) float64 + func (s *EvalSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *EvalSelect) Float64sX(ctx context.Context) []float64 + func (s *EvalSelect) Int(ctx context.Context) (_ int, err error) + func (s *EvalSelect) IntX(ctx context.Context) int + func (s *EvalSelect) Ints(ctx context.Context) ([]int, error) + func (s *EvalSelect) IntsX(ctx context.Context) []int + func (s *EvalSelect) ScanX(ctx context.Context, v any) + func (s *EvalSelect) String(ctx context.Context) (_ string, err error) + func (s *EvalSelect) StringX(ctx context.Context) string + func (s *EvalSelect) Strings(ctx context.Context) ([]string, error) + func (s *EvalSelect) StringsX(ctx context.Context) []string + type EvalUpdate struct + func (eu *EvalUpdate) AppendResult(s []string) *EvalUpdate + func (eu *EvalUpdate) Exec(ctx context.Context) error + func (eu *EvalUpdate) ExecX(ctx context.Context) + func (eu *EvalUpdate) Mutation() *EvalMutation + func (eu *EvalUpdate) Save(ctx context.Context) (int, error) + func (eu *EvalUpdate) SaveX(ctx context.Context) int + func (eu *EvalUpdate) SetResult(s []string) *EvalUpdate + func (eu *EvalUpdate) SetSnippet(s string) *EvalUpdate + func (eu *EvalUpdate) SetTime(s string) *EvalUpdate + func (eu *EvalUpdate) Where(ps ...predicate.Eval) *EvalUpdate + type EvalUpdateOne struct + func (euo *EvalUpdateOne) AppendResult(s []string) *EvalUpdateOne + func (euo *EvalUpdateOne) Exec(ctx context.Context) error + func (euo *EvalUpdateOne) ExecX(ctx context.Context) + func (euo *EvalUpdateOne) Mutation() *EvalMutation + func (euo *EvalUpdateOne) Save(ctx context.Context) (*Eval, error) + func (euo *EvalUpdateOne) SaveX(ctx context.Context) *Eval + func (euo *EvalUpdateOne) Select(field string, fields ...string) *EvalUpdateOne + func (euo *EvalUpdateOne) SetResult(s []string) *EvalUpdateOne + func (euo *EvalUpdateOne) SetSnippet(s string) *EvalUpdateOne + func (euo *EvalUpdateOne) SetTime(s string) *EvalUpdateOne + func (euo *EvalUpdateOne) Where(ps ...predicate.Eval) *EvalUpdateOne + type Evals []*Eval + type Hook = ent.Hook + type InterceptFunc = ent.InterceptFunc + type Interceptor = ent.Interceptor + type MutateFunc = ent.MutateFunc + type Mutation = ent.Mutation + type Mutator = ent.Mutator + type NodeOption func(*nodeOptions) + func WithFixedNodeType(t string) NodeOption + func WithNodeType(f func(context.Context, int) (string, error)) NodeOption + type Noder interface + IsNode func() + type NotFoundError struct + func (e *NotFoundError) Error() string + type NotLoadedError struct + func (e *NotLoadedError) Error() string + type NotSingularError struct + func (e *NotSingularError) Error() string + type Op = ent.Op + type Option func(*config) + func Debug() Option + func Driver(driver dialect.Driver) Option + func Log(fn func(...any)) Option + type OrderDirection = entgql.OrderDirection + type OrderFunc func(*sql.Selector) + type PageInfo = entgql.PageInfo[int] + type Policy = ent.Policy + type Querier = ent.Querier + type QuerierFunc = ent.QuerierFunc + type Query = ent.Query + type QueryContext = ent.QueryContext + type RollbackFunc func(context.Context, *Tx) error + func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error + type RollbackHook func(Rollbacker) Rollbacker + type Rollbacker interface + Rollback func(context.Context, *Tx) error + type TraverseFunc = ent.TraverseFunc + type Traverser = ent.Traverser + type Tx struct + Eval *EvalClient + func TxFromContext(ctx context.Context) *Tx + func (tx *Tx) Client() *Client + func (tx *Tx) Commit() error + func (tx *Tx) OnCommit(f CommitHook) + func (tx *Tx) OnRollback(f RollbackHook) + func (tx *Tx) Rollback() error + type ValidationError struct + Name string + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error + type Value = ent.Value