Versions in this module Expand all Collapse all v0 v0.0.3 Apr 14, 2023 v0.0.2 Apr 13, 2023 v0.0.1 Apr 13, 2023 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeMessage + 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 + 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 + Message *MessageClient + 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) 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 Hook = ent.Hook + type InterceptFunc = ent.InterceptFunc + type Interceptor = ent.Interceptor + type Message struct + ID int + func (m *Message) String() string + func (m *Message) Unwrap() *Message + func (m *Message) Update() *MessageUpdateOne + func (m *Message) Value(name string) (ent.Value, error) + type MessageClient struct + func NewMessageClient(c config) *MessageClient + func (c *MessageClient) Create() *MessageCreate + func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk + func (c *MessageClient) Delete() *MessageDelete + func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne + func (c *MessageClient) DeleteOneID(id int) *MessageDeleteOne + func (c *MessageClient) Get(ctx context.Context, id int) (*Message, error) + func (c *MessageClient) GetX(ctx context.Context, id int) *Message + func (c *MessageClient) Hooks() []Hook + func (c *MessageClient) Intercept(interceptors ...Interceptor) + func (c *MessageClient) Interceptors() []Interceptor + func (c *MessageClient) Query() *MessageQuery + func (c *MessageClient) Update() *MessageUpdate + func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne + func (c *MessageClient) UpdateOneID(id int) *MessageUpdateOne + func (c *MessageClient) Use(hooks ...Hook) + type MessageCreate struct + func (mc *MessageCreate) Exec(ctx context.Context) error + func (mc *MessageCreate) ExecX(ctx context.Context) + func (mc *MessageCreate) Mutation() *MessageMutation + func (mc *MessageCreate) Save(ctx context.Context) (*Message, error) + func (mc *MessageCreate) SaveX(ctx context.Context) *Message + type MessageCreateBulk struct + func (mcb *MessageCreateBulk) Exec(ctx context.Context) error + func (mcb *MessageCreateBulk) ExecX(ctx context.Context) + func (mcb *MessageCreateBulk) Save(ctx context.Context) ([]*Message, error) + func (mcb *MessageCreateBulk) SaveX(ctx context.Context) []*Message + type MessageDelete struct + func (md *MessageDelete) Exec(ctx context.Context) (int, error) + func (md *MessageDelete) ExecX(ctx context.Context) int + func (md *MessageDelete) Where(ps ...predicate.Message) *MessageDelete + type MessageDeleteOne struct + func (mdo *MessageDeleteOne) Exec(ctx context.Context) error + func (mdo *MessageDeleteOne) ExecX(ctx context.Context) + func (mdo *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne + type MessageGroupBy struct + func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy + func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error + func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *MessageGroupBy) BoolX(ctx context.Context) bool + func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool + func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *MessageGroupBy) Float64X(ctx context.Context) float64 + func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64 + func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *MessageGroupBy) IntX(ctx context.Context) int + func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *MessageGroupBy) IntsX(ctx context.Context) []int + func (s *MessageGroupBy) ScanX(ctx context.Context, v any) + func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error) + func (s *MessageGroupBy) StringX(ctx context.Context) string + func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *MessageGroupBy) StringsX(ctx context.Context) []string + type MessageMutation struct + func (m *MessageMutation) AddField(name string, value ent.Value) error + func (m *MessageMutation) AddedEdges() []string + func (m *MessageMutation) AddedField(name string) (ent.Value, bool) + func (m *MessageMutation) AddedFields() []string + func (m *MessageMutation) AddedIDs(name string) []ent.Value + func (m *MessageMutation) ClearEdge(name string) error + func (m *MessageMutation) ClearField(name string) error + func (m *MessageMutation) ClearedEdges() []string + func (m *MessageMutation) ClearedFields() []string + func (m *MessageMutation) EdgeCleared(name string) bool + func (m *MessageMutation) Field(name string) (ent.Value, bool) + func (m *MessageMutation) FieldCleared(name string) bool + func (m *MessageMutation) Fields() []string + func (m *MessageMutation) ID() (id int, exists bool) + func (m *MessageMutation) IDs(ctx context.Context) ([]int, error) + func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *MessageMutation) Op() Op + func (m *MessageMutation) RemovedEdges() []string + func (m *MessageMutation) RemovedIDs(name string) []ent.Value + func (m *MessageMutation) ResetEdge(name string) error + func (m *MessageMutation) ResetField(name string) error + func (m *MessageMutation) SetField(name string, value ent.Value) error + func (m *MessageMutation) SetOp(op Op) + func (m *MessageMutation) Type() string + func (m *MessageMutation) Where(ps ...predicate.Message) + func (m *MessageMutation) WhereP(ps ...func(*sql.Selector)) + func (m MessageMutation) Client() *Client + func (m MessageMutation) Tx() (*Tx, error) + type MessageQuery struct + func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect + func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error) + func (mq *MessageQuery) AllX(ctx context.Context) []*Message + func (mq *MessageQuery) Clone() *MessageQuery + func (mq *MessageQuery) Count(ctx context.Context) (int, error) + func (mq *MessageQuery) CountX(ctx context.Context) int + func (mq *MessageQuery) Exist(ctx context.Context) (bool, error) + func (mq *MessageQuery) ExistX(ctx context.Context) bool + func (mq *MessageQuery) First(ctx context.Context) (*Message, error) + func (mq *MessageQuery) FirstID(ctx context.Context) (id int, err error) + func (mq *MessageQuery) FirstIDX(ctx context.Context) int + func (mq *MessageQuery) FirstX(ctx context.Context) *Message + func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy + func (mq *MessageQuery) IDs(ctx context.Context) (ids []int, err error) + func (mq *MessageQuery) IDsX(ctx context.Context) []int + func (mq *MessageQuery) Limit(limit int) *MessageQuery + func (mq *MessageQuery) Offset(offset int) *MessageQuery + func (mq *MessageQuery) Only(ctx context.Context) (*Message, error) + func (mq *MessageQuery) OnlyID(ctx context.Context) (id int, err error) + func (mq *MessageQuery) OnlyIDX(ctx context.Context) int + func (mq *MessageQuery) OnlyX(ctx context.Context) *Message + func (mq *MessageQuery) Order(o ...message.Order) *MessageQuery + func (mq *MessageQuery) Select(fields ...string) *MessageSelect + func (mq *MessageQuery) Unique(unique bool) *MessageQuery + func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery + type MessageSelect struct + func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect + func (ms *MessageSelect) Scan(ctx context.Context, v any) error + func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *MessageSelect) BoolX(ctx context.Context) bool + func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error) + func (s *MessageSelect) BoolsX(ctx context.Context) []bool + func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *MessageSelect) Float64X(ctx context.Context) float64 + func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *MessageSelect) Float64sX(ctx context.Context) []float64 + func (s *MessageSelect) Int(ctx context.Context) (_ int, err error) + func (s *MessageSelect) IntX(ctx context.Context) int + func (s *MessageSelect) Ints(ctx context.Context) ([]int, error) + func (s *MessageSelect) IntsX(ctx context.Context) []int + func (s *MessageSelect) ScanX(ctx context.Context, v any) + func (s *MessageSelect) String(ctx context.Context) (_ string, err error) + func (s *MessageSelect) StringX(ctx context.Context) string + func (s *MessageSelect) Strings(ctx context.Context) ([]string, error) + func (s *MessageSelect) StringsX(ctx context.Context) []string + type MessageUpdate struct + func (mu *MessageUpdate) Exec(ctx context.Context) error + func (mu *MessageUpdate) ExecX(ctx context.Context) + func (mu *MessageUpdate) Mutation() *MessageMutation + func (mu *MessageUpdate) Save(ctx context.Context) (int, error) + func (mu *MessageUpdate) SaveX(ctx context.Context) int + func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate + type MessageUpdateOne struct + func (muo *MessageUpdateOne) Exec(ctx context.Context) error + func (muo *MessageUpdateOne) ExecX(ctx context.Context) + func (muo *MessageUpdateOne) Mutation() *MessageMutation + func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error) + func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message + func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne + func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne + type Messages []*Message + type MutateFunc = ent.MutateFunc + type Mutation = ent.Mutation + type Mutator = ent.Mutator + 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 OrderFunc func(*sql.Selector) + 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 + Message *MessageClient + 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