Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type Block
- type BlockClient
- func (c *BlockClient) Create() *BlockCreate
- func (c *BlockClient) CreateBulk(builders ...*BlockCreate) *BlockCreateBulk
- func (c *BlockClient) Delete() *BlockDelete
- func (c *BlockClient) DeleteOne(b *Block) *BlockDeleteOne
- func (c *BlockClient) DeleteOneID(id int) *BlockDeleteOne
- func (c *BlockClient) Get(ctx context.Context, id int) (*Block, error)
- func (c *BlockClient) GetX(ctx context.Context, id int) *Block
- func (c *BlockClient) Hooks() []Hook
- func (c *BlockClient) Intercept(interceptors ...Interceptor)
- func (c *BlockClient) Interceptors() []Interceptor
- func (c *BlockClient) MapCreateBulk(slice any, setFunc func(*BlockCreate, int)) *BlockCreateBulk
- func (c *BlockClient) Query() *BlockQuery
- func (c *BlockClient) QueryMsgs(b *Block) *MsgQuery
- func (c *BlockClient) QueryReceipts(b *Block) *ReceiptQuery
- func (c *BlockClient) Update() *BlockUpdate
- func (c *BlockClient) UpdateOne(b *Block) *BlockUpdateOne
- func (c *BlockClient) UpdateOneID(id int) *BlockUpdateOne
- func (c *BlockClient) Use(hooks ...Hook)
- type BlockCreate
- func (bc *BlockCreate) AddMsgIDs(ids ...int) *BlockCreate
- func (bc *BlockCreate) AddMsgs(m ...*Msg) *BlockCreate
- func (bc *BlockCreate) AddReceiptIDs(ids ...int) *BlockCreate
- func (bc *BlockCreate) AddReceipts(r ...*Receipt) *BlockCreate
- func (bc *BlockCreate) Exec(ctx context.Context) error
- func (bc *BlockCreate) ExecX(ctx context.Context)
- func (bc *BlockCreate) Mutation() *BlockMutation
- func (bc *BlockCreate) Save(ctx context.Context) (*Block, error)
- func (bc *BlockCreate) SaveX(ctx context.Context) *Block
- func (bc *BlockCreate) SetChainID(u uint64) *BlockCreate
- func (bc *BlockCreate) SetCreatedAt(t time.Time) *BlockCreate
- func (bc *BlockCreate) SetHash(b []byte) *BlockCreate
- func (bc *BlockCreate) SetHeight(u uint64) *BlockCreate
- func (bc *BlockCreate) SetNillableCreatedAt(t *time.Time) *BlockCreate
- func (bc *BlockCreate) SetNillableTimestamp(t *time.Time) *BlockCreate
- func (bc *BlockCreate) SetOffset(u uint64) *BlockCreate
- func (bc *BlockCreate) SetTimestamp(t time.Time) *BlockCreate
- type BlockCreateBulk
- type BlockDelete
- type BlockDeleteOne
- type BlockEdges
- type BlockFilter
- func (f *BlockFilter) Where(p entql.P)
- func (f *BlockFilter) WhereChainID(p entql.Uint64P)
- func (f *BlockFilter) WhereCreatedAt(p entql.TimeP)
- func (f *BlockFilter) WhereHasMsgs()
- func (f *BlockFilter) WhereHasMsgsWith(preds ...predicate.Msg)
- func (f *BlockFilter) WhereHasReceipts()
- func (f *BlockFilter) WhereHasReceiptsWith(preds ...predicate.Receipt)
- func (f *BlockFilter) WhereHash(p entql.BytesP)
- func (f *BlockFilter) WhereHeight(p entql.Uint64P)
- func (f *BlockFilter) WhereID(p entql.IntP)
- func (f *BlockFilter) WhereOffset(p entql.Uint64P)
- func (f *BlockFilter) WhereTimestamp(p entql.TimeP)
- type BlockGroupBy
- func (bgb *BlockGroupBy) Aggregate(fns ...AggregateFunc) *BlockGroupBy
- func (s *BlockGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BlockGroupBy) BoolX(ctx context.Context) bool
- func (s *BlockGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BlockGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BlockGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BlockGroupBy) Float64X(ctx context.Context) float64
- func (s *BlockGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BlockGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BlockGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BlockGroupBy) IntX(ctx context.Context) int
- func (s *BlockGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BlockGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BlockGroupBy) Scan(ctx context.Context, v any) error
- func (s *BlockGroupBy) ScanX(ctx context.Context, v any)
- func (s *BlockGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BlockGroupBy) StringX(ctx context.Context) string
- func (s *BlockGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BlockGroupBy) StringsX(ctx context.Context) []string
- type BlockMutation
- func (m *BlockMutation) AddChainID(u int64)
- func (m *BlockMutation) AddField(name string, value ent.Value) error
- func (m *BlockMutation) AddHeight(u int64)
- func (m *BlockMutation) AddMsgIDs(ids ...int)
- func (m *BlockMutation) AddOffset(u int64)
- func (m *BlockMutation) AddReceiptIDs(ids ...int)
- func (m *BlockMutation) AddedChainID() (r int64, exists bool)
- func (m *BlockMutation) AddedEdges() []string
- func (m *BlockMutation) AddedField(name string) (ent.Value, bool)
- func (m *BlockMutation) AddedFields() []string
- func (m *BlockMutation) AddedHeight() (r int64, exists bool)
- func (m *BlockMutation) AddedIDs(name string) []ent.Value
- func (m *BlockMutation) AddedOffset() (r int64, exists bool)
- func (m *BlockMutation) ChainID() (r uint64, exists bool)
- func (m *BlockMutation) ClearEdge(name string) error
- func (m *BlockMutation) ClearField(name string) error
- func (m *BlockMutation) ClearMsgs()
- func (m *BlockMutation) ClearReceipts()
- func (m *BlockMutation) ClearedEdges() []string
- func (m *BlockMutation) ClearedFields() []string
- func (m BlockMutation) Client() *Client
- func (m *BlockMutation) CreatedAt() (r time.Time, exists bool)
- func (m *BlockMutation) EdgeCleared(name string) bool
- func (m *BlockMutation) Field(name string) (ent.Value, bool)
- func (m *BlockMutation) FieldCleared(name string) bool
- func (m *BlockMutation) Fields() []string
- func (m *BlockMutation) Filter() *BlockFilter
- func (m *BlockMutation) Hash() (r []byte, exists bool)
- func (m *BlockMutation) Height() (r uint64, exists bool)
- func (m *BlockMutation) ID() (id int, exists bool)
- func (m *BlockMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BlockMutation) MsgsCleared() bool
- func (m *BlockMutation) MsgsIDs() (ids []int)
- func (m *BlockMutation) Offset() (r uint64, exists bool)
- func (m *BlockMutation) OldChainID(ctx context.Context) (v uint64, err error)
- func (m *BlockMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BlockMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BlockMutation) OldHash(ctx context.Context) (v []byte, err error)
- func (m *BlockMutation) OldHeight(ctx context.Context) (v uint64, err error)
- func (m *BlockMutation) OldOffset(ctx context.Context) (v uint64, err error)
- func (m *BlockMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *BlockMutation) Op() Op
- func (m *BlockMutation) ReceiptsCleared() bool
- func (m *BlockMutation) ReceiptsIDs() (ids []int)
- func (m *BlockMutation) RemoveMsgIDs(ids ...int)
- func (m *BlockMutation) RemoveReceiptIDs(ids ...int)
- func (m *BlockMutation) RemovedEdges() []string
- func (m *BlockMutation) RemovedIDs(name string) []ent.Value
- func (m *BlockMutation) RemovedMsgsIDs() (ids []int)
- func (m *BlockMutation) RemovedReceiptsIDs() (ids []int)
- func (m *BlockMutation) ResetChainID()
- func (m *BlockMutation) ResetCreatedAt()
- func (m *BlockMutation) ResetEdge(name string) error
- func (m *BlockMutation) ResetField(name string) error
- func (m *BlockMutation) ResetHash()
- func (m *BlockMutation) ResetHeight()
- func (m *BlockMutation) ResetMsgs()
- func (m *BlockMutation) ResetOffset()
- func (m *BlockMutation) ResetReceipts()
- func (m *BlockMutation) ResetTimestamp()
- func (m *BlockMutation) SetChainID(u uint64)
- func (m *BlockMutation) SetCreatedAt(t time.Time)
- func (m *BlockMutation) SetField(name string, value ent.Value) error
- func (m *BlockMutation) SetHash(b []byte)
- func (m *BlockMutation) SetHeight(u uint64)
- func (m *BlockMutation) SetOffset(u uint64)
- func (m *BlockMutation) SetOp(op Op)
- func (m *BlockMutation) SetTimestamp(t time.Time)
- func (m *BlockMutation) Timestamp() (r time.Time, exists bool)
- func (m BlockMutation) Tx() (*Tx, error)
- func (m *BlockMutation) Type() string
- func (m *BlockMutation) Where(ps ...predicate.Block)
- func (m *BlockMutation) WhereP(ps ...func(*sql.Selector))
- type BlockQuery
- func (bq *BlockQuery) Aggregate(fns ...AggregateFunc) *BlockSelect
- func (bq *BlockQuery) All(ctx context.Context) ([]*Block, error)
- func (bq *BlockQuery) AllX(ctx context.Context) []*Block
- func (bq *BlockQuery) Clone() *BlockQuery
- func (bq *BlockQuery) Count(ctx context.Context) (int, error)
- func (bq *BlockQuery) CountX(ctx context.Context) int
- func (bq *BlockQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BlockQuery) ExistX(ctx context.Context) bool
- func (bq *BlockQuery) Filter() *BlockFilter
- func (bq *BlockQuery) First(ctx context.Context) (*Block, error)
- func (bq *BlockQuery) FirstID(ctx context.Context) (id int, err error)
- func (bq *BlockQuery) FirstIDX(ctx context.Context) int
- func (bq *BlockQuery) FirstX(ctx context.Context) *Block
- func (bq *BlockQuery) GroupBy(field string, fields ...string) *BlockGroupBy
- func (bq *BlockQuery) IDs(ctx context.Context) (ids []int, err error)
- func (bq *BlockQuery) IDsX(ctx context.Context) []int
- func (bq *BlockQuery) Limit(limit int) *BlockQuery
- func (bq *BlockQuery) Offset(offset int) *BlockQuery
- func (bq *BlockQuery) Only(ctx context.Context) (*Block, error)
- func (bq *BlockQuery) OnlyID(ctx context.Context) (id int, err error)
- func (bq *BlockQuery) OnlyIDX(ctx context.Context) int
- func (bq *BlockQuery) OnlyX(ctx context.Context) *Block
- func (bq *BlockQuery) Order(o ...block.OrderOption) *BlockQuery
- func (bq *BlockQuery) QueryMsgs() *MsgQuery
- func (bq *BlockQuery) QueryReceipts() *ReceiptQuery
- func (bq *BlockQuery) Select(fields ...string) *BlockSelect
- func (bq *BlockQuery) Unique(unique bool) *BlockQuery
- func (bq *BlockQuery) Where(ps ...predicate.Block) *BlockQuery
- func (bq *BlockQuery) WithMsgs(opts ...func(*MsgQuery)) *BlockQuery
- func (bq *BlockQuery) WithReceipts(opts ...func(*ReceiptQuery)) *BlockQuery
- type BlockSelect
- func (bs *BlockSelect) Aggregate(fns ...AggregateFunc) *BlockSelect
- func (s *BlockSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BlockSelect) BoolX(ctx context.Context) bool
- func (s *BlockSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BlockSelect) BoolsX(ctx context.Context) []bool
- func (s *BlockSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BlockSelect) Float64X(ctx context.Context) float64
- func (s *BlockSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BlockSelect) Float64sX(ctx context.Context) []float64
- func (s *BlockSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BlockSelect) IntX(ctx context.Context) int
- func (s *BlockSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BlockSelect) IntsX(ctx context.Context) []int
- func (bs *BlockSelect) Scan(ctx context.Context, v any) error
- func (s *BlockSelect) ScanX(ctx context.Context, v any)
- func (s *BlockSelect) String(ctx context.Context) (_ string, err error)
- func (s *BlockSelect) StringX(ctx context.Context) string
- func (s *BlockSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BlockSelect) StringsX(ctx context.Context) []string
- type BlockUpdate
- func (bu *BlockUpdate) AddChainID(u int64) *BlockUpdate
- func (bu *BlockUpdate) AddHeight(u int64) *BlockUpdate
- func (bu *BlockUpdate) AddMsgIDs(ids ...int) *BlockUpdate
- func (bu *BlockUpdate) AddMsgs(m ...*Msg) *BlockUpdate
- func (bu *BlockUpdate) AddOffset(u int64) *BlockUpdate
- func (bu *BlockUpdate) AddReceiptIDs(ids ...int) *BlockUpdate
- func (bu *BlockUpdate) AddReceipts(r ...*Receipt) *BlockUpdate
- func (bu *BlockUpdate) ClearMsgs() *BlockUpdate
- func (bu *BlockUpdate) ClearReceipts() *BlockUpdate
- func (bu *BlockUpdate) Exec(ctx context.Context) error
- func (bu *BlockUpdate) ExecX(ctx context.Context)
- func (bu *BlockUpdate) Mutation() *BlockMutation
- func (bu *BlockUpdate) RemoveMsgIDs(ids ...int) *BlockUpdate
- func (bu *BlockUpdate) RemoveMsgs(m ...*Msg) *BlockUpdate
- func (bu *BlockUpdate) RemoveReceiptIDs(ids ...int) *BlockUpdate
- func (bu *BlockUpdate) RemoveReceipts(r ...*Receipt) *BlockUpdate
- func (bu *BlockUpdate) Save(ctx context.Context) (int, error)
- func (bu *BlockUpdate) SaveX(ctx context.Context) int
- func (bu *BlockUpdate) SetChainID(u uint64) *BlockUpdate
- func (bu *BlockUpdate) SetCreatedAt(t time.Time) *BlockUpdate
- func (bu *BlockUpdate) SetHash(b []byte) *BlockUpdate
- func (bu *BlockUpdate) SetHeight(u uint64) *BlockUpdate
- func (bu *BlockUpdate) SetNillableChainID(u *uint64) *BlockUpdate
- func (bu *BlockUpdate) SetNillableCreatedAt(t *time.Time) *BlockUpdate
- func (bu *BlockUpdate) SetNillableHeight(u *uint64) *BlockUpdate
- func (bu *BlockUpdate) SetNillableOffset(u *uint64) *BlockUpdate
- func (bu *BlockUpdate) SetNillableTimestamp(t *time.Time) *BlockUpdate
- func (bu *BlockUpdate) SetOffset(u uint64) *BlockUpdate
- func (bu *BlockUpdate) SetTimestamp(t time.Time) *BlockUpdate
- func (bu *BlockUpdate) Where(ps ...predicate.Block) *BlockUpdate
- type BlockUpdateOne
- func (buo *BlockUpdateOne) AddChainID(u int64) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddHeight(u int64) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddMsgIDs(ids ...int) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddMsgs(m ...*Msg) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddOffset(u int64) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddReceiptIDs(ids ...int) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddReceipts(r ...*Receipt) *BlockUpdateOne
- func (buo *BlockUpdateOne) ClearMsgs() *BlockUpdateOne
- func (buo *BlockUpdateOne) ClearReceipts() *BlockUpdateOne
- func (buo *BlockUpdateOne) Exec(ctx context.Context) error
- func (buo *BlockUpdateOne) ExecX(ctx context.Context)
- func (buo *BlockUpdateOne) Mutation() *BlockMutation
- func (buo *BlockUpdateOne) RemoveMsgIDs(ids ...int) *BlockUpdateOne
- func (buo *BlockUpdateOne) RemoveMsgs(m ...*Msg) *BlockUpdateOne
- func (buo *BlockUpdateOne) RemoveReceiptIDs(ids ...int) *BlockUpdateOne
- func (buo *BlockUpdateOne) RemoveReceipts(r ...*Receipt) *BlockUpdateOne
- func (buo *BlockUpdateOne) Save(ctx context.Context) (*Block, error)
- func (buo *BlockUpdateOne) SaveX(ctx context.Context) *Block
- func (buo *BlockUpdateOne) Select(field string, fields ...string) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetChainID(u uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetCreatedAt(t time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetHash(b []byte) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetHeight(u uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableChainID(u *uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableCreatedAt(t *time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableHeight(u *uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableOffset(u *uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableTimestamp(t *time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetOffset(u uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetTimestamp(t time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) Where(ps ...predicate.Block) *BlockUpdateOne
- type Blocks
- type Chain
- type ChainClient
- func (c *ChainClient) Create() *ChainCreate
- func (c *ChainClient) CreateBulk(builders ...*ChainCreate) *ChainCreateBulk
- func (c *ChainClient) Delete() *ChainDelete
- func (c *ChainClient) DeleteOne(ch *Chain) *ChainDeleteOne
- func (c *ChainClient) DeleteOneID(id int) *ChainDeleteOne
- func (c *ChainClient) Get(ctx context.Context, id int) (*Chain, error)
- func (c *ChainClient) GetX(ctx context.Context, id int) *Chain
- func (c *ChainClient) Hooks() []Hook
- func (c *ChainClient) Intercept(interceptors ...Interceptor)
- func (c *ChainClient) Interceptors() []Interceptor
- func (c *ChainClient) MapCreateBulk(slice any, setFunc func(*ChainCreate, int)) *ChainCreateBulk
- func (c *ChainClient) Query() *ChainQuery
- func (c *ChainClient) Update() *ChainUpdate
- func (c *ChainClient) UpdateOne(ch *Chain) *ChainUpdateOne
- func (c *ChainClient) UpdateOneID(id int) *ChainUpdateOne
- func (c *ChainClient) Use(hooks ...Hook)
- type ChainCreate
- func (cc *ChainCreate) Exec(ctx context.Context) error
- func (cc *ChainCreate) ExecX(ctx context.Context)
- func (cc *ChainCreate) Mutation() *ChainMutation
- func (cc *ChainCreate) Save(ctx context.Context) (*Chain, error)
- func (cc *ChainCreate) SaveX(ctx context.Context) *Chain
- func (cc *ChainCreate) SetChainID(u uint64) *ChainCreate
- func (cc *ChainCreate) SetCreatedAt(t time.Time) *ChainCreate
- func (cc *ChainCreate) SetName(s string) *ChainCreate
- func (cc *ChainCreate) SetNillableCreatedAt(t *time.Time) *ChainCreate
- type ChainCreateBulk
- type ChainDelete
- type ChainDeleteOne
- type ChainFilter
- type ChainGroupBy
- func (cgb *ChainGroupBy) Aggregate(fns ...AggregateFunc) *ChainGroupBy
- func (s *ChainGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChainGroupBy) BoolX(ctx context.Context) bool
- func (s *ChainGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChainGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChainGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChainGroupBy) Float64X(ctx context.Context) float64
- func (s *ChainGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChainGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChainGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChainGroupBy) IntX(ctx context.Context) int
- func (s *ChainGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChainGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ChainGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChainGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChainGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChainGroupBy) StringX(ctx context.Context) string
- func (s *ChainGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChainGroupBy) StringsX(ctx context.Context) []string
- type ChainMutation
- func (m *ChainMutation) AddChainID(u int64)
- func (m *ChainMutation) AddField(name string, value ent.Value) error
- func (m *ChainMutation) AddedChainID() (r int64, exists bool)
- func (m *ChainMutation) AddedEdges() []string
- func (m *ChainMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChainMutation) AddedFields() []string
- func (m *ChainMutation) AddedIDs(name string) []ent.Value
- func (m *ChainMutation) ChainID() (r uint64, exists bool)
- func (m *ChainMutation) ClearEdge(name string) error
- func (m *ChainMutation) ClearField(name string) error
- func (m *ChainMutation) ClearedEdges() []string
- func (m *ChainMutation) ClearedFields() []string
- func (m ChainMutation) Client() *Client
- func (m *ChainMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ChainMutation) EdgeCleared(name string) bool
- func (m *ChainMutation) Field(name string) (ent.Value, bool)
- func (m *ChainMutation) FieldCleared(name string) bool
- func (m *ChainMutation) Fields() []string
- func (m *ChainMutation) Filter() *ChainFilter
- func (m *ChainMutation) ID() (id int, exists bool)
- func (m *ChainMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ChainMutation) Name() (r string, exists bool)
- func (m *ChainMutation) OldChainID(ctx context.Context) (v uint64, err error)
- func (m *ChainMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChainMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChainMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ChainMutation) Op() Op
- func (m *ChainMutation) RemovedEdges() []string
- func (m *ChainMutation) RemovedIDs(name string) []ent.Value
- func (m *ChainMutation) ResetChainID()
- func (m *ChainMutation) ResetCreatedAt()
- func (m *ChainMutation) ResetEdge(name string) error
- func (m *ChainMutation) ResetField(name string) error
- func (m *ChainMutation) ResetName()
- func (m *ChainMutation) SetChainID(u uint64)
- func (m *ChainMutation) SetCreatedAt(t time.Time)
- func (m *ChainMutation) SetField(name string, value ent.Value) error
- func (m *ChainMutation) SetName(s string)
- func (m *ChainMutation) SetOp(op Op)
- func (m ChainMutation) Tx() (*Tx, error)
- func (m *ChainMutation) Type() string
- func (m *ChainMutation) Where(ps ...predicate.Chain)
- func (m *ChainMutation) WhereP(ps ...func(*sql.Selector))
- type ChainQuery
- func (cq *ChainQuery) Aggregate(fns ...AggregateFunc) *ChainSelect
- func (cq *ChainQuery) All(ctx context.Context) ([]*Chain, error)
- func (cq *ChainQuery) AllX(ctx context.Context) []*Chain
- func (cq *ChainQuery) Clone() *ChainQuery
- func (cq *ChainQuery) Count(ctx context.Context) (int, error)
- func (cq *ChainQuery) CountX(ctx context.Context) int
- func (cq *ChainQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ChainQuery) ExistX(ctx context.Context) bool
- func (cq *ChainQuery) Filter() *ChainFilter
- func (cq *ChainQuery) First(ctx context.Context) (*Chain, error)
- func (cq *ChainQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *ChainQuery) FirstIDX(ctx context.Context) int
- func (cq *ChainQuery) FirstX(ctx context.Context) *Chain
- func (cq *ChainQuery) GroupBy(field string, fields ...string) *ChainGroupBy
- func (cq *ChainQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *ChainQuery) IDsX(ctx context.Context) []int
- func (cq *ChainQuery) Limit(limit int) *ChainQuery
- func (cq *ChainQuery) Offset(offset int) *ChainQuery
- func (cq *ChainQuery) Only(ctx context.Context) (*Chain, error)
- func (cq *ChainQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *ChainQuery) OnlyIDX(ctx context.Context) int
- func (cq *ChainQuery) OnlyX(ctx context.Context) *Chain
- func (cq *ChainQuery) Order(o ...chain.OrderOption) *ChainQuery
- func (cq *ChainQuery) Select(fields ...string) *ChainSelect
- func (cq *ChainQuery) Unique(unique bool) *ChainQuery
- func (cq *ChainQuery) Where(ps ...predicate.Chain) *ChainQuery
- type ChainSelect
- func (cs *ChainSelect) Aggregate(fns ...AggregateFunc) *ChainSelect
- func (s *ChainSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChainSelect) BoolX(ctx context.Context) bool
- func (s *ChainSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChainSelect) BoolsX(ctx context.Context) []bool
- func (s *ChainSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChainSelect) Float64X(ctx context.Context) float64
- func (s *ChainSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChainSelect) Float64sX(ctx context.Context) []float64
- func (s *ChainSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChainSelect) IntX(ctx context.Context) int
- func (s *ChainSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChainSelect) IntsX(ctx context.Context) []int
- func (cs *ChainSelect) Scan(ctx context.Context, v any) error
- func (s *ChainSelect) ScanX(ctx context.Context, v any)
- func (s *ChainSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChainSelect) StringX(ctx context.Context) string
- func (s *ChainSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChainSelect) StringsX(ctx context.Context) []string
- type ChainUpdate
- func (cu *ChainUpdate) AddChainID(u int64) *ChainUpdate
- func (cu *ChainUpdate) Exec(ctx context.Context) error
- func (cu *ChainUpdate) ExecX(ctx context.Context)
- func (cu *ChainUpdate) Mutation() *ChainMutation
- func (cu *ChainUpdate) Save(ctx context.Context) (int, error)
- func (cu *ChainUpdate) SaveX(ctx context.Context) int
- func (cu *ChainUpdate) SetChainID(u uint64) *ChainUpdate
- func (cu *ChainUpdate) SetCreatedAt(t time.Time) *ChainUpdate
- func (cu *ChainUpdate) SetName(s string) *ChainUpdate
- func (cu *ChainUpdate) SetNillableChainID(u *uint64) *ChainUpdate
- func (cu *ChainUpdate) SetNillableCreatedAt(t *time.Time) *ChainUpdate
- func (cu *ChainUpdate) SetNillableName(s *string) *ChainUpdate
- func (cu *ChainUpdate) Where(ps ...predicate.Chain) *ChainUpdate
- type ChainUpdateOne
- func (cuo *ChainUpdateOne) AddChainID(u int64) *ChainUpdateOne
- func (cuo *ChainUpdateOne) Exec(ctx context.Context) error
- func (cuo *ChainUpdateOne) ExecX(ctx context.Context)
- func (cuo *ChainUpdateOne) Mutation() *ChainMutation
- func (cuo *ChainUpdateOne) Save(ctx context.Context) (*Chain, error)
- func (cuo *ChainUpdateOne) SaveX(ctx context.Context) *Chain
- func (cuo *ChainUpdateOne) Select(field string, fields ...string) *ChainUpdateOne
- func (cuo *ChainUpdateOne) SetChainID(u uint64) *ChainUpdateOne
- func (cuo *ChainUpdateOne) SetCreatedAt(t time.Time) *ChainUpdateOne
- func (cuo *ChainUpdateOne) SetName(s string) *ChainUpdateOne
- func (cuo *ChainUpdateOne) SetNillableChainID(u *uint64) *ChainUpdateOne
- func (cuo *ChainUpdateOne) SetNillableCreatedAt(t *time.Time) *ChainUpdateOne
- func (cuo *ChainUpdateOne) SetNillableName(s *string) *ChainUpdateOne
- func (cuo *ChainUpdateOne) Where(ps ...predicate.Chain) *ChainUpdateOne
- type Chains
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) DB() *sql.DB
- 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
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type Msg
- type MsgClient
- func (c *MsgClient) Create() *MsgCreate
- func (c *MsgClient) CreateBulk(builders ...*MsgCreate) *MsgCreateBulk
- func (c *MsgClient) Delete() *MsgDelete
- func (c *MsgClient) DeleteOne(m *Msg) *MsgDeleteOne
- func (c *MsgClient) DeleteOneID(id int) *MsgDeleteOne
- func (c *MsgClient) Get(ctx context.Context, id int) (*Msg, error)
- func (c *MsgClient) GetX(ctx context.Context, id int) *Msg
- func (c *MsgClient) Hooks() []Hook
- func (c *MsgClient) Intercept(interceptors ...Interceptor)
- func (c *MsgClient) Interceptors() []Interceptor
- func (c *MsgClient) MapCreateBulk(slice any, setFunc func(*MsgCreate, int)) *MsgCreateBulk
- func (c *MsgClient) Query() *MsgQuery
- func (c *MsgClient) QueryBlock(m *Msg) *BlockQuery
- func (c *MsgClient) QueryReceipts(m *Msg) *ReceiptQuery
- func (c *MsgClient) Update() *MsgUpdate
- func (c *MsgClient) UpdateOne(m *Msg) *MsgUpdateOne
- func (c *MsgClient) UpdateOneID(id int) *MsgUpdateOne
- func (c *MsgClient) Use(hooks ...Hook)
- type MsgCreate
- func (mc *MsgCreate) AddBlock(b ...*Block) *MsgCreate
- func (mc *MsgCreate) AddBlockIDs(ids ...int) *MsgCreate
- func (mc *MsgCreate) AddReceiptIDs(ids ...int) *MsgCreate
- func (mc *MsgCreate) AddReceipts(r ...*Receipt) *MsgCreate
- func (mc *MsgCreate) Exec(ctx context.Context) error
- func (mc *MsgCreate) ExecX(ctx context.Context)
- func (mc *MsgCreate) Mutation() *MsgMutation
- func (mc *MsgCreate) Save(ctx context.Context) (*Msg, error)
- func (mc *MsgCreate) SaveX(ctx context.Context) *Msg
- func (mc *MsgCreate) SetCreatedAt(t time.Time) *MsgCreate
- func (mc *MsgCreate) SetData(b []byte) *MsgCreate
- func (mc *MsgCreate) SetDestChainID(u uint64) *MsgCreate
- func (mc *MsgCreate) SetGasLimit(u uint64) *MsgCreate
- func (mc *MsgCreate) SetNillableCreatedAt(t *time.Time) *MsgCreate
- func (mc *MsgCreate) SetNillableStatus(s *string) *MsgCreate
- func (mc *MsgCreate) SetOffset(u uint64) *MsgCreate
- func (mc *MsgCreate) SetReceiptHash(b []byte) *MsgCreate
- func (mc *MsgCreate) SetSender(b []byte) *MsgCreate
- func (mc *MsgCreate) SetSourceChainID(u uint64) *MsgCreate
- func (mc *MsgCreate) SetStatus(s string) *MsgCreate
- func (mc *MsgCreate) SetTo(b []byte) *MsgCreate
- func (mc *MsgCreate) SetTxHash(b []byte) *MsgCreate
- type MsgCreateBulk
- type MsgDelete
- type MsgDeleteOne
- type MsgEdges
- type MsgFilter
- func (f *MsgFilter) Where(p entql.P)
- func (f *MsgFilter) WhereCreatedAt(p entql.TimeP)
- func (f *MsgFilter) WhereData(p entql.BytesP)
- func (f *MsgFilter) WhereDestChainID(p entql.Uint64P)
- func (f *MsgFilter) WhereGasLimit(p entql.Uint64P)
- func (f *MsgFilter) WhereHasBlock()
- func (f *MsgFilter) WhereHasBlockWith(preds ...predicate.Block)
- func (f *MsgFilter) WhereHasReceipts()
- func (f *MsgFilter) WhereHasReceiptsWith(preds ...predicate.Receipt)
- func (f *MsgFilter) WhereID(p entql.IntP)
- func (f *MsgFilter) WhereOffset(p entql.Uint64P)
- func (f *MsgFilter) WhereReceiptHash(p entql.BytesP)
- func (f *MsgFilter) WhereSender(p entql.BytesP)
- func (f *MsgFilter) WhereSourceChainID(p entql.Uint64P)
- func (f *MsgFilter) WhereStatus(p entql.StringP)
- func (f *MsgFilter) WhereTo(p entql.BytesP)
- func (f *MsgFilter) WhereTxHash(p entql.BytesP)
- type MsgGroupBy
- func (mgb *MsgGroupBy) Aggregate(fns ...AggregateFunc) *MsgGroupBy
- func (s *MsgGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MsgGroupBy) BoolX(ctx context.Context) bool
- func (s *MsgGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MsgGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MsgGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MsgGroupBy) Float64X(ctx context.Context) float64
- func (s *MsgGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MsgGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MsgGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MsgGroupBy) IntX(ctx context.Context) int
- func (s *MsgGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MsgGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MsgGroupBy) Scan(ctx context.Context, v any) error
- func (s *MsgGroupBy) ScanX(ctx context.Context, v any)
- func (s *MsgGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MsgGroupBy) StringX(ctx context.Context) string
- func (s *MsgGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MsgGroupBy) StringsX(ctx context.Context) []string
- type MsgMutation
- func (m *MsgMutation) AddBlockIDs(ids ...int)
- func (m *MsgMutation) AddDestChainID(u int64)
- func (m *MsgMutation) AddField(name string, value ent.Value) error
- func (m *MsgMutation) AddGasLimit(u int64)
- func (m *MsgMutation) AddOffset(u int64)
- func (m *MsgMutation) AddReceiptIDs(ids ...int)
- func (m *MsgMutation) AddSourceChainID(u int64)
- func (m *MsgMutation) AddedDestChainID() (r int64, exists bool)
- func (m *MsgMutation) AddedEdges() []string
- func (m *MsgMutation) AddedField(name string) (ent.Value, bool)
- func (m *MsgMutation) AddedFields() []string
- func (m *MsgMutation) AddedGasLimit() (r int64, exists bool)
- func (m *MsgMutation) AddedIDs(name string) []ent.Value
- func (m *MsgMutation) AddedOffset() (r int64, exists bool)
- func (m *MsgMutation) AddedSourceChainID() (r int64, exists bool)
- func (m *MsgMutation) BlockCleared() bool
- func (m *MsgMutation) BlockIDs() (ids []int)
- func (m *MsgMutation) ClearBlock()
- func (m *MsgMutation) ClearEdge(name string) error
- func (m *MsgMutation) ClearField(name string) error
- func (m *MsgMutation) ClearReceiptHash()
- func (m *MsgMutation) ClearReceipts()
- func (m *MsgMutation) ClearStatus()
- func (m *MsgMutation) ClearedEdges() []string
- func (m *MsgMutation) ClearedFields() []string
- func (m MsgMutation) Client() *Client
- func (m *MsgMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MsgMutation) Data() (r []byte, exists bool)
- func (m *MsgMutation) DestChainID() (r uint64, exists bool)
- func (m *MsgMutation) EdgeCleared(name string) bool
- func (m *MsgMutation) Field(name string) (ent.Value, bool)
- func (m *MsgMutation) FieldCleared(name string) bool
- func (m *MsgMutation) Fields() []string
- func (m *MsgMutation) Filter() *MsgFilter
- func (m *MsgMutation) GasLimit() (r uint64, exists bool)
- func (m *MsgMutation) ID() (id int, exists bool)
- func (m *MsgMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MsgMutation) Offset() (r uint64, exists bool)
- func (m *MsgMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MsgMutation) OldData(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) OldDestChainID(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MsgMutation) OldGasLimit(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldOffset(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldReceiptHash(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) OldSender(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *MsgMutation) OldTo(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) OldTxHash(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) Op() Op
- func (m *MsgMutation) ReceiptHash() (r []byte, exists bool)
- func (m *MsgMutation) ReceiptHashCleared() bool
- func (m *MsgMutation) ReceiptsCleared() bool
- func (m *MsgMutation) ReceiptsIDs() (ids []int)
- func (m *MsgMutation) RemoveBlockIDs(ids ...int)
- func (m *MsgMutation) RemoveReceiptIDs(ids ...int)
- func (m *MsgMutation) RemovedBlockIDs() (ids []int)
- func (m *MsgMutation) RemovedEdges() []string
- func (m *MsgMutation) RemovedIDs(name string) []ent.Value
- func (m *MsgMutation) RemovedReceiptsIDs() (ids []int)
- func (m *MsgMutation) ResetBlock()
- func (m *MsgMutation) ResetCreatedAt()
- func (m *MsgMutation) ResetData()
- func (m *MsgMutation) ResetDestChainID()
- func (m *MsgMutation) ResetEdge(name string) error
- func (m *MsgMutation) ResetField(name string) error
- func (m *MsgMutation) ResetGasLimit()
- func (m *MsgMutation) ResetOffset()
- func (m *MsgMutation) ResetReceiptHash()
- func (m *MsgMutation) ResetReceipts()
- func (m *MsgMutation) ResetSender()
- func (m *MsgMutation) ResetSourceChainID()
- func (m *MsgMutation) ResetStatus()
- func (m *MsgMutation) ResetTo()
- func (m *MsgMutation) ResetTxHash()
- func (m *MsgMutation) Sender() (r []byte, exists bool)
- func (m *MsgMutation) SetCreatedAt(t time.Time)
- func (m *MsgMutation) SetData(b []byte)
- func (m *MsgMutation) SetDestChainID(u uint64)
- func (m *MsgMutation) SetField(name string, value ent.Value) error
- func (m *MsgMutation) SetGasLimit(u uint64)
- func (m *MsgMutation) SetOffset(u uint64)
- func (m *MsgMutation) SetOp(op Op)
- func (m *MsgMutation) SetReceiptHash(b []byte)
- func (m *MsgMutation) SetSender(b []byte)
- func (m *MsgMutation) SetSourceChainID(u uint64)
- func (m *MsgMutation) SetStatus(s string)
- func (m *MsgMutation) SetTo(b []byte)
- func (m *MsgMutation) SetTxHash(b []byte)
- func (m *MsgMutation) SourceChainID() (r uint64, exists bool)
- func (m *MsgMutation) Status() (r string, exists bool)
- func (m *MsgMutation) StatusCleared() bool
- func (m *MsgMutation) To() (r []byte, exists bool)
- func (m MsgMutation) Tx() (*Tx, error)
- func (m *MsgMutation) TxHash() (r []byte, exists bool)
- func (m *MsgMutation) Type() string
- func (m *MsgMutation) Where(ps ...predicate.Msg)
- func (m *MsgMutation) WhereP(ps ...func(*sql.Selector))
- type MsgQuery
- func (mq *MsgQuery) Aggregate(fns ...AggregateFunc) *MsgSelect
- func (mq *MsgQuery) All(ctx context.Context) ([]*Msg, error)
- func (mq *MsgQuery) AllX(ctx context.Context) []*Msg
- func (mq *MsgQuery) Clone() *MsgQuery
- func (mq *MsgQuery) Count(ctx context.Context) (int, error)
- func (mq *MsgQuery) CountX(ctx context.Context) int
- func (mq *MsgQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MsgQuery) ExistX(ctx context.Context) bool
- func (mq *MsgQuery) Filter() *MsgFilter
- func (mq *MsgQuery) First(ctx context.Context) (*Msg, error)
- func (mq *MsgQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MsgQuery) FirstIDX(ctx context.Context) int
- func (mq *MsgQuery) FirstX(ctx context.Context) *Msg
- func (mq *MsgQuery) GroupBy(field string, fields ...string) *MsgGroupBy
- func (mq *MsgQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mq *MsgQuery) IDsX(ctx context.Context) []int
- func (mq *MsgQuery) Limit(limit int) *MsgQuery
- func (mq *MsgQuery) Offset(offset int) *MsgQuery
- func (mq *MsgQuery) Only(ctx context.Context) (*Msg, error)
- func (mq *MsgQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MsgQuery) OnlyIDX(ctx context.Context) int
- func (mq *MsgQuery) OnlyX(ctx context.Context) *Msg
- func (mq *MsgQuery) Order(o ...msg.OrderOption) *MsgQuery
- func (mq *MsgQuery) QueryBlock() *BlockQuery
- func (mq *MsgQuery) QueryReceipts() *ReceiptQuery
- func (mq *MsgQuery) Select(fields ...string) *MsgSelect
- func (mq *MsgQuery) Unique(unique bool) *MsgQuery
- func (mq *MsgQuery) Where(ps ...predicate.Msg) *MsgQuery
- func (mq *MsgQuery) WithBlock(opts ...func(*BlockQuery)) *MsgQuery
- func (mq *MsgQuery) WithReceipts(opts ...func(*ReceiptQuery)) *MsgQuery
- type MsgSelect
- func (ms *MsgSelect) Aggregate(fns ...AggregateFunc) *MsgSelect
- func (s *MsgSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MsgSelect) BoolX(ctx context.Context) bool
- func (s *MsgSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MsgSelect) BoolsX(ctx context.Context) []bool
- func (s *MsgSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MsgSelect) Float64X(ctx context.Context) float64
- func (s *MsgSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MsgSelect) Float64sX(ctx context.Context) []float64
- func (s *MsgSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MsgSelect) IntX(ctx context.Context) int
- func (s *MsgSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MsgSelect) IntsX(ctx context.Context) []int
- func (ms *MsgSelect) Scan(ctx context.Context, v any) error
- func (s *MsgSelect) ScanX(ctx context.Context, v any)
- func (s *MsgSelect) String(ctx context.Context) (_ string, err error)
- func (s *MsgSelect) StringX(ctx context.Context) string
- func (s *MsgSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MsgSelect) StringsX(ctx context.Context) []string
- type MsgUpdate
- func (mu *MsgUpdate) AddBlock(b ...*Block) *MsgUpdate
- func (mu *MsgUpdate) AddBlockIDs(ids ...int) *MsgUpdate
- func (mu *MsgUpdate) AddDestChainID(u int64) *MsgUpdate
- func (mu *MsgUpdate) AddGasLimit(u int64) *MsgUpdate
- func (mu *MsgUpdate) AddOffset(u int64) *MsgUpdate
- func (mu *MsgUpdate) AddReceiptIDs(ids ...int) *MsgUpdate
- func (mu *MsgUpdate) AddReceipts(r ...*Receipt) *MsgUpdate
- func (mu *MsgUpdate) AddSourceChainID(u int64) *MsgUpdate
- func (mu *MsgUpdate) ClearBlock() *MsgUpdate
- func (mu *MsgUpdate) ClearReceiptHash() *MsgUpdate
- func (mu *MsgUpdate) ClearReceipts() *MsgUpdate
- func (mu *MsgUpdate) ClearStatus() *MsgUpdate
- func (mu *MsgUpdate) Exec(ctx context.Context) error
- func (mu *MsgUpdate) ExecX(ctx context.Context)
- func (mu *MsgUpdate) Mutation() *MsgMutation
- func (mu *MsgUpdate) RemoveBlock(b ...*Block) *MsgUpdate
- func (mu *MsgUpdate) RemoveBlockIDs(ids ...int) *MsgUpdate
- func (mu *MsgUpdate) RemoveReceiptIDs(ids ...int) *MsgUpdate
- func (mu *MsgUpdate) RemoveReceipts(r ...*Receipt) *MsgUpdate
- func (mu *MsgUpdate) Save(ctx context.Context) (int, error)
- func (mu *MsgUpdate) SaveX(ctx context.Context) int
- func (mu *MsgUpdate) SetCreatedAt(t time.Time) *MsgUpdate
- func (mu *MsgUpdate) SetData(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetDestChainID(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetGasLimit(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableCreatedAt(t *time.Time) *MsgUpdate
- func (mu *MsgUpdate) SetNillableDestChainID(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableGasLimit(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableOffset(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableSourceChainID(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableStatus(s *string) *MsgUpdate
- func (mu *MsgUpdate) SetOffset(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetReceiptHash(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetSender(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetSourceChainID(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetStatus(s string) *MsgUpdate
- func (mu *MsgUpdate) SetTo(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetTxHash(b []byte) *MsgUpdate
- func (mu *MsgUpdate) Where(ps ...predicate.Msg) *MsgUpdate
- type MsgUpdateOne
- func (muo *MsgUpdateOne) AddBlock(b ...*Block) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddBlockIDs(ids ...int) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddDestChainID(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddGasLimit(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddOffset(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddReceiptIDs(ids ...int) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddReceipts(r ...*Receipt) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddSourceChainID(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) ClearBlock() *MsgUpdateOne
- func (muo *MsgUpdateOne) ClearReceiptHash() *MsgUpdateOne
- func (muo *MsgUpdateOne) ClearReceipts() *MsgUpdateOne
- func (muo *MsgUpdateOne) ClearStatus() *MsgUpdateOne
- func (muo *MsgUpdateOne) Exec(ctx context.Context) error
- func (muo *MsgUpdateOne) ExecX(ctx context.Context)
- func (muo *MsgUpdateOne) Mutation() *MsgMutation
- func (muo *MsgUpdateOne) RemoveBlock(b ...*Block) *MsgUpdateOne
- func (muo *MsgUpdateOne) RemoveBlockIDs(ids ...int) *MsgUpdateOne
- func (muo *MsgUpdateOne) RemoveReceiptIDs(ids ...int) *MsgUpdateOne
- func (muo *MsgUpdateOne) RemoveReceipts(r ...*Receipt) *MsgUpdateOne
- func (muo *MsgUpdateOne) Save(ctx context.Context) (*Msg, error)
- func (muo *MsgUpdateOne) SaveX(ctx context.Context) *Msg
- func (muo *MsgUpdateOne) Select(field string, fields ...string) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetCreatedAt(t time.Time) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetData(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetDestChainID(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetGasLimit(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableCreatedAt(t *time.Time) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableDestChainID(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableGasLimit(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableOffset(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableSourceChainID(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableStatus(s *string) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetOffset(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetReceiptHash(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetSender(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetSourceChainID(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetStatus(s string) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetTo(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetTxHash(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) Where(ps ...predicate.Msg) *MsgUpdateOne
- type Msgs
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Receipt
- type ReceiptClient
- func (c *ReceiptClient) Create() *ReceiptCreate
- func (c *ReceiptClient) CreateBulk(builders ...*ReceiptCreate) *ReceiptCreateBulk
- func (c *ReceiptClient) Delete() *ReceiptDelete
- func (c *ReceiptClient) DeleteOne(r *Receipt) *ReceiptDeleteOne
- func (c *ReceiptClient) DeleteOneID(id int) *ReceiptDeleteOne
- func (c *ReceiptClient) Get(ctx context.Context, id int) (*Receipt, error)
- func (c *ReceiptClient) GetX(ctx context.Context, id int) *Receipt
- func (c *ReceiptClient) Hooks() []Hook
- func (c *ReceiptClient) Intercept(interceptors ...Interceptor)
- func (c *ReceiptClient) Interceptors() []Interceptor
- func (c *ReceiptClient) MapCreateBulk(slice any, setFunc func(*ReceiptCreate, int)) *ReceiptCreateBulk
- func (c *ReceiptClient) Query() *ReceiptQuery
- func (c *ReceiptClient) QueryBlock(r *Receipt) *BlockQuery
- func (c *ReceiptClient) QueryMsgs(r *Receipt) *MsgQuery
- func (c *ReceiptClient) Update() *ReceiptUpdate
- func (c *ReceiptClient) UpdateOne(r *Receipt) *ReceiptUpdateOne
- func (c *ReceiptClient) UpdateOneID(id int) *ReceiptUpdateOne
- func (c *ReceiptClient) Use(hooks ...Hook)
- type ReceiptCreate
- func (rc *ReceiptCreate) AddBlock(b ...*Block) *ReceiptCreate
- func (rc *ReceiptCreate) AddBlockIDs(ids ...int) *ReceiptCreate
- func (rc *ReceiptCreate) AddMsgIDs(ids ...int) *ReceiptCreate
- func (rc *ReceiptCreate) AddMsgs(m ...*Msg) *ReceiptCreate
- func (rc *ReceiptCreate) Exec(ctx context.Context) error
- func (rc *ReceiptCreate) ExecX(ctx context.Context)
- func (rc *ReceiptCreate) Mutation() *ReceiptMutation
- func (rc *ReceiptCreate) Save(ctx context.Context) (*Receipt, error)
- func (rc *ReceiptCreate) SaveX(ctx context.Context) *Receipt
- func (rc *ReceiptCreate) SetBlockHash(b []byte) *ReceiptCreate
- func (rc *ReceiptCreate) SetCreatedAt(t time.Time) *ReceiptCreate
- func (rc *ReceiptCreate) SetDestChainID(u uint64) *ReceiptCreate
- func (rc *ReceiptCreate) SetGasUsed(u uint64) *ReceiptCreate
- func (rc *ReceiptCreate) SetNillableCreatedAt(t *time.Time) *ReceiptCreate
- func (rc *ReceiptCreate) SetNillableRevertReason(s *string) *ReceiptCreate
- func (rc *ReceiptCreate) SetOffset(u uint64) *ReceiptCreate
- func (rc *ReceiptCreate) SetRelayerAddress(b []byte) *ReceiptCreate
- func (rc *ReceiptCreate) SetRevertReason(s string) *ReceiptCreate
- func (rc *ReceiptCreate) SetSourceChainID(u uint64) *ReceiptCreate
- func (rc *ReceiptCreate) SetSuccess(b bool) *ReceiptCreate
- func (rc *ReceiptCreate) SetTxHash(b []byte) *ReceiptCreate
- type ReceiptCreateBulk
- type ReceiptDelete
- type ReceiptDeleteOne
- type ReceiptEdges
- type ReceiptFilter
- func (f *ReceiptFilter) Where(p entql.P)
- func (f *ReceiptFilter) WhereBlockHash(p entql.BytesP)
- func (f *ReceiptFilter) WhereCreatedAt(p entql.TimeP)
- func (f *ReceiptFilter) WhereDestChainID(p entql.Uint64P)
- func (f *ReceiptFilter) WhereGasUsed(p entql.Uint64P)
- func (f *ReceiptFilter) WhereHasBlock()
- func (f *ReceiptFilter) WhereHasBlockWith(preds ...predicate.Block)
- func (f *ReceiptFilter) WhereHasMsgs()
- func (f *ReceiptFilter) WhereHasMsgsWith(preds ...predicate.Msg)
- func (f *ReceiptFilter) WhereID(p entql.IntP)
- func (f *ReceiptFilter) WhereOffset(p entql.Uint64P)
- func (f *ReceiptFilter) WhereRelayerAddress(p entql.BytesP)
- func (f *ReceiptFilter) WhereRevertReason(p entql.StringP)
- func (f *ReceiptFilter) WhereSourceChainID(p entql.Uint64P)
- func (f *ReceiptFilter) WhereSuccess(p entql.BoolP)
- func (f *ReceiptFilter) WhereTxHash(p entql.BytesP)
- type ReceiptGroupBy
- func (rgb *ReceiptGroupBy) Aggregate(fns ...AggregateFunc) *ReceiptGroupBy
- func (s *ReceiptGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReceiptGroupBy) BoolX(ctx context.Context) bool
- func (s *ReceiptGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReceiptGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReceiptGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReceiptGroupBy) Float64X(ctx context.Context) float64
- func (s *ReceiptGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReceiptGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReceiptGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReceiptGroupBy) IntX(ctx context.Context) int
- func (s *ReceiptGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReceiptGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReceiptGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReceiptGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReceiptGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReceiptGroupBy) StringX(ctx context.Context) string
- func (s *ReceiptGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReceiptGroupBy) StringsX(ctx context.Context) []string
- type ReceiptMutation
- func (m *ReceiptMutation) AddBlockIDs(ids ...int)
- func (m *ReceiptMutation) AddDestChainID(u int64)
- func (m *ReceiptMutation) AddField(name string, value ent.Value) error
- func (m *ReceiptMutation) AddGasUsed(u int64)
- func (m *ReceiptMutation) AddMsgIDs(ids ...int)
- func (m *ReceiptMutation) AddOffset(u int64)
- func (m *ReceiptMutation) AddSourceChainID(u int64)
- func (m *ReceiptMutation) AddedDestChainID() (r int64, exists bool)
- func (m *ReceiptMutation) AddedEdges() []string
- func (m *ReceiptMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReceiptMutation) AddedFields() []string
- func (m *ReceiptMutation) AddedGasUsed() (r int64, exists bool)
- func (m *ReceiptMutation) AddedIDs(name string) []ent.Value
- func (m *ReceiptMutation) AddedOffset() (r int64, exists bool)
- func (m *ReceiptMutation) AddedSourceChainID() (r int64, exists bool)
- func (m *ReceiptMutation) BlockCleared() bool
- func (m *ReceiptMutation) BlockHash() (r []byte, exists bool)
- func (m *ReceiptMutation) BlockIDs() (ids []int)
- func (m *ReceiptMutation) ClearBlock()
- func (m *ReceiptMutation) ClearEdge(name string) error
- func (m *ReceiptMutation) ClearField(name string) error
- func (m *ReceiptMutation) ClearMsgs()
- func (m *ReceiptMutation) ClearRevertReason()
- func (m *ReceiptMutation) ClearedEdges() []string
- func (m *ReceiptMutation) ClearedFields() []string
- func (m ReceiptMutation) Client() *Client
- func (m *ReceiptMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ReceiptMutation) DestChainID() (r uint64, exists bool)
- func (m *ReceiptMutation) EdgeCleared(name string) bool
- func (m *ReceiptMutation) Field(name string) (ent.Value, bool)
- func (m *ReceiptMutation) FieldCleared(name string) bool
- func (m *ReceiptMutation) Fields() []string
- func (m *ReceiptMutation) Filter() *ReceiptFilter
- func (m *ReceiptMutation) GasUsed() (r uint64, exists bool)
- func (m *ReceiptMutation) ID() (id int, exists bool)
- func (m *ReceiptMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ReceiptMutation) MsgsCleared() bool
- func (m *ReceiptMutation) MsgsIDs() (ids []int)
- func (m *ReceiptMutation) Offset() (r uint64, exists bool)
- func (m *ReceiptMutation) OldBlockHash(ctx context.Context) (v []byte, err error)
- func (m *ReceiptMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReceiptMutation) OldDestChainID(ctx context.Context) (v uint64, err error)
- func (m *ReceiptMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReceiptMutation) OldGasUsed(ctx context.Context) (v uint64, err error)
- func (m *ReceiptMutation) OldOffset(ctx context.Context) (v uint64, err error)
- func (m *ReceiptMutation) OldRelayerAddress(ctx context.Context) (v []byte, err error)
- func (m *ReceiptMutation) OldRevertReason(ctx context.Context) (v string, err error)
- func (m *ReceiptMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
- func (m *ReceiptMutation) OldSuccess(ctx context.Context) (v bool, err error)
- func (m *ReceiptMutation) OldTxHash(ctx context.Context) (v []byte, err error)
- func (m *ReceiptMutation) Op() Op
- func (m *ReceiptMutation) RelayerAddress() (r []byte, exists bool)
- func (m *ReceiptMutation) RemoveBlockIDs(ids ...int)
- func (m *ReceiptMutation) RemoveMsgIDs(ids ...int)
- func (m *ReceiptMutation) RemovedBlockIDs() (ids []int)
- func (m *ReceiptMutation) RemovedEdges() []string
- func (m *ReceiptMutation) RemovedIDs(name string) []ent.Value
- func (m *ReceiptMutation) RemovedMsgsIDs() (ids []int)
- func (m *ReceiptMutation) ResetBlock()
- func (m *ReceiptMutation) ResetBlockHash()
- func (m *ReceiptMutation) ResetCreatedAt()
- func (m *ReceiptMutation) ResetDestChainID()
- func (m *ReceiptMutation) ResetEdge(name string) error
- func (m *ReceiptMutation) ResetField(name string) error
- func (m *ReceiptMutation) ResetGasUsed()
- func (m *ReceiptMutation) ResetMsgs()
- func (m *ReceiptMutation) ResetOffset()
- func (m *ReceiptMutation) ResetRelayerAddress()
- func (m *ReceiptMutation) ResetRevertReason()
- func (m *ReceiptMutation) ResetSourceChainID()
- func (m *ReceiptMutation) ResetSuccess()
- func (m *ReceiptMutation) ResetTxHash()
- func (m *ReceiptMutation) RevertReason() (r string, exists bool)
- func (m *ReceiptMutation) RevertReasonCleared() bool
- func (m *ReceiptMutation) SetBlockHash(b []byte)
- func (m *ReceiptMutation) SetCreatedAt(t time.Time)
- func (m *ReceiptMutation) SetDestChainID(u uint64)
- func (m *ReceiptMutation) SetField(name string, value ent.Value) error
- func (m *ReceiptMutation) SetGasUsed(u uint64)
- func (m *ReceiptMutation) SetOffset(u uint64)
- func (m *ReceiptMutation) SetOp(op Op)
- func (m *ReceiptMutation) SetRelayerAddress(b []byte)
- func (m *ReceiptMutation) SetRevertReason(s string)
- func (m *ReceiptMutation) SetSourceChainID(u uint64)
- func (m *ReceiptMutation) SetSuccess(b bool)
- func (m *ReceiptMutation) SetTxHash(b []byte)
- func (m *ReceiptMutation) SourceChainID() (r uint64, exists bool)
- func (m *ReceiptMutation) Success() (r bool, exists bool)
- func (m ReceiptMutation) Tx() (*Tx, error)
- func (m *ReceiptMutation) TxHash() (r []byte, exists bool)
- func (m *ReceiptMutation) Type() string
- func (m *ReceiptMutation) Where(ps ...predicate.Receipt)
- func (m *ReceiptMutation) WhereP(ps ...func(*sql.Selector))
- type ReceiptQuery
- func (rq *ReceiptQuery) Aggregate(fns ...AggregateFunc) *ReceiptSelect
- func (rq *ReceiptQuery) All(ctx context.Context) ([]*Receipt, error)
- func (rq *ReceiptQuery) AllX(ctx context.Context) []*Receipt
- func (rq *ReceiptQuery) Clone() *ReceiptQuery
- func (rq *ReceiptQuery) Count(ctx context.Context) (int, error)
- func (rq *ReceiptQuery) CountX(ctx context.Context) int
- func (rq *ReceiptQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReceiptQuery) ExistX(ctx context.Context) bool
- func (rq *ReceiptQuery) Filter() *ReceiptFilter
- func (rq *ReceiptQuery) First(ctx context.Context) (*Receipt, error)
- func (rq *ReceiptQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *ReceiptQuery) FirstIDX(ctx context.Context) int
- func (rq *ReceiptQuery) FirstX(ctx context.Context) *Receipt
- func (rq *ReceiptQuery) GroupBy(field string, fields ...string) *ReceiptGroupBy
- func (rq *ReceiptQuery) IDs(ctx context.Context) (ids []int, err error)
- func (rq *ReceiptQuery) IDsX(ctx context.Context) []int
- func (rq *ReceiptQuery) Limit(limit int) *ReceiptQuery
- func (rq *ReceiptQuery) Offset(offset int) *ReceiptQuery
- func (rq *ReceiptQuery) Only(ctx context.Context) (*Receipt, error)
- func (rq *ReceiptQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *ReceiptQuery) OnlyIDX(ctx context.Context) int
- func (rq *ReceiptQuery) OnlyX(ctx context.Context) *Receipt
- func (rq *ReceiptQuery) Order(o ...receipt.OrderOption) *ReceiptQuery
- func (rq *ReceiptQuery) QueryBlock() *BlockQuery
- func (rq *ReceiptQuery) QueryMsgs() *MsgQuery
- func (rq *ReceiptQuery) Select(fields ...string) *ReceiptSelect
- func (rq *ReceiptQuery) Unique(unique bool) *ReceiptQuery
- func (rq *ReceiptQuery) Where(ps ...predicate.Receipt) *ReceiptQuery
- func (rq *ReceiptQuery) WithBlock(opts ...func(*BlockQuery)) *ReceiptQuery
- func (rq *ReceiptQuery) WithMsgs(opts ...func(*MsgQuery)) *ReceiptQuery
- type ReceiptSelect
- func (rs *ReceiptSelect) Aggregate(fns ...AggregateFunc) *ReceiptSelect
- func (s *ReceiptSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReceiptSelect) BoolX(ctx context.Context) bool
- func (s *ReceiptSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReceiptSelect) BoolsX(ctx context.Context) []bool
- func (s *ReceiptSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReceiptSelect) Float64X(ctx context.Context) float64
- func (s *ReceiptSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReceiptSelect) Float64sX(ctx context.Context) []float64
- func (s *ReceiptSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReceiptSelect) IntX(ctx context.Context) int
- func (s *ReceiptSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReceiptSelect) IntsX(ctx context.Context) []int
- func (rs *ReceiptSelect) Scan(ctx context.Context, v any) error
- func (s *ReceiptSelect) ScanX(ctx context.Context, v any)
- func (s *ReceiptSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReceiptSelect) StringX(ctx context.Context) string
- func (s *ReceiptSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReceiptSelect) StringsX(ctx context.Context) []string
- type ReceiptUpdate
- func (ru *ReceiptUpdate) AddBlock(b ...*Block) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddBlockIDs(ids ...int) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddDestChainID(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddGasUsed(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddMsgIDs(ids ...int) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddMsgs(m ...*Msg) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddOffset(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddSourceChainID(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) ClearBlock() *ReceiptUpdate
- func (ru *ReceiptUpdate) ClearMsgs() *ReceiptUpdate
- func (ru *ReceiptUpdate) ClearRevertReason() *ReceiptUpdate
- func (ru *ReceiptUpdate) Exec(ctx context.Context) error
- func (ru *ReceiptUpdate) ExecX(ctx context.Context)
- func (ru *ReceiptUpdate) Mutation() *ReceiptMutation
- func (ru *ReceiptUpdate) RemoveBlock(b ...*Block) *ReceiptUpdate
- func (ru *ReceiptUpdate) RemoveBlockIDs(ids ...int) *ReceiptUpdate
- func (ru *ReceiptUpdate) RemoveMsgIDs(ids ...int) *ReceiptUpdate
- func (ru *ReceiptUpdate) RemoveMsgs(m ...*Msg) *ReceiptUpdate
- func (ru *ReceiptUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReceiptUpdate) SaveX(ctx context.Context) int
- func (ru *ReceiptUpdate) SetBlockHash(b []byte) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetCreatedAt(t time.Time) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetDestChainID(u uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetGasUsed(u uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableCreatedAt(t *time.Time) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableDestChainID(u *uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableGasUsed(u *uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableOffset(u *uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableRevertReason(s *string) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableSourceChainID(u *uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableSuccess(b *bool) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetOffset(u uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetRelayerAddress(b []byte) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetRevertReason(s string) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetSourceChainID(u uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetSuccess(b bool) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetTxHash(b []byte) *ReceiptUpdate
- func (ru *ReceiptUpdate) Where(ps ...predicate.Receipt) *ReceiptUpdate
- type ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddBlock(b ...*Block) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddBlockIDs(ids ...int) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddDestChainID(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddGasUsed(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddMsgIDs(ids ...int) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddMsgs(m ...*Msg) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddOffset(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddSourceChainID(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) ClearBlock() *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) ClearMsgs() *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) ClearRevertReason() *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReceiptUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReceiptUpdateOne) Mutation() *ReceiptMutation
- func (ruo *ReceiptUpdateOne) RemoveBlock(b ...*Block) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) RemoveBlockIDs(ids ...int) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) RemoveMsgIDs(ids ...int) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) RemoveMsgs(m ...*Msg) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) Save(ctx context.Context) (*Receipt, error)
- func (ruo *ReceiptUpdateOne) SaveX(ctx context.Context) *Receipt
- func (ruo *ReceiptUpdateOne) Select(field string, fields ...string) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetBlockHash(b []byte) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetCreatedAt(t time.Time) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetDestChainID(u uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetGasUsed(u uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableCreatedAt(t *time.Time) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableDestChainID(u *uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableGasUsed(u *uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableOffset(u *uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableRevertReason(s *string) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableSourceChainID(u *uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableSuccess(b *bool) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetOffset(u uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetRelayerAddress(b []byte) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetRevertReason(s string) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetSourceChainID(u uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetSuccess(b bool) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetTxHash(b []byte) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) Where(ps ...predicate.Receipt) *ReceiptUpdateOne
- type Receipts
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type XProviderCursor
- type XProviderCursorClient
- func (c *XProviderCursorClient) Create() *XProviderCursorCreate
- func (c *XProviderCursorClient) CreateBulk(builders ...*XProviderCursorCreate) *XProviderCursorCreateBulk
- func (c *XProviderCursorClient) Delete() *XProviderCursorDelete
- func (c *XProviderCursorClient) DeleteOne(xc *XProviderCursor) *XProviderCursorDeleteOne
- func (c *XProviderCursorClient) DeleteOneID(id uuid.UUID) *XProviderCursorDeleteOne
- func (c *XProviderCursorClient) Get(ctx context.Context, id uuid.UUID) (*XProviderCursor, error)
- func (c *XProviderCursorClient) GetX(ctx context.Context, id uuid.UUID) *XProviderCursor
- func (c *XProviderCursorClient) Hooks() []Hook
- func (c *XProviderCursorClient) Intercept(interceptors ...Interceptor)
- func (c *XProviderCursorClient) Interceptors() []Interceptor
- func (c *XProviderCursorClient) MapCreateBulk(slice any, setFunc func(*XProviderCursorCreate, int)) *XProviderCursorCreateBulk
- func (c *XProviderCursorClient) Query() *XProviderCursorQuery
- func (c *XProviderCursorClient) Update() *XProviderCursorUpdate
- func (c *XProviderCursorClient) UpdateOne(xc *XProviderCursor) *XProviderCursorUpdateOne
- func (c *XProviderCursorClient) UpdateOneID(id uuid.UUID) *XProviderCursorUpdateOne
- func (c *XProviderCursorClient) Use(hooks ...Hook)
- type XProviderCursorCreate
- func (xcc *XProviderCursorCreate) Exec(ctx context.Context) error
- func (xcc *XProviderCursorCreate) ExecX(ctx context.Context)
- func (xcc *XProviderCursorCreate) Mutation() *XProviderCursorMutation
- func (xcc *XProviderCursorCreate) Save(ctx context.Context) (*XProviderCursor, error)
- func (xcc *XProviderCursorCreate) SaveX(ctx context.Context) *XProviderCursor
- func (xcc *XProviderCursorCreate) SetChainID(u uint64) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetCreatedAt(t time.Time) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetHeight(u uint64) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetID(u uuid.UUID) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetNillableCreatedAt(t *time.Time) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetNillableID(u *uuid.UUID) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetOffset(u uint64) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetUpdatedAt(t time.Time) *XProviderCursorCreate
- type XProviderCursorCreateBulk
- func (xccb *XProviderCursorCreateBulk) Exec(ctx context.Context) error
- func (xccb *XProviderCursorCreateBulk) ExecX(ctx context.Context)
- func (xccb *XProviderCursorCreateBulk) Save(ctx context.Context) ([]*XProviderCursor, error)
- func (xccb *XProviderCursorCreateBulk) SaveX(ctx context.Context) []*XProviderCursor
- type XProviderCursorDelete
- type XProviderCursorDeleteOne
- type XProviderCursorFilter
- func (f *XProviderCursorFilter) Where(p entql.P)
- func (f *XProviderCursorFilter) WhereChainID(p entql.Uint64P)
- func (f *XProviderCursorFilter) WhereCreatedAt(p entql.TimeP)
- func (f *XProviderCursorFilter) WhereHeight(p entql.Uint64P)
- func (f *XProviderCursorFilter) WhereID(p entql.ValueP)
- func (f *XProviderCursorFilter) WhereOffset(p entql.Uint64P)
- func (f *XProviderCursorFilter) WhereUpdatedAt(p entql.TimeP)
- type XProviderCursorGroupBy
- func (xcgb *XProviderCursorGroupBy) Aggregate(fns ...AggregateFunc) *XProviderCursorGroupBy
- func (s *XProviderCursorGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *XProviderCursorGroupBy) BoolX(ctx context.Context) bool
- func (s *XProviderCursorGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *XProviderCursorGroupBy) BoolsX(ctx context.Context) []bool
- func (s *XProviderCursorGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *XProviderCursorGroupBy) Float64X(ctx context.Context) float64
- func (s *XProviderCursorGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *XProviderCursorGroupBy) Float64sX(ctx context.Context) []float64
- func (s *XProviderCursorGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *XProviderCursorGroupBy) IntX(ctx context.Context) int
- func (s *XProviderCursorGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *XProviderCursorGroupBy) IntsX(ctx context.Context) []int
- func (xcgb *XProviderCursorGroupBy) Scan(ctx context.Context, v any) error
- func (s *XProviderCursorGroupBy) ScanX(ctx context.Context, v any)
- func (s *XProviderCursorGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *XProviderCursorGroupBy) StringX(ctx context.Context) string
- func (s *XProviderCursorGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *XProviderCursorGroupBy) StringsX(ctx context.Context) []string
- type XProviderCursorMutation
- func (m *XProviderCursorMutation) AddChainID(u int64)
- func (m *XProviderCursorMutation) AddField(name string, value ent.Value) error
- func (m *XProviderCursorMutation) AddHeight(u int64)
- func (m *XProviderCursorMutation) AddOffset(u int64)
- func (m *XProviderCursorMutation) AddedChainID() (r int64, exists bool)
- func (m *XProviderCursorMutation) AddedEdges() []string
- func (m *XProviderCursorMutation) AddedField(name string) (ent.Value, bool)
- func (m *XProviderCursorMutation) AddedFields() []string
- func (m *XProviderCursorMutation) AddedHeight() (r int64, exists bool)
- func (m *XProviderCursorMutation) AddedIDs(name string) []ent.Value
- func (m *XProviderCursorMutation) AddedOffset() (r int64, exists bool)
- func (m *XProviderCursorMutation) ChainID() (r uint64, exists bool)
- func (m *XProviderCursorMutation) ClearEdge(name string) error
- func (m *XProviderCursorMutation) ClearField(name string) error
- func (m *XProviderCursorMutation) ClearedEdges() []string
- func (m *XProviderCursorMutation) ClearedFields() []string
- func (m XProviderCursorMutation) Client() *Client
- func (m *XProviderCursorMutation) CreatedAt() (r time.Time, exists bool)
- func (m *XProviderCursorMutation) EdgeCleared(name string) bool
- func (m *XProviderCursorMutation) Field(name string) (ent.Value, bool)
- func (m *XProviderCursorMutation) FieldCleared(name string) bool
- func (m *XProviderCursorMutation) Fields() []string
- func (m *XProviderCursorMutation) Filter() *XProviderCursorFilter
- func (m *XProviderCursorMutation) Height() (r uint64, exists bool)
- func (m *XProviderCursorMutation) ID() (id uuid.UUID, exists bool)
- func (m *XProviderCursorMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *XProviderCursorMutation) Offset() (r uint64, exists bool)
- func (m *XProviderCursorMutation) OldChainID(ctx context.Context) (v uint64, err error)
- func (m *XProviderCursorMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *XProviderCursorMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *XProviderCursorMutation) OldHeight(ctx context.Context) (v uint64, err error)
- func (m *XProviderCursorMutation) OldOffset(ctx context.Context) (v uint64, err error)
- func (m *XProviderCursorMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *XProviderCursorMutation) Op() Op
- func (m *XProviderCursorMutation) RemovedEdges() []string
- func (m *XProviderCursorMutation) RemovedIDs(name string) []ent.Value
- func (m *XProviderCursorMutation) ResetChainID()
- func (m *XProviderCursorMutation) ResetCreatedAt()
- func (m *XProviderCursorMutation) ResetEdge(name string) error
- func (m *XProviderCursorMutation) ResetField(name string) error
- func (m *XProviderCursorMutation) ResetHeight()
- func (m *XProviderCursorMutation) ResetOffset()
- func (m *XProviderCursorMutation) ResetUpdatedAt()
- func (m *XProviderCursorMutation) SetChainID(u uint64)
- func (m *XProviderCursorMutation) SetCreatedAt(t time.Time)
- func (m *XProviderCursorMutation) SetField(name string, value ent.Value) error
- func (m *XProviderCursorMutation) SetHeight(u uint64)
- func (m *XProviderCursorMutation) SetID(id uuid.UUID)
- func (m *XProviderCursorMutation) SetOffset(u uint64)
- func (m *XProviderCursorMutation) SetOp(op Op)
- func (m *XProviderCursorMutation) SetUpdatedAt(t time.Time)
- func (m XProviderCursorMutation) Tx() (*Tx, error)
- func (m *XProviderCursorMutation) Type() string
- func (m *XProviderCursorMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *XProviderCursorMutation) Where(ps ...predicate.XProviderCursor)
- func (m *XProviderCursorMutation) WhereP(ps ...func(*sql.Selector))
- type XProviderCursorQuery
- func (xcq *XProviderCursorQuery) Aggregate(fns ...AggregateFunc) *XProviderCursorSelect
- func (xcq *XProviderCursorQuery) All(ctx context.Context) ([]*XProviderCursor, error)
- func (xcq *XProviderCursorQuery) AllX(ctx context.Context) []*XProviderCursor
- func (xcq *XProviderCursorQuery) Clone() *XProviderCursorQuery
- func (xcq *XProviderCursorQuery) Count(ctx context.Context) (int, error)
- func (xcq *XProviderCursorQuery) CountX(ctx context.Context) int
- func (xcq *XProviderCursorQuery) Exist(ctx context.Context) (bool, error)
- func (xcq *XProviderCursorQuery) ExistX(ctx context.Context) bool
- func (xcq *XProviderCursorQuery) Filter() *XProviderCursorFilter
- func (xcq *XProviderCursorQuery) First(ctx context.Context) (*XProviderCursor, error)
- func (xcq *XProviderCursorQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (xcq *XProviderCursorQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (xcq *XProviderCursorQuery) FirstX(ctx context.Context) *XProviderCursor
- func (xcq *XProviderCursorQuery) GroupBy(field string, fields ...string) *XProviderCursorGroupBy
- func (xcq *XProviderCursorQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (xcq *XProviderCursorQuery) IDsX(ctx context.Context) []uuid.UUID
- func (xcq *XProviderCursorQuery) Limit(limit int) *XProviderCursorQuery
- func (xcq *XProviderCursorQuery) Offset(offset int) *XProviderCursorQuery
- func (xcq *XProviderCursorQuery) Only(ctx context.Context) (*XProviderCursor, error)
- func (xcq *XProviderCursorQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (xcq *XProviderCursorQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (xcq *XProviderCursorQuery) OnlyX(ctx context.Context) *XProviderCursor
- func (xcq *XProviderCursorQuery) Order(o ...xprovidercursor.OrderOption) *XProviderCursorQuery
- func (xcq *XProviderCursorQuery) Select(fields ...string) *XProviderCursorSelect
- func (xcq *XProviderCursorQuery) Unique(unique bool) *XProviderCursorQuery
- func (xcq *XProviderCursorQuery) Where(ps ...predicate.XProviderCursor) *XProviderCursorQuery
- type XProviderCursorSelect
- func (xcs *XProviderCursorSelect) Aggregate(fns ...AggregateFunc) *XProviderCursorSelect
- func (s *XProviderCursorSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *XProviderCursorSelect) BoolX(ctx context.Context) bool
- func (s *XProviderCursorSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *XProviderCursorSelect) BoolsX(ctx context.Context) []bool
- func (s *XProviderCursorSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *XProviderCursorSelect) Float64X(ctx context.Context) float64
- func (s *XProviderCursorSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *XProviderCursorSelect) Float64sX(ctx context.Context) []float64
- func (s *XProviderCursorSelect) Int(ctx context.Context) (_ int, err error)
- func (s *XProviderCursorSelect) IntX(ctx context.Context) int
- func (s *XProviderCursorSelect) Ints(ctx context.Context) ([]int, error)
- func (s *XProviderCursorSelect) IntsX(ctx context.Context) []int
- func (xcs *XProviderCursorSelect) Scan(ctx context.Context, v any) error
- func (s *XProviderCursorSelect) ScanX(ctx context.Context, v any)
- func (s *XProviderCursorSelect) String(ctx context.Context) (_ string, err error)
- func (s *XProviderCursorSelect) StringX(ctx context.Context) string
- func (s *XProviderCursorSelect) Strings(ctx context.Context) ([]string, error)
- func (s *XProviderCursorSelect) StringsX(ctx context.Context) []string
- type XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) AddChainID(u int64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) AddHeight(u int64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) AddOffset(u int64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) Exec(ctx context.Context) error
- func (xcu *XProviderCursorUpdate) ExecX(ctx context.Context)
- func (xcu *XProviderCursorUpdate) Mutation() *XProviderCursorMutation
- func (xcu *XProviderCursorUpdate) Save(ctx context.Context) (int, error)
- func (xcu *XProviderCursorUpdate) SaveX(ctx context.Context) int
- func (xcu *XProviderCursorUpdate) SetChainID(u uint64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetCreatedAt(t time.Time) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetHeight(u uint64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetNillableChainID(u *uint64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetNillableCreatedAt(t *time.Time) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetNillableHeight(u *uint64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetNillableOffset(u *uint64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetOffset(u uint64) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetUpdatedAt(t time.Time) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) Where(ps ...predicate.XProviderCursor) *XProviderCursorUpdate
- type XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) AddChainID(u int64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) AddHeight(u int64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) AddOffset(u int64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) Exec(ctx context.Context) error
- func (xcuo *XProviderCursorUpdateOne) ExecX(ctx context.Context)
- func (xcuo *XProviderCursorUpdateOne) Mutation() *XProviderCursorMutation
- func (xcuo *XProviderCursorUpdateOne) Save(ctx context.Context) (*XProviderCursor, error)
- func (xcuo *XProviderCursorUpdateOne) SaveX(ctx context.Context) *XProviderCursor
- func (xcuo *XProviderCursorUpdateOne) Select(field string, fields ...string) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetChainID(u uint64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetCreatedAt(t time.Time) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetHeight(u uint64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetNillableChainID(u *uint64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetNillableCreatedAt(t *time.Time) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetNillableHeight(u *uint64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetNillableOffset(u *uint64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetOffset(u uint64) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetUpdatedAt(t time.Time) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) Where(ps ...predicate.XProviderCursor) *XProviderCursorUpdateOne
- type XProviderCursors
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeBlock = "Block" TypeChain = "Chain" TypeMsg = "Msg" TypeReceipt = "Receipt" TypeXProviderCursor = "XProviderCursor" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
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.
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 Block ¶
type Block struct { // ID of the ent. ID int `json:"id,omitempty"` // Hash holds the value of the "hash" field. Hash []byte `json:"hash,omitempty"` // ChainID holds the value of the "chain_id" field. ChainID uint64 `json:"chain_id,omitempty"` // Height holds the value of the "height" field. Height uint64 `json:"height,omitempty"` // Offset holds the value of the "offset" field. Offset uint64 `json:"offset,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BlockQuery when eager-loading is set. Edges BlockEdges `json:"edges"` // contains filtered or unexported fields }
Block is the model entity for the Block schema.
func (*Block) QueryReceipts ¶
func (b *Block) QueryReceipts() *ReceiptQuery
QueryReceipts queries the "receipts" edge of the Block entity.
func (*Block) Unwrap ¶
Unwrap unwraps the Block 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 (*Block) Update ¶
func (b *Block) Update() *BlockUpdateOne
Update returns a builder for updating this Block. Note that you need to call Block.Unwrap() before calling this method if this Block was returned from a transaction, and the transaction was committed or rolled back.
type BlockClient ¶
type BlockClient struct {
// contains filtered or unexported fields
}
BlockClient is a client for the Block schema.
func NewBlockClient ¶
func NewBlockClient(c config) *BlockClient
NewBlockClient returns a client for the Block from the given config.
func (*BlockClient) Create ¶
func (c *BlockClient) Create() *BlockCreate
Create returns a builder for creating a Block entity.
func (*BlockClient) CreateBulk ¶
func (c *BlockClient) CreateBulk(builders ...*BlockCreate) *BlockCreateBulk
CreateBulk returns a builder for creating a bulk of Block entities.
func (*BlockClient) Delete ¶
func (c *BlockClient) Delete() *BlockDelete
Delete returns a delete builder for Block.
func (*BlockClient) DeleteOne ¶
func (c *BlockClient) DeleteOne(b *Block) *BlockDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BlockClient) DeleteOneID ¶
func (c *BlockClient) DeleteOneID(id int) *BlockDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BlockClient) GetX ¶
func (c *BlockClient) GetX(ctx context.Context, id int) *Block
GetX is like Get, but panics if an error occurs.
func (*BlockClient) Intercept ¶
func (c *BlockClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `block.Intercept(f(g(h())))`.
func (*BlockClient) Interceptors ¶
func (c *BlockClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BlockClient) MapCreateBulk ¶
func (c *BlockClient) MapCreateBulk(slice any, setFunc func(*BlockCreate, int)) *BlockCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*BlockClient) Query ¶
func (c *BlockClient) Query() *BlockQuery
Query returns a query builder for Block.
func (*BlockClient) QueryMsgs ¶
func (c *BlockClient) QueryMsgs(b *Block) *MsgQuery
QueryMsgs queries the msgs edge of a Block.
func (*BlockClient) QueryReceipts ¶
func (c *BlockClient) QueryReceipts(b *Block) *ReceiptQuery
QueryReceipts queries the receipts edge of a Block.
func (*BlockClient) Update ¶
func (c *BlockClient) Update() *BlockUpdate
Update returns an update builder for Block.
func (*BlockClient) UpdateOne ¶
func (c *BlockClient) UpdateOne(b *Block) *BlockUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BlockClient) UpdateOneID ¶
func (c *BlockClient) UpdateOneID(id int) *BlockUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BlockClient) Use ¶
func (c *BlockClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `block.Hooks(f(g(h())))`.
type BlockCreate ¶
type BlockCreate struct {
// contains filtered or unexported fields
}
BlockCreate is the builder for creating a Block entity.
func (*BlockCreate) AddMsgIDs ¶
func (bc *BlockCreate) AddMsgIDs(ids ...int) *BlockCreate
AddMsgIDs adds the "msgs" edge to the Msg entity by IDs.
func (*BlockCreate) AddMsgs ¶
func (bc *BlockCreate) AddMsgs(m ...*Msg) *BlockCreate
AddMsgs adds the "msgs" edges to the Msg entity.
func (*BlockCreate) AddReceiptIDs ¶
func (bc *BlockCreate) AddReceiptIDs(ids ...int) *BlockCreate
AddReceiptIDs adds the "receipts" edge to the Receipt entity by IDs.
func (*BlockCreate) AddReceipts ¶
func (bc *BlockCreate) AddReceipts(r ...*Receipt) *BlockCreate
AddReceipts adds the "receipts" edges to the Receipt entity.
func (*BlockCreate) Exec ¶
func (bc *BlockCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BlockCreate) ExecX ¶
func (bc *BlockCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlockCreate) Mutation ¶
func (bc *BlockCreate) Mutation() *BlockMutation
Mutation returns the BlockMutation object of the builder.
func (*BlockCreate) Save ¶
func (bc *BlockCreate) Save(ctx context.Context) (*Block, error)
Save creates the Block in the database.
func (*BlockCreate) SaveX ¶
func (bc *BlockCreate) SaveX(ctx context.Context) *Block
SaveX calls Save and panics if Save returns an error.
func (*BlockCreate) SetChainID ¶ added in v0.1.7
func (bc *BlockCreate) SetChainID(u uint64) *BlockCreate
SetChainID sets the "chain_id" field.
func (*BlockCreate) SetCreatedAt ¶
func (bc *BlockCreate) SetCreatedAt(t time.Time) *BlockCreate
SetCreatedAt sets the "created_at" field.
func (*BlockCreate) SetHash ¶ added in v0.1.7
func (bc *BlockCreate) SetHash(b []byte) *BlockCreate
SetHash sets the "hash" field.
func (*BlockCreate) SetHeight ¶ added in v0.1.7
func (bc *BlockCreate) SetHeight(u uint64) *BlockCreate
SetHeight sets the "height" field.
func (*BlockCreate) SetNillableCreatedAt ¶
func (bc *BlockCreate) SetNillableCreatedAt(t *time.Time) *BlockCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BlockCreate) SetNillableTimestamp ¶
func (bc *BlockCreate) SetNillableTimestamp(t *time.Time) *BlockCreate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*BlockCreate) SetOffset ¶ added in v0.1.7
func (bc *BlockCreate) SetOffset(u uint64) *BlockCreate
SetOffset sets the "offset" field.
func (*BlockCreate) SetTimestamp ¶
func (bc *BlockCreate) SetTimestamp(t time.Time) *BlockCreate
SetTimestamp sets the "timestamp" field.
type BlockCreateBulk ¶
type BlockCreateBulk struct {
// contains filtered or unexported fields
}
BlockCreateBulk is the builder for creating many Block entities in bulk.
func (*BlockCreateBulk) Exec ¶
func (bcb *BlockCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BlockCreateBulk) ExecX ¶
func (bcb *BlockCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BlockDelete ¶
type BlockDelete struct {
// contains filtered or unexported fields
}
BlockDelete is the builder for deleting a Block entity.
func (*BlockDelete) Exec ¶
func (bd *BlockDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BlockDelete) ExecX ¶
func (bd *BlockDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BlockDelete) Where ¶
func (bd *BlockDelete) Where(ps ...predicate.Block) *BlockDelete
Where appends a list predicates to the BlockDelete builder.
type BlockDeleteOne ¶
type BlockDeleteOne struct {
// contains filtered or unexported fields
}
BlockDeleteOne is the builder for deleting a single Block entity.
func (*BlockDeleteOne) Exec ¶
func (bdo *BlockDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BlockDeleteOne) ExecX ¶
func (bdo *BlockDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlockDeleteOne) Where ¶
func (bdo *BlockDeleteOne) Where(ps ...predicate.Block) *BlockDeleteOne
Where appends a list predicates to the BlockDelete builder.
type BlockEdges ¶
type BlockEdges struct { // Msgs holds the value of the msgs edge. Msgs []*Msg `json:"msgs,omitempty"` // Receipts holds the value of the receipts edge. Receipts []*Receipt `json:"receipts,omitempty"` // contains filtered or unexported fields }
BlockEdges holds the relations/edges for other nodes in the graph.
func (BlockEdges) MsgsOrErr ¶
func (e BlockEdges) MsgsOrErr() ([]*Msg, error)
MsgsOrErr returns the Msgs value or an error if the edge was not loaded in eager-loading.
func (BlockEdges) ReceiptsOrErr ¶
func (e BlockEdges) ReceiptsOrErr() ([]*Receipt, error)
ReceiptsOrErr returns the Receipts value or an error if the edge was not loaded in eager-loading.
type BlockFilter ¶
type BlockFilter struct {
// contains filtered or unexported fields
}
BlockFilter provides a generic filtering capability at runtime for BlockQuery.
func (*BlockFilter) Where ¶
func (f *BlockFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*BlockFilter) WhereChainID ¶ added in v0.1.7
func (f *BlockFilter) WhereChainID(p entql.Uint64P)
WhereChainID applies the entql uint64 predicate on the chain_id field.
func (*BlockFilter) WhereCreatedAt ¶
func (f *BlockFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*BlockFilter) WhereHasMsgs ¶
func (f *BlockFilter) WhereHasMsgs()
WhereHasMsgs applies a predicate to check if query has an edge msgs.
func (*BlockFilter) WhereHasMsgsWith ¶
func (f *BlockFilter) WhereHasMsgsWith(preds ...predicate.Msg)
WhereHasMsgsWith applies a predicate to check if query has an edge msgs with a given conditions (other predicates).
func (*BlockFilter) WhereHasReceipts ¶
func (f *BlockFilter) WhereHasReceipts()
WhereHasReceipts applies a predicate to check if query has an edge receipts.
func (*BlockFilter) WhereHasReceiptsWith ¶
func (f *BlockFilter) WhereHasReceiptsWith(preds ...predicate.Receipt)
WhereHasReceiptsWith applies a predicate to check if query has an edge receipts with a given conditions (other predicates).
func (*BlockFilter) WhereHash ¶ added in v0.1.7
func (f *BlockFilter) WhereHash(p entql.BytesP)
WhereHash applies the entql []byte predicate on the hash field.
func (*BlockFilter) WhereHeight ¶ added in v0.1.7
func (f *BlockFilter) WhereHeight(p entql.Uint64P)
WhereHeight applies the entql uint64 predicate on the height field.
func (*BlockFilter) WhereID ¶
func (f *BlockFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*BlockFilter) WhereOffset ¶ added in v0.1.7
func (f *BlockFilter) WhereOffset(p entql.Uint64P)
WhereOffset applies the entql uint64 predicate on the offset field.
func (*BlockFilter) WhereTimestamp ¶
func (f *BlockFilter) WhereTimestamp(p entql.TimeP)
WhereTimestamp applies the entql time.Time predicate on the timestamp field.
type BlockGroupBy ¶
type BlockGroupBy struct {
// contains filtered or unexported fields
}
BlockGroupBy is the group-by builder for Block entities.
func (*BlockGroupBy) Aggregate ¶
func (bgb *BlockGroupBy) Aggregate(fns ...AggregateFunc) *BlockGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BlockGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Scan ¶
func (bgb *BlockGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BlockGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BlockMutation ¶
type BlockMutation struct {
// contains filtered or unexported fields
}
BlockMutation represents an operation that mutates the Block nodes in the graph.
func (*BlockMutation) AddChainID ¶ added in v0.1.7
func (m *BlockMutation) AddChainID(u int64)
AddChainID adds u to the "chain_id" field.
func (*BlockMutation) AddField ¶
func (m *BlockMutation) 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 (*BlockMutation) AddHeight ¶ added in v0.1.7
func (m *BlockMutation) AddHeight(u int64)
AddHeight adds u to the "height" field.
func (*BlockMutation) AddMsgIDs ¶
func (m *BlockMutation) AddMsgIDs(ids ...int)
AddMsgIDs adds the "msgs" edge to the Msg entity by ids.
func (*BlockMutation) AddOffset ¶ added in v0.1.7
func (m *BlockMutation) AddOffset(u int64)
AddOffset adds u to the "offset" field.
func (*BlockMutation) AddReceiptIDs ¶
func (m *BlockMutation) AddReceiptIDs(ids ...int)
AddReceiptIDs adds the "receipts" edge to the Receipt entity by ids.
func (*BlockMutation) AddedChainID ¶ added in v0.1.7
func (m *BlockMutation) AddedChainID() (r int64, exists bool)
AddedChainID returns the value that was added to the "chain_id" field in this mutation.
func (*BlockMutation) AddedEdges ¶
func (m *BlockMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BlockMutation) AddedField ¶
func (m *BlockMutation) 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 (*BlockMutation) AddedFields ¶
func (m *BlockMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BlockMutation) AddedHeight ¶ added in v0.1.7
func (m *BlockMutation) AddedHeight() (r int64, exists bool)
AddedHeight returns the value that was added to the "height" field in this mutation.
func (*BlockMutation) AddedIDs ¶
func (m *BlockMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BlockMutation) AddedOffset ¶ added in v0.1.7
func (m *BlockMutation) AddedOffset() (r int64, exists bool)
AddedOffset returns the value that was added to the "offset" field in this mutation.
func (*BlockMutation) ChainID ¶ added in v0.1.7
func (m *BlockMutation) ChainID() (r uint64, exists bool)
ChainID returns the value of the "chain_id" field in the mutation.
func (*BlockMutation) ClearEdge ¶
func (m *BlockMutation) 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 (*BlockMutation) ClearField ¶
func (m *BlockMutation) 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 (*BlockMutation) ClearMsgs ¶
func (m *BlockMutation) ClearMsgs()
ClearMsgs clears the "msgs" edge to the Msg entity.
func (*BlockMutation) ClearReceipts ¶
func (m *BlockMutation) ClearReceipts()
ClearReceipts clears the "receipts" edge to the Receipt entity.
func (*BlockMutation) ClearedEdges ¶
func (m *BlockMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BlockMutation) ClearedFields ¶
func (m *BlockMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BlockMutation) Client ¶
func (m BlockMutation) 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 (*BlockMutation) CreatedAt ¶
func (m *BlockMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*BlockMutation) EdgeCleared ¶
func (m *BlockMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BlockMutation) Field ¶
func (m *BlockMutation) 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 (*BlockMutation) FieldCleared ¶
func (m *BlockMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BlockMutation) Fields ¶
func (m *BlockMutation) 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 (*BlockMutation) Filter ¶
func (m *BlockMutation) Filter() *BlockFilter
Filter returns an entql.Where implementation to apply filters on the BlockMutation builder.
func (*BlockMutation) Hash ¶ added in v0.1.7
func (m *BlockMutation) Hash() (r []byte, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*BlockMutation) Height ¶ added in v0.1.7
func (m *BlockMutation) Height() (r uint64, exists bool)
Height returns the value of the "height" field in the mutation.
func (*BlockMutation) ID ¶
func (m *BlockMutation) 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 (*BlockMutation) IDs ¶
func (m *BlockMutation) 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 (*BlockMutation) MsgsCleared ¶
func (m *BlockMutation) MsgsCleared() bool
MsgsCleared reports if the "msgs" edge to the Msg entity was cleared.
func (*BlockMutation) MsgsIDs ¶
func (m *BlockMutation) MsgsIDs() (ids []int)
MsgsIDs returns the "msgs" edge IDs in the mutation.
func (*BlockMutation) Offset ¶ added in v0.1.7
func (m *BlockMutation) Offset() (r uint64, exists bool)
Offset returns the value of the "offset" field in the mutation.
func (*BlockMutation) OldChainID ¶ added in v0.1.7
func (m *BlockMutation) OldChainID(ctx context.Context) (v uint64, err error)
OldChainID returns the old "chain_id" field's value of the Block entity. If the Block 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 (*BlockMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Block entity. If the Block 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 (*BlockMutation) 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 (*BlockMutation) OldHash ¶ added in v0.1.7
func (m *BlockMutation) OldHash(ctx context.Context) (v []byte, err error)
OldHash returns the old "hash" field's value of the Block entity. If the Block 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 (*BlockMutation) OldHeight ¶ added in v0.1.7
func (m *BlockMutation) OldHeight(ctx context.Context) (v uint64, err error)
OldHeight returns the old "height" field's value of the Block entity. If the Block 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 (*BlockMutation) OldOffset ¶ added in v0.1.7
func (m *BlockMutation) OldOffset(ctx context.Context) (v uint64, err error)
OldOffset returns the old "offset" field's value of the Block entity. If the Block 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 (*BlockMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the Block entity. If the Block 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 (*BlockMutation) ReceiptsCleared ¶
func (m *BlockMutation) ReceiptsCleared() bool
ReceiptsCleared reports if the "receipts" edge to the Receipt entity was cleared.
func (*BlockMutation) ReceiptsIDs ¶
func (m *BlockMutation) ReceiptsIDs() (ids []int)
ReceiptsIDs returns the "receipts" edge IDs in the mutation.
func (*BlockMutation) RemoveMsgIDs ¶
func (m *BlockMutation) RemoveMsgIDs(ids ...int)
RemoveMsgIDs removes the "msgs" edge to the Msg entity by IDs.
func (*BlockMutation) RemoveReceiptIDs ¶
func (m *BlockMutation) RemoveReceiptIDs(ids ...int)
RemoveReceiptIDs removes the "receipts" edge to the Receipt entity by IDs.
func (*BlockMutation) RemovedEdges ¶
func (m *BlockMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BlockMutation) RemovedIDs ¶
func (m *BlockMutation) 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 (*BlockMutation) RemovedMsgsIDs ¶
func (m *BlockMutation) RemovedMsgsIDs() (ids []int)
RemovedMsgs returns the removed IDs of the "msgs" edge to the Msg entity.
func (*BlockMutation) RemovedReceiptsIDs ¶
func (m *BlockMutation) RemovedReceiptsIDs() (ids []int)
RemovedReceipts returns the removed IDs of the "receipts" edge to the Receipt entity.
func (*BlockMutation) ResetChainID ¶ added in v0.1.7
func (m *BlockMutation) ResetChainID()
ResetChainID resets all changes to the "chain_id" field.
func (*BlockMutation) ResetCreatedAt ¶
func (m *BlockMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*BlockMutation) ResetEdge ¶
func (m *BlockMutation) 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 (*BlockMutation) ResetField ¶
func (m *BlockMutation) 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 (*BlockMutation) ResetHash ¶ added in v0.1.7
func (m *BlockMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*BlockMutation) ResetHeight ¶ added in v0.1.7
func (m *BlockMutation) ResetHeight()
ResetHeight resets all changes to the "height" field.
func (*BlockMutation) ResetMsgs ¶
func (m *BlockMutation) ResetMsgs()
ResetMsgs resets all changes to the "msgs" edge.
func (*BlockMutation) ResetOffset ¶ added in v0.1.7
func (m *BlockMutation) ResetOffset()
ResetOffset resets all changes to the "offset" field.
func (*BlockMutation) ResetReceipts ¶
func (m *BlockMutation) ResetReceipts()
ResetReceipts resets all changes to the "receipts" edge.
func (*BlockMutation) ResetTimestamp ¶
func (m *BlockMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*BlockMutation) SetChainID ¶ added in v0.1.7
func (m *BlockMutation) SetChainID(u uint64)
SetChainID sets the "chain_id" field.
func (*BlockMutation) SetCreatedAt ¶
func (m *BlockMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*BlockMutation) SetField ¶
func (m *BlockMutation) 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 (*BlockMutation) SetHash ¶ added in v0.1.7
func (m *BlockMutation) SetHash(b []byte)
SetHash sets the "hash" field.
func (*BlockMutation) SetHeight ¶ added in v0.1.7
func (m *BlockMutation) SetHeight(u uint64)
SetHeight sets the "height" field.
func (*BlockMutation) SetOffset ¶ added in v0.1.7
func (m *BlockMutation) SetOffset(u uint64)
SetOffset sets the "offset" field.
func (*BlockMutation) SetOp ¶
func (m *BlockMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BlockMutation) SetTimestamp ¶
func (m *BlockMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*BlockMutation) Timestamp ¶
func (m *BlockMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (BlockMutation) Tx ¶
func (m BlockMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BlockMutation) Type ¶
func (m *BlockMutation) Type() string
Type returns the node type of this mutation (Block).
func (*BlockMutation) Where ¶
func (m *BlockMutation) Where(ps ...predicate.Block)
Where appends a list predicates to the BlockMutation builder.
func (*BlockMutation) WhereP ¶
func (m *BlockMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BlockMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BlockQuery ¶
type BlockQuery struct {
// contains filtered or unexported fields
}
BlockQuery is the builder for querying Block entities.
func (*BlockQuery) Aggregate ¶
func (bq *BlockQuery) Aggregate(fns ...AggregateFunc) *BlockSelect
Aggregate returns a BlockSelect configured with the given aggregations.
func (*BlockQuery) All ¶
func (bq *BlockQuery) All(ctx context.Context) ([]*Block, error)
All executes the query and returns a list of Blocks.
func (*BlockQuery) AllX ¶
func (bq *BlockQuery) AllX(ctx context.Context) []*Block
AllX is like All, but panics if an error occurs.
func (*BlockQuery) Clone ¶
func (bq *BlockQuery) Clone() *BlockQuery
Clone returns a duplicate of the BlockQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BlockQuery) Count ¶
func (bq *BlockQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BlockQuery) CountX ¶
func (bq *BlockQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BlockQuery) Exist ¶
func (bq *BlockQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BlockQuery) ExistX ¶
func (bq *BlockQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BlockQuery) Filter ¶
func (bq *BlockQuery) Filter() *BlockFilter
Filter returns a Filter implementation to apply filters on the BlockQuery builder.
func (*BlockQuery) First ¶
func (bq *BlockQuery) First(ctx context.Context) (*Block, error)
First returns the first Block entity from the query. Returns a *NotFoundError when no Block was found.
func (*BlockQuery) FirstID ¶
func (bq *BlockQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Block ID from the query. Returns a *NotFoundError when no Block ID was found.
func (*BlockQuery) FirstIDX ¶
func (bq *BlockQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*BlockQuery) FirstX ¶
func (bq *BlockQuery) FirstX(ctx context.Context) *Block
FirstX is like First, but panics if an error occurs.
func (*BlockQuery) GroupBy ¶
func (bq *BlockQuery) GroupBy(field string, fields ...string) *BlockGroupBy
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 { Hash []byte `json:"hash,omitempty"` Count int `json:"count,omitempty"` } client.Block.Query(). GroupBy(block.FieldHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BlockQuery) IDs ¶
func (bq *BlockQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Block IDs.
func (*BlockQuery) IDsX ¶
func (bq *BlockQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*BlockQuery) Limit ¶
func (bq *BlockQuery) Limit(limit int) *BlockQuery
Limit the number of records to be returned by this query.
func (*BlockQuery) Offset ¶
func (bq *BlockQuery) Offset(offset int) *BlockQuery
Offset to start from.
func (*BlockQuery) Only ¶
func (bq *BlockQuery) Only(ctx context.Context) (*Block, error)
Only returns a single Block entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Block entity is found. Returns a *NotFoundError when no Block entities are found.
func (*BlockQuery) OnlyID ¶
func (bq *BlockQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Block ID in the query. Returns a *NotSingularError when more than one Block ID is found. Returns a *NotFoundError when no entities are found.
func (*BlockQuery) OnlyIDX ¶
func (bq *BlockQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BlockQuery) OnlyX ¶
func (bq *BlockQuery) OnlyX(ctx context.Context) *Block
OnlyX is like Only, but panics if an error occurs.
func (*BlockQuery) Order ¶
func (bq *BlockQuery) Order(o ...block.OrderOption) *BlockQuery
Order specifies how the records should be ordered.
func (*BlockQuery) QueryMsgs ¶
func (bq *BlockQuery) QueryMsgs() *MsgQuery
QueryMsgs chains the current query on the "msgs" edge.
func (*BlockQuery) QueryReceipts ¶
func (bq *BlockQuery) QueryReceipts() *ReceiptQuery
QueryReceipts chains the current query on the "receipts" edge.
func (*BlockQuery) Select ¶
func (bq *BlockQuery) Select(fields ...string) *BlockSelect
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 { Hash []byte `json:"hash,omitempty"` } client.Block.Query(). Select(block.FieldHash). Scan(ctx, &v)
func (*BlockQuery) Unique ¶
func (bq *BlockQuery) Unique(unique bool) *BlockQuery
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 (*BlockQuery) Where ¶
func (bq *BlockQuery) Where(ps ...predicate.Block) *BlockQuery
Where adds a new predicate for the BlockQuery builder.
func (*BlockQuery) WithMsgs ¶
func (bq *BlockQuery) WithMsgs(opts ...func(*MsgQuery)) *BlockQuery
WithMsgs tells the query-builder to eager-load the nodes that are connected to the "msgs" edge. The optional arguments are used to configure the query builder of the edge.
func (*BlockQuery) WithReceipts ¶
func (bq *BlockQuery) WithReceipts(opts ...func(*ReceiptQuery)) *BlockQuery
WithReceipts tells the query-builder to eager-load the nodes that are connected to the "receipts" edge. The optional arguments are used to configure the query builder of the edge.
type BlockSelect ¶
type BlockSelect struct { *BlockQuery // contains filtered or unexported fields }
BlockSelect is the builder for selecting fields of Block entities.
func (*BlockSelect) Aggregate ¶
func (bs *BlockSelect) Aggregate(fns ...AggregateFunc) *BlockSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BlockSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Scan ¶
func (bs *BlockSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BlockSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BlockUpdate ¶
type BlockUpdate struct {
// contains filtered or unexported fields
}
BlockUpdate is the builder for updating Block entities.
func (*BlockUpdate) AddChainID ¶ added in v0.1.7
func (bu *BlockUpdate) AddChainID(u int64) *BlockUpdate
AddChainID adds u to the "chain_id" field.
func (*BlockUpdate) AddHeight ¶ added in v0.1.7
func (bu *BlockUpdate) AddHeight(u int64) *BlockUpdate
AddHeight adds u to the "height" field.
func (*BlockUpdate) AddMsgIDs ¶
func (bu *BlockUpdate) AddMsgIDs(ids ...int) *BlockUpdate
AddMsgIDs adds the "msgs" edge to the Msg entity by IDs.
func (*BlockUpdate) AddMsgs ¶
func (bu *BlockUpdate) AddMsgs(m ...*Msg) *BlockUpdate
AddMsgs adds the "msgs" edges to the Msg entity.
func (*BlockUpdate) AddOffset ¶ added in v0.1.7
func (bu *BlockUpdate) AddOffset(u int64) *BlockUpdate
AddOffset adds u to the "offset" field.
func (*BlockUpdate) AddReceiptIDs ¶
func (bu *BlockUpdate) AddReceiptIDs(ids ...int) *BlockUpdate
AddReceiptIDs adds the "receipts" edge to the Receipt entity by IDs.
func (*BlockUpdate) AddReceipts ¶
func (bu *BlockUpdate) AddReceipts(r ...*Receipt) *BlockUpdate
AddReceipts adds the "receipts" edges to the Receipt entity.
func (*BlockUpdate) ClearMsgs ¶
func (bu *BlockUpdate) ClearMsgs() *BlockUpdate
ClearMsgs clears all "msgs" edges to the Msg entity.
func (*BlockUpdate) ClearReceipts ¶
func (bu *BlockUpdate) ClearReceipts() *BlockUpdate
ClearReceipts clears all "receipts" edges to the Receipt entity.
func (*BlockUpdate) Exec ¶
func (bu *BlockUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BlockUpdate) ExecX ¶
func (bu *BlockUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlockUpdate) Mutation ¶
func (bu *BlockUpdate) Mutation() *BlockMutation
Mutation returns the BlockMutation object of the builder.
func (*BlockUpdate) RemoveMsgIDs ¶
func (bu *BlockUpdate) RemoveMsgIDs(ids ...int) *BlockUpdate
RemoveMsgIDs removes the "msgs" edge to Msg entities by IDs.
func (*BlockUpdate) RemoveMsgs ¶
func (bu *BlockUpdate) RemoveMsgs(m ...*Msg) *BlockUpdate
RemoveMsgs removes "msgs" edges to Msg entities.
func (*BlockUpdate) RemoveReceiptIDs ¶
func (bu *BlockUpdate) RemoveReceiptIDs(ids ...int) *BlockUpdate
RemoveReceiptIDs removes the "receipts" edge to Receipt entities by IDs.
func (*BlockUpdate) RemoveReceipts ¶
func (bu *BlockUpdate) RemoveReceipts(r ...*Receipt) *BlockUpdate
RemoveReceipts removes "receipts" edges to Receipt entities.
func (*BlockUpdate) Save ¶
func (bu *BlockUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BlockUpdate) SaveX ¶
func (bu *BlockUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BlockUpdate) SetChainID ¶ added in v0.1.7
func (bu *BlockUpdate) SetChainID(u uint64) *BlockUpdate
SetChainID sets the "chain_id" field.
func (*BlockUpdate) SetCreatedAt ¶
func (bu *BlockUpdate) SetCreatedAt(t time.Time) *BlockUpdate
SetCreatedAt sets the "created_at" field.
func (*BlockUpdate) SetHash ¶ added in v0.1.7
func (bu *BlockUpdate) SetHash(b []byte) *BlockUpdate
SetHash sets the "hash" field.
func (*BlockUpdate) SetHeight ¶ added in v0.1.7
func (bu *BlockUpdate) SetHeight(u uint64) *BlockUpdate
SetHeight sets the "height" field.
func (*BlockUpdate) SetNillableChainID ¶ added in v0.1.7
func (bu *BlockUpdate) SetNillableChainID(u *uint64) *BlockUpdate
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*BlockUpdate) SetNillableCreatedAt ¶
func (bu *BlockUpdate) SetNillableCreatedAt(t *time.Time) *BlockUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BlockUpdate) SetNillableHeight ¶ added in v0.1.7
func (bu *BlockUpdate) SetNillableHeight(u *uint64) *BlockUpdate
SetNillableHeight sets the "height" field if the given value is not nil.
func (*BlockUpdate) SetNillableOffset ¶ added in v0.1.7
func (bu *BlockUpdate) SetNillableOffset(u *uint64) *BlockUpdate
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*BlockUpdate) SetNillableTimestamp ¶
func (bu *BlockUpdate) SetNillableTimestamp(t *time.Time) *BlockUpdate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*BlockUpdate) SetOffset ¶ added in v0.1.7
func (bu *BlockUpdate) SetOffset(u uint64) *BlockUpdate
SetOffset sets the "offset" field.
func (*BlockUpdate) SetTimestamp ¶
func (bu *BlockUpdate) SetTimestamp(t time.Time) *BlockUpdate
SetTimestamp sets the "timestamp" field.
func (*BlockUpdate) Where ¶
func (bu *BlockUpdate) Where(ps ...predicate.Block) *BlockUpdate
Where appends a list predicates to the BlockUpdate builder.
type BlockUpdateOne ¶
type BlockUpdateOne struct {
// contains filtered or unexported fields
}
BlockUpdateOne is the builder for updating a single Block entity.
func (*BlockUpdateOne) AddChainID ¶ added in v0.1.7
func (buo *BlockUpdateOne) AddChainID(u int64) *BlockUpdateOne
AddChainID adds u to the "chain_id" field.
func (*BlockUpdateOne) AddHeight ¶ added in v0.1.7
func (buo *BlockUpdateOne) AddHeight(u int64) *BlockUpdateOne
AddHeight adds u to the "height" field.
func (*BlockUpdateOne) AddMsgIDs ¶
func (buo *BlockUpdateOne) AddMsgIDs(ids ...int) *BlockUpdateOne
AddMsgIDs adds the "msgs" edge to the Msg entity by IDs.
func (*BlockUpdateOne) AddMsgs ¶
func (buo *BlockUpdateOne) AddMsgs(m ...*Msg) *BlockUpdateOne
AddMsgs adds the "msgs" edges to the Msg entity.
func (*BlockUpdateOne) AddOffset ¶ added in v0.1.7
func (buo *BlockUpdateOne) AddOffset(u int64) *BlockUpdateOne
AddOffset adds u to the "offset" field.
func (*BlockUpdateOne) AddReceiptIDs ¶
func (buo *BlockUpdateOne) AddReceiptIDs(ids ...int) *BlockUpdateOne
AddReceiptIDs adds the "receipts" edge to the Receipt entity by IDs.
func (*BlockUpdateOne) AddReceipts ¶
func (buo *BlockUpdateOne) AddReceipts(r ...*Receipt) *BlockUpdateOne
AddReceipts adds the "receipts" edges to the Receipt entity.
func (*BlockUpdateOne) ClearMsgs ¶
func (buo *BlockUpdateOne) ClearMsgs() *BlockUpdateOne
ClearMsgs clears all "msgs" edges to the Msg entity.
func (*BlockUpdateOne) ClearReceipts ¶
func (buo *BlockUpdateOne) ClearReceipts() *BlockUpdateOne
ClearReceipts clears all "receipts" edges to the Receipt entity.
func (*BlockUpdateOne) Exec ¶
func (buo *BlockUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BlockUpdateOne) ExecX ¶
func (buo *BlockUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlockUpdateOne) Mutation ¶
func (buo *BlockUpdateOne) Mutation() *BlockMutation
Mutation returns the BlockMutation object of the builder.
func (*BlockUpdateOne) RemoveMsgIDs ¶
func (buo *BlockUpdateOne) RemoveMsgIDs(ids ...int) *BlockUpdateOne
RemoveMsgIDs removes the "msgs" edge to Msg entities by IDs.
func (*BlockUpdateOne) RemoveMsgs ¶
func (buo *BlockUpdateOne) RemoveMsgs(m ...*Msg) *BlockUpdateOne
RemoveMsgs removes "msgs" edges to Msg entities.
func (*BlockUpdateOne) RemoveReceiptIDs ¶
func (buo *BlockUpdateOne) RemoveReceiptIDs(ids ...int) *BlockUpdateOne
RemoveReceiptIDs removes the "receipts" edge to Receipt entities by IDs.
func (*BlockUpdateOne) RemoveReceipts ¶
func (buo *BlockUpdateOne) RemoveReceipts(r ...*Receipt) *BlockUpdateOne
RemoveReceipts removes "receipts" edges to Receipt entities.
func (*BlockUpdateOne) Save ¶
func (buo *BlockUpdateOne) Save(ctx context.Context) (*Block, error)
Save executes the query and returns the updated Block entity.
func (*BlockUpdateOne) SaveX ¶
func (buo *BlockUpdateOne) SaveX(ctx context.Context) *Block
SaveX is like Save, but panics if an error occurs.
func (*BlockUpdateOne) Select ¶
func (buo *BlockUpdateOne) Select(field string, fields ...string) *BlockUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BlockUpdateOne) SetChainID ¶ added in v0.1.7
func (buo *BlockUpdateOne) SetChainID(u uint64) *BlockUpdateOne
SetChainID sets the "chain_id" field.
func (*BlockUpdateOne) SetCreatedAt ¶
func (buo *BlockUpdateOne) SetCreatedAt(t time.Time) *BlockUpdateOne
SetCreatedAt sets the "created_at" field.
func (*BlockUpdateOne) SetHash ¶ added in v0.1.7
func (buo *BlockUpdateOne) SetHash(b []byte) *BlockUpdateOne
SetHash sets the "hash" field.
func (*BlockUpdateOne) SetHeight ¶ added in v0.1.7
func (buo *BlockUpdateOne) SetHeight(u uint64) *BlockUpdateOne
SetHeight sets the "height" field.
func (*BlockUpdateOne) SetNillableChainID ¶ added in v0.1.7
func (buo *BlockUpdateOne) SetNillableChainID(u *uint64) *BlockUpdateOne
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*BlockUpdateOne) SetNillableCreatedAt ¶
func (buo *BlockUpdateOne) SetNillableCreatedAt(t *time.Time) *BlockUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BlockUpdateOne) SetNillableHeight ¶ added in v0.1.7
func (buo *BlockUpdateOne) SetNillableHeight(u *uint64) *BlockUpdateOne
SetNillableHeight sets the "height" field if the given value is not nil.
func (*BlockUpdateOne) SetNillableOffset ¶ added in v0.1.7
func (buo *BlockUpdateOne) SetNillableOffset(u *uint64) *BlockUpdateOne
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*BlockUpdateOne) SetNillableTimestamp ¶
func (buo *BlockUpdateOne) SetNillableTimestamp(t *time.Time) *BlockUpdateOne
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*BlockUpdateOne) SetOffset ¶ added in v0.1.7
func (buo *BlockUpdateOne) SetOffset(u uint64) *BlockUpdateOne
SetOffset sets the "offset" field.
func (*BlockUpdateOne) SetTimestamp ¶
func (buo *BlockUpdateOne) SetTimestamp(t time.Time) *BlockUpdateOne
SetTimestamp sets the "timestamp" field.
func (*BlockUpdateOne) Where ¶
func (buo *BlockUpdateOne) Where(ps ...predicate.Block) *BlockUpdateOne
Where appends a list predicates to the BlockUpdate builder.
type Chain ¶
type Chain struct { // ID of the ent. ID int `json:"id,omitempty"` // ChainID holds the value of the "chain_id" field. ChainID uint64 `json:"chain_id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // contains filtered or unexported fields }
Chain is the model entity for the Chain schema.
func (*Chain) Unwrap ¶
Unwrap unwraps the Chain 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 (*Chain) Update ¶
func (c *Chain) Update() *ChainUpdateOne
Update returns a builder for updating this Chain. Note that you need to call Chain.Unwrap() before calling this method if this Chain was returned from a transaction, and the transaction was committed or rolled back.
type ChainClient ¶
type ChainClient struct {
// contains filtered or unexported fields
}
ChainClient is a client for the Chain schema.
func NewChainClient ¶
func NewChainClient(c config) *ChainClient
NewChainClient returns a client for the Chain from the given config.
func (*ChainClient) Create ¶
func (c *ChainClient) Create() *ChainCreate
Create returns a builder for creating a Chain entity.
func (*ChainClient) CreateBulk ¶
func (c *ChainClient) CreateBulk(builders ...*ChainCreate) *ChainCreateBulk
CreateBulk returns a builder for creating a bulk of Chain entities.
func (*ChainClient) Delete ¶
func (c *ChainClient) Delete() *ChainDelete
Delete returns a delete builder for Chain.
func (*ChainClient) DeleteOne ¶
func (c *ChainClient) DeleteOne(ch *Chain) *ChainDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChainClient) DeleteOneID ¶
func (c *ChainClient) DeleteOneID(id int) *ChainDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChainClient) GetX ¶
func (c *ChainClient) GetX(ctx context.Context, id int) *Chain
GetX is like Get, but panics if an error occurs.
func (*ChainClient) Intercept ¶
func (c *ChainClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chain.Intercept(f(g(h())))`.
func (*ChainClient) Interceptors ¶
func (c *ChainClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChainClient) MapCreateBulk ¶
func (c *ChainClient) MapCreateBulk(slice any, setFunc func(*ChainCreate, int)) *ChainCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ChainClient) Query ¶
func (c *ChainClient) Query() *ChainQuery
Query returns a query builder for Chain.
func (*ChainClient) Update ¶
func (c *ChainClient) Update() *ChainUpdate
Update returns an update builder for Chain.
func (*ChainClient) UpdateOne ¶
func (c *ChainClient) UpdateOne(ch *Chain) *ChainUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChainClient) UpdateOneID ¶
func (c *ChainClient) UpdateOneID(id int) *ChainUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChainClient) Use ¶
func (c *ChainClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chain.Hooks(f(g(h())))`.
type ChainCreate ¶
type ChainCreate struct {
// contains filtered or unexported fields
}
ChainCreate is the builder for creating a Chain entity.
func (*ChainCreate) Exec ¶
func (cc *ChainCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChainCreate) ExecX ¶
func (cc *ChainCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChainCreate) Mutation ¶
func (cc *ChainCreate) Mutation() *ChainMutation
Mutation returns the ChainMutation object of the builder.
func (*ChainCreate) Save ¶
func (cc *ChainCreate) Save(ctx context.Context) (*Chain, error)
Save creates the Chain in the database.
func (*ChainCreate) SaveX ¶
func (cc *ChainCreate) SaveX(ctx context.Context) *Chain
SaveX calls Save and panics if Save returns an error.
func (*ChainCreate) SetChainID ¶
func (cc *ChainCreate) SetChainID(u uint64) *ChainCreate
SetChainID sets the "chain_id" field.
func (*ChainCreate) SetCreatedAt ¶
func (cc *ChainCreate) SetCreatedAt(t time.Time) *ChainCreate
SetCreatedAt sets the "created_at" field.
func (*ChainCreate) SetName ¶
func (cc *ChainCreate) SetName(s string) *ChainCreate
SetName sets the "name" field.
func (*ChainCreate) SetNillableCreatedAt ¶
func (cc *ChainCreate) SetNillableCreatedAt(t *time.Time) *ChainCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
type ChainCreateBulk ¶
type ChainCreateBulk struct {
// contains filtered or unexported fields
}
ChainCreateBulk is the builder for creating many Chain entities in bulk.
func (*ChainCreateBulk) Exec ¶
func (ccb *ChainCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChainCreateBulk) ExecX ¶
func (ccb *ChainCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ChainDelete ¶
type ChainDelete struct {
// contains filtered or unexported fields
}
ChainDelete is the builder for deleting a Chain entity.
func (*ChainDelete) Exec ¶
func (cd *ChainDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChainDelete) ExecX ¶
func (cd *ChainDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChainDelete) Where ¶
func (cd *ChainDelete) Where(ps ...predicate.Chain) *ChainDelete
Where appends a list predicates to the ChainDelete builder.
type ChainDeleteOne ¶
type ChainDeleteOne struct {
// contains filtered or unexported fields
}
ChainDeleteOne is the builder for deleting a single Chain entity.
func (*ChainDeleteOne) Exec ¶
func (cdo *ChainDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChainDeleteOne) ExecX ¶
func (cdo *ChainDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChainDeleteOne) Where ¶
func (cdo *ChainDeleteOne) Where(ps ...predicate.Chain) *ChainDeleteOne
Where appends a list predicates to the ChainDelete builder.
type ChainFilter ¶
type ChainFilter struct {
// contains filtered or unexported fields
}
ChainFilter provides a generic filtering capability at runtime for ChainQuery.
func (*ChainFilter) Where ¶
func (f *ChainFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ChainFilter) WhereChainID ¶
func (f *ChainFilter) WhereChainID(p entql.Uint64P)
WhereChainID applies the entql uint64 predicate on the chain_id field.
func (*ChainFilter) WhereCreatedAt ¶
func (f *ChainFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*ChainFilter) WhereID ¶
func (f *ChainFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*ChainFilter) WhereName ¶
func (f *ChainFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
type ChainGroupBy ¶
type ChainGroupBy struct {
// contains filtered or unexported fields
}
ChainGroupBy is the group-by builder for Chain entities.
func (*ChainGroupBy) Aggregate ¶
func (cgb *ChainGroupBy) Aggregate(fns ...AggregateFunc) *ChainGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChainGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChainGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChainGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChainGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChainGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChainGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChainGroupBy) Scan ¶
func (cgb *ChainGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChainGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChainMutation ¶
type ChainMutation struct {
// contains filtered or unexported fields
}
ChainMutation represents an operation that mutates the Chain nodes in the graph.
func (*ChainMutation) AddChainID ¶
func (m *ChainMutation) AddChainID(u int64)
AddChainID adds u to the "chain_id" field.
func (*ChainMutation) AddField ¶
func (m *ChainMutation) 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 (*ChainMutation) AddedChainID ¶
func (m *ChainMutation) AddedChainID() (r int64, exists bool)
AddedChainID returns the value that was added to the "chain_id" field in this mutation.
func (*ChainMutation) AddedEdges ¶
func (m *ChainMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChainMutation) AddedField ¶
func (m *ChainMutation) 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 (*ChainMutation) AddedFields ¶
func (m *ChainMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChainMutation) AddedIDs ¶
func (m *ChainMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChainMutation) ChainID ¶
func (m *ChainMutation) ChainID() (r uint64, exists bool)
ChainID returns the value of the "chain_id" field in the mutation.
func (*ChainMutation) ClearEdge ¶
func (m *ChainMutation) 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 (*ChainMutation) ClearField ¶
func (m *ChainMutation) 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 (*ChainMutation) ClearedEdges ¶
func (m *ChainMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChainMutation) ClearedFields ¶
func (m *ChainMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChainMutation) Client ¶
func (m ChainMutation) 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 (*ChainMutation) CreatedAt ¶
func (m *ChainMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ChainMutation) EdgeCleared ¶
func (m *ChainMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChainMutation) Field ¶
func (m *ChainMutation) 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 (*ChainMutation) FieldCleared ¶
func (m *ChainMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChainMutation) Fields ¶
func (m *ChainMutation) 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 (*ChainMutation) Filter ¶
func (m *ChainMutation) Filter() *ChainFilter
Filter returns an entql.Where implementation to apply filters on the ChainMutation builder.
func (*ChainMutation) ID ¶
func (m *ChainMutation) 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 (*ChainMutation) IDs ¶
func (m *ChainMutation) 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 (*ChainMutation) Name ¶
func (m *ChainMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ChainMutation) OldChainID ¶
func (m *ChainMutation) OldChainID(ctx context.Context) (v uint64, err error)
OldChainID returns the old "chain_id" field's value of the Chain entity. If the Chain 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 (*ChainMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Chain entity. If the Chain 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 (*ChainMutation) 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 (*ChainMutation) OldName ¶
func (m *ChainMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Chain entity. If the Chain 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 (*ChainMutation) RemovedEdges ¶
func (m *ChainMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChainMutation) RemovedIDs ¶
func (m *ChainMutation) 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 (*ChainMutation) ResetChainID ¶
func (m *ChainMutation) ResetChainID()
ResetChainID resets all changes to the "chain_id" field.
func (*ChainMutation) ResetCreatedAt ¶
func (m *ChainMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ChainMutation) ResetEdge ¶
func (m *ChainMutation) 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 (*ChainMutation) ResetField ¶
func (m *ChainMutation) 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 (*ChainMutation) ResetName ¶
func (m *ChainMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ChainMutation) SetChainID ¶
func (m *ChainMutation) SetChainID(u uint64)
SetChainID sets the "chain_id" field.
func (*ChainMutation) SetCreatedAt ¶
func (m *ChainMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ChainMutation) SetField ¶
func (m *ChainMutation) 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 (*ChainMutation) SetName ¶
func (m *ChainMutation) SetName(s string)
SetName sets the "name" field.
func (*ChainMutation) SetOp ¶
func (m *ChainMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ChainMutation) Tx ¶
func (m ChainMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChainMutation) Type ¶
func (m *ChainMutation) Type() string
Type returns the node type of this mutation (Chain).
func (*ChainMutation) Where ¶
func (m *ChainMutation) Where(ps ...predicate.Chain)
Where appends a list predicates to the ChainMutation builder.
func (*ChainMutation) WhereP ¶
func (m *ChainMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChainMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChainQuery ¶
type ChainQuery struct {
// contains filtered or unexported fields
}
ChainQuery is the builder for querying Chain entities.
func (*ChainQuery) Aggregate ¶
func (cq *ChainQuery) Aggregate(fns ...AggregateFunc) *ChainSelect
Aggregate returns a ChainSelect configured with the given aggregations.
func (*ChainQuery) All ¶
func (cq *ChainQuery) All(ctx context.Context) ([]*Chain, error)
All executes the query and returns a list of Chains.
func (*ChainQuery) AllX ¶
func (cq *ChainQuery) AllX(ctx context.Context) []*Chain
AllX is like All, but panics if an error occurs.
func (*ChainQuery) Clone ¶
func (cq *ChainQuery) Clone() *ChainQuery
Clone returns a duplicate of the ChainQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChainQuery) Count ¶
func (cq *ChainQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChainQuery) CountX ¶
func (cq *ChainQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChainQuery) Exist ¶
func (cq *ChainQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChainQuery) ExistX ¶
func (cq *ChainQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChainQuery) Filter ¶
func (cq *ChainQuery) Filter() *ChainFilter
Filter returns a Filter implementation to apply filters on the ChainQuery builder.
func (*ChainQuery) First ¶
func (cq *ChainQuery) First(ctx context.Context) (*Chain, error)
First returns the first Chain entity from the query. Returns a *NotFoundError when no Chain was found.
func (*ChainQuery) FirstID ¶
func (cq *ChainQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Chain ID from the query. Returns a *NotFoundError when no Chain ID was found.
func (*ChainQuery) FirstIDX ¶
func (cq *ChainQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChainQuery) FirstX ¶
func (cq *ChainQuery) FirstX(ctx context.Context) *Chain
FirstX is like First, but panics if an error occurs.
func (*ChainQuery) GroupBy ¶
func (cq *ChainQuery) GroupBy(field string, fields ...string) *ChainGroupBy
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 { ChainID uint64 `json:"chain_id,omitempty"` Count int `json:"count,omitempty"` } client.Chain.Query(). GroupBy(chain.FieldChainID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ChainQuery) IDs ¶
func (cq *ChainQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Chain IDs.
func (*ChainQuery) IDsX ¶
func (cq *ChainQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ChainQuery) Limit ¶
func (cq *ChainQuery) Limit(limit int) *ChainQuery
Limit the number of records to be returned by this query.
func (*ChainQuery) Offset ¶
func (cq *ChainQuery) Offset(offset int) *ChainQuery
Offset to start from.
func (*ChainQuery) Only ¶
func (cq *ChainQuery) Only(ctx context.Context) (*Chain, error)
Only returns a single Chain entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Chain entity is found. Returns a *NotFoundError when no Chain entities are found.
func (*ChainQuery) OnlyID ¶
func (cq *ChainQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Chain ID in the query. Returns a *NotSingularError when more than one Chain ID is found. Returns a *NotFoundError when no entities are found.
func (*ChainQuery) OnlyIDX ¶
func (cq *ChainQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChainQuery) OnlyX ¶
func (cq *ChainQuery) OnlyX(ctx context.Context) *Chain
OnlyX is like Only, but panics if an error occurs.
func (*ChainQuery) Order ¶
func (cq *ChainQuery) Order(o ...chain.OrderOption) *ChainQuery
Order specifies how the records should be ordered.
func (*ChainQuery) Select ¶
func (cq *ChainQuery) Select(fields ...string) *ChainSelect
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 { ChainID uint64 `json:"chain_id,omitempty"` } client.Chain.Query(). Select(chain.FieldChainID). Scan(ctx, &v)
func (*ChainQuery) Unique ¶
func (cq *ChainQuery) Unique(unique bool) *ChainQuery
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 (*ChainQuery) Where ¶
func (cq *ChainQuery) Where(ps ...predicate.Chain) *ChainQuery
Where adds a new predicate for the ChainQuery builder.
type ChainSelect ¶
type ChainSelect struct { *ChainQuery // contains filtered or unexported fields }
ChainSelect is the builder for selecting fields of Chain entities.
func (*ChainSelect) Aggregate ¶
func (cs *ChainSelect) Aggregate(fns ...AggregateFunc) *ChainSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChainSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChainSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChainSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChainSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChainSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChainSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChainSelect) Scan ¶
func (cs *ChainSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChainSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChainUpdate ¶
type ChainUpdate struct {
// contains filtered or unexported fields
}
ChainUpdate is the builder for updating Chain entities.
func (*ChainUpdate) AddChainID ¶
func (cu *ChainUpdate) AddChainID(u int64) *ChainUpdate
AddChainID adds u to the "chain_id" field.
func (*ChainUpdate) Exec ¶
func (cu *ChainUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChainUpdate) ExecX ¶
func (cu *ChainUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChainUpdate) Mutation ¶
func (cu *ChainUpdate) Mutation() *ChainMutation
Mutation returns the ChainMutation object of the builder.
func (*ChainUpdate) Save ¶
func (cu *ChainUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChainUpdate) SaveX ¶
func (cu *ChainUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChainUpdate) SetChainID ¶
func (cu *ChainUpdate) SetChainID(u uint64) *ChainUpdate
SetChainID sets the "chain_id" field.
func (*ChainUpdate) SetCreatedAt ¶
func (cu *ChainUpdate) SetCreatedAt(t time.Time) *ChainUpdate
SetCreatedAt sets the "created_at" field.
func (*ChainUpdate) SetName ¶
func (cu *ChainUpdate) SetName(s string) *ChainUpdate
SetName sets the "name" field.
func (*ChainUpdate) SetNillableChainID ¶
func (cu *ChainUpdate) SetNillableChainID(u *uint64) *ChainUpdate
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*ChainUpdate) SetNillableCreatedAt ¶
func (cu *ChainUpdate) SetNillableCreatedAt(t *time.Time) *ChainUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChainUpdate) SetNillableName ¶
func (cu *ChainUpdate) SetNillableName(s *string) *ChainUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ChainUpdate) Where ¶
func (cu *ChainUpdate) Where(ps ...predicate.Chain) *ChainUpdate
Where appends a list predicates to the ChainUpdate builder.
type ChainUpdateOne ¶
type ChainUpdateOne struct {
// contains filtered or unexported fields
}
ChainUpdateOne is the builder for updating a single Chain entity.
func (*ChainUpdateOne) AddChainID ¶
func (cuo *ChainUpdateOne) AddChainID(u int64) *ChainUpdateOne
AddChainID adds u to the "chain_id" field.
func (*ChainUpdateOne) Exec ¶
func (cuo *ChainUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChainUpdateOne) ExecX ¶
func (cuo *ChainUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChainUpdateOne) Mutation ¶
func (cuo *ChainUpdateOne) Mutation() *ChainMutation
Mutation returns the ChainMutation object of the builder.
func (*ChainUpdateOne) Save ¶
func (cuo *ChainUpdateOne) Save(ctx context.Context) (*Chain, error)
Save executes the query and returns the updated Chain entity.
func (*ChainUpdateOne) SaveX ¶
func (cuo *ChainUpdateOne) SaveX(ctx context.Context) *Chain
SaveX is like Save, but panics if an error occurs.
func (*ChainUpdateOne) Select ¶
func (cuo *ChainUpdateOne) Select(field string, fields ...string) *ChainUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChainUpdateOne) SetChainID ¶
func (cuo *ChainUpdateOne) SetChainID(u uint64) *ChainUpdateOne
SetChainID sets the "chain_id" field.
func (*ChainUpdateOne) SetCreatedAt ¶
func (cuo *ChainUpdateOne) SetCreatedAt(t time.Time) *ChainUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ChainUpdateOne) SetName ¶
func (cuo *ChainUpdateOne) SetName(s string) *ChainUpdateOne
SetName sets the "name" field.
func (*ChainUpdateOne) SetNillableChainID ¶
func (cuo *ChainUpdateOne) SetNillableChainID(u *uint64) *ChainUpdateOne
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*ChainUpdateOne) SetNillableCreatedAt ¶
func (cuo *ChainUpdateOne) SetNillableCreatedAt(t *time.Time) *ChainUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChainUpdateOne) SetNillableName ¶
func (cuo *ChainUpdateOne) SetNillableName(s *string) *ChainUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ChainUpdateOne) Where ¶
func (cuo *ChainUpdateOne) Where(ps ...predicate.Chain) *ChainUpdateOne
Where appends a list predicates to the ChainUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Block is the client for interacting with the Block builders. Block *BlockClient // Chain is the client for interacting with the Chain builders. Chain *ChainClient // Msg is the client for interacting with the Msg builders. Msg *MsgClient // Receipt is the client for interacting with the Receipt builders. Receipt *ReceiptClient // XProviderCursor is the client for interacting with the XProviderCursor builders. XProviderCursor *XProviderCursorClient // 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(). Block. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
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 InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Msg ¶
type Msg struct { // ID of the ent. ID int `json:"id,omitempty"` // Sender holds the value of the "sender" field. Sender []byte `json:"sender,omitempty"` // To holds the value of the "to" field. To []byte `json:"to,omitempty"` // Data holds the value of the "data" field. Data []byte `json:"data,omitempty"` // GasLimit holds the value of the "gas_limit" field. GasLimit uint64 `json:"gas_limit,omitempty"` // SourceChainID holds the value of the "source_chain_id" field. SourceChainID uint64 `json:"source_chain_id,omitempty"` // DestChainID holds the value of the "dest_chain_id" field. DestChainID uint64 `json:"dest_chain_id,omitempty"` // Offset holds the value of the "offset" field. Offset uint64 `json:"offset,omitempty"` // TxHash holds the value of the "tx_hash" field. TxHash []byte `json:"tx_hash,omitempty"` // ReceiptHash holds the value of the "receipt_hash" field. ReceiptHash []byte `json:"receipt_hash,omitempty"` // Status holds the value of the "status" field. Status string `json:"status,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MsgQuery when eager-loading is set. Edges MsgEdges `json:"edges"` // contains filtered or unexported fields }
Msg is the model entity for the Msg schema.
func (*Msg) QueryBlock ¶
func (m *Msg) QueryBlock() *BlockQuery
QueryBlock queries the "block" edge of the Msg entity.
func (*Msg) QueryReceipts ¶ added in v0.1.3
func (m *Msg) QueryReceipts() *ReceiptQuery
QueryReceipts queries the "receipts" edge of the Msg entity.
func (*Msg) Unwrap ¶
Unwrap unwraps the Msg 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 (*Msg) Update ¶
func (m *Msg) Update() *MsgUpdateOne
Update returns a builder for updating this Msg. Note that you need to call Msg.Unwrap() before calling this method if this Msg was returned from a transaction, and the transaction was committed or rolled back.
type MsgClient ¶
type MsgClient struct {
// contains filtered or unexported fields
}
MsgClient is a client for the Msg schema.
func NewMsgClient ¶
func NewMsgClient(c config) *MsgClient
NewMsgClient returns a client for the Msg from the given config.
func (*MsgClient) CreateBulk ¶
func (c *MsgClient) CreateBulk(builders ...*MsgCreate) *MsgCreateBulk
CreateBulk returns a builder for creating a bulk of Msg entities.
func (*MsgClient) DeleteOne ¶
func (c *MsgClient) DeleteOne(m *Msg) *MsgDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MsgClient) DeleteOneID ¶
func (c *MsgClient) DeleteOneID(id int) *MsgDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MsgClient) Intercept ¶
func (c *MsgClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `msg.Intercept(f(g(h())))`.
func (*MsgClient) Interceptors ¶
func (c *MsgClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MsgClient) MapCreateBulk ¶
func (c *MsgClient) MapCreateBulk(slice any, setFunc func(*MsgCreate, int)) *MsgCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MsgClient) QueryBlock ¶
func (c *MsgClient) QueryBlock(m *Msg) *BlockQuery
QueryBlock queries the block edge of a Msg.
func (*MsgClient) QueryReceipts ¶ added in v0.1.3
func (c *MsgClient) QueryReceipts(m *Msg) *ReceiptQuery
QueryReceipts queries the receipts edge of a Msg.
func (*MsgClient) UpdateOne ¶
func (c *MsgClient) UpdateOne(m *Msg) *MsgUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MsgClient) UpdateOneID ¶
func (c *MsgClient) UpdateOneID(id int) *MsgUpdateOne
UpdateOneID returns an update builder for the given id.
type MsgCreate ¶
type MsgCreate struct {
// contains filtered or unexported fields
}
MsgCreate is the builder for creating a Msg entity.
func (*MsgCreate) AddBlockIDs ¶ added in v0.1.7
AddBlockIDs adds the "block" edge to the Block entity by IDs.
func (*MsgCreate) AddReceiptIDs ¶ added in v0.1.3
AddReceiptIDs adds the "receipts" edge to the Receipt entity by IDs.
func (*MsgCreate) AddReceipts ¶ added in v0.1.3
AddReceipts adds the "receipts" edges to the Receipt entity.
func (*MsgCreate) Mutation ¶
func (mc *MsgCreate) Mutation() *MsgMutation
Mutation returns the MsgMutation object of the builder.
func (*MsgCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*MsgCreate) SetDestChainID ¶
SetDestChainID sets the "dest_chain_id" field.
func (*MsgCreate) SetGasLimit ¶ added in v0.1.7
SetGasLimit sets the "gas_limit" field.
func (*MsgCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MsgCreate) SetNillableStatus ¶ added in v0.1.4
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MsgCreate) SetReceiptHash ¶ added in v0.1.4
SetReceiptHash sets the "receipt_hash" field.
func (*MsgCreate) SetSourceChainID ¶
SetSourceChainID sets the "source_chain_id" field.
type MsgCreateBulk ¶
type MsgCreateBulk struct {
// contains filtered or unexported fields
}
MsgCreateBulk is the builder for creating many Msg entities in bulk.
func (*MsgCreateBulk) Exec ¶
func (mcb *MsgCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MsgCreateBulk) ExecX ¶
func (mcb *MsgCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MsgDelete ¶
type MsgDelete struct {
// contains filtered or unexported fields
}
MsgDelete is the builder for deleting a Msg entity.
func (*MsgDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type MsgDeleteOne ¶
type MsgDeleteOne struct {
// contains filtered or unexported fields
}
MsgDeleteOne is the builder for deleting a single Msg entity.
func (*MsgDeleteOne) Exec ¶
func (mdo *MsgDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MsgDeleteOne) ExecX ¶
func (mdo *MsgDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MsgDeleteOne) Where ¶
func (mdo *MsgDeleteOne) Where(ps ...predicate.Msg) *MsgDeleteOne
Where appends a list predicates to the MsgDelete builder.
type MsgEdges ¶
type MsgEdges struct { // Block holds the value of the block edge. Block []*Block `json:"block,omitempty"` // Receipts holds the value of the receipts edge. Receipts []*Receipt `json:"receipts,omitempty"` // contains filtered or unexported fields }
MsgEdges holds the relations/edges for other nodes in the graph.
func (MsgEdges) BlockOrErr ¶
BlockOrErr returns the Block value or an error if the edge was not loaded in eager-loading.
func (MsgEdges) ReceiptsOrErr ¶ added in v0.1.3
ReceiptsOrErr returns the Receipts value or an error if the edge was not loaded in eager-loading.
type MsgFilter ¶
type MsgFilter struct {
// contains filtered or unexported fields
}
MsgFilter provides a generic filtering capability at runtime for MsgQuery.
func (*MsgFilter) WhereCreatedAt ¶
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*MsgFilter) WhereDestChainID ¶
WhereDestChainID applies the entql uint64 predicate on the dest_chain_id field.
func (*MsgFilter) WhereGasLimit ¶ added in v0.1.7
WhereGasLimit applies the entql uint64 predicate on the gas_limit field.
func (*MsgFilter) WhereHasBlock ¶
func (f *MsgFilter) WhereHasBlock()
WhereHasBlock applies a predicate to check if query has an edge block.
func (*MsgFilter) WhereHasBlockWith ¶
WhereHasBlockWith applies a predicate to check if query has an edge block with a given conditions (other predicates).
func (*MsgFilter) WhereHasReceipts ¶ added in v0.1.3
func (f *MsgFilter) WhereHasReceipts()
WhereHasReceipts applies a predicate to check if query has an edge receipts.
func (*MsgFilter) WhereHasReceiptsWith ¶ added in v0.1.3
WhereHasReceiptsWith applies a predicate to check if query has an edge receipts with a given conditions (other predicates).
func (*MsgFilter) WhereOffset ¶ added in v0.1.7
WhereOffset applies the entql uint64 predicate on the offset field.
func (*MsgFilter) WhereReceiptHash ¶ added in v0.1.4
WhereReceiptHash applies the entql []byte predicate on the receipt_hash field.
func (*MsgFilter) WhereSender ¶ added in v0.1.7
WhereSender applies the entql []byte predicate on the sender field.
func (*MsgFilter) WhereSourceChainID ¶
WhereSourceChainID applies the entql uint64 predicate on the source_chain_id field.
func (*MsgFilter) WhereStatus ¶ added in v0.1.4
WhereStatus applies the entql string predicate on the status field.
func (*MsgFilter) WhereTo ¶ added in v0.1.7
WhereTo applies the entql []byte predicate on the to field.
func (*MsgFilter) WhereTxHash ¶
WhereTxHash applies the entql []byte predicate on the tx_hash field.
type MsgGroupBy ¶
type MsgGroupBy struct {
// contains filtered or unexported fields
}
MsgGroupBy is the group-by builder for Msg entities.
func (*MsgGroupBy) Aggregate ¶
func (mgb *MsgGroupBy) Aggregate(fns ...AggregateFunc) *MsgGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MsgGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MsgGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MsgGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MsgGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MsgGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MsgGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MsgGroupBy) Scan ¶
func (mgb *MsgGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MsgGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MsgMutation ¶
type MsgMutation struct {
// contains filtered or unexported fields
}
MsgMutation represents an operation that mutates the Msg nodes in the graph.
func (*MsgMutation) AddBlockIDs ¶ added in v0.1.7
func (m *MsgMutation) AddBlockIDs(ids ...int)
AddBlockIDs adds the "block" edge to the Block entity by ids.
func (*MsgMutation) AddDestChainID ¶
func (m *MsgMutation) AddDestChainID(u int64)
AddDestChainID adds u to the "dest_chain_id" field.
func (*MsgMutation) AddField ¶
func (m *MsgMutation) 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 (*MsgMutation) AddGasLimit ¶ added in v0.1.7
func (m *MsgMutation) AddGasLimit(u int64)
AddGasLimit adds u to the "gas_limit" field.
func (*MsgMutation) AddOffset ¶ added in v0.1.7
func (m *MsgMutation) AddOffset(u int64)
AddOffset adds u to the "offset" field.
func (*MsgMutation) AddReceiptIDs ¶ added in v0.1.3
func (m *MsgMutation) AddReceiptIDs(ids ...int)
AddReceiptIDs adds the "receipts" edge to the Receipt entity by ids.
func (*MsgMutation) AddSourceChainID ¶
func (m *MsgMutation) AddSourceChainID(u int64)
AddSourceChainID adds u to the "source_chain_id" field.
func (*MsgMutation) AddedDestChainID ¶
func (m *MsgMutation) AddedDestChainID() (r int64, exists bool)
AddedDestChainID returns the value that was added to the "dest_chain_id" field in this mutation.
func (*MsgMutation) AddedEdges ¶
func (m *MsgMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MsgMutation) AddedField ¶
func (m *MsgMutation) 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 (*MsgMutation) AddedFields ¶
func (m *MsgMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MsgMutation) AddedGasLimit ¶ added in v0.1.7
func (m *MsgMutation) AddedGasLimit() (r int64, exists bool)
AddedGasLimit returns the value that was added to the "gas_limit" field in this mutation.
func (*MsgMutation) AddedIDs ¶
func (m *MsgMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MsgMutation) AddedOffset ¶ added in v0.1.7
func (m *MsgMutation) AddedOffset() (r int64, exists bool)
AddedOffset returns the value that was added to the "offset" field in this mutation.
func (*MsgMutation) AddedSourceChainID ¶
func (m *MsgMutation) AddedSourceChainID() (r int64, exists bool)
AddedSourceChainID returns the value that was added to the "source_chain_id" field in this mutation.
func (*MsgMutation) BlockCleared ¶
func (m *MsgMutation) BlockCleared() bool
BlockCleared reports if the "block" edge to the Block entity was cleared.
func (*MsgMutation) BlockIDs ¶
func (m *MsgMutation) BlockIDs() (ids []int)
BlockIDs returns the "block" edge IDs in the mutation.
func (*MsgMutation) ClearBlock ¶
func (m *MsgMutation) ClearBlock()
ClearBlock clears the "block" edge to the Block entity.
func (*MsgMutation) ClearEdge ¶
func (m *MsgMutation) 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 (*MsgMutation) ClearField ¶
func (m *MsgMutation) 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 (*MsgMutation) ClearReceiptHash ¶ added in v0.1.4
func (m *MsgMutation) ClearReceiptHash()
ClearReceiptHash clears the value of the "receipt_hash" field.
func (*MsgMutation) ClearReceipts ¶ added in v0.1.3
func (m *MsgMutation) ClearReceipts()
ClearReceipts clears the "receipts" edge to the Receipt entity.
func (*MsgMutation) ClearStatus ¶ added in v0.1.4
func (m *MsgMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*MsgMutation) ClearedEdges ¶
func (m *MsgMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MsgMutation) ClearedFields ¶
func (m *MsgMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MsgMutation) Client ¶
func (m MsgMutation) 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 (*MsgMutation) CreatedAt ¶
func (m *MsgMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MsgMutation) Data ¶
func (m *MsgMutation) Data() (r []byte, exists bool)
Data returns the value of the "data" field in the mutation.
func (*MsgMutation) DestChainID ¶
func (m *MsgMutation) DestChainID() (r uint64, exists bool)
DestChainID returns the value of the "dest_chain_id" field in the mutation.
func (*MsgMutation) EdgeCleared ¶
func (m *MsgMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MsgMutation) Field ¶
func (m *MsgMutation) 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 (*MsgMutation) FieldCleared ¶
func (m *MsgMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MsgMutation) Fields ¶
func (m *MsgMutation) 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 (*MsgMutation) Filter ¶
func (m *MsgMutation) Filter() *MsgFilter
Filter returns an entql.Where implementation to apply filters on the MsgMutation builder.
func (*MsgMutation) GasLimit ¶ added in v0.1.7
func (m *MsgMutation) GasLimit() (r uint64, exists bool)
GasLimit returns the value of the "gas_limit" field in the mutation.
func (*MsgMutation) ID ¶
func (m *MsgMutation) 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 (*MsgMutation) IDs ¶
func (m *MsgMutation) 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 (*MsgMutation) Offset ¶ added in v0.1.7
func (m *MsgMutation) Offset() (r uint64, exists bool)
Offset returns the value of the "offset" field in the mutation.
func (*MsgMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldData ¶
func (m *MsgMutation) OldData(ctx context.Context) (v []byte, err error)
OldData returns the old "data" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldDestChainID ¶
func (m *MsgMutation) OldDestChainID(ctx context.Context) (v uint64, err error)
OldDestChainID returns the old "dest_chain_id" field's value of the Msg entity. If the Msg 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 (*MsgMutation) 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 (*MsgMutation) OldGasLimit ¶ added in v0.1.7
func (m *MsgMutation) OldGasLimit(ctx context.Context) (v uint64, err error)
OldGasLimit returns the old "gas_limit" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldOffset ¶ added in v0.1.7
func (m *MsgMutation) OldOffset(ctx context.Context) (v uint64, err error)
OldOffset returns the old "offset" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldReceiptHash ¶ added in v0.1.4
func (m *MsgMutation) OldReceiptHash(ctx context.Context) (v []byte, err error)
OldReceiptHash returns the old "receipt_hash" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldSender ¶ added in v0.1.7
func (m *MsgMutation) OldSender(ctx context.Context) (v []byte, err error)
OldSender returns the old "sender" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldSourceChainID ¶
func (m *MsgMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
OldSourceChainID returns the old "source_chain_id" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldStatus ¶ added in v0.1.4
func (m *MsgMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldTo ¶ added in v0.1.7
func (m *MsgMutation) OldTo(ctx context.Context) (v []byte, err error)
OldTo returns the old "to" field's value of the Msg entity. If the Msg 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 (*MsgMutation) OldTxHash ¶
func (m *MsgMutation) OldTxHash(ctx context.Context) (v []byte, err error)
OldTxHash returns the old "tx_hash" field's value of the Msg entity. If the Msg 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 (*MsgMutation) ReceiptHash ¶ added in v0.1.4
func (m *MsgMutation) ReceiptHash() (r []byte, exists bool)
ReceiptHash returns the value of the "receipt_hash" field in the mutation.
func (*MsgMutation) ReceiptHashCleared ¶ added in v0.1.4
func (m *MsgMutation) ReceiptHashCleared() bool
ReceiptHashCleared returns if the "receipt_hash" field was cleared in this mutation.
func (*MsgMutation) ReceiptsCleared ¶ added in v0.1.3
func (m *MsgMutation) ReceiptsCleared() bool
ReceiptsCleared reports if the "receipts" edge to the Receipt entity was cleared.
func (*MsgMutation) ReceiptsIDs ¶ added in v0.1.3
func (m *MsgMutation) ReceiptsIDs() (ids []int)
ReceiptsIDs returns the "receipts" edge IDs in the mutation.
func (*MsgMutation) RemoveBlockIDs ¶ added in v0.1.7
func (m *MsgMutation) RemoveBlockIDs(ids ...int)
RemoveBlockIDs removes the "block" edge to the Block entity by IDs.
func (*MsgMutation) RemoveReceiptIDs ¶ added in v0.1.3
func (m *MsgMutation) RemoveReceiptIDs(ids ...int)
RemoveReceiptIDs removes the "receipts" edge to the Receipt entity by IDs.
func (*MsgMutation) RemovedBlockIDs ¶ added in v0.1.7
func (m *MsgMutation) RemovedBlockIDs() (ids []int)
RemovedBlock returns the removed IDs of the "block" edge to the Block entity.
func (*MsgMutation) RemovedEdges ¶
func (m *MsgMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MsgMutation) RemovedIDs ¶
func (m *MsgMutation) 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 (*MsgMutation) RemovedReceiptsIDs ¶ added in v0.1.3
func (m *MsgMutation) RemovedReceiptsIDs() (ids []int)
RemovedReceipts returns the removed IDs of the "receipts" edge to the Receipt entity.
func (*MsgMutation) ResetBlock ¶
func (m *MsgMutation) ResetBlock()
ResetBlock resets all changes to the "block" edge.
func (*MsgMutation) ResetCreatedAt ¶
func (m *MsgMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MsgMutation) ResetData ¶
func (m *MsgMutation) ResetData()
ResetData resets all changes to the "data" field.
func (*MsgMutation) ResetDestChainID ¶
func (m *MsgMutation) ResetDestChainID()
ResetDestChainID resets all changes to the "dest_chain_id" field.
func (*MsgMutation) ResetEdge ¶
func (m *MsgMutation) 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 (*MsgMutation) ResetField ¶
func (m *MsgMutation) 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 (*MsgMutation) ResetGasLimit ¶ added in v0.1.7
func (m *MsgMutation) ResetGasLimit()
ResetGasLimit resets all changes to the "gas_limit" field.
func (*MsgMutation) ResetOffset ¶ added in v0.1.7
func (m *MsgMutation) ResetOffset()
ResetOffset resets all changes to the "offset" field.
func (*MsgMutation) ResetReceiptHash ¶ added in v0.1.4
func (m *MsgMutation) ResetReceiptHash()
ResetReceiptHash resets all changes to the "receipt_hash" field.
func (*MsgMutation) ResetReceipts ¶ added in v0.1.3
func (m *MsgMutation) ResetReceipts()
ResetReceipts resets all changes to the "receipts" edge.
func (*MsgMutation) ResetSender ¶ added in v0.1.7
func (m *MsgMutation) ResetSender()
ResetSender resets all changes to the "sender" field.
func (*MsgMutation) ResetSourceChainID ¶
func (m *MsgMutation) ResetSourceChainID()
ResetSourceChainID resets all changes to the "source_chain_id" field.
func (*MsgMutation) ResetStatus ¶ added in v0.1.4
func (m *MsgMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*MsgMutation) ResetTo ¶ added in v0.1.7
func (m *MsgMutation) ResetTo()
ResetTo resets all changes to the "to" field.
func (*MsgMutation) ResetTxHash ¶
func (m *MsgMutation) ResetTxHash()
ResetTxHash resets all changes to the "tx_hash" field.
func (*MsgMutation) Sender ¶ added in v0.1.7
func (m *MsgMutation) Sender() (r []byte, exists bool)
Sender returns the value of the "sender" field in the mutation.
func (*MsgMutation) SetCreatedAt ¶
func (m *MsgMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MsgMutation) SetData ¶
func (m *MsgMutation) SetData(b []byte)
SetData sets the "data" field.
func (*MsgMutation) SetDestChainID ¶
func (m *MsgMutation) SetDestChainID(u uint64)
SetDestChainID sets the "dest_chain_id" field.
func (*MsgMutation) SetField ¶
func (m *MsgMutation) 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 (*MsgMutation) SetGasLimit ¶ added in v0.1.7
func (m *MsgMutation) SetGasLimit(u uint64)
SetGasLimit sets the "gas_limit" field.
func (*MsgMutation) SetOffset ¶ added in v0.1.7
func (m *MsgMutation) SetOffset(u uint64)
SetOffset sets the "offset" field.
func (*MsgMutation) SetOp ¶
func (m *MsgMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MsgMutation) SetReceiptHash ¶ added in v0.1.4
func (m *MsgMutation) SetReceiptHash(b []byte)
SetReceiptHash sets the "receipt_hash" field.
func (*MsgMutation) SetSender ¶ added in v0.1.7
func (m *MsgMutation) SetSender(b []byte)
SetSender sets the "sender" field.
func (*MsgMutation) SetSourceChainID ¶
func (m *MsgMutation) SetSourceChainID(u uint64)
SetSourceChainID sets the "source_chain_id" field.
func (*MsgMutation) SetStatus ¶ added in v0.1.4
func (m *MsgMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*MsgMutation) SetTo ¶ added in v0.1.7
func (m *MsgMutation) SetTo(b []byte)
SetTo sets the "to" field.
func (*MsgMutation) SetTxHash ¶
func (m *MsgMutation) SetTxHash(b []byte)
SetTxHash sets the "tx_hash" field.
func (*MsgMutation) SourceChainID ¶
func (m *MsgMutation) SourceChainID() (r uint64, exists bool)
SourceChainID returns the value of the "source_chain_id" field in the mutation.
func (*MsgMutation) Status ¶ added in v0.1.4
func (m *MsgMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (*MsgMutation) StatusCleared ¶ added in v0.1.4
func (m *MsgMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*MsgMutation) To ¶ added in v0.1.7
func (m *MsgMutation) To() (r []byte, exists bool)
To returns the value of the "to" field in the mutation.
func (MsgMutation) Tx ¶
func (m MsgMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MsgMutation) TxHash ¶
func (m *MsgMutation) TxHash() (r []byte, exists bool)
TxHash returns the value of the "tx_hash" field in the mutation.
func (*MsgMutation) Type ¶
func (m *MsgMutation) Type() string
Type returns the node type of this mutation (Msg).
func (*MsgMutation) Where ¶
func (m *MsgMutation) Where(ps ...predicate.Msg)
Where appends a list predicates to the MsgMutation builder.
func (*MsgMutation) WhereP ¶
func (m *MsgMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MsgMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MsgQuery ¶
type MsgQuery struct {
// contains filtered or unexported fields
}
MsgQuery is the builder for querying Msg entities.
func (*MsgQuery) Aggregate ¶
func (mq *MsgQuery) Aggregate(fns ...AggregateFunc) *MsgSelect
Aggregate returns a MsgSelect configured with the given aggregations.
func (*MsgQuery) Clone ¶
Clone returns a duplicate of the MsgQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MsgQuery) Filter ¶
Filter returns a Filter implementation to apply filters on the MsgQuery builder.
func (*MsgQuery) First ¶
First returns the first Msg entity from the query. Returns a *NotFoundError when no Msg was found.
func (*MsgQuery) FirstID ¶
FirstID returns the first Msg ID from the query. Returns a *NotFoundError when no Msg ID was found.
func (*MsgQuery) GroupBy ¶
func (mq *MsgQuery) GroupBy(field string, fields ...string) *MsgGroupBy
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 { Sender []byte `json:"sender,omitempty"` Count int `json:"count,omitempty"` } client.Msg.Query(). GroupBy(msg.FieldSender). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MsgQuery) Only ¶
Only returns a single Msg entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Msg entity is found. Returns a *NotFoundError when no Msg entities are found.
func (*MsgQuery) OnlyID ¶
OnlyID is like Only, but returns the only Msg ID in the query. Returns a *NotSingularError when more than one Msg ID is found. Returns a *NotFoundError when no entities are found.
func (*MsgQuery) Order ¶
func (mq *MsgQuery) Order(o ...msg.OrderOption) *MsgQuery
Order specifies how the records should be ordered.
func (*MsgQuery) QueryBlock ¶
func (mq *MsgQuery) QueryBlock() *BlockQuery
QueryBlock chains the current query on the "block" edge.
func (*MsgQuery) QueryReceipts ¶ added in v0.1.3
func (mq *MsgQuery) QueryReceipts() *ReceiptQuery
QueryReceipts chains the current query on the "receipts" edge.
func (*MsgQuery) Select ¶
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 { Sender []byte `json:"sender,omitempty"` } client.Msg.Query(). Select(msg.FieldSender). Scan(ctx, &v)
func (*MsgQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MsgQuery) WithBlock ¶
func (mq *MsgQuery) WithBlock(opts ...func(*BlockQuery)) *MsgQuery
WithBlock tells the query-builder to eager-load the nodes that are connected to the "block" edge. The optional arguments are used to configure the query builder of the edge.
func (*MsgQuery) WithReceipts ¶ added in v0.1.3
func (mq *MsgQuery) WithReceipts(opts ...func(*ReceiptQuery)) *MsgQuery
WithReceipts tells the query-builder to eager-load the nodes that are connected to the "receipts" edge. The optional arguments are used to configure the query builder of the edge.
type MsgSelect ¶
type MsgSelect struct { *MsgQuery // contains filtered or unexported fields }
MsgSelect is the builder for selecting fields of Msg entities.
func (*MsgSelect) Aggregate ¶
func (ms *MsgSelect) Aggregate(fns ...AggregateFunc) *MsgSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MsgSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MsgSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MsgSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MsgSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MsgSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MsgSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MsgSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MsgUpdate ¶
type MsgUpdate struct {
// contains filtered or unexported fields
}
MsgUpdate is the builder for updating Msg entities.
func (*MsgUpdate) AddBlockIDs ¶ added in v0.1.7
AddBlockIDs adds the "block" edge to the Block entity by IDs.
func (*MsgUpdate) AddDestChainID ¶
AddDestChainID adds u to the "dest_chain_id" field.
func (*MsgUpdate) AddGasLimit ¶ added in v0.1.7
AddGasLimit adds u to the "gas_limit" field.
func (*MsgUpdate) AddReceiptIDs ¶ added in v0.1.3
AddReceiptIDs adds the "receipts" edge to the Receipt entity by IDs.
func (*MsgUpdate) AddReceipts ¶ added in v0.1.3
AddReceipts adds the "receipts" edges to the Receipt entity.
func (*MsgUpdate) AddSourceChainID ¶
AddSourceChainID adds u to the "source_chain_id" field.
func (*MsgUpdate) ClearBlock ¶
ClearBlock clears all "block" edges to the Block entity.
func (*MsgUpdate) ClearReceiptHash ¶ added in v0.1.4
ClearReceiptHash clears the value of the "receipt_hash" field.
func (*MsgUpdate) ClearReceipts ¶ added in v0.1.3
ClearReceipts clears all "receipts" edges to the Receipt entity.
func (*MsgUpdate) ClearStatus ¶ added in v0.1.4
ClearStatus clears the value of the "status" field.
func (*MsgUpdate) Mutation ¶
func (mu *MsgUpdate) Mutation() *MsgMutation
Mutation returns the MsgMutation object of the builder.
func (*MsgUpdate) RemoveBlock ¶ added in v0.1.7
RemoveBlock removes "block" edges to Block entities.
func (*MsgUpdate) RemoveBlockIDs ¶ added in v0.1.7
RemoveBlockIDs removes the "block" edge to Block entities by IDs.
func (*MsgUpdate) RemoveReceiptIDs ¶ added in v0.1.3
RemoveReceiptIDs removes the "receipts" edge to Receipt entities by IDs.
func (*MsgUpdate) RemoveReceipts ¶ added in v0.1.3
RemoveReceipts removes "receipts" edges to Receipt entities.
func (*MsgUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*MsgUpdate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*MsgUpdate) SetDestChainID ¶
SetDestChainID sets the "dest_chain_id" field.
func (*MsgUpdate) SetGasLimit ¶ added in v0.1.7
SetGasLimit sets the "gas_limit" field.
func (*MsgUpdate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MsgUpdate) SetNillableDestChainID ¶
SetNillableDestChainID sets the "dest_chain_id" field if the given value is not nil.
func (*MsgUpdate) SetNillableGasLimit ¶ added in v0.1.7
SetNillableGasLimit sets the "gas_limit" field if the given value is not nil.
func (*MsgUpdate) SetNillableOffset ¶ added in v0.1.7
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*MsgUpdate) SetNillableSourceChainID ¶
SetNillableSourceChainID sets the "source_chain_id" field if the given value is not nil.
func (*MsgUpdate) SetNillableStatus ¶ added in v0.1.4
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MsgUpdate) SetReceiptHash ¶ added in v0.1.4
SetReceiptHash sets the "receipt_hash" field.
func (*MsgUpdate) SetSourceChainID ¶
SetSourceChainID sets the "source_chain_id" field.
type MsgUpdateOne ¶
type MsgUpdateOne struct {
// contains filtered or unexported fields
}
MsgUpdateOne is the builder for updating a single Msg entity.
func (*MsgUpdateOne) AddBlock ¶ added in v0.1.7
func (muo *MsgUpdateOne) AddBlock(b ...*Block) *MsgUpdateOne
AddBlock adds the "block" edges to the Block entity.
func (*MsgUpdateOne) AddBlockIDs ¶ added in v0.1.7
func (muo *MsgUpdateOne) AddBlockIDs(ids ...int) *MsgUpdateOne
AddBlockIDs adds the "block" edge to the Block entity by IDs.
func (*MsgUpdateOne) AddDestChainID ¶
func (muo *MsgUpdateOne) AddDestChainID(u int64) *MsgUpdateOne
AddDestChainID adds u to the "dest_chain_id" field.
func (*MsgUpdateOne) AddGasLimit ¶ added in v0.1.7
func (muo *MsgUpdateOne) AddGasLimit(u int64) *MsgUpdateOne
AddGasLimit adds u to the "gas_limit" field.
func (*MsgUpdateOne) AddOffset ¶ added in v0.1.7
func (muo *MsgUpdateOne) AddOffset(u int64) *MsgUpdateOne
AddOffset adds u to the "offset" field.
func (*MsgUpdateOne) AddReceiptIDs ¶ added in v0.1.3
func (muo *MsgUpdateOne) AddReceiptIDs(ids ...int) *MsgUpdateOne
AddReceiptIDs adds the "receipts" edge to the Receipt entity by IDs.
func (*MsgUpdateOne) AddReceipts ¶ added in v0.1.3
func (muo *MsgUpdateOne) AddReceipts(r ...*Receipt) *MsgUpdateOne
AddReceipts adds the "receipts" edges to the Receipt entity.
func (*MsgUpdateOne) AddSourceChainID ¶
func (muo *MsgUpdateOne) AddSourceChainID(u int64) *MsgUpdateOne
AddSourceChainID adds u to the "source_chain_id" field.
func (*MsgUpdateOne) ClearBlock ¶
func (muo *MsgUpdateOne) ClearBlock() *MsgUpdateOne
ClearBlock clears all "block" edges to the Block entity.
func (*MsgUpdateOne) ClearReceiptHash ¶ added in v0.1.4
func (muo *MsgUpdateOne) ClearReceiptHash() *MsgUpdateOne
ClearReceiptHash clears the value of the "receipt_hash" field.
func (*MsgUpdateOne) ClearReceipts ¶ added in v0.1.3
func (muo *MsgUpdateOne) ClearReceipts() *MsgUpdateOne
ClearReceipts clears all "receipts" edges to the Receipt entity.
func (*MsgUpdateOne) ClearStatus ¶ added in v0.1.4
func (muo *MsgUpdateOne) ClearStatus() *MsgUpdateOne
ClearStatus clears the value of the "status" field.
func (*MsgUpdateOne) Exec ¶
func (muo *MsgUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MsgUpdateOne) ExecX ¶
func (muo *MsgUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MsgUpdateOne) Mutation ¶
func (muo *MsgUpdateOne) Mutation() *MsgMutation
Mutation returns the MsgMutation object of the builder.
func (*MsgUpdateOne) RemoveBlock ¶ added in v0.1.7
func (muo *MsgUpdateOne) RemoveBlock(b ...*Block) *MsgUpdateOne
RemoveBlock removes "block" edges to Block entities.
func (*MsgUpdateOne) RemoveBlockIDs ¶ added in v0.1.7
func (muo *MsgUpdateOne) RemoveBlockIDs(ids ...int) *MsgUpdateOne
RemoveBlockIDs removes the "block" edge to Block entities by IDs.
func (*MsgUpdateOne) RemoveReceiptIDs ¶ added in v0.1.3
func (muo *MsgUpdateOne) RemoveReceiptIDs(ids ...int) *MsgUpdateOne
RemoveReceiptIDs removes the "receipts" edge to Receipt entities by IDs.
func (*MsgUpdateOne) RemoveReceipts ¶ added in v0.1.3
func (muo *MsgUpdateOne) RemoveReceipts(r ...*Receipt) *MsgUpdateOne
RemoveReceipts removes "receipts" edges to Receipt entities.
func (*MsgUpdateOne) Save ¶
func (muo *MsgUpdateOne) Save(ctx context.Context) (*Msg, error)
Save executes the query and returns the updated Msg entity.
func (*MsgUpdateOne) SaveX ¶
func (muo *MsgUpdateOne) SaveX(ctx context.Context) *Msg
SaveX is like Save, but panics if an error occurs.
func (*MsgUpdateOne) Select ¶
func (muo *MsgUpdateOne) Select(field string, fields ...string) *MsgUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MsgUpdateOne) SetCreatedAt ¶
func (muo *MsgUpdateOne) SetCreatedAt(t time.Time) *MsgUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MsgUpdateOne) SetData ¶
func (muo *MsgUpdateOne) SetData(b []byte) *MsgUpdateOne
SetData sets the "data" field.
func (*MsgUpdateOne) SetDestChainID ¶
func (muo *MsgUpdateOne) SetDestChainID(u uint64) *MsgUpdateOne
SetDestChainID sets the "dest_chain_id" field.
func (*MsgUpdateOne) SetGasLimit ¶ added in v0.1.7
func (muo *MsgUpdateOne) SetGasLimit(u uint64) *MsgUpdateOne
SetGasLimit sets the "gas_limit" field.
func (*MsgUpdateOne) SetNillableCreatedAt ¶
func (muo *MsgUpdateOne) SetNillableCreatedAt(t *time.Time) *MsgUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableDestChainID ¶
func (muo *MsgUpdateOne) SetNillableDestChainID(u *uint64) *MsgUpdateOne
SetNillableDestChainID sets the "dest_chain_id" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableGasLimit ¶ added in v0.1.7
func (muo *MsgUpdateOne) SetNillableGasLimit(u *uint64) *MsgUpdateOne
SetNillableGasLimit sets the "gas_limit" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableOffset ¶ added in v0.1.7
func (muo *MsgUpdateOne) SetNillableOffset(u *uint64) *MsgUpdateOne
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableSourceChainID ¶
func (muo *MsgUpdateOne) SetNillableSourceChainID(u *uint64) *MsgUpdateOne
SetNillableSourceChainID sets the "source_chain_id" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableStatus ¶ added in v0.1.4
func (muo *MsgUpdateOne) SetNillableStatus(s *string) *MsgUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MsgUpdateOne) SetOffset ¶ added in v0.1.7
func (muo *MsgUpdateOne) SetOffset(u uint64) *MsgUpdateOne
SetOffset sets the "offset" field.
func (*MsgUpdateOne) SetReceiptHash ¶ added in v0.1.4
func (muo *MsgUpdateOne) SetReceiptHash(b []byte) *MsgUpdateOne
SetReceiptHash sets the "receipt_hash" field.
func (*MsgUpdateOne) SetSender ¶ added in v0.1.7
func (muo *MsgUpdateOne) SetSender(b []byte) *MsgUpdateOne
SetSender sets the "sender" field.
func (*MsgUpdateOne) SetSourceChainID ¶
func (muo *MsgUpdateOne) SetSourceChainID(u uint64) *MsgUpdateOne
SetSourceChainID sets the "source_chain_id" field.
func (*MsgUpdateOne) SetStatus ¶ added in v0.1.4
func (muo *MsgUpdateOne) SetStatus(s string) *MsgUpdateOne
SetStatus sets the "status" field.
func (*MsgUpdateOne) SetTo ¶ added in v0.1.7
func (muo *MsgUpdateOne) SetTo(b []byte) *MsgUpdateOne
SetTo sets the "to" field.
func (*MsgUpdateOne) SetTxHash ¶
func (muo *MsgUpdateOne) SetTxHash(b []byte) *MsgUpdateOne
SetTxHash sets the "tx_hash" field.
func (*MsgUpdateOne) Where ¶
func (muo *MsgUpdateOne) Where(ps ...predicate.Msg) *MsgUpdateOne
Where appends a list predicates to the MsgUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Receipt ¶
type Receipt struct { // ID of the ent. ID int `json:"id,omitempty"` // BlockHash holds the value of the "block_hash" field. BlockHash []byte `json:"block_hash,omitempty"` // GasUsed holds the value of the "gas_used" field. GasUsed uint64 `json:"gas_used,omitempty"` // Success holds the value of the "success" field. Success bool `json:"success,omitempty"` // RelayerAddress holds the value of the "relayer_address" field. RelayerAddress []byte `json:"relayer_address,omitempty"` // SourceChainID holds the value of the "source_chain_id" field. SourceChainID uint64 `json:"source_chain_id,omitempty"` // DestChainID holds the value of the "dest_chain_id" field. DestChainID uint64 `json:"dest_chain_id,omitempty"` // Offset holds the value of the "offset" field. Offset uint64 `json:"offset,omitempty"` // TxHash holds the value of the "tx_hash" field. TxHash []byte `json:"tx_hash,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // RevertReason holds the value of the "revert_reason" field. RevertReason string `json:"revert_reason,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ReceiptQuery when eager-loading is set. Edges ReceiptEdges `json:"edges"` // contains filtered or unexported fields }
Receipt is the model entity for the Receipt schema.
func (*Receipt) QueryBlock ¶
func (r *Receipt) QueryBlock() *BlockQuery
QueryBlock queries the "block" edge of the Receipt entity.
func (*Receipt) QueryMsgs ¶ added in v0.1.3
QueryMsgs queries the "msgs" edge of the Receipt entity.
func (*Receipt) Unwrap ¶
Unwrap unwraps the Receipt 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 (*Receipt) Update ¶
func (r *Receipt) Update() *ReceiptUpdateOne
Update returns a builder for updating this Receipt. Note that you need to call Receipt.Unwrap() before calling this method if this Receipt was returned from a transaction, and the transaction was committed or rolled back.
type ReceiptClient ¶
type ReceiptClient struct {
// contains filtered or unexported fields
}
ReceiptClient is a client for the Receipt schema.
func NewReceiptClient ¶
func NewReceiptClient(c config) *ReceiptClient
NewReceiptClient returns a client for the Receipt from the given config.
func (*ReceiptClient) Create ¶
func (c *ReceiptClient) Create() *ReceiptCreate
Create returns a builder for creating a Receipt entity.
func (*ReceiptClient) CreateBulk ¶
func (c *ReceiptClient) CreateBulk(builders ...*ReceiptCreate) *ReceiptCreateBulk
CreateBulk returns a builder for creating a bulk of Receipt entities.
func (*ReceiptClient) Delete ¶
func (c *ReceiptClient) Delete() *ReceiptDelete
Delete returns a delete builder for Receipt.
func (*ReceiptClient) DeleteOne ¶
func (c *ReceiptClient) DeleteOne(r *Receipt) *ReceiptDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReceiptClient) DeleteOneID ¶
func (c *ReceiptClient) DeleteOneID(id int) *ReceiptDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ReceiptClient) GetX ¶
func (c *ReceiptClient) GetX(ctx context.Context, id int) *Receipt
GetX is like Get, but panics if an error occurs.
func (*ReceiptClient) Hooks ¶
func (c *ReceiptClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ReceiptClient) Intercept ¶
func (c *ReceiptClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `receipt.Intercept(f(g(h())))`.
func (*ReceiptClient) Interceptors ¶
func (c *ReceiptClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ReceiptClient) MapCreateBulk ¶
func (c *ReceiptClient) MapCreateBulk(slice any, setFunc func(*ReceiptCreate, int)) *ReceiptCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ReceiptClient) Query ¶
func (c *ReceiptClient) Query() *ReceiptQuery
Query returns a query builder for Receipt.
func (*ReceiptClient) QueryBlock ¶
func (c *ReceiptClient) QueryBlock(r *Receipt) *BlockQuery
QueryBlock queries the block edge of a Receipt.
func (*ReceiptClient) QueryMsgs ¶ added in v0.1.3
func (c *ReceiptClient) QueryMsgs(r *Receipt) *MsgQuery
QueryMsgs queries the msgs edge of a Receipt.
func (*ReceiptClient) Update ¶
func (c *ReceiptClient) Update() *ReceiptUpdate
Update returns an update builder for Receipt.
func (*ReceiptClient) UpdateOne ¶
func (c *ReceiptClient) UpdateOne(r *Receipt) *ReceiptUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReceiptClient) UpdateOneID ¶
func (c *ReceiptClient) UpdateOneID(id int) *ReceiptUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReceiptClient) Use ¶
func (c *ReceiptClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `receipt.Hooks(f(g(h())))`.
type ReceiptCreate ¶
type ReceiptCreate struct {
// contains filtered or unexported fields
}
ReceiptCreate is the builder for creating a Receipt entity.
func (*ReceiptCreate) AddBlock ¶ added in v0.1.7
func (rc *ReceiptCreate) AddBlock(b ...*Block) *ReceiptCreate
AddBlock adds the "block" edges to the Block entity.
func (*ReceiptCreate) AddBlockIDs ¶ added in v0.1.7
func (rc *ReceiptCreate) AddBlockIDs(ids ...int) *ReceiptCreate
AddBlockIDs adds the "block" edge to the Block entity by IDs.
func (*ReceiptCreate) AddMsgIDs ¶ added in v0.1.3
func (rc *ReceiptCreate) AddMsgIDs(ids ...int) *ReceiptCreate
AddMsgIDs adds the "msgs" edge to the Msg entity by IDs.
func (*ReceiptCreate) AddMsgs ¶ added in v0.1.3
func (rc *ReceiptCreate) AddMsgs(m ...*Msg) *ReceiptCreate
AddMsgs adds the "msgs" edges to the Msg entity.
func (*ReceiptCreate) Exec ¶
func (rc *ReceiptCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReceiptCreate) ExecX ¶
func (rc *ReceiptCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReceiptCreate) Mutation ¶
func (rc *ReceiptCreate) Mutation() *ReceiptMutation
Mutation returns the ReceiptMutation object of the builder.
func (*ReceiptCreate) Save ¶
func (rc *ReceiptCreate) Save(ctx context.Context) (*Receipt, error)
Save creates the Receipt in the database.
func (*ReceiptCreate) SaveX ¶
func (rc *ReceiptCreate) SaveX(ctx context.Context) *Receipt
SaveX calls Save and panics if Save returns an error.
func (*ReceiptCreate) SetBlockHash ¶ added in v0.1.7
func (rc *ReceiptCreate) SetBlockHash(b []byte) *ReceiptCreate
SetBlockHash sets the "block_hash" field.
func (*ReceiptCreate) SetCreatedAt ¶
func (rc *ReceiptCreate) SetCreatedAt(t time.Time) *ReceiptCreate
SetCreatedAt sets the "created_at" field.
func (*ReceiptCreate) SetDestChainID ¶
func (rc *ReceiptCreate) SetDestChainID(u uint64) *ReceiptCreate
SetDestChainID sets the "dest_chain_id" field.
func (*ReceiptCreate) SetGasUsed ¶
func (rc *ReceiptCreate) SetGasUsed(u uint64) *ReceiptCreate
SetGasUsed sets the "gas_used" field.
func (*ReceiptCreate) SetNillableCreatedAt ¶
func (rc *ReceiptCreate) SetNillableCreatedAt(t *time.Time) *ReceiptCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReceiptCreate) SetNillableRevertReason ¶ added in v0.1.9
func (rc *ReceiptCreate) SetNillableRevertReason(s *string) *ReceiptCreate
SetNillableRevertReason sets the "revert_reason" field if the given value is not nil.
func (*ReceiptCreate) SetOffset ¶ added in v0.1.7
func (rc *ReceiptCreate) SetOffset(u uint64) *ReceiptCreate
SetOffset sets the "offset" field.
func (*ReceiptCreate) SetRelayerAddress ¶
func (rc *ReceiptCreate) SetRelayerAddress(b []byte) *ReceiptCreate
SetRelayerAddress sets the "relayer_address" field.
func (*ReceiptCreate) SetRevertReason ¶ added in v0.1.9
func (rc *ReceiptCreate) SetRevertReason(s string) *ReceiptCreate
SetRevertReason sets the "revert_reason" field.
func (*ReceiptCreate) SetSourceChainID ¶
func (rc *ReceiptCreate) SetSourceChainID(u uint64) *ReceiptCreate
SetSourceChainID sets the "source_chain_id" field.
func (*ReceiptCreate) SetSuccess ¶
func (rc *ReceiptCreate) SetSuccess(b bool) *ReceiptCreate
SetSuccess sets the "success" field.
func (*ReceiptCreate) SetTxHash ¶
func (rc *ReceiptCreate) SetTxHash(b []byte) *ReceiptCreate
SetTxHash sets the "tx_hash" field.
type ReceiptCreateBulk ¶
type ReceiptCreateBulk struct {
// contains filtered or unexported fields
}
ReceiptCreateBulk is the builder for creating many Receipt entities in bulk.
func (*ReceiptCreateBulk) Exec ¶
func (rcb *ReceiptCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReceiptCreateBulk) ExecX ¶
func (rcb *ReceiptCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReceiptDelete ¶
type ReceiptDelete struct {
// contains filtered or unexported fields
}
ReceiptDelete is the builder for deleting a Receipt entity.
func (*ReceiptDelete) Exec ¶
func (rd *ReceiptDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReceiptDelete) ExecX ¶
func (rd *ReceiptDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReceiptDelete) Where ¶
func (rd *ReceiptDelete) Where(ps ...predicate.Receipt) *ReceiptDelete
Where appends a list predicates to the ReceiptDelete builder.
type ReceiptDeleteOne ¶
type ReceiptDeleteOne struct {
// contains filtered or unexported fields
}
ReceiptDeleteOne is the builder for deleting a single Receipt entity.
func (*ReceiptDeleteOne) Exec ¶
func (rdo *ReceiptDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReceiptDeleteOne) ExecX ¶
func (rdo *ReceiptDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReceiptDeleteOne) Where ¶
func (rdo *ReceiptDeleteOne) Where(ps ...predicate.Receipt) *ReceiptDeleteOne
Where appends a list predicates to the ReceiptDelete builder.
type ReceiptEdges ¶
type ReceiptEdges struct { // Block holds the value of the block edge. Block []*Block `json:"block,omitempty"` // Msgs holds the value of the msgs edge. Msgs []*Msg `json:"msgs,omitempty"` // contains filtered or unexported fields }
ReceiptEdges holds the relations/edges for other nodes in the graph.
func (ReceiptEdges) BlockOrErr ¶
func (e ReceiptEdges) BlockOrErr() ([]*Block, error)
BlockOrErr returns the Block value or an error if the edge was not loaded in eager-loading.
func (ReceiptEdges) MsgsOrErr ¶ added in v0.1.3
func (e ReceiptEdges) MsgsOrErr() ([]*Msg, error)
MsgsOrErr returns the Msgs value or an error if the edge was not loaded in eager-loading.
type ReceiptFilter ¶
type ReceiptFilter struct {
// contains filtered or unexported fields
}
ReceiptFilter provides a generic filtering capability at runtime for ReceiptQuery.
func (*ReceiptFilter) Where ¶
func (f *ReceiptFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ReceiptFilter) WhereBlockHash ¶ added in v0.1.7
func (f *ReceiptFilter) WhereBlockHash(p entql.BytesP)
WhereBlockHash applies the entql []byte predicate on the block_hash field.
func (*ReceiptFilter) WhereCreatedAt ¶
func (f *ReceiptFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*ReceiptFilter) WhereDestChainID ¶
func (f *ReceiptFilter) WhereDestChainID(p entql.Uint64P)
WhereDestChainID applies the entql uint64 predicate on the dest_chain_id field.
func (*ReceiptFilter) WhereGasUsed ¶
func (f *ReceiptFilter) WhereGasUsed(p entql.Uint64P)
WhereGasUsed applies the entql uint64 predicate on the gas_used field.
func (*ReceiptFilter) WhereHasBlock ¶
func (f *ReceiptFilter) WhereHasBlock()
WhereHasBlock applies a predicate to check if query has an edge block.
func (*ReceiptFilter) WhereHasBlockWith ¶
func (f *ReceiptFilter) WhereHasBlockWith(preds ...predicate.Block)
WhereHasBlockWith applies a predicate to check if query has an edge block with a given conditions (other predicates).
func (*ReceiptFilter) WhereHasMsgs ¶ added in v0.1.3
func (f *ReceiptFilter) WhereHasMsgs()
WhereHasMsgs applies a predicate to check if query has an edge msgs.
func (*ReceiptFilter) WhereHasMsgsWith ¶ added in v0.1.3
func (f *ReceiptFilter) WhereHasMsgsWith(preds ...predicate.Msg)
WhereHasMsgsWith applies a predicate to check if query has an edge msgs with a given conditions (other predicates).
func (*ReceiptFilter) WhereID ¶
func (f *ReceiptFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*ReceiptFilter) WhereOffset ¶ added in v0.1.7
func (f *ReceiptFilter) WhereOffset(p entql.Uint64P)
WhereOffset applies the entql uint64 predicate on the offset field.
func (*ReceiptFilter) WhereRelayerAddress ¶
func (f *ReceiptFilter) WhereRelayerAddress(p entql.BytesP)
WhereRelayerAddress applies the entql []byte predicate on the relayer_address field.
func (*ReceiptFilter) WhereRevertReason ¶ added in v0.1.9
func (f *ReceiptFilter) WhereRevertReason(p entql.StringP)
WhereRevertReason applies the entql string predicate on the revert_reason field.
func (*ReceiptFilter) WhereSourceChainID ¶
func (f *ReceiptFilter) WhereSourceChainID(p entql.Uint64P)
WhereSourceChainID applies the entql uint64 predicate on the source_chain_id field.
func (*ReceiptFilter) WhereSuccess ¶
func (f *ReceiptFilter) WhereSuccess(p entql.BoolP)
WhereSuccess applies the entql bool predicate on the success field.
func (*ReceiptFilter) WhereTxHash ¶
func (f *ReceiptFilter) WhereTxHash(p entql.BytesP)
WhereTxHash applies the entql []byte predicate on the tx_hash field.
type ReceiptGroupBy ¶
type ReceiptGroupBy struct {
// contains filtered or unexported fields
}
ReceiptGroupBy is the group-by builder for Receipt entities.
func (*ReceiptGroupBy) Aggregate ¶
func (rgb *ReceiptGroupBy) Aggregate(fns ...AggregateFunc) *ReceiptGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReceiptGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReceiptGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReceiptGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReceiptGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReceiptGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReceiptGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReceiptGroupBy) Scan ¶
func (rgb *ReceiptGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReceiptGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReceiptMutation ¶
type ReceiptMutation struct {
// contains filtered or unexported fields
}
ReceiptMutation represents an operation that mutates the Receipt nodes in the graph.
func (*ReceiptMutation) AddBlockIDs ¶ added in v0.1.7
func (m *ReceiptMutation) AddBlockIDs(ids ...int)
AddBlockIDs adds the "block" edge to the Block entity by ids.
func (*ReceiptMutation) AddDestChainID ¶
func (m *ReceiptMutation) AddDestChainID(u int64)
AddDestChainID adds u to the "dest_chain_id" field.
func (*ReceiptMutation) AddField ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) AddGasUsed ¶
func (m *ReceiptMutation) AddGasUsed(u int64)
AddGasUsed adds u to the "gas_used" field.
func (*ReceiptMutation) AddMsgIDs ¶ added in v0.1.3
func (m *ReceiptMutation) AddMsgIDs(ids ...int)
AddMsgIDs adds the "msgs" edge to the Msg entity by ids.
func (*ReceiptMutation) AddOffset ¶ added in v0.1.7
func (m *ReceiptMutation) AddOffset(u int64)
AddOffset adds u to the "offset" field.
func (*ReceiptMutation) AddSourceChainID ¶
func (m *ReceiptMutation) AddSourceChainID(u int64)
AddSourceChainID adds u to the "source_chain_id" field.
func (*ReceiptMutation) AddedDestChainID ¶
func (m *ReceiptMutation) AddedDestChainID() (r int64, exists bool)
AddedDestChainID returns the value that was added to the "dest_chain_id" field in this mutation.
func (*ReceiptMutation) AddedEdges ¶
func (m *ReceiptMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReceiptMutation) AddedField ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) AddedFields ¶
func (m *ReceiptMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReceiptMutation) AddedGasUsed ¶
func (m *ReceiptMutation) AddedGasUsed() (r int64, exists bool)
AddedGasUsed returns the value that was added to the "gas_used" field in this mutation.
func (*ReceiptMutation) AddedIDs ¶
func (m *ReceiptMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReceiptMutation) AddedOffset ¶ added in v0.1.7
func (m *ReceiptMutation) AddedOffset() (r int64, exists bool)
AddedOffset returns the value that was added to the "offset" field in this mutation.
func (*ReceiptMutation) AddedSourceChainID ¶
func (m *ReceiptMutation) AddedSourceChainID() (r int64, exists bool)
AddedSourceChainID returns the value that was added to the "source_chain_id" field in this mutation.
func (*ReceiptMutation) BlockCleared ¶
func (m *ReceiptMutation) BlockCleared() bool
BlockCleared reports if the "block" edge to the Block entity was cleared.
func (*ReceiptMutation) BlockHash ¶ added in v0.1.7
func (m *ReceiptMutation) BlockHash() (r []byte, exists bool)
BlockHash returns the value of the "block_hash" field in the mutation.
func (*ReceiptMutation) BlockIDs ¶
func (m *ReceiptMutation) BlockIDs() (ids []int)
BlockIDs returns the "block" edge IDs in the mutation.
func (*ReceiptMutation) ClearBlock ¶
func (m *ReceiptMutation) ClearBlock()
ClearBlock clears the "block" edge to the Block entity.
func (*ReceiptMutation) ClearEdge ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) ClearField ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) ClearMsgs ¶ added in v0.1.3
func (m *ReceiptMutation) ClearMsgs()
ClearMsgs clears the "msgs" edge to the Msg entity.
func (*ReceiptMutation) ClearRevertReason ¶ added in v0.1.9
func (m *ReceiptMutation) ClearRevertReason()
ClearRevertReason clears the value of the "revert_reason" field.
func (*ReceiptMutation) ClearedEdges ¶
func (m *ReceiptMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReceiptMutation) ClearedFields ¶
func (m *ReceiptMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReceiptMutation) Client ¶
func (m ReceiptMutation) 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 (*ReceiptMutation) CreatedAt ¶
func (m *ReceiptMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ReceiptMutation) DestChainID ¶
func (m *ReceiptMutation) DestChainID() (r uint64, exists bool)
DestChainID returns the value of the "dest_chain_id" field in the mutation.
func (*ReceiptMutation) EdgeCleared ¶
func (m *ReceiptMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReceiptMutation) Field ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) FieldCleared ¶
func (m *ReceiptMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReceiptMutation) Fields ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) Filter ¶
func (m *ReceiptMutation) Filter() *ReceiptFilter
Filter returns an entql.Where implementation to apply filters on the ReceiptMutation builder.
func (*ReceiptMutation) GasUsed ¶
func (m *ReceiptMutation) GasUsed() (r uint64, exists bool)
GasUsed returns the value of the "gas_used" field in the mutation.
func (*ReceiptMutation) ID ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) IDs ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) MsgsCleared ¶ added in v0.1.3
func (m *ReceiptMutation) MsgsCleared() bool
MsgsCleared reports if the "msgs" edge to the Msg entity was cleared.
func (*ReceiptMutation) MsgsIDs ¶ added in v0.1.3
func (m *ReceiptMutation) MsgsIDs() (ids []int)
MsgsIDs returns the "msgs" edge IDs in the mutation.
func (*ReceiptMutation) Offset ¶ added in v0.1.7
func (m *ReceiptMutation) Offset() (r uint64, exists bool)
Offset returns the value of the "offset" field in the mutation.
func (*ReceiptMutation) OldBlockHash ¶ added in v0.1.7
func (m *ReceiptMutation) OldBlockHash(ctx context.Context) (v []byte, err error)
OldBlockHash returns the old "block_hash" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldDestChainID ¶
func (m *ReceiptMutation) OldDestChainID(ctx context.Context) (v uint64, err error)
OldDestChainID returns the old "dest_chain_id" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) 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 (*ReceiptMutation) OldGasUsed ¶
func (m *ReceiptMutation) OldGasUsed(ctx context.Context) (v uint64, err error)
OldGasUsed returns the old "gas_used" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldOffset ¶ added in v0.1.7
func (m *ReceiptMutation) OldOffset(ctx context.Context) (v uint64, err error)
OldOffset returns the old "offset" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldRelayerAddress ¶
func (m *ReceiptMutation) OldRelayerAddress(ctx context.Context) (v []byte, err error)
OldRelayerAddress returns the old "relayer_address" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldRevertReason ¶ added in v0.1.9
func (m *ReceiptMutation) OldRevertReason(ctx context.Context) (v string, err error)
OldRevertReason returns the old "revert_reason" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldSourceChainID ¶
func (m *ReceiptMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
OldSourceChainID returns the old "source_chain_id" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldSuccess ¶
func (m *ReceiptMutation) OldSuccess(ctx context.Context) (v bool, err error)
OldSuccess returns the old "success" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) OldTxHash ¶
func (m *ReceiptMutation) OldTxHash(ctx context.Context) (v []byte, err error)
OldTxHash returns the old "tx_hash" field's value of the Receipt entity. If the Receipt 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 (*ReceiptMutation) RelayerAddress ¶
func (m *ReceiptMutation) RelayerAddress() (r []byte, exists bool)
RelayerAddress returns the value of the "relayer_address" field in the mutation.
func (*ReceiptMutation) RemoveBlockIDs ¶ added in v0.1.7
func (m *ReceiptMutation) RemoveBlockIDs(ids ...int)
RemoveBlockIDs removes the "block" edge to the Block entity by IDs.
func (*ReceiptMutation) RemoveMsgIDs ¶ added in v0.1.3
func (m *ReceiptMutation) RemoveMsgIDs(ids ...int)
RemoveMsgIDs removes the "msgs" edge to the Msg entity by IDs.
func (*ReceiptMutation) RemovedBlockIDs ¶ added in v0.1.7
func (m *ReceiptMutation) RemovedBlockIDs() (ids []int)
RemovedBlock returns the removed IDs of the "block" edge to the Block entity.
func (*ReceiptMutation) RemovedEdges ¶
func (m *ReceiptMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReceiptMutation) RemovedIDs ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) RemovedMsgsIDs ¶ added in v0.1.3
func (m *ReceiptMutation) RemovedMsgsIDs() (ids []int)
RemovedMsgs returns the removed IDs of the "msgs" edge to the Msg entity.
func (*ReceiptMutation) ResetBlock ¶
func (m *ReceiptMutation) ResetBlock()
ResetBlock resets all changes to the "block" edge.
func (*ReceiptMutation) ResetBlockHash ¶ added in v0.1.7
func (m *ReceiptMutation) ResetBlockHash()
ResetBlockHash resets all changes to the "block_hash" field.
func (*ReceiptMutation) ResetCreatedAt ¶
func (m *ReceiptMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ReceiptMutation) ResetDestChainID ¶
func (m *ReceiptMutation) ResetDestChainID()
ResetDestChainID resets all changes to the "dest_chain_id" field.
func (*ReceiptMutation) ResetEdge ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) ResetField ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) ResetGasUsed ¶
func (m *ReceiptMutation) ResetGasUsed()
ResetGasUsed resets all changes to the "gas_used" field.
func (*ReceiptMutation) ResetMsgs ¶ added in v0.1.3
func (m *ReceiptMutation) ResetMsgs()
ResetMsgs resets all changes to the "msgs" edge.
func (*ReceiptMutation) ResetOffset ¶ added in v0.1.7
func (m *ReceiptMutation) ResetOffset()
ResetOffset resets all changes to the "offset" field.
func (*ReceiptMutation) ResetRelayerAddress ¶
func (m *ReceiptMutation) ResetRelayerAddress()
ResetRelayerAddress resets all changes to the "relayer_address" field.
func (*ReceiptMutation) ResetRevertReason ¶ added in v0.1.9
func (m *ReceiptMutation) ResetRevertReason()
ResetRevertReason resets all changes to the "revert_reason" field.
func (*ReceiptMutation) ResetSourceChainID ¶
func (m *ReceiptMutation) ResetSourceChainID()
ResetSourceChainID resets all changes to the "source_chain_id" field.
func (*ReceiptMutation) ResetSuccess ¶
func (m *ReceiptMutation) ResetSuccess()
ResetSuccess resets all changes to the "success" field.
func (*ReceiptMutation) ResetTxHash ¶
func (m *ReceiptMutation) ResetTxHash()
ResetTxHash resets all changes to the "tx_hash" field.
func (*ReceiptMutation) RevertReason ¶ added in v0.1.9
func (m *ReceiptMutation) RevertReason() (r string, exists bool)
RevertReason returns the value of the "revert_reason" field in the mutation.
func (*ReceiptMutation) RevertReasonCleared ¶ added in v0.1.9
func (m *ReceiptMutation) RevertReasonCleared() bool
RevertReasonCleared returns if the "revert_reason" field was cleared in this mutation.
func (*ReceiptMutation) SetBlockHash ¶ added in v0.1.7
func (m *ReceiptMutation) SetBlockHash(b []byte)
SetBlockHash sets the "block_hash" field.
func (*ReceiptMutation) SetCreatedAt ¶
func (m *ReceiptMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ReceiptMutation) SetDestChainID ¶
func (m *ReceiptMutation) SetDestChainID(u uint64)
SetDestChainID sets the "dest_chain_id" field.
func (*ReceiptMutation) SetField ¶
func (m *ReceiptMutation) 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 (*ReceiptMutation) SetGasUsed ¶
func (m *ReceiptMutation) SetGasUsed(u uint64)
SetGasUsed sets the "gas_used" field.
func (*ReceiptMutation) SetOffset ¶ added in v0.1.7
func (m *ReceiptMutation) SetOffset(u uint64)
SetOffset sets the "offset" field.
func (*ReceiptMutation) SetOp ¶
func (m *ReceiptMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ReceiptMutation) SetRelayerAddress ¶
func (m *ReceiptMutation) SetRelayerAddress(b []byte)
SetRelayerAddress sets the "relayer_address" field.
func (*ReceiptMutation) SetRevertReason ¶ added in v0.1.9
func (m *ReceiptMutation) SetRevertReason(s string)
SetRevertReason sets the "revert_reason" field.
func (*ReceiptMutation) SetSourceChainID ¶
func (m *ReceiptMutation) SetSourceChainID(u uint64)
SetSourceChainID sets the "source_chain_id" field.
func (*ReceiptMutation) SetSuccess ¶
func (m *ReceiptMutation) SetSuccess(b bool)
SetSuccess sets the "success" field.
func (*ReceiptMutation) SetTxHash ¶
func (m *ReceiptMutation) SetTxHash(b []byte)
SetTxHash sets the "tx_hash" field.
func (*ReceiptMutation) SourceChainID ¶
func (m *ReceiptMutation) SourceChainID() (r uint64, exists bool)
SourceChainID returns the value of the "source_chain_id" field in the mutation.
func (*ReceiptMutation) Success ¶
func (m *ReceiptMutation) Success() (r bool, exists bool)
Success returns the value of the "success" field in the mutation.
func (ReceiptMutation) Tx ¶
func (m ReceiptMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReceiptMutation) TxHash ¶
func (m *ReceiptMutation) TxHash() (r []byte, exists bool)
TxHash returns the value of the "tx_hash" field in the mutation.
func (*ReceiptMutation) Type ¶
func (m *ReceiptMutation) Type() string
Type returns the node type of this mutation (Receipt).
func (*ReceiptMutation) Where ¶
func (m *ReceiptMutation) Where(ps ...predicate.Receipt)
Where appends a list predicates to the ReceiptMutation builder.
func (*ReceiptMutation) WhereP ¶
func (m *ReceiptMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ReceiptMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ReceiptQuery ¶
type ReceiptQuery struct {
// contains filtered or unexported fields
}
ReceiptQuery is the builder for querying Receipt entities.
func (*ReceiptQuery) Aggregate ¶
func (rq *ReceiptQuery) Aggregate(fns ...AggregateFunc) *ReceiptSelect
Aggregate returns a ReceiptSelect configured with the given aggregations.
func (*ReceiptQuery) All ¶
func (rq *ReceiptQuery) All(ctx context.Context) ([]*Receipt, error)
All executes the query and returns a list of Receipts.
func (*ReceiptQuery) AllX ¶
func (rq *ReceiptQuery) AllX(ctx context.Context) []*Receipt
AllX is like All, but panics if an error occurs.
func (*ReceiptQuery) Clone ¶
func (rq *ReceiptQuery) Clone() *ReceiptQuery
Clone returns a duplicate of the ReceiptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReceiptQuery) Count ¶
func (rq *ReceiptQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReceiptQuery) CountX ¶
func (rq *ReceiptQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReceiptQuery) Exist ¶
func (rq *ReceiptQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReceiptQuery) ExistX ¶
func (rq *ReceiptQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReceiptQuery) Filter ¶
func (rq *ReceiptQuery) Filter() *ReceiptFilter
Filter returns a Filter implementation to apply filters on the ReceiptQuery builder.
func (*ReceiptQuery) First ¶
func (rq *ReceiptQuery) First(ctx context.Context) (*Receipt, error)
First returns the first Receipt entity from the query. Returns a *NotFoundError when no Receipt was found.
func (*ReceiptQuery) FirstID ¶
func (rq *ReceiptQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Receipt ID from the query. Returns a *NotFoundError when no Receipt ID was found.
func (*ReceiptQuery) FirstIDX ¶
func (rq *ReceiptQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReceiptQuery) FirstX ¶
func (rq *ReceiptQuery) FirstX(ctx context.Context) *Receipt
FirstX is like First, but panics if an error occurs.
func (*ReceiptQuery) GroupBy ¶
func (rq *ReceiptQuery) GroupBy(field string, fields ...string) *ReceiptGroupBy
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 { BlockHash []byte `json:"block_hash,omitempty"` Count int `json:"count,omitempty"` } client.Receipt.Query(). GroupBy(receipt.FieldBlockHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ReceiptQuery) IDs ¶
func (rq *ReceiptQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Receipt IDs.
func (*ReceiptQuery) IDsX ¶
func (rq *ReceiptQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ReceiptQuery) Limit ¶
func (rq *ReceiptQuery) Limit(limit int) *ReceiptQuery
Limit the number of records to be returned by this query.
func (*ReceiptQuery) Offset ¶
func (rq *ReceiptQuery) Offset(offset int) *ReceiptQuery
Offset to start from.
func (*ReceiptQuery) Only ¶
func (rq *ReceiptQuery) Only(ctx context.Context) (*Receipt, error)
Only returns a single Receipt entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Receipt entity is found. Returns a *NotFoundError when no Receipt entities are found.
func (*ReceiptQuery) OnlyID ¶
func (rq *ReceiptQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Receipt ID in the query. Returns a *NotSingularError when more than one Receipt ID is found. Returns a *NotFoundError when no entities are found.
func (*ReceiptQuery) OnlyIDX ¶
func (rq *ReceiptQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReceiptQuery) OnlyX ¶
func (rq *ReceiptQuery) OnlyX(ctx context.Context) *Receipt
OnlyX is like Only, but panics if an error occurs.
func (*ReceiptQuery) Order ¶
func (rq *ReceiptQuery) Order(o ...receipt.OrderOption) *ReceiptQuery
Order specifies how the records should be ordered.
func (*ReceiptQuery) QueryBlock ¶
func (rq *ReceiptQuery) QueryBlock() *BlockQuery
QueryBlock chains the current query on the "block" edge.
func (*ReceiptQuery) QueryMsgs ¶ added in v0.1.3
func (rq *ReceiptQuery) QueryMsgs() *MsgQuery
QueryMsgs chains the current query on the "msgs" edge.
func (*ReceiptQuery) Select ¶
func (rq *ReceiptQuery) Select(fields ...string) *ReceiptSelect
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 { BlockHash []byte `json:"block_hash,omitempty"` } client.Receipt.Query(). Select(receipt.FieldBlockHash). Scan(ctx, &v)
func (*ReceiptQuery) Unique ¶
func (rq *ReceiptQuery) Unique(unique bool) *ReceiptQuery
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 (*ReceiptQuery) Where ¶
func (rq *ReceiptQuery) Where(ps ...predicate.Receipt) *ReceiptQuery
Where adds a new predicate for the ReceiptQuery builder.
func (*ReceiptQuery) WithBlock ¶
func (rq *ReceiptQuery) WithBlock(opts ...func(*BlockQuery)) *ReceiptQuery
WithBlock tells the query-builder to eager-load the nodes that are connected to the "block" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReceiptQuery) WithMsgs ¶ added in v0.1.3
func (rq *ReceiptQuery) WithMsgs(opts ...func(*MsgQuery)) *ReceiptQuery
WithMsgs tells the query-builder to eager-load the nodes that are connected to the "msgs" edge. The optional arguments are used to configure the query builder of the edge.
type ReceiptSelect ¶
type ReceiptSelect struct { *ReceiptQuery // contains filtered or unexported fields }
ReceiptSelect is the builder for selecting fields of Receipt entities.
func (*ReceiptSelect) Aggregate ¶
func (rs *ReceiptSelect) Aggregate(fns ...AggregateFunc) *ReceiptSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ReceiptSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReceiptSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReceiptSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReceiptSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReceiptSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReceiptSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReceiptSelect) Scan ¶
func (rs *ReceiptSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReceiptSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReceiptUpdate ¶
type ReceiptUpdate struct {
// contains filtered or unexported fields
}
ReceiptUpdate is the builder for updating Receipt entities.
func (*ReceiptUpdate) AddBlock ¶ added in v0.1.7
func (ru *ReceiptUpdate) AddBlock(b ...*Block) *ReceiptUpdate
AddBlock adds the "block" edges to the Block entity.
func (*ReceiptUpdate) AddBlockIDs ¶ added in v0.1.7
func (ru *ReceiptUpdate) AddBlockIDs(ids ...int) *ReceiptUpdate
AddBlockIDs adds the "block" edge to the Block entity by IDs.
func (*ReceiptUpdate) AddDestChainID ¶
func (ru *ReceiptUpdate) AddDestChainID(u int64) *ReceiptUpdate
AddDestChainID adds u to the "dest_chain_id" field.
func (*ReceiptUpdate) AddGasUsed ¶
func (ru *ReceiptUpdate) AddGasUsed(u int64) *ReceiptUpdate
AddGasUsed adds u to the "gas_used" field.
func (*ReceiptUpdate) AddMsgIDs ¶ added in v0.1.3
func (ru *ReceiptUpdate) AddMsgIDs(ids ...int) *ReceiptUpdate
AddMsgIDs adds the "msgs" edge to the Msg entity by IDs.
func (*ReceiptUpdate) AddMsgs ¶ added in v0.1.3
func (ru *ReceiptUpdate) AddMsgs(m ...*Msg) *ReceiptUpdate
AddMsgs adds the "msgs" edges to the Msg entity.
func (*ReceiptUpdate) AddOffset ¶ added in v0.1.7
func (ru *ReceiptUpdate) AddOffset(u int64) *ReceiptUpdate
AddOffset adds u to the "offset" field.
func (*ReceiptUpdate) AddSourceChainID ¶
func (ru *ReceiptUpdate) AddSourceChainID(u int64) *ReceiptUpdate
AddSourceChainID adds u to the "source_chain_id" field.
func (*ReceiptUpdate) ClearBlock ¶
func (ru *ReceiptUpdate) ClearBlock() *ReceiptUpdate
ClearBlock clears all "block" edges to the Block entity.
func (*ReceiptUpdate) ClearMsgs ¶ added in v0.1.3
func (ru *ReceiptUpdate) ClearMsgs() *ReceiptUpdate
ClearMsgs clears all "msgs" edges to the Msg entity.
func (*ReceiptUpdate) ClearRevertReason ¶ added in v0.1.9
func (ru *ReceiptUpdate) ClearRevertReason() *ReceiptUpdate
ClearRevertReason clears the value of the "revert_reason" field.
func (*ReceiptUpdate) Exec ¶
func (ru *ReceiptUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReceiptUpdate) ExecX ¶
func (ru *ReceiptUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReceiptUpdate) Mutation ¶
func (ru *ReceiptUpdate) Mutation() *ReceiptMutation
Mutation returns the ReceiptMutation object of the builder.
func (*ReceiptUpdate) RemoveBlock ¶ added in v0.1.7
func (ru *ReceiptUpdate) RemoveBlock(b ...*Block) *ReceiptUpdate
RemoveBlock removes "block" edges to Block entities.
func (*ReceiptUpdate) RemoveBlockIDs ¶ added in v0.1.7
func (ru *ReceiptUpdate) RemoveBlockIDs(ids ...int) *ReceiptUpdate
RemoveBlockIDs removes the "block" edge to Block entities by IDs.
func (*ReceiptUpdate) RemoveMsgIDs ¶ added in v0.1.3
func (ru *ReceiptUpdate) RemoveMsgIDs(ids ...int) *ReceiptUpdate
RemoveMsgIDs removes the "msgs" edge to Msg entities by IDs.
func (*ReceiptUpdate) RemoveMsgs ¶ added in v0.1.3
func (ru *ReceiptUpdate) RemoveMsgs(m ...*Msg) *ReceiptUpdate
RemoveMsgs removes "msgs" edges to Msg entities.
func (*ReceiptUpdate) Save ¶
func (ru *ReceiptUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReceiptUpdate) SaveX ¶
func (ru *ReceiptUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReceiptUpdate) SetBlockHash ¶ added in v0.1.7
func (ru *ReceiptUpdate) SetBlockHash(b []byte) *ReceiptUpdate
SetBlockHash sets the "block_hash" field.
func (*ReceiptUpdate) SetCreatedAt ¶
func (ru *ReceiptUpdate) SetCreatedAt(t time.Time) *ReceiptUpdate
SetCreatedAt sets the "created_at" field.
func (*ReceiptUpdate) SetDestChainID ¶
func (ru *ReceiptUpdate) SetDestChainID(u uint64) *ReceiptUpdate
SetDestChainID sets the "dest_chain_id" field.
func (*ReceiptUpdate) SetGasUsed ¶
func (ru *ReceiptUpdate) SetGasUsed(u uint64) *ReceiptUpdate
SetGasUsed sets the "gas_used" field.
func (*ReceiptUpdate) SetNillableCreatedAt ¶
func (ru *ReceiptUpdate) SetNillableCreatedAt(t *time.Time) *ReceiptUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableDestChainID ¶
func (ru *ReceiptUpdate) SetNillableDestChainID(u *uint64) *ReceiptUpdate
SetNillableDestChainID sets the "dest_chain_id" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableGasUsed ¶
func (ru *ReceiptUpdate) SetNillableGasUsed(u *uint64) *ReceiptUpdate
SetNillableGasUsed sets the "gas_used" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableOffset ¶ added in v0.1.7
func (ru *ReceiptUpdate) SetNillableOffset(u *uint64) *ReceiptUpdate
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableRevertReason ¶ added in v0.1.9
func (ru *ReceiptUpdate) SetNillableRevertReason(s *string) *ReceiptUpdate
SetNillableRevertReason sets the "revert_reason" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableSourceChainID ¶
func (ru *ReceiptUpdate) SetNillableSourceChainID(u *uint64) *ReceiptUpdate
SetNillableSourceChainID sets the "source_chain_id" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableSuccess ¶
func (ru *ReceiptUpdate) SetNillableSuccess(b *bool) *ReceiptUpdate
SetNillableSuccess sets the "success" field if the given value is not nil.
func (*ReceiptUpdate) SetOffset ¶ added in v0.1.7
func (ru *ReceiptUpdate) SetOffset(u uint64) *ReceiptUpdate
SetOffset sets the "offset" field.
func (*ReceiptUpdate) SetRelayerAddress ¶
func (ru *ReceiptUpdate) SetRelayerAddress(b []byte) *ReceiptUpdate
SetRelayerAddress sets the "relayer_address" field.
func (*ReceiptUpdate) SetRevertReason ¶ added in v0.1.9
func (ru *ReceiptUpdate) SetRevertReason(s string) *ReceiptUpdate
SetRevertReason sets the "revert_reason" field.
func (*ReceiptUpdate) SetSourceChainID ¶
func (ru *ReceiptUpdate) SetSourceChainID(u uint64) *ReceiptUpdate
SetSourceChainID sets the "source_chain_id" field.
func (*ReceiptUpdate) SetSuccess ¶
func (ru *ReceiptUpdate) SetSuccess(b bool) *ReceiptUpdate
SetSuccess sets the "success" field.
func (*ReceiptUpdate) SetTxHash ¶
func (ru *ReceiptUpdate) SetTxHash(b []byte) *ReceiptUpdate
SetTxHash sets the "tx_hash" field.
func (*ReceiptUpdate) Where ¶
func (ru *ReceiptUpdate) Where(ps ...predicate.Receipt) *ReceiptUpdate
Where appends a list predicates to the ReceiptUpdate builder.
type ReceiptUpdateOne ¶
type ReceiptUpdateOne struct {
// contains filtered or unexported fields
}
ReceiptUpdateOne is the builder for updating a single Receipt entity.
func (*ReceiptUpdateOne) AddBlock ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) AddBlock(b ...*Block) *ReceiptUpdateOne
AddBlock adds the "block" edges to the Block entity.
func (*ReceiptUpdateOne) AddBlockIDs ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) AddBlockIDs(ids ...int) *ReceiptUpdateOne
AddBlockIDs adds the "block" edge to the Block entity by IDs.
func (*ReceiptUpdateOne) AddDestChainID ¶
func (ruo *ReceiptUpdateOne) AddDestChainID(u int64) *ReceiptUpdateOne
AddDestChainID adds u to the "dest_chain_id" field.
func (*ReceiptUpdateOne) AddGasUsed ¶
func (ruo *ReceiptUpdateOne) AddGasUsed(u int64) *ReceiptUpdateOne
AddGasUsed adds u to the "gas_used" field.
func (*ReceiptUpdateOne) AddMsgIDs ¶ added in v0.1.3
func (ruo *ReceiptUpdateOne) AddMsgIDs(ids ...int) *ReceiptUpdateOne
AddMsgIDs adds the "msgs" edge to the Msg entity by IDs.
func (*ReceiptUpdateOne) AddMsgs ¶ added in v0.1.3
func (ruo *ReceiptUpdateOne) AddMsgs(m ...*Msg) *ReceiptUpdateOne
AddMsgs adds the "msgs" edges to the Msg entity.
func (*ReceiptUpdateOne) AddOffset ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) AddOffset(u int64) *ReceiptUpdateOne
AddOffset adds u to the "offset" field.
func (*ReceiptUpdateOne) AddSourceChainID ¶
func (ruo *ReceiptUpdateOne) AddSourceChainID(u int64) *ReceiptUpdateOne
AddSourceChainID adds u to the "source_chain_id" field.
func (*ReceiptUpdateOne) ClearBlock ¶
func (ruo *ReceiptUpdateOne) ClearBlock() *ReceiptUpdateOne
ClearBlock clears all "block" edges to the Block entity.
func (*ReceiptUpdateOne) ClearMsgs ¶ added in v0.1.3
func (ruo *ReceiptUpdateOne) ClearMsgs() *ReceiptUpdateOne
ClearMsgs clears all "msgs" edges to the Msg entity.
func (*ReceiptUpdateOne) ClearRevertReason ¶ added in v0.1.9
func (ruo *ReceiptUpdateOne) ClearRevertReason() *ReceiptUpdateOne
ClearRevertReason clears the value of the "revert_reason" field.
func (*ReceiptUpdateOne) Exec ¶
func (ruo *ReceiptUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReceiptUpdateOne) ExecX ¶
func (ruo *ReceiptUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReceiptUpdateOne) Mutation ¶
func (ruo *ReceiptUpdateOne) Mutation() *ReceiptMutation
Mutation returns the ReceiptMutation object of the builder.
func (*ReceiptUpdateOne) RemoveBlock ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) RemoveBlock(b ...*Block) *ReceiptUpdateOne
RemoveBlock removes "block" edges to Block entities.
func (*ReceiptUpdateOne) RemoveBlockIDs ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) RemoveBlockIDs(ids ...int) *ReceiptUpdateOne
RemoveBlockIDs removes the "block" edge to Block entities by IDs.
func (*ReceiptUpdateOne) RemoveMsgIDs ¶ added in v0.1.3
func (ruo *ReceiptUpdateOne) RemoveMsgIDs(ids ...int) *ReceiptUpdateOne
RemoveMsgIDs removes the "msgs" edge to Msg entities by IDs.
func (*ReceiptUpdateOne) RemoveMsgs ¶ added in v0.1.3
func (ruo *ReceiptUpdateOne) RemoveMsgs(m ...*Msg) *ReceiptUpdateOne
RemoveMsgs removes "msgs" edges to Msg entities.
func (*ReceiptUpdateOne) Save ¶
func (ruo *ReceiptUpdateOne) Save(ctx context.Context) (*Receipt, error)
Save executes the query and returns the updated Receipt entity.
func (*ReceiptUpdateOne) SaveX ¶
func (ruo *ReceiptUpdateOne) SaveX(ctx context.Context) *Receipt
SaveX is like Save, but panics if an error occurs.
func (*ReceiptUpdateOne) Select ¶
func (ruo *ReceiptUpdateOne) Select(field string, fields ...string) *ReceiptUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReceiptUpdateOne) SetBlockHash ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) SetBlockHash(b []byte) *ReceiptUpdateOne
SetBlockHash sets the "block_hash" field.
func (*ReceiptUpdateOne) SetCreatedAt ¶
func (ruo *ReceiptUpdateOne) SetCreatedAt(t time.Time) *ReceiptUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ReceiptUpdateOne) SetDestChainID ¶
func (ruo *ReceiptUpdateOne) SetDestChainID(u uint64) *ReceiptUpdateOne
SetDestChainID sets the "dest_chain_id" field.
func (*ReceiptUpdateOne) SetGasUsed ¶
func (ruo *ReceiptUpdateOne) SetGasUsed(u uint64) *ReceiptUpdateOne
SetGasUsed sets the "gas_used" field.
func (*ReceiptUpdateOne) SetNillableCreatedAt ¶
func (ruo *ReceiptUpdateOne) SetNillableCreatedAt(t *time.Time) *ReceiptUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableDestChainID ¶
func (ruo *ReceiptUpdateOne) SetNillableDestChainID(u *uint64) *ReceiptUpdateOne
SetNillableDestChainID sets the "dest_chain_id" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableGasUsed ¶
func (ruo *ReceiptUpdateOne) SetNillableGasUsed(u *uint64) *ReceiptUpdateOne
SetNillableGasUsed sets the "gas_used" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableOffset ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) SetNillableOffset(u *uint64) *ReceiptUpdateOne
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableRevertReason ¶ added in v0.1.9
func (ruo *ReceiptUpdateOne) SetNillableRevertReason(s *string) *ReceiptUpdateOne
SetNillableRevertReason sets the "revert_reason" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableSourceChainID ¶
func (ruo *ReceiptUpdateOne) SetNillableSourceChainID(u *uint64) *ReceiptUpdateOne
SetNillableSourceChainID sets the "source_chain_id" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableSuccess ¶
func (ruo *ReceiptUpdateOne) SetNillableSuccess(b *bool) *ReceiptUpdateOne
SetNillableSuccess sets the "success" field if the given value is not nil.
func (*ReceiptUpdateOne) SetOffset ¶ added in v0.1.7
func (ruo *ReceiptUpdateOne) SetOffset(u uint64) *ReceiptUpdateOne
SetOffset sets the "offset" field.
func (*ReceiptUpdateOne) SetRelayerAddress ¶
func (ruo *ReceiptUpdateOne) SetRelayerAddress(b []byte) *ReceiptUpdateOne
SetRelayerAddress sets the "relayer_address" field.
func (*ReceiptUpdateOne) SetRevertReason ¶ added in v0.1.9
func (ruo *ReceiptUpdateOne) SetRevertReason(s string) *ReceiptUpdateOne
SetRevertReason sets the "revert_reason" field.
func (*ReceiptUpdateOne) SetSourceChainID ¶
func (ruo *ReceiptUpdateOne) SetSourceChainID(u uint64) *ReceiptUpdateOne
SetSourceChainID sets the "source_chain_id" field.
func (*ReceiptUpdateOne) SetSuccess ¶
func (ruo *ReceiptUpdateOne) SetSuccess(b bool) *ReceiptUpdateOne
SetSuccess sets the "success" field.
func (*ReceiptUpdateOne) SetTxHash ¶
func (ruo *ReceiptUpdateOne) SetTxHash(b []byte) *ReceiptUpdateOne
SetTxHash sets the "tx_hash" field.
func (*ReceiptUpdateOne) Where ¶
func (ruo *ReceiptUpdateOne) Where(ps ...predicate.Receipt) *ReceiptUpdateOne
Where appends a list predicates to the ReceiptUpdate 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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Block is the client for interacting with the Block builders. Block *BlockClient // Chain is the client for interacting with the Chain builders. Chain *ChainClient // Msg is the client for interacting with the Msg builders. Msg *MsgClient // Receipt is the client for interacting with the Receipt builders. Receipt *ReceiptClient // XProviderCursor is the client for interacting with the XProviderCursor builders. XProviderCursor *XProviderCursorClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field 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.
type XProviderCursor ¶
type XProviderCursor struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // ChainID holds the value of the "chain_id" field. ChainID uint64 `json:"chain_id,omitempty"` // Height holds the value of the "height" field. Height uint64 `json:"height,omitempty"` // Offset holds the value of the "offset" field. Offset uint64 `json:"offset,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // contains filtered or unexported fields }
XProviderCursor is the model entity for the XProviderCursor schema.
func (*XProviderCursor) String ¶
func (xc *XProviderCursor) String() string
String implements the fmt.Stringer.
func (*XProviderCursor) Unwrap ¶
func (xc *XProviderCursor) Unwrap() *XProviderCursor
Unwrap unwraps the XProviderCursor 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 (*XProviderCursor) Update ¶
func (xc *XProviderCursor) Update() *XProviderCursorUpdateOne
Update returns a builder for updating this XProviderCursor. Note that you need to call XProviderCursor.Unwrap() before calling this method if this XProviderCursor was returned from a transaction, and the transaction was committed or rolled back.
type XProviderCursorClient ¶
type XProviderCursorClient struct {
// contains filtered or unexported fields
}
XProviderCursorClient is a client for the XProviderCursor schema.
func NewXProviderCursorClient ¶
func NewXProviderCursorClient(c config) *XProviderCursorClient
NewXProviderCursorClient returns a client for the XProviderCursor from the given config.
func (*XProviderCursorClient) Create ¶
func (c *XProviderCursorClient) Create() *XProviderCursorCreate
Create returns a builder for creating a XProviderCursor entity.
func (*XProviderCursorClient) CreateBulk ¶
func (c *XProviderCursorClient) CreateBulk(builders ...*XProviderCursorCreate) *XProviderCursorCreateBulk
CreateBulk returns a builder for creating a bulk of XProviderCursor entities.
func (*XProviderCursorClient) Delete ¶
func (c *XProviderCursorClient) Delete() *XProviderCursorDelete
Delete returns a delete builder for XProviderCursor.
func (*XProviderCursorClient) DeleteOne ¶
func (c *XProviderCursorClient) DeleteOne(xc *XProviderCursor) *XProviderCursorDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*XProviderCursorClient) DeleteOneID ¶
func (c *XProviderCursorClient) DeleteOneID(id uuid.UUID) *XProviderCursorDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*XProviderCursorClient) Get ¶
func (c *XProviderCursorClient) Get(ctx context.Context, id uuid.UUID) (*XProviderCursor, error)
Get returns a XProviderCursor entity by its id.
func (*XProviderCursorClient) GetX ¶
func (c *XProviderCursorClient) GetX(ctx context.Context, id uuid.UUID) *XProviderCursor
GetX is like Get, but panics if an error occurs.
func (*XProviderCursorClient) Hooks ¶
func (c *XProviderCursorClient) Hooks() []Hook
Hooks returns the client hooks.
func (*XProviderCursorClient) Intercept ¶
func (c *XProviderCursorClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `xprovidercursor.Intercept(f(g(h())))`.
func (*XProviderCursorClient) Interceptors ¶
func (c *XProviderCursorClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*XProviderCursorClient) MapCreateBulk ¶
func (c *XProviderCursorClient) MapCreateBulk(slice any, setFunc func(*XProviderCursorCreate, int)) *XProviderCursorCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*XProviderCursorClient) Query ¶
func (c *XProviderCursorClient) Query() *XProviderCursorQuery
Query returns a query builder for XProviderCursor.
func (*XProviderCursorClient) Update ¶
func (c *XProviderCursorClient) Update() *XProviderCursorUpdate
Update returns an update builder for XProviderCursor.
func (*XProviderCursorClient) UpdateOne ¶
func (c *XProviderCursorClient) UpdateOne(xc *XProviderCursor) *XProviderCursorUpdateOne
UpdateOne returns an update builder for the given entity.
func (*XProviderCursorClient) UpdateOneID ¶
func (c *XProviderCursorClient) UpdateOneID(id uuid.UUID) *XProviderCursorUpdateOne
UpdateOneID returns an update builder for the given id.
func (*XProviderCursorClient) Use ¶
func (c *XProviderCursorClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `xprovidercursor.Hooks(f(g(h())))`.
type XProviderCursorCreate ¶
type XProviderCursorCreate struct {
// contains filtered or unexported fields
}
XProviderCursorCreate is the builder for creating a XProviderCursor entity.
func (*XProviderCursorCreate) Exec ¶
func (xcc *XProviderCursorCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*XProviderCursorCreate) ExecX ¶
func (xcc *XProviderCursorCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*XProviderCursorCreate) Mutation ¶
func (xcc *XProviderCursorCreate) Mutation() *XProviderCursorMutation
Mutation returns the XProviderCursorMutation object of the builder.
func (*XProviderCursorCreate) Save ¶
func (xcc *XProviderCursorCreate) Save(ctx context.Context) (*XProviderCursor, error)
Save creates the XProviderCursor in the database.
func (*XProviderCursorCreate) SaveX ¶
func (xcc *XProviderCursorCreate) SaveX(ctx context.Context) *XProviderCursor
SaveX calls Save and panics if Save returns an error.
func (*XProviderCursorCreate) SetChainID ¶
func (xcc *XProviderCursorCreate) SetChainID(u uint64) *XProviderCursorCreate
SetChainID sets the "chain_id" field.
func (*XProviderCursorCreate) SetCreatedAt ¶
func (xcc *XProviderCursorCreate) SetCreatedAt(t time.Time) *XProviderCursorCreate
SetCreatedAt sets the "created_at" field.
func (*XProviderCursorCreate) SetHeight ¶
func (xcc *XProviderCursorCreate) SetHeight(u uint64) *XProviderCursorCreate
SetHeight sets the "height" field.
func (*XProviderCursorCreate) SetID ¶ added in v0.1.7
func (xcc *XProviderCursorCreate) SetID(u uuid.UUID) *XProviderCursorCreate
SetID sets the "id" field.
func (*XProviderCursorCreate) SetNillableCreatedAt ¶
func (xcc *XProviderCursorCreate) SetNillableCreatedAt(t *time.Time) *XProviderCursorCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*XProviderCursorCreate) SetNillableID ¶ added in v0.1.7
func (xcc *XProviderCursorCreate) SetNillableID(u *uuid.UUID) *XProviderCursorCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*XProviderCursorCreate) SetNillableUpdatedAt ¶
func (xcc *XProviderCursorCreate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*XProviderCursorCreate) SetOffset ¶ added in v0.1.7
func (xcc *XProviderCursorCreate) SetOffset(u uint64) *XProviderCursorCreate
SetOffset sets the "offset" field.
func (*XProviderCursorCreate) SetUpdatedAt ¶
func (xcc *XProviderCursorCreate) SetUpdatedAt(t time.Time) *XProviderCursorCreate
SetUpdatedAt sets the "updated_at" field.
type XProviderCursorCreateBulk ¶
type XProviderCursorCreateBulk struct {
// contains filtered or unexported fields
}
XProviderCursorCreateBulk is the builder for creating many XProviderCursor entities in bulk.
func (*XProviderCursorCreateBulk) Exec ¶
func (xccb *XProviderCursorCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*XProviderCursorCreateBulk) ExecX ¶
func (xccb *XProviderCursorCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*XProviderCursorCreateBulk) Save ¶
func (xccb *XProviderCursorCreateBulk) Save(ctx context.Context) ([]*XProviderCursor, error)
Save creates the XProviderCursor entities in the database.
func (*XProviderCursorCreateBulk) SaveX ¶
func (xccb *XProviderCursorCreateBulk) SaveX(ctx context.Context) []*XProviderCursor
SaveX is like Save, but panics if an error occurs.
type XProviderCursorDelete ¶
type XProviderCursorDelete struct {
// contains filtered or unexported fields
}
XProviderCursorDelete is the builder for deleting a XProviderCursor entity.
func (*XProviderCursorDelete) Exec ¶
func (xcd *XProviderCursorDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*XProviderCursorDelete) ExecX ¶
func (xcd *XProviderCursorDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*XProviderCursorDelete) Where ¶
func (xcd *XProviderCursorDelete) Where(ps ...predicate.XProviderCursor) *XProviderCursorDelete
Where appends a list predicates to the XProviderCursorDelete builder.
type XProviderCursorDeleteOne ¶
type XProviderCursorDeleteOne struct {
// contains filtered or unexported fields
}
XProviderCursorDeleteOne is the builder for deleting a single XProviderCursor entity.
func (*XProviderCursorDeleteOne) Exec ¶
func (xcdo *XProviderCursorDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*XProviderCursorDeleteOne) ExecX ¶
func (xcdo *XProviderCursorDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*XProviderCursorDeleteOne) Where ¶
func (xcdo *XProviderCursorDeleteOne) Where(ps ...predicate.XProviderCursor) *XProviderCursorDeleteOne
Where appends a list predicates to the XProviderCursorDelete builder.
type XProviderCursorFilter ¶
type XProviderCursorFilter struct {
// contains filtered or unexported fields
}
XProviderCursorFilter provides a generic filtering capability at runtime for XProviderCursorQuery.
func (*XProviderCursorFilter) Where ¶
func (f *XProviderCursorFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*XProviderCursorFilter) WhereChainID ¶
func (f *XProviderCursorFilter) WhereChainID(p entql.Uint64P)
WhereChainID applies the entql uint64 predicate on the chain_id field.
func (*XProviderCursorFilter) WhereCreatedAt ¶
func (f *XProviderCursorFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*XProviderCursorFilter) WhereHeight ¶
func (f *XProviderCursorFilter) WhereHeight(p entql.Uint64P)
WhereHeight applies the entql uint64 predicate on the height field.
func (*XProviderCursorFilter) WhereID ¶
func (f *XProviderCursorFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*XProviderCursorFilter) WhereOffset ¶ added in v0.1.7
func (f *XProviderCursorFilter) WhereOffset(p entql.Uint64P)
WhereOffset applies the entql uint64 predicate on the offset field.
func (*XProviderCursorFilter) WhereUpdatedAt ¶
func (f *XProviderCursorFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type XProviderCursorGroupBy ¶
type XProviderCursorGroupBy struct {
// contains filtered or unexported fields
}
XProviderCursorGroupBy is the group-by builder for XProviderCursor entities.
func (*XProviderCursorGroupBy) Aggregate ¶
func (xcgb *XProviderCursorGroupBy) Aggregate(fns ...AggregateFunc) *XProviderCursorGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*XProviderCursorGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*XProviderCursorGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*XProviderCursorGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*XProviderCursorGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*XProviderCursorGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*XProviderCursorGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*XProviderCursorGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*XProviderCursorGroupBy) Scan ¶
func (xcgb *XProviderCursorGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*XProviderCursorGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type XProviderCursorMutation ¶
type XProviderCursorMutation struct {
// contains filtered or unexported fields
}
XProviderCursorMutation represents an operation that mutates the XProviderCursor nodes in the graph.
func (*XProviderCursorMutation) AddChainID ¶
func (m *XProviderCursorMutation) AddChainID(u int64)
AddChainID adds u to the "chain_id" field.
func (*XProviderCursorMutation) AddField ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) AddHeight ¶
func (m *XProviderCursorMutation) AddHeight(u int64)
AddHeight adds u to the "height" field.
func (*XProviderCursorMutation) AddOffset ¶ added in v0.1.7
func (m *XProviderCursorMutation) AddOffset(u int64)
AddOffset adds u to the "offset" field.
func (*XProviderCursorMutation) AddedChainID ¶
func (m *XProviderCursorMutation) AddedChainID() (r int64, exists bool)
AddedChainID returns the value that was added to the "chain_id" field in this mutation.
func (*XProviderCursorMutation) AddedEdges ¶
func (m *XProviderCursorMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*XProviderCursorMutation) AddedField ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) AddedFields ¶
func (m *XProviderCursorMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*XProviderCursorMutation) AddedHeight ¶
func (m *XProviderCursorMutation) AddedHeight() (r int64, exists bool)
AddedHeight returns the value that was added to the "height" field in this mutation.
func (*XProviderCursorMutation) AddedIDs ¶
func (m *XProviderCursorMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*XProviderCursorMutation) AddedOffset ¶ added in v0.1.7
func (m *XProviderCursorMutation) AddedOffset() (r int64, exists bool)
AddedOffset returns the value that was added to the "offset" field in this mutation.
func (*XProviderCursorMutation) ChainID ¶
func (m *XProviderCursorMutation) ChainID() (r uint64, exists bool)
ChainID returns the value of the "chain_id" field in the mutation.
func (*XProviderCursorMutation) ClearEdge ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) ClearField ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) ClearedEdges ¶
func (m *XProviderCursorMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*XProviderCursorMutation) ClearedFields ¶
func (m *XProviderCursorMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (XProviderCursorMutation) Client ¶
func (m XProviderCursorMutation) 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 (*XProviderCursorMutation) CreatedAt ¶
func (m *XProviderCursorMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*XProviderCursorMutation) EdgeCleared ¶
func (m *XProviderCursorMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*XProviderCursorMutation) Field ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) FieldCleared ¶
func (m *XProviderCursorMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*XProviderCursorMutation) Fields ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) Filter ¶
func (m *XProviderCursorMutation) Filter() *XProviderCursorFilter
Filter returns an entql.Where implementation to apply filters on the XProviderCursorMutation builder.
func (*XProviderCursorMutation) Height ¶
func (m *XProviderCursorMutation) Height() (r uint64, exists bool)
Height returns the value of the "height" field in the mutation.
func (*XProviderCursorMutation) ID ¶
func (m *XProviderCursorMutation) ID() (id uuid.UUID, 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 (*XProviderCursorMutation) IDs ¶
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 (*XProviderCursorMutation) Offset ¶ added in v0.1.7
func (m *XProviderCursorMutation) Offset() (r uint64, exists bool)
Offset returns the value of the "offset" field in the mutation.
func (*XProviderCursorMutation) OldChainID ¶
func (m *XProviderCursorMutation) OldChainID(ctx context.Context) (v uint64, err error)
OldChainID returns the old "chain_id" field's value of the XProviderCursor entity. If the XProviderCursor 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 (*XProviderCursorMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the XProviderCursor entity. If the XProviderCursor 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 (*XProviderCursorMutation) 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 (*XProviderCursorMutation) OldHeight ¶
func (m *XProviderCursorMutation) OldHeight(ctx context.Context) (v uint64, err error)
OldHeight returns the old "height" field's value of the XProviderCursor entity. If the XProviderCursor 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 (*XProviderCursorMutation) OldOffset ¶ added in v0.1.7
func (m *XProviderCursorMutation) OldOffset(ctx context.Context) (v uint64, err error)
OldOffset returns the old "offset" field's value of the XProviderCursor entity. If the XProviderCursor 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 (*XProviderCursorMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the XProviderCursor entity. If the XProviderCursor 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 (*XProviderCursorMutation) Op ¶
func (m *XProviderCursorMutation) Op() Op
Op returns the operation name.
func (*XProviderCursorMutation) RemovedEdges ¶
func (m *XProviderCursorMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*XProviderCursorMutation) RemovedIDs ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) ResetChainID ¶
func (m *XProviderCursorMutation) ResetChainID()
ResetChainID resets all changes to the "chain_id" field.
func (*XProviderCursorMutation) ResetCreatedAt ¶
func (m *XProviderCursorMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*XProviderCursorMutation) ResetEdge ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) ResetField ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) ResetHeight ¶
func (m *XProviderCursorMutation) ResetHeight()
ResetHeight resets all changes to the "height" field.
func (*XProviderCursorMutation) ResetOffset ¶ added in v0.1.7
func (m *XProviderCursorMutation) ResetOffset()
ResetOffset resets all changes to the "offset" field.
func (*XProviderCursorMutation) ResetUpdatedAt ¶
func (m *XProviderCursorMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*XProviderCursorMutation) SetChainID ¶
func (m *XProviderCursorMutation) SetChainID(u uint64)
SetChainID sets the "chain_id" field.
func (*XProviderCursorMutation) SetCreatedAt ¶
func (m *XProviderCursorMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*XProviderCursorMutation) SetField ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) SetHeight ¶
func (m *XProviderCursorMutation) SetHeight(u uint64)
SetHeight sets the "height" field.
func (*XProviderCursorMutation) SetID ¶ added in v0.1.7
func (m *XProviderCursorMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of XProviderCursor entities.
func (*XProviderCursorMutation) SetOffset ¶ added in v0.1.7
func (m *XProviderCursorMutation) SetOffset(u uint64)
SetOffset sets the "offset" field.
func (*XProviderCursorMutation) SetOp ¶
func (m *XProviderCursorMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*XProviderCursorMutation) SetUpdatedAt ¶
func (m *XProviderCursorMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (XProviderCursorMutation) Tx ¶
func (m XProviderCursorMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*XProviderCursorMutation) Type ¶
func (m *XProviderCursorMutation) Type() string
Type returns the node type of this mutation (XProviderCursor).
func (*XProviderCursorMutation) UpdatedAt ¶
func (m *XProviderCursorMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*XProviderCursorMutation) Where ¶
func (m *XProviderCursorMutation) Where(ps ...predicate.XProviderCursor)
Where appends a list predicates to the XProviderCursorMutation builder.
func (*XProviderCursorMutation) WhereP ¶
func (m *XProviderCursorMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the XProviderCursorMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type XProviderCursorQuery ¶
type XProviderCursorQuery struct {
// contains filtered or unexported fields
}
XProviderCursorQuery is the builder for querying XProviderCursor entities.
func (*XProviderCursorQuery) Aggregate ¶
func (xcq *XProviderCursorQuery) Aggregate(fns ...AggregateFunc) *XProviderCursorSelect
Aggregate returns a XProviderCursorSelect configured with the given aggregations.
func (*XProviderCursorQuery) All ¶
func (xcq *XProviderCursorQuery) All(ctx context.Context) ([]*XProviderCursor, error)
All executes the query and returns a list of XProviderCursors.
func (*XProviderCursorQuery) AllX ¶
func (xcq *XProviderCursorQuery) AllX(ctx context.Context) []*XProviderCursor
AllX is like All, but panics if an error occurs.
func (*XProviderCursorQuery) Clone ¶
func (xcq *XProviderCursorQuery) Clone() *XProviderCursorQuery
Clone returns a duplicate of the XProviderCursorQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*XProviderCursorQuery) Count ¶
func (xcq *XProviderCursorQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*XProviderCursorQuery) CountX ¶
func (xcq *XProviderCursorQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*XProviderCursorQuery) Exist ¶
func (xcq *XProviderCursorQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*XProviderCursorQuery) ExistX ¶
func (xcq *XProviderCursorQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*XProviderCursorQuery) Filter ¶
func (xcq *XProviderCursorQuery) Filter() *XProviderCursorFilter
Filter returns a Filter implementation to apply filters on the XProviderCursorQuery builder.
func (*XProviderCursorQuery) First ¶
func (xcq *XProviderCursorQuery) First(ctx context.Context) (*XProviderCursor, error)
First returns the first XProviderCursor entity from the query. Returns a *NotFoundError when no XProviderCursor was found.
func (*XProviderCursorQuery) FirstID ¶
FirstID returns the first XProviderCursor ID from the query. Returns a *NotFoundError when no XProviderCursor ID was found.
func (*XProviderCursorQuery) FirstIDX ¶
func (xcq *XProviderCursorQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*XProviderCursorQuery) FirstX ¶
func (xcq *XProviderCursorQuery) FirstX(ctx context.Context) *XProviderCursor
FirstX is like First, but panics if an error occurs.
func (*XProviderCursorQuery) GroupBy ¶
func (xcq *XProviderCursorQuery) GroupBy(field string, fields ...string) *XProviderCursorGroupBy
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 { ChainID uint64 `json:"chain_id,omitempty"` Count int `json:"count,omitempty"` } client.XProviderCursor.Query(). GroupBy(xprovidercursor.FieldChainID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*XProviderCursorQuery) IDs ¶
IDs executes the query and returns a list of XProviderCursor IDs.
func (*XProviderCursorQuery) IDsX ¶
func (xcq *XProviderCursorQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*XProviderCursorQuery) Limit ¶
func (xcq *XProviderCursorQuery) Limit(limit int) *XProviderCursorQuery
Limit the number of records to be returned by this query.
func (*XProviderCursorQuery) Offset ¶
func (xcq *XProviderCursorQuery) Offset(offset int) *XProviderCursorQuery
Offset to start from.
func (*XProviderCursorQuery) Only ¶
func (xcq *XProviderCursorQuery) Only(ctx context.Context) (*XProviderCursor, error)
Only returns a single XProviderCursor entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one XProviderCursor entity is found. Returns a *NotFoundError when no XProviderCursor entities are found.
func (*XProviderCursorQuery) OnlyID ¶
OnlyID is like Only, but returns the only XProviderCursor ID in the query. Returns a *NotSingularError when more than one XProviderCursor ID is found. Returns a *NotFoundError when no entities are found.
func (*XProviderCursorQuery) OnlyIDX ¶
func (xcq *XProviderCursorQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*XProviderCursorQuery) OnlyX ¶
func (xcq *XProviderCursorQuery) OnlyX(ctx context.Context) *XProviderCursor
OnlyX is like Only, but panics if an error occurs.
func (*XProviderCursorQuery) Order ¶
func (xcq *XProviderCursorQuery) Order(o ...xprovidercursor.OrderOption) *XProviderCursorQuery
Order specifies how the records should be ordered.
func (*XProviderCursorQuery) Select ¶
func (xcq *XProviderCursorQuery) Select(fields ...string) *XProviderCursorSelect
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 { ChainID uint64 `json:"chain_id,omitempty"` } client.XProviderCursor.Query(). Select(xprovidercursor.FieldChainID). Scan(ctx, &v)
func (*XProviderCursorQuery) Unique ¶
func (xcq *XProviderCursorQuery) Unique(unique bool) *XProviderCursorQuery
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 (*XProviderCursorQuery) Where ¶
func (xcq *XProviderCursorQuery) Where(ps ...predicate.XProviderCursor) *XProviderCursorQuery
Where adds a new predicate for the XProviderCursorQuery builder.
type XProviderCursorSelect ¶
type XProviderCursorSelect struct { *XProviderCursorQuery // contains filtered or unexported fields }
XProviderCursorSelect is the builder for selecting fields of XProviderCursor entities.
func (*XProviderCursorSelect) Aggregate ¶
func (xcs *XProviderCursorSelect) Aggregate(fns ...AggregateFunc) *XProviderCursorSelect
Aggregate adds the given aggregation functions to the selector query.
func (*XProviderCursorSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*XProviderCursorSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*XProviderCursorSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*XProviderCursorSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*XProviderCursorSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*XProviderCursorSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*XProviderCursorSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*XProviderCursorSelect) Scan ¶
func (xcs *XProviderCursorSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*XProviderCursorSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type XProviderCursorUpdate ¶
type XProviderCursorUpdate struct {
// contains filtered or unexported fields
}
XProviderCursorUpdate is the builder for updating XProviderCursor entities.
func (*XProviderCursorUpdate) AddChainID ¶
func (xcu *XProviderCursorUpdate) AddChainID(u int64) *XProviderCursorUpdate
AddChainID adds u to the "chain_id" field.
func (*XProviderCursorUpdate) AddHeight ¶
func (xcu *XProviderCursorUpdate) AddHeight(u int64) *XProviderCursorUpdate
AddHeight adds u to the "height" field.
func (*XProviderCursorUpdate) AddOffset ¶ added in v0.1.7
func (xcu *XProviderCursorUpdate) AddOffset(u int64) *XProviderCursorUpdate
AddOffset adds u to the "offset" field.
func (*XProviderCursorUpdate) Exec ¶
func (xcu *XProviderCursorUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*XProviderCursorUpdate) ExecX ¶
func (xcu *XProviderCursorUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*XProviderCursorUpdate) Mutation ¶
func (xcu *XProviderCursorUpdate) Mutation() *XProviderCursorMutation
Mutation returns the XProviderCursorMutation object of the builder.
func (*XProviderCursorUpdate) Save ¶
func (xcu *XProviderCursorUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*XProviderCursorUpdate) SaveX ¶
func (xcu *XProviderCursorUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*XProviderCursorUpdate) SetChainID ¶
func (xcu *XProviderCursorUpdate) SetChainID(u uint64) *XProviderCursorUpdate
SetChainID sets the "chain_id" field.
func (*XProviderCursorUpdate) SetCreatedAt ¶
func (xcu *XProviderCursorUpdate) SetCreatedAt(t time.Time) *XProviderCursorUpdate
SetCreatedAt sets the "created_at" field.
func (*XProviderCursorUpdate) SetHeight ¶
func (xcu *XProviderCursorUpdate) SetHeight(u uint64) *XProviderCursorUpdate
SetHeight sets the "height" field.
func (*XProviderCursorUpdate) SetNillableChainID ¶
func (xcu *XProviderCursorUpdate) SetNillableChainID(u *uint64) *XProviderCursorUpdate
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*XProviderCursorUpdate) SetNillableCreatedAt ¶
func (xcu *XProviderCursorUpdate) SetNillableCreatedAt(t *time.Time) *XProviderCursorUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*XProviderCursorUpdate) SetNillableHeight ¶
func (xcu *XProviderCursorUpdate) SetNillableHeight(u *uint64) *XProviderCursorUpdate
SetNillableHeight sets the "height" field if the given value is not nil.
func (*XProviderCursorUpdate) SetNillableOffset ¶ added in v0.1.7
func (xcu *XProviderCursorUpdate) SetNillableOffset(u *uint64) *XProviderCursorUpdate
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*XProviderCursorUpdate) SetNillableUpdatedAt ¶
func (xcu *XProviderCursorUpdate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*XProviderCursorUpdate) SetOffset ¶ added in v0.1.7
func (xcu *XProviderCursorUpdate) SetOffset(u uint64) *XProviderCursorUpdate
SetOffset sets the "offset" field.
func (*XProviderCursorUpdate) SetUpdatedAt ¶
func (xcu *XProviderCursorUpdate) SetUpdatedAt(t time.Time) *XProviderCursorUpdate
SetUpdatedAt sets the "updated_at" field.
func (*XProviderCursorUpdate) Where ¶
func (xcu *XProviderCursorUpdate) Where(ps ...predicate.XProviderCursor) *XProviderCursorUpdate
Where appends a list predicates to the XProviderCursorUpdate builder.
type XProviderCursorUpdateOne ¶
type XProviderCursorUpdateOne struct {
// contains filtered or unexported fields
}
XProviderCursorUpdateOne is the builder for updating a single XProviderCursor entity.
func (*XProviderCursorUpdateOne) AddChainID ¶
func (xcuo *XProviderCursorUpdateOne) AddChainID(u int64) *XProviderCursorUpdateOne
AddChainID adds u to the "chain_id" field.
func (*XProviderCursorUpdateOne) AddHeight ¶
func (xcuo *XProviderCursorUpdateOne) AddHeight(u int64) *XProviderCursorUpdateOne
AddHeight adds u to the "height" field.
func (*XProviderCursorUpdateOne) AddOffset ¶ added in v0.1.7
func (xcuo *XProviderCursorUpdateOne) AddOffset(u int64) *XProviderCursorUpdateOne
AddOffset adds u to the "offset" field.
func (*XProviderCursorUpdateOne) Exec ¶
func (xcuo *XProviderCursorUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*XProviderCursorUpdateOne) ExecX ¶
func (xcuo *XProviderCursorUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*XProviderCursorUpdateOne) Mutation ¶
func (xcuo *XProviderCursorUpdateOne) Mutation() *XProviderCursorMutation
Mutation returns the XProviderCursorMutation object of the builder.
func (*XProviderCursorUpdateOne) Save ¶
func (xcuo *XProviderCursorUpdateOne) Save(ctx context.Context) (*XProviderCursor, error)
Save executes the query and returns the updated XProviderCursor entity.
func (*XProviderCursorUpdateOne) SaveX ¶
func (xcuo *XProviderCursorUpdateOne) SaveX(ctx context.Context) *XProviderCursor
SaveX is like Save, but panics if an error occurs.
func (*XProviderCursorUpdateOne) Select ¶
func (xcuo *XProviderCursorUpdateOne) Select(field string, fields ...string) *XProviderCursorUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*XProviderCursorUpdateOne) SetChainID ¶
func (xcuo *XProviderCursorUpdateOne) SetChainID(u uint64) *XProviderCursorUpdateOne
SetChainID sets the "chain_id" field.
func (*XProviderCursorUpdateOne) SetCreatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetCreatedAt(t time.Time) *XProviderCursorUpdateOne
SetCreatedAt sets the "created_at" field.
func (*XProviderCursorUpdateOne) SetHeight ¶
func (xcuo *XProviderCursorUpdateOne) SetHeight(u uint64) *XProviderCursorUpdateOne
SetHeight sets the "height" field.
func (*XProviderCursorUpdateOne) SetNillableChainID ¶
func (xcuo *XProviderCursorUpdateOne) SetNillableChainID(u *uint64) *XProviderCursorUpdateOne
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetNillableCreatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetNillableCreatedAt(t *time.Time) *XProviderCursorUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetNillableHeight ¶
func (xcuo *XProviderCursorUpdateOne) SetNillableHeight(u *uint64) *XProviderCursorUpdateOne
SetNillableHeight sets the "height" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetNillableOffset ¶ added in v0.1.7
func (xcuo *XProviderCursorUpdateOne) SetNillableOffset(u *uint64) *XProviderCursorUpdateOne
SetNillableOffset sets the "offset" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetNillableUpdatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetOffset ¶ added in v0.1.7
func (xcuo *XProviderCursorUpdateOne) SetOffset(u uint64) *XProviderCursorUpdateOne
SetOffset sets the "offset" field.
func (*XProviderCursorUpdateOne) SetUpdatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetUpdatedAt(t time.Time) *XProviderCursorUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*XProviderCursorUpdateOne) Where ¶
func (xcuo *XProviderCursorUpdateOne) Where(ps ...predicate.XProviderCursor) *XProviderCursorUpdateOne
Where appends a list predicates to the XProviderCursorUpdate builder.
type XProviderCursors ¶
type XProviderCursors []*XProviderCursor
XProviderCursors is a parsable slice of XProviderCursor.
Source Files ¶
- block.go
- block_create.go
- block_delete.go
- block_query.go
- block_update.go
- chain.go
- chain_create.go
- chain_delete.go
- chain_query.go
- chain_update.go
- client.go
- client_db.go
- ent.go
- entql.go
- generate.go
- msg.go
- msg_create.go
- msg_delete.go
- msg_query.go
- msg_update.go
- mutation.go
- receipt.go
- receipt_create.go
- receipt_delete.go
- receipt_query.go
- receipt_update.go
- runtime.go
- tx.go
- xprovidercursor.go
- xprovidercursor_create.go
- xprovidercursor_delete.go
- xprovidercursor_query.go
- xprovidercursor_update.go