Documentation ¶
Index ¶
- Constants
- Variables
- 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
- 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) Node(ctx context.Context, id int) (*Node, 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
- type CommitHook
- type Committer
- type ConstraintError
- type Cursor
- type Edge
- type Field
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Query
- type Report
- type ReportClient
- func (c *ReportClient) Create() *ReportCreate
- func (c *ReportClient) CreateBulk(builders ...*ReportCreate) *ReportCreateBulk
- func (c *ReportClient) Delete() *ReportDelete
- func (c *ReportClient) DeleteOne(r *Report) *ReportDeleteOne
- func (c *ReportClient) DeleteOneID(id int) *ReportDeleteOne
- func (c *ReportClient) Get(ctx context.Context, id int) (*Report, error)
- func (c *ReportClient) GetX(ctx context.Context, id int) *Report
- func (c *ReportClient) Hooks() []Hook
- func (c *ReportClient) Query() *ReportQuery
- func (c *ReportClient) Update() *ReportUpdate
- func (c *ReportClient) UpdateOne(r *Report) *ReportUpdateOne
- func (c *ReportClient) UpdateOneID(id int) *ReportUpdateOne
- func (c *ReportClient) Use(hooks ...Hook)
- type ReportConnection
- type ReportCreate
- func (rc *ReportCreate) Exec(ctx context.Context) error
- func (rc *ReportCreate) ExecX(ctx context.Context)
- func (rc *ReportCreate) Mutation() *ReportMutation
- func (rc *ReportCreate) Save(ctx context.Context) (*Report, error)
- func (rc *ReportCreate) SaveX(ctx context.Context) *Report
- func (rc *ReportCreate) SetID(i int) *ReportCreate
- type ReportCreateBulk
- type ReportDelete
- type ReportDeleteOne
- type ReportEdge
- type ReportGroupBy
- func (rgb *ReportGroupBy) Aggregate(fns ...AggregateFunc) *ReportGroupBy
- func (s *ReportGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReportGroupBy) BoolX(ctx context.Context) bool
- func (s *ReportGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReportGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReportGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReportGroupBy) Float64X(ctx context.Context) float64
- func (s *ReportGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReportGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReportGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReportGroupBy) IntX(ctx context.Context) int
- func (s *ReportGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReportGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReportGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReportGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReportGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReportGroupBy) StringX(ctx context.Context) string
- func (s *ReportGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReportGroupBy) StringsX(ctx context.Context) []string
- type ReportMutation
- func (m *ReportMutation) AddField(name string, value ent.Value) error
- func (m *ReportMutation) AddedEdges() []string
- func (m *ReportMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReportMutation) AddedFields() []string
- func (m *ReportMutation) AddedIDs(name string) []ent.Value
- func (m *ReportMutation) ClearEdge(name string) error
- func (m *ReportMutation) ClearField(name string) error
- func (m *ReportMutation) ClearedEdges() []string
- func (m *ReportMutation) ClearedFields() []string
- func (m ReportMutation) Client() *Client
- func (m *ReportMutation) EdgeCleared(name string) bool
- func (m *ReportMutation) Field(name string) (ent.Value, bool)
- func (m *ReportMutation) FieldCleared(name string) bool
- func (m *ReportMutation) Fields() []string
- func (m *ReportMutation) ID() (id int, exists bool)
- func (m *ReportMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ReportMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReportMutation) Op() Op
- func (m *ReportMutation) RemovedEdges() []string
- func (m *ReportMutation) RemovedIDs(name string) []ent.Value
- func (m *ReportMutation) ResetEdge(name string) error
- func (m *ReportMutation) ResetField(name string) error
- func (m *ReportMutation) SetField(name string, value ent.Value) error
- func (m *ReportMutation) SetID(id int)
- func (m ReportMutation) Tx() (*Tx, error)
- func (m *ReportMutation) Type() string
- func (m *ReportMutation) Where(ps ...predicate.Report)
- type ReportOrder
- type ReportOrderField
- type ReportPaginateOption
- type ReportQuery
- func (rq *ReportQuery) Aggregate(fns ...AggregateFunc) *ReportSelect
- func (rq *ReportQuery) All(ctx context.Context) ([]*Report, error)
- func (rq *ReportQuery) AllX(ctx context.Context) []*Report
- func (rq *ReportQuery) Clone() *ReportQuery
- func (r *ReportQuery) CollectFields(ctx context.Context, satisfies ...string) (*ReportQuery, error)
- func (rq *ReportQuery) Count(ctx context.Context) (int, error)
- func (rq *ReportQuery) CountX(ctx context.Context) int
- func (rq *ReportQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReportQuery) ExistX(ctx context.Context) bool
- func (rq *ReportQuery) First(ctx context.Context) (*Report, error)
- func (rq *ReportQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *ReportQuery) FirstIDX(ctx context.Context) int
- func (rq *ReportQuery) FirstX(ctx context.Context) *Report
- func (rq *ReportQuery) GroupBy(field string, fields ...string) *ReportGroupBy
- func (rq *ReportQuery) IDs(ctx context.Context) ([]int, error)
- func (rq *ReportQuery) IDsX(ctx context.Context) []int
- func (rq *ReportQuery) Limit(limit int) *ReportQuery
- func (rq *ReportQuery) Offset(offset int) *ReportQuery
- func (rq *ReportQuery) Only(ctx context.Context) (*Report, error)
- func (rq *ReportQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *ReportQuery) OnlyIDX(ctx context.Context) int
- func (rq *ReportQuery) OnlyX(ctx context.Context) *Report
- func (rq *ReportQuery) Order(o ...OrderFunc) *ReportQuery
- func (r *ReportQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ReportConnection, error)
- func (rq *ReportQuery) Select(fields ...string) *ReportSelect
- func (rq *ReportQuery) Unique(unique bool) *ReportQuery
- func (rq *ReportQuery) Where(ps ...predicate.Report) *ReportQuery
- type ReportSelect
- func (rs *ReportSelect) Aggregate(fns ...AggregateFunc) *ReportSelect
- func (s *ReportSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReportSelect) BoolX(ctx context.Context) bool
- func (s *ReportSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReportSelect) BoolsX(ctx context.Context) []bool
- func (s *ReportSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReportSelect) Float64X(ctx context.Context) float64
- func (s *ReportSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReportSelect) Float64sX(ctx context.Context) []float64
- func (s *ReportSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReportSelect) IntX(ctx context.Context) int
- func (s *ReportSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReportSelect) IntsX(ctx context.Context) []int
- func (rs *ReportSelect) Scan(ctx context.Context, v any) error
- func (s *ReportSelect) ScanX(ctx context.Context, v any)
- func (s *ReportSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReportSelect) StringX(ctx context.Context) string
- func (s *ReportSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReportSelect) StringsX(ctx context.Context) []string
- type ReportUpdate
- func (ru *ReportUpdate) Exec(ctx context.Context) error
- func (ru *ReportUpdate) ExecX(ctx context.Context)
- func (ru *ReportUpdate) Mutation() *ReportMutation
- func (ru *ReportUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReportUpdate) SaveX(ctx context.Context) int
- func (ru *ReportUpdate) Where(ps ...predicate.Report) *ReportUpdate
- type ReportUpdateOne
- func (ruo *ReportUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReportUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReportUpdateOne) Mutation() *ReportMutation
- func (ruo *ReportUpdateOne) Save(ctx context.Context) (*Report, error)
- func (ruo *ReportUpdateOne) SaveX(ctx context.Context) *Report
- func (ruo *ReportUpdateOne) Select(field string, fields ...string) *ReportUpdateOne
- type ReportWhereInput
- type Reports
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- 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) Query() *UserQuery
- 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 UserConnection
- type 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) SetFullName(s string) *UserCreate
- func (uc *UserCreate) SetID(i int) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdge
- 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 UserMutation
- 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) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) EdgeCleared(name string) 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) FullName() (r string, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFullName(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFullName()
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFullName(s string)
- func (m *UserMutation) SetID(id int)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserOrder
- type UserOrderField
- type UserPaginateOption
- 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 (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)
- 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) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- 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 (u *UserQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*UserConnection, error)
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *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) 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) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetFullName(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- 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) SetFullName(s string) *UserUpdateOne
- type UserWhereInput
- 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. TypeReport = "Report" TypeUser = "User" )
Variables ¶
var DefaultReportOrder = &ReportOrder{ Direction: OrderDirectionAsc, Field: &ReportOrderField{ field: report.FieldID, toCursor: func(r *Report) Cursor { return Cursor{ID: r.ID} }, }, }
DefaultReportOrder is the default ordering of Report.
var DefaultUserOrder = &UserOrder{ Direction: OrderDirectionAsc, Field: &UserOrderField{ field: user.FieldID, toCursor: func(u *User) Cursor { return Cursor{ID: u.ID} }, }, }
DefaultUserOrder is the default ordering of User.
var ErrEmptyReportWhereInput = errors.New("ent: empty predicate ReportWhereInput")
ErrEmptyReportWhereInput is returned in case the ReportWhereInput is empty.
var ErrEmptyUserWhereInput = errors.New("ent: empty predicate UserWhereInput")
ErrEmptyUserWhereInput is returned in case the UserWhereInput is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx 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 // Report is the client for interacting with the Report builders. Report *ReportClient // User is the client for interacting with the User builders. User *UserClient // 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(). Report. Query(). Count(ctx)
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
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 Cursor ¶
Cursor of an edge type.
func (Cursor) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Cursor) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.
type Edge ¶
type Edge struct { Type string `json:"type,omitempty"` // edge type. Name string `json:"name,omitempty"` // edge name. IDs []int `json:"ids,omitempty"` // node ids (where this edge point to). }
Edges between two nodes.
type Field ¶
type Field struct { Type string `json:"type,omitempty"` // field type. Name string `json:"name,omitempty"` // field name (as in struct). Value string `json:"value,omitempty"` // stringified value. }
Field of a node.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct { ID int `json:"id,omitempty"` // node id. Type string `json:"type,omitempty"` // node type. Fields []*Field `json:"fields,omitempty"` // node fields. Edges []*Edge `json:"edges,omitempty"` // node edges. }
Node in the graph.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
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 OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) MarshalGQL ¶
func (o OrderDirection) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (*OrderDirection) UnmarshalGQL ¶
func (o *OrderDirection) UnmarshalGQL(val interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type PageInfo ¶
type PageInfo struct { HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` StartCursor *Cursor `json:"startCursor"` EndCursor *Cursor `json:"endCursor"` }
PageInfo of a connection type.
type Report ¶
type Report struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Report is the model entity for the Report schema.
func (*Report) ToEdge ¶
func (r *Report) ToEdge(order *ReportOrder) *ReportEdge
ToEdge converts Report into ReportEdge.
func (*Report) Unwrap ¶
Unwrap unwraps the Report 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 (*Report) Update ¶
func (r *Report) Update() *ReportUpdateOne
Update returns a builder for updating this Report. Note that you need to call Report.Unwrap() before calling this method if this Report was returned from a transaction, and the transaction was committed or rolled back.
type ReportClient ¶
type ReportClient struct {
// contains filtered or unexported fields
}
ReportClient is a client for the Report schema.
func NewReportClient ¶
func NewReportClient(c config) *ReportClient
NewReportClient returns a client for the Report from the given config.
func (*ReportClient) Create ¶
func (c *ReportClient) Create() *ReportCreate
Create returns a builder for creating a Report entity.
func (*ReportClient) CreateBulk ¶
func (c *ReportClient) CreateBulk(builders ...*ReportCreate) *ReportCreateBulk
CreateBulk returns a builder for creating a bulk of Report entities.
func (*ReportClient) Delete ¶
func (c *ReportClient) Delete() *ReportDelete
Delete returns a delete builder for Report.
func (*ReportClient) DeleteOne ¶
func (c *ReportClient) DeleteOne(r *Report) *ReportDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReportClient) DeleteOneID ¶
func (c *ReportClient) DeleteOneID(id int) *ReportDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ReportClient) GetX ¶
func (c *ReportClient) GetX(ctx context.Context, id int) *Report
GetX is like Get, but panics if an error occurs.
func (*ReportClient) Query ¶
func (c *ReportClient) Query() *ReportQuery
Query returns a query builder for Report.
func (*ReportClient) Update ¶
func (c *ReportClient) Update() *ReportUpdate
Update returns an update builder for Report.
func (*ReportClient) UpdateOne ¶
func (c *ReportClient) UpdateOne(r *Report) *ReportUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReportClient) UpdateOneID ¶
func (c *ReportClient) UpdateOneID(id int) *ReportUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReportClient) Use ¶
func (c *ReportClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `report.Hooks(f(g(h())))`.
type ReportConnection ¶
type ReportConnection struct { Edges []*ReportEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ReportConnection is the connection containing edges to Report.
type ReportCreate ¶
type ReportCreate struct {
// contains filtered or unexported fields
}
ReportCreate is the builder for creating a Report entity.
func (*ReportCreate) Exec ¶
func (rc *ReportCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReportCreate) ExecX ¶
func (rc *ReportCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReportCreate) Mutation ¶
func (rc *ReportCreate) Mutation() *ReportMutation
Mutation returns the ReportMutation object of the builder.
func (*ReportCreate) Save ¶
func (rc *ReportCreate) Save(ctx context.Context) (*Report, error)
Save creates the Report in the database.
func (*ReportCreate) SaveX ¶
func (rc *ReportCreate) SaveX(ctx context.Context) *Report
SaveX calls Save and panics if Save returns an error.
func (*ReportCreate) SetID ¶
func (rc *ReportCreate) SetID(i int) *ReportCreate
SetID sets the "id" field.
type ReportCreateBulk ¶
type ReportCreateBulk struct {
// contains filtered or unexported fields
}
ReportCreateBulk is the builder for creating many Report entities in bulk.
func (*ReportCreateBulk) Exec ¶
func (rcb *ReportCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReportCreateBulk) ExecX ¶
func (rcb *ReportCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReportDelete ¶
type ReportDelete struct {
// contains filtered or unexported fields
}
ReportDelete is the builder for deleting a Report entity.
func (*ReportDelete) Exec ¶
func (rd *ReportDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReportDelete) ExecX ¶
func (rd *ReportDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReportDelete) Where ¶
func (rd *ReportDelete) Where(ps ...predicate.Report) *ReportDelete
Where appends a list predicates to the ReportDelete builder.
type ReportDeleteOne ¶
type ReportDeleteOne struct {
// contains filtered or unexported fields
}
ReportDeleteOne is the builder for deleting a single Report entity.
func (*ReportDeleteOne) Exec ¶
func (rdo *ReportDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReportDeleteOne) ExecX ¶
func (rdo *ReportDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReportEdge ¶
ReportEdge is the edge representation of Report.
type ReportGroupBy ¶
type ReportGroupBy struct {
// contains filtered or unexported fields
}
ReportGroupBy is the group-by builder for Report entities.
func (*ReportGroupBy) Aggregate ¶
func (rgb *ReportGroupBy) Aggregate(fns ...AggregateFunc) *ReportGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReportGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReportGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReportGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReportGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReportGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReportGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReportGroupBy) Scan ¶
func (rgb *ReportGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*ReportGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReportMutation ¶
type ReportMutation struct {
// contains filtered or unexported fields
}
ReportMutation represents an operation that mutates the Report nodes in the graph.
func (*ReportMutation) AddField ¶
func (m *ReportMutation) 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 (*ReportMutation) AddedEdges ¶
func (m *ReportMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReportMutation) AddedField ¶
func (m *ReportMutation) 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 (*ReportMutation) AddedFields ¶
func (m *ReportMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReportMutation) AddedIDs ¶
func (m *ReportMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReportMutation) ClearEdge ¶
func (m *ReportMutation) 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 (*ReportMutation) ClearField ¶
func (m *ReportMutation) 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 (*ReportMutation) ClearedEdges ¶
func (m *ReportMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReportMutation) ClearedFields ¶
func (m *ReportMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReportMutation) Client ¶
func (m ReportMutation) 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 (*ReportMutation) EdgeCleared ¶
func (m *ReportMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReportMutation) Field ¶
func (m *ReportMutation) 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 (*ReportMutation) FieldCleared ¶
func (m *ReportMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReportMutation) Fields ¶
func (m *ReportMutation) 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 (*ReportMutation) ID ¶
func (m *ReportMutation) 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 (*ReportMutation) IDs ¶
func (m *ReportMutation) 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 (*ReportMutation) 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 (*ReportMutation) RemovedEdges ¶
func (m *ReportMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReportMutation) RemovedIDs ¶
func (m *ReportMutation) 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 (*ReportMutation) ResetEdge ¶
func (m *ReportMutation) 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 (*ReportMutation) ResetField ¶
func (m *ReportMutation) 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 (*ReportMutation) SetField ¶
func (m *ReportMutation) 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 (*ReportMutation) SetID ¶
func (m *ReportMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Report entities.
func (ReportMutation) Tx ¶
func (m ReportMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReportMutation) Type ¶
func (m *ReportMutation) Type() string
Type returns the node type of this mutation (Report).
func (*ReportMutation) Where ¶
func (m *ReportMutation) Where(ps ...predicate.Report)
Where appends a list predicates to the ReportMutation builder.
type ReportOrder ¶
type ReportOrder struct { Direction OrderDirection `json:"direction"` Field *ReportOrderField `json:"field"` }
ReportOrder defines the ordering of Report.
type ReportOrderField ¶
type ReportOrderField struct {
// contains filtered or unexported fields
}
ReportOrderField defines the ordering field of Report.
type ReportPaginateOption ¶
type ReportPaginateOption func(*reportPager) error
ReportPaginateOption enables pagination customization.
func WithReportFilter ¶
func WithReportFilter(filter func(*ReportQuery) (*ReportQuery, error)) ReportPaginateOption
WithReportFilter configures pagination filter.
func WithReportOrder ¶
func WithReportOrder(order *ReportOrder) ReportPaginateOption
WithReportOrder configures pagination ordering.
type ReportQuery ¶
type ReportQuery struct {
// contains filtered or unexported fields
}
ReportQuery is the builder for querying Report entities.
func (*ReportQuery) Aggregate ¶
func (rq *ReportQuery) Aggregate(fns ...AggregateFunc) *ReportSelect
Aggregate returns a ReportSelect configured with the given aggregations.
func (*ReportQuery) All ¶
func (rq *ReportQuery) All(ctx context.Context) ([]*Report, error)
All executes the query and returns a list of Reports.
func (*ReportQuery) AllX ¶
func (rq *ReportQuery) AllX(ctx context.Context) []*Report
AllX is like All, but panics if an error occurs.
func (*ReportQuery) Clone ¶
func (rq *ReportQuery) Clone() *ReportQuery
Clone returns a duplicate of the ReportQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReportQuery) CollectFields ¶
func (r *ReportQuery) CollectFields(ctx context.Context, satisfies ...string) (*ReportQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ReportQuery) Count ¶
func (rq *ReportQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReportQuery) CountX ¶
func (rq *ReportQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReportQuery) Exist ¶
func (rq *ReportQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReportQuery) ExistX ¶
func (rq *ReportQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReportQuery) First ¶
func (rq *ReportQuery) First(ctx context.Context) (*Report, error)
First returns the first Report entity from the query. Returns a *NotFoundError when no Report was found.
func (*ReportQuery) FirstID ¶
func (rq *ReportQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Report ID from the query. Returns a *NotFoundError when no Report ID was found.
func (*ReportQuery) FirstIDX ¶
func (rq *ReportQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReportQuery) FirstX ¶
func (rq *ReportQuery) FirstX(ctx context.Context) *Report
FirstX is like First, but panics if an error occurs.
func (*ReportQuery) GroupBy ¶
func (rq *ReportQuery) GroupBy(field string, fields ...string) *ReportGroupBy
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.
func (*ReportQuery) IDs ¶
func (rq *ReportQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Report IDs.
func (*ReportQuery) IDsX ¶
func (rq *ReportQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ReportQuery) Limit ¶
func (rq *ReportQuery) Limit(limit int) *ReportQuery
Limit adds a limit step to the query.
func (*ReportQuery) Offset ¶
func (rq *ReportQuery) Offset(offset int) *ReportQuery
Offset adds an offset step to the query.
func (*ReportQuery) Only ¶
func (rq *ReportQuery) Only(ctx context.Context) (*Report, error)
Only returns a single Report entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Report entity is found. Returns a *NotFoundError when no Report entities are found.
func (*ReportQuery) OnlyID ¶
func (rq *ReportQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Report ID in the query. Returns a *NotSingularError when more than one Report ID is found. Returns a *NotFoundError when no entities are found.
func (*ReportQuery) OnlyIDX ¶
func (rq *ReportQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReportQuery) OnlyX ¶
func (rq *ReportQuery) OnlyX(ctx context.Context) *Report
OnlyX is like Only, but panics if an error occurs.
func (*ReportQuery) Order ¶
func (rq *ReportQuery) Order(o ...OrderFunc) *ReportQuery
Order adds an order step to the query.
func (*ReportQuery) Paginate ¶
func (r *ReportQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ReportPaginateOption, ) (*ReportConnection, error)
Paginate executes the query and returns a relay based cursor connection to Report.
func (*ReportQuery) Select ¶
func (rq *ReportQuery) Select(fields ...string) *ReportSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*ReportQuery) Unique ¶
func (rq *ReportQuery) Unique(unique bool) *ReportQuery
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 (*ReportQuery) Where ¶
func (rq *ReportQuery) Where(ps ...predicate.Report) *ReportQuery
Where adds a new predicate for the ReportQuery builder.
type ReportSelect ¶
type ReportSelect struct { *ReportQuery // contains filtered or unexported fields }
ReportSelect is the builder for selecting fields of Report entities.
func (*ReportSelect) Aggregate ¶
func (rs *ReportSelect) Aggregate(fns ...AggregateFunc) *ReportSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ReportSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReportSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReportSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReportSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReportSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReportSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReportSelect) Scan ¶
func (rs *ReportSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReportSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReportUpdate ¶
type ReportUpdate struct {
// contains filtered or unexported fields
}
ReportUpdate is the builder for updating Report entities.
func (*ReportUpdate) Exec ¶
func (ru *ReportUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReportUpdate) ExecX ¶
func (ru *ReportUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReportUpdate) Mutation ¶
func (ru *ReportUpdate) Mutation() *ReportMutation
Mutation returns the ReportMutation object of the builder.
func (*ReportUpdate) Save ¶
func (ru *ReportUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReportUpdate) SaveX ¶
func (ru *ReportUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReportUpdate) Where ¶
func (ru *ReportUpdate) Where(ps ...predicate.Report) *ReportUpdate
Where appends a list predicates to the ReportUpdate builder.
type ReportUpdateOne ¶
type ReportUpdateOne struct {
// contains filtered or unexported fields
}
ReportUpdateOne is the builder for updating a single Report entity.
func (*ReportUpdateOne) Exec ¶
func (ruo *ReportUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReportUpdateOne) ExecX ¶
func (ruo *ReportUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReportUpdateOne) Mutation ¶
func (ruo *ReportUpdateOne) Mutation() *ReportMutation
Mutation returns the ReportMutation object of the builder.
func (*ReportUpdateOne) Save ¶
func (ruo *ReportUpdateOne) Save(ctx context.Context) (*Report, error)
Save executes the query and returns the updated Report entity.
func (*ReportUpdateOne) SaveX ¶
func (ruo *ReportUpdateOne) SaveX(ctx context.Context) *Report
SaveX is like Save, but panics if an error occurs.
func (*ReportUpdateOne) Select ¶
func (ruo *ReportUpdateOne) Select(field string, fields ...string) *ReportUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
type ReportWhereInput ¶
type ReportWhereInput struct { Predicates []predicate.Report `json:"-"` Not *ReportWhereInput `json:"not,omitempty"` Or []*ReportWhereInput `json:"or,omitempty"` And []*ReportWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` }
ReportWhereInput represents a where input for filtering Report queries.
func (*ReportWhereInput) AddPredicates ¶
func (i *ReportWhereInput) AddPredicates(predicates ...predicate.Report)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*ReportWhereInput) Filter ¶
func (i *ReportWhereInput) Filter(q *ReportQuery) (*ReportQuery, error)
Filter applies the ReportWhereInput filter on the ReportQuery builder.
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 Tx ¶
type Tx struct { // Report is the client for interacting with the Report builders. Report *ReportClient // User is the client for interacting with the User builders. User *UserClient // 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"` // FullName holds the value of the "fullName" field. FullName string `json:"fullName,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
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) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for 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 UserConnection ¶
type UserConnection struct { Edges []*UserEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
UserConnection is the connection containing edges to User.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User 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) SetFullName ¶
func (uc *UserCreate) SetFullName(s string) *UserCreate
SetFullName sets the "fullName" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(i int) *UserCreate
SetID sets the "id" 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.
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 group-by 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 UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
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) 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) 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) 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) 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) FullName ¶
func (m *UserMutation) FullName() (r string, exists bool)
FullName returns the value of the "fullName" 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) 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) OldFullName ¶
func (m *UserMutation) OldFullName(ctx context.Context) (v string, err error)
OldFullName returns the old "fullName" 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) 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) 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) 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) ResetFullName ¶
func (m *UserMutation) ResetFullName()
ResetFullName resets all changes to the "fullName" 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) SetFullName ¶
func (m *UserMutation) SetFullName(s string)
SetFullName sets the "fullName" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
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) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserOrder ¶
type UserOrder struct { Direction OrderDirection `json:"direction"` Field *UserOrderField `json:"field"` }
UserOrder defines the ordering of User.
type UserOrderField ¶
type UserOrderField struct {
// contains filtered or unexported fields
}
UserOrderField defines the ordering field of User.
type UserPaginateOption ¶
type UserPaginateOption func(*userPager) error
UserPaginateOption enables pagination customization.
func WithUserFilter ¶
func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption
WithUserFilter configures pagination filter.
func WithUserOrder ¶
func WithUserOrder(order *UserOrder) UserPaginateOption
WithUserOrder configures pagination ordering.
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) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
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 { FullName string `json:"fullName,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldFullName). Aggregate(ent.Count()). Scan(ctx, &v)
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) Paginate ¶
func (u *UserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...UserPaginateOption, ) (*UserConnection, error)
Paginate executes the query and returns a relay based cursor connection to User.
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 { FullName string `json:"fullName,omitempty"` } client.User.Query(). Select(user.FieldFullName). Scan(ctx, &v)
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) 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) 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) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
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) SetFullName ¶
func (uu *UserUpdate) SetFullName(s string) *UserUpdate
SetFullName sets the "fullName" 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) 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) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
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) SetFullName ¶
func (uuo *UserUpdateOne) SetFullName(s string) *UserUpdateOne
SetFullName sets the "fullName" field.
type UserWhereInput ¶
type UserWhereInput struct { Predicates []predicate.User `json:"-"` Not *UserWhereInput `json:"not,omitempty"` Or []*UserWhereInput `json:"or,omitempty"` And []*UserWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "fullName" field predicates. FullName *string `json:"fullname,omitempty"` FullNameNEQ *string `json:"fullnameNEQ,omitempty"` FullNameIn []string `json:"fullnameIn,omitempty"` FullNameNotIn []string `json:"fullnameNotIn,omitempty"` FullNameGT *string `json:"fullnameGT,omitempty"` FullNameGTE *string `json:"fullnameGTE,omitempty"` FullNameLT *string `json:"fullnameLT,omitempty"` FullNameLTE *string `json:"fullnameLTE,omitempty"` FullNameContains *string `json:"fullnameContains,omitempty"` FullNameHasPrefix *string `json:"fullnameHasPrefix,omitempty"` FullNameHasSuffix *string `json:"fullnameHasSuffix,omitempty"` FullNameEqualFold *string `json:"fullnameEqualFold,omitempty"` FullNameContainsFold *string `json:"fullnameContainsFold,omitempty"` }
UserWhereInput represents a where input for filtering User queries.
func (*UserWhereInput) AddPredicates ¶
func (i *UserWhereInput) AddPredicates(predicates ...predicate.User)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
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 ¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- gql_collection.go
- gql_edge.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- mutation.go
- report.go
- report_create.go
- report_delete.go
- report_query.go
- report_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go