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) SetBlockHash(b []byte) *BlockCreate
- func (bc *BlockCreate) SetBlockHeight(u uint64) *BlockCreate
- func (bc *BlockCreate) SetCreatedAt(t time.Time) *BlockCreate
- func (bc *BlockCreate) SetNillableCreatedAt(t *time.Time) *BlockCreate
- func (bc *BlockCreate) SetNillableTimestamp(t *time.Time) *BlockCreate
- func (bc *BlockCreate) SetNillableUUID(u *uuid.UUID) *BlockCreate
- func (bc *BlockCreate) SetSourceChainID(u uint64) *BlockCreate
- func (bc *BlockCreate) SetTimestamp(t time.Time) *BlockCreate
- func (bc *BlockCreate) SetUUID(u uuid.UUID) *BlockCreate
- type BlockCreateBulk
- type BlockDelete
- type BlockDeleteOne
- type BlockEdges
- type BlockFilter
- func (f *BlockFilter) Where(p entql.P)
- func (f *BlockFilter) WhereBlockHash(p entql.BytesP)
- func (f *BlockFilter) WhereBlockHeight(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) WhereID(p entql.IntP)
- func (f *BlockFilter) WhereSourceChainID(p entql.Uint64P)
- func (f *BlockFilter) WhereTimestamp(p entql.TimeP)
- func (f *BlockFilter) WhereUUID(p entql.ValueP)
- 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) AddBlockHeight(u int64)
- func (m *BlockMutation) AddField(name string, value ent.Value) error
- func (m *BlockMutation) AddMsgIDs(ids ...int)
- func (m *BlockMutation) AddReceiptIDs(ids ...int)
- func (m *BlockMutation) AddSourceChainID(u int64)
- func (m *BlockMutation) AddedBlockHeight() (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) AddedIDs(name string) []ent.Value
- func (m *BlockMutation) AddedSourceChainID() (r int64, exists bool)
- func (m *BlockMutation) BlockHash() (r []byte, exists bool)
- func (m *BlockMutation) BlockHeight() (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) 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) OldBlockHash(ctx context.Context) (v []byte, err error)
- func (m *BlockMutation) OldBlockHeight(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) OldSourceChainID(ctx context.Context) (v uint64, err error)
- func (m *BlockMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *BlockMutation) OldUUID(ctx context.Context) (v uuid.UUID, 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) ResetBlockHash()
- func (m *BlockMutation) ResetBlockHeight()
- func (m *BlockMutation) ResetCreatedAt()
- func (m *BlockMutation) ResetEdge(name string) error
- func (m *BlockMutation) ResetField(name string) error
- func (m *BlockMutation) ResetMsgs()
- func (m *BlockMutation) ResetReceipts()
- func (m *BlockMutation) ResetSourceChainID()
- func (m *BlockMutation) ResetTimestamp()
- func (m *BlockMutation) ResetUUID()
- func (m *BlockMutation) SetBlockHash(b []byte)
- func (m *BlockMutation) SetBlockHeight(u uint64)
- func (m *BlockMutation) SetCreatedAt(t time.Time)
- func (m *BlockMutation) SetField(name string, value ent.Value) error
- func (m *BlockMutation) SetOp(op Op)
- func (m *BlockMutation) SetSourceChainID(u uint64)
- func (m *BlockMutation) SetTimestamp(t time.Time)
- func (m *BlockMutation) SetUUID(u uuid.UUID)
- func (m *BlockMutation) SourceChainID() (r uint64, exists bool)
- func (m *BlockMutation) Timestamp() (r time.Time, exists bool)
- func (m BlockMutation) Tx() (*Tx, error)
- func (m *BlockMutation) Type() string
- func (m *BlockMutation) UUID() (r uuid.UUID, exists bool)
- 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) AddBlockHeight(u int64) *BlockUpdate
- func (bu *BlockUpdate) AddMsgIDs(ids ...int) *BlockUpdate
- func (bu *BlockUpdate) AddMsgs(m ...*Msg) *BlockUpdate
- func (bu *BlockUpdate) AddReceiptIDs(ids ...int) *BlockUpdate
- func (bu *BlockUpdate) AddReceipts(r ...*Receipt) *BlockUpdate
- func (bu *BlockUpdate) AddSourceChainID(u int64) *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) SetBlockHash(b []byte) *BlockUpdate
- func (bu *BlockUpdate) SetBlockHeight(u uint64) *BlockUpdate
- func (bu *BlockUpdate) SetCreatedAt(t time.Time) *BlockUpdate
- func (bu *BlockUpdate) SetNillableBlockHeight(u *uint64) *BlockUpdate
- func (bu *BlockUpdate) SetNillableCreatedAt(t *time.Time) *BlockUpdate
- func (bu *BlockUpdate) SetNillableSourceChainID(u *uint64) *BlockUpdate
- func (bu *BlockUpdate) SetNillableTimestamp(t *time.Time) *BlockUpdate
- func (bu *BlockUpdate) SetNillableUUID(u *uuid.UUID) *BlockUpdate
- func (bu *BlockUpdate) SetSourceChainID(u uint64) *BlockUpdate
- func (bu *BlockUpdate) SetTimestamp(t time.Time) *BlockUpdate
- func (bu *BlockUpdate) SetUUID(u uuid.UUID) *BlockUpdate
- func (bu *BlockUpdate) Where(ps ...predicate.Block) *BlockUpdate
- type BlockUpdateOne
- func (buo *BlockUpdateOne) AddBlockHeight(u int64) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddMsgIDs(ids ...int) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddMsgs(m ...*Msg) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddReceiptIDs(ids ...int) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddReceipts(r ...*Receipt) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddSourceChainID(u int64) *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) SetBlockHash(b []byte) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetBlockHeight(u uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetCreatedAt(t time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableBlockHeight(u *uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableCreatedAt(t *time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableSourceChainID(u *uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableTimestamp(t *time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetNillableUUID(u *uuid.UUID) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetSourceChainID(u uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetTimestamp(t time.Time) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetUUID(u uuid.UUID) *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
- func (cc *ChainCreate) SetNillableUUID(u *uuid.UUID) *ChainCreate
- func (cc *ChainCreate) SetUUID(u uuid.UUID) *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) OldUUID(ctx context.Context) (v uuid.UUID, 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) ResetUUID()
- 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) SetUUID(u uuid.UUID)
- func (m ChainMutation) Tx() (*Tx, error)
- func (m *ChainMutation) Type() string
- func (m *ChainMutation) UUID() (r uuid.UUID, exists bool)
- 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) SetNillableUUID(u *uuid.UUID) *ChainUpdate
- func (cu *ChainUpdate) SetUUID(u uuid.UUID) *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) SetNillableUUID(u *uuid.UUID) *ChainUpdateOne
- func (cuo *ChainUpdateOne) SetUUID(u uuid.UUID) *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) 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) 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) 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) SetBlock(b *Block) *MsgCreate
- func (mc *MsgCreate) SetBlockID(id int) *MsgCreate
- func (mc *MsgCreate) SetCreatedAt(t time.Time) *MsgCreate
- func (mc *MsgCreate) SetData(b []byte) *MsgCreate
- func (mc *MsgCreate) SetDestAddress(b []byte) *MsgCreate
- func (mc *MsgCreate) SetDestChainID(u uint64) *MsgCreate
- func (mc *MsgCreate) SetDestGasLimit(u uint64) *MsgCreate
- func (mc *MsgCreate) SetNillableBlockID(id *int) *MsgCreate
- func (mc *MsgCreate) SetNillableCreatedAt(t *time.Time) *MsgCreate
- func (mc *MsgCreate) SetNillableUUID(u *uuid.UUID) *MsgCreate
- func (mc *MsgCreate) SetSourceChainID(u uint64) *MsgCreate
- func (mc *MsgCreate) SetSourceMsgSender(b []byte) *MsgCreate
- func (mc *MsgCreate) SetStreamOffset(u uint64) *MsgCreate
- func (mc *MsgCreate) SetTxHash(b []byte) *MsgCreate
- func (mc *MsgCreate) SetUUID(u uuid.UUID) *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) WhereDestAddress(p entql.BytesP)
- func (f *MsgFilter) WhereDestChainID(p entql.Uint64P)
- func (f *MsgFilter) WhereDestGasLimit(p entql.Uint64P)
- func (f *MsgFilter) WhereHasBlock()
- func (f *MsgFilter) WhereHasBlockWith(preds ...predicate.Block)
- func (f *MsgFilter) WhereID(p entql.IntP)
- func (f *MsgFilter) WhereSourceChainID(p entql.Uint64P)
- func (f *MsgFilter) WhereSourceMsgSender(p entql.BytesP)
- func (f *MsgFilter) WhereStreamOffset(p entql.Uint64P)
- func (f *MsgFilter) WhereTxHash(p entql.BytesP)
- func (f *MsgFilter) WhereUUID(p entql.ValueP)
- 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) AddDestChainID(u int64)
- func (m *MsgMutation) AddDestGasLimit(u int64)
- func (m *MsgMutation) AddField(name string, value ent.Value) error
- func (m *MsgMutation) AddSourceChainID(u int64)
- func (m *MsgMutation) AddStreamOffset(u int64)
- func (m *MsgMutation) AddedDestChainID() (r int64, exists bool)
- func (m *MsgMutation) AddedDestGasLimit() (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) AddedIDs(name string) []ent.Value
- func (m *MsgMutation) AddedSourceChainID() (r int64, exists bool)
- func (m *MsgMutation) AddedStreamOffset() (r int64, exists bool)
- func (m *MsgMutation) BlockCleared() bool
- func (m *MsgMutation) BlockID() (id int, exists 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) 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) DestAddress() (r []byte, exists bool)
- func (m *MsgMutation) DestChainID() (r uint64, exists bool)
- func (m *MsgMutation) DestGasLimit() (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) ID() (id int, exists bool)
- func (m *MsgMutation) IDs(ctx context.Context) ([]int, error)
- 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) OldDestAddress(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) OldDestChainID(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldDestGasLimit(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MsgMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldSourceMsgSender(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) OldStreamOffset(ctx context.Context) (v uint64, err error)
- func (m *MsgMutation) OldTxHash(ctx context.Context) (v []byte, err error)
- func (m *MsgMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MsgMutation) Op() Op
- func (m *MsgMutation) RemovedEdges() []string
- func (m *MsgMutation) RemovedIDs(name string) []ent.Value
- func (m *MsgMutation) ResetBlock()
- func (m *MsgMutation) ResetCreatedAt()
- func (m *MsgMutation) ResetData()
- func (m *MsgMutation) ResetDestAddress()
- func (m *MsgMutation) ResetDestChainID()
- func (m *MsgMutation) ResetDestGasLimit()
- func (m *MsgMutation) ResetEdge(name string) error
- func (m *MsgMutation) ResetField(name string) error
- func (m *MsgMutation) ResetSourceChainID()
- func (m *MsgMutation) ResetSourceMsgSender()
- func (m *MsgMutation) ResetStreamOffset()
- func (m *MsgMutation) ResetTxHash()
- func (m *MsgMutation) ResetUUID()
- func (m *MsgMutation) SetBlockID(id int)
- func (m *MsgMutation) SetCreatedAt(t time.Time)
- func (m *MsgMutation) SetData(b []byte)
- func (m *MsgMutation) SetDestAddress(b []byte)
- func (m *MsgMutation) SetDestChainID(u uint64)
- func (m *MsgMutation) SetDestGasLimit(u uint64)
- func (m *MsgMutation) SetField(name string, value ent.Value) error
- func (m *MsgMutation) SetOp(op Op)
- func (m *MsgMutation) SetSourceChainID(u uint64)
- func (m *MsgMutation) SetSourceMsgSender(b []byte)
- func (m *MsgMutation) SetStreamOffset(u uint64)
- func (m *MsgMutation) SetTxHash(b []byte)
- func (m *MsgMutation) SetUUID(u uuid.UUID)
- func (m *MsgMutation) SourceChainID() (r uint64, exists bool)
- func (m *MsgMutation) SourceMsgSender() (r []byte, exists bool)
- func (m *MsgMutation) StreamOffset() (r uint64, exists bool)
- func (m MsgMutation) Tx() (*Tx, error)
- func (m *MsgMutation) TxHash() (r []byte, exists bool)
- func (m *MsgMutation) Type() string
- func (m *MsgMutation) UUID() (r uuid.UUID, exists bool)
- 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) 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
- 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) AddDestChainID(u int64) *MsgUpdate
- func (mu *MsgUpdate) AddDestGasLimit(u int64) *MsgUpdate
- func (mu *MsgUpdate) AddSourceChainID(u int64) *MsgUpdate
- func (mu *MsgUpdate) AddStreamOffset(u int64) *MsgUpdate
- func (mu *MsgUpdate) ClearBlock() *MsgUpdate
- func (mu *MsgUpdate) Exec(ctx context.Context) error
- func (mu *MsgUpdate) ExecX(ctx context.Context)
- func (mu *MsgUpdate) Mutation() *MsgMutation
- func (mu *MsgUpdate) Save(ctx context.Context) (int, error)
- func (mu *MsgUpdate) SaveX(ctx context.Context) int
- func (mu *MsgUpdate) SetBlock(b *Block) *MsgUpdate
- func (mu *MsgUpdate) SetBlockID(id int) *MsgUpdate
- func (mu *MsgUpdate) SetCreatedAt(t time.Time) *MsgUpdate
- func (mu *MsgUpdate) SetData(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetDestAddress(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetDestChainID(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetDestGasLimit(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableBlockID(id *int) *MsgUpdate
- func (mu *MsgUpdate) SetNillableCreatedAt(t *time.Time) *MsgUpdate
- func (mu *MsgUpdate) SetNillableDestChainID(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableDestGasLimit(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableSourceChainID(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableStreamOffset(u *uint64) *MsgUpdate
- func (mu *MsgUpdate) SetNillableUUID(u *uuid.UUID) *MsgUpdate
- func (mu *MsgUpdate) SetSourceChainID(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetSourceMsgSender(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetStreamOffset(u uint64) *MsgUpdate
- func (mu *MsgUpdate) SetTxHash(b []byte) *MsgUpdate
- func (mu *MsgUpdate) SetUUID(u uuid.UUID) *MsgUpdate
- func (mu *MsgUpdate) Where(ps ...predicate.Msg) *MsgUpdate
- type MsgUpdateOne
- func (muo *MsgUpdateOne) AddDestChainID(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddDestGasLimit(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddSourceChainID(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) AddStreamOffset(u int64) *MsgUpdateOne
- func (muo *MsgUpdateOne) ClearBlock() *MsgUpdateOne
- func (muo *MsgUpdateOne) Exec(ctx context.Context) error
- func (muo *MsgUpdateOne) ExecX(ctx context.Context)
- func (muo *MsgUpdateOne) Mutation() *MsgMutation
- 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) SetBlock(b *Block) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetBlockID(id int) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetCreatedAt(t time.Time) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetData(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetDestAddress(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetDestChainID(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetDestGasLimit(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableBlockID(id *int) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableCreatedAt(t *time.Time) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableDestChainID(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableDestGasLimit(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableSourceChainID(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableStreamOffset(u *uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetNillableUUID(u *uuid.UUID) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetSourceChainID(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetSourceMsgSender(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetStreamOffset(u uint64) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetTxHash(b []byte) *MsgUpdateOne
- func (muo *MsgUpdateOne) SetUUID(u uuid.UUID) *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) 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) 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) SetBlock(b *Block) *ReceiptCreate
- func (rc *ReceiptCreate) SetBlockID(id int) *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) SetNillableBlockID(id *int) *ReceiptCreate
- func (rc *ReceiptCreate) SetNillableCreatedAt(t *time.Time) *ReceiptCreate
- func (rc *ReceiptCreate) SetNillableUUID(u *uuid.UUID) *ReceiptCreate
- func (rc *ReceiptCreate) SetRelayerAddress(b []byte) *ReceiptCreate
- func (rc *ReceiptCreate) SetSourceChainID(u uint64) *ReceiptCreate
- func (rc *ReceiptCreate) SetStreamOffset(u uint64) *ReceiptCreate
- func (rc *ReceiptCreate) SetSuccess(b bool) *ReceiptCreate
- func (rc *ReceiptCreate) SetTxHash(b []byte) *ReceiptCreate
- func (rc *ReceiptCreate) SetUUID(u uuid.UUID) *ReceiptCreate
- type ReceiptCreateBulk
- type ReceiptDelete
- type ReceiptDeleteOne
- type ReceiptEdges
- type ReceiptFilter
- func (f *ReceiptFilter) Where(p entql.P)
- 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) WhereID(p entql.IntP)
- func (f *ReceiptFilter) WhereRelayerAddress(p entql.BytesP)
- func (f *ReceiptFilter) WhereSourceChainID(p entql.Uint64P)
- func (f *ReceiptFilter) WhereStreamOffset(p entql.Uint64P)
- func (f *ReceiptFilter) WhereSuccess(p entql.BoolP)
- func (f *ReceiptFilter) WhereTxHash(p entql.BytesP)
- func (f *ReceiptFilter) WhereUUID(p entql.ValueP)
- 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) AddDestChainID(u int64)
- func (m *ReceiptMutation) AddField(name string, value ent.Value) error
- func (m *ReceiptMutation) AddGasUsed(u int64)
- func (m *ReceiptMutation) AddSourceChainID(u int64)
- func (m *ReceiptMutation) AddStreamOffset(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) AddedSourceChainID() (r int64, exists bool)
- func (m *ReceiptMutation) AddedStreamOffset() (r int64, exists bool)
- func (m *ReceiptMutation) BlockCleared() bool
- func (m *ReceiptMutation) BlockID() (id int, 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) 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) 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) OldRelayerAddress(ctx context.Context) (v []byte, err error)
- func (m *ReceiptMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
- func (m *ReceiptMutation) OldStreamOffset(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) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ReceiptMutation) Op() Op
- func (m *ReceiptMutation) RelayerAddress() (r []byte, exists bool)
- func (m *ReceiptMutation) RemovedEdges() []string
- func (m *ReceiptMutation) RemovedIDs(name string) []ent.Value
- func (m *ReceiptMutation) ResetBlock()
- 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) ResetRelayerAddress()
- func (m *ReceiptMutation) ResetSourceChainID()
- func (m *ReceiptMutation) ResetStreamOffset()
- func (m *ReceiptMutation) ResetSuccess()
- func (m *ReceiptMutation) ResetTxHash()
- func (m *ReceiptMutation) ResetUUID()
- func (m *ReceiptMutation) SetBlockID(id int)
- 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) SetOp(op Op)
- func (m *ReceiptMutation) SetRelayerAddress(b []byte)
- func (m *ReceiptMutation) SetSourceChainID(u uint64)
- func (m *ReceiptMutation) SetStreamOffset(u uint64)
- func (m *ReceiptMutation) SetSuccess(b bool)
- func (m *ReceiptMutation) SetTxHash(b []byte)
- func (m *ReceiptMutation) SetUUID(u uuid.UUID)
- func (m *ReceiptMutation) SourceChainID() (r uint64, exists bool)
- func (m *ReceiptMutation) StreamOffset() (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) UUID() (r uuid.UUID, exists bool)
- 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) 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
- 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) AddDestChainID(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddGasUsed(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddSourceChainID(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) AddStreamOffset(u int64) *ReceiptUpdate
- func (ru *ReceiptUpdate) ClearBlock() *ReceiptUpdate
- func (ru *ReceiptUpdate) Exec(ctx context.Context) error
- func (ru *ReceiptUpdate) ExecX(ctx context.Context)
- func (ru *ReceiptUpdate) Mutation() *ReceiptMutation
- func (ru *ReceiptUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReceiptUpdate) SaveX(ctx context.Context) int
- func (ru *ReceiptUpdate) SetBlock(b *Block) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetBlockID(id int) *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) SetNillableBlockID(id *int) *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) SetNillableSourceChainID(u *uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableStreamOffset(u *uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableSuccess(b *bool) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetNillableUUID(u *uuid.UUID) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetRelayerAddress(b []byte) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetSourceChainID(u uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetStreamOffset(u uint64) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetSuccess(b bool) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetTxHash(b []byte) *ReceiptUpdate
- func (ru *ReceiptUpdate) SetUUID(u uuid.UUID) *ReceiptUpdate
- func (ru *ReceiptUpdate) Where(ps ...predicate.Receipt) *ReceiptUpdate
- type ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddDestChainID(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddGasUsed(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddSourceChainID(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) AddStreamOffset(u int64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) ClearBlock() *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReceiptUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReceiptUpdateOne) Mutation() *ReceiptMutation
- 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) SetBlock(b *Block) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetBlockID(id int) *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) SetNillableBlockID(id *int) *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) SetNillableSourceChainID(u *uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableStreamOffset(u *uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableSuccess(b *bool) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetNillableUUID(u *uuid.UUID) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetRelayerAddress(b []byte) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetSourceChainID(u uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetStreamOffset(u uint64) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetSuccess(b bool) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetTxHash(b []byte) *ReceiptUpdateOne
- func (ruo *ReceiptUpdateOne) SetUUID(u uuid.UUID) *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 int) *XProviderCursorDeleteOne
- func (c *XProviderCursorClient) Get(ctx context.Context, id int) (*XProviderCursor, error)
- func (c *XProviderCursorClient) GetX(ctx context.Context, id int) *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 int) *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) SetNillableCreatedAt(t *time.Time) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetNillableUUID(u *uuid.UUID) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorCreate
- func (xcc *XProviderCursorCreate) SetUUID(u uuid.UUID) *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.IntP)
- func (f *XProviderCursorFilter) WhereUUID(p entql.ValueP)
- 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) 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) 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 int, exists bool)
- func (m *XProviderCursorMutation) IDs(ctx context.Context) ([]int, error)
- 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) OldUUID(ctx context.Context) (v uuid.UUID, 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) ResetUUID()
- 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) SetOp(op Op)
- func (m *XProviderCursorMutation) SetUUID(u uuid.UUID)
- func (m *XProviderCursorMutation) SetUpdatedAt(t time.Time)
- func (m XProviderCursorMutation) Tx() (*Tx, error)
- func (m *XProviderCursorMutation) Type() string
- func (m *XProviderCursorMutation) UUID() (r uuid.UUID, exists bool)
- 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 int, err error)
- func (xcq *XProviderCursorQuery) FirstIDX(ctx context.Context) int
- 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 []int, err error)
- func (xcq *XProviderCursorQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (xcq *XProviderCursorQuery) OnlyIDX(ctx context.Context) int
- 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) 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) SetNillableUUID(u *uuid.UUID) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdate
- func (xcu *XProviderCursorUpdate) SetUUID(u uuid.UUID) *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) 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) SetNillableUUID(u *uuid.UUID) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdateOne
- func (xcuo *XProviderCursorUpdateOne) SetUUID(u uuid.UUID) *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"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // SourceChainID holds the value of the "SourceChainID" field. SourceChainID uint64 `json:"SourceChainID,omitempty"` // BlockHeight holds the value of the "BlockHeight" field. BlockHeight uint64 `json:"BlockHeight,omitempty"` // BlockHash holds the value of the "BlockHash" field. BlockHash []byte `json:"BlockHash,omitempty"` // Timestamp holds the value of the "Timestamp" field. Timestamp time.Time `json:"Timestamp,omitempty"` // CreatedAt holds the value of the "CreatedAt" field. CreatedAt time.Time `json:"CreatedAt,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) SetBlockHash ¶
func (bc *BlockCreate) SetBlockHash(b []byte) *BlockCreate
SetBlockHash sets the "BlockHash" field.
func (*BlockCreate) SetBlockHeight ¶
func (bc *BlockCreate) SetBlockHeight(u uint64) *BlockCreate
SetBlockHeight sets the "BlockHeight" field.
func (*BlockCreate) SetCreatedAt ¶
func (bc *BlockCreate) SetCreatedAt(t time.Time) *BlockCreate
SetCreatedAt sets the "CreatedAt" field.
func (*BlockCreate) SetNillableCreatedAt ¶
func (bc *BlockCreate) SetNillableCreatedAt(t *time.Time) *BlockCreate
SetNillableCreatedAt sets the "CreatedAt" 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) SetNillableUUID ¶
func (bc *BlockCreate) SetNillableUUID(u *uuid.UUID) *BlockCreate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*BlockCreate) SetSourceChainID ¶
func (bc *BlockCreate) SetSourceChainID(u uint64) *BlockCreate
SetSourceChainID sets the "SourceChainID" field.
func (*BlockCreate) SetTimestamp ¶
func (bc *BlockCreate) SetTimestamp(t time.Time) *BlockCreate
SetTimestamp sets the "Timestamp" field.
func (*BlockCreate) SetUUID ¶
func (bc *BlockCreate) SetUUID(u uuid.UUID) *BlockCreate
SetUUID sets the "UUID" 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) WhereBlockHash ¶
func (f *BlockFilter) WhereBlockHash(p entql.BytesP)
WhereBlockHash applies the entql []byte predicate on the BlockHash field.
func (*BlockFilter) WhereBlockHeight ¶
func (f *BlockFilter) WhereBlockHeight(p entql.Uint64P)
WhereBlockHeight applies the entql uint64 predicate on the BlockHeight field.
func (*BlockFilter) WhereCreatedAt ¶
func (f *BlockFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the CreatedAt 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) WhereID ¶
func (f *BlockFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*BlockFilter) WhereSourceChainID ¶
func (f *BlockFilter) WhereSourceChainID(p entql.Uint64P)
WhereSourceChainID applies the entql uint64 predicate on the SourceChainID field.
func (*BlockFilter) WhereTimestamp ¶
func (f *BlockFilter) WhereTimestamp(p entql.TimeP)
WhereTimestamp applies the entql time.Time predicate on the Timestamp field.
func (*BlockFilter) WhereUUID ¶
func (f *BlockFilter) WhereUUID(p entql.ValueP)
WhereUUID applies the entql [16]byte predicate on the UUID 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) AddBlockHeight ¶
func (m *BlockMutation) AddBlockHeight(u int64)
AddBlockHeight adds u to the "BlockHeight" 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) AddMsgIDs ¶
func (m *BlockMutation) AddMsgIDs(ids ...int)
AddMsgIDs adds the "Msgs" edge to the Msg entity by ids.
func (*BlockMutation) AddReceiptIDs ¶
func (m *BlockMutation) AddReceiptIDs(ids ...int)
AddReceiptIDs adds the "Receipts" edge to the Receipt entity by ids.
func (*BlockMutation) AddSourceChainID ¶
func (m *BlockMutation) AddSourceChainID(u int64)
AddSourceChainID adds u to the "SourceChainID" field.
func (*BlockMutation) AddedBlockHeight ¶
func (m *BlockMutation) AddedBlockHeight() (r int64, exists bool)
AddedBlockHeight returns the value that was added to the "BlockHeight" 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) 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) AddedSourceChainID ¶
func (m *BlockMutation) AddedSourceChainID() (r int64, exists bool)
AddedSourceChainID returns the value that was added to the "SourceChainID" field in this mutation.
func (*BlockMutation) BlockHash ¶
func (m *BlockMutation) BlockHash() (r []byte, exists bool)
BlockHash returns the value of the "BlockHash" field in the mutation.
func (*BlockMutation) BlockHeight ¶
func (m *BlockMutation) BlockHeight() (r uint64, exists bool)
BlockHeight returns the value of the "BlockHeight" 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 "CreatedAt" 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) 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) OldBlockHash ¶
func (m *BlockMutation) OldBlockHash(ctx context.Context) (v []byte, err error)
OldBlockHash returns the old "BlockHash" 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) OldBlockHeight ¶
func (m *BlockMutation) OldBlockHeight(ctx context.Context) (v uint64, err error)
OldBlockHeight returns the old "BlockHeight" 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 "CreatedAt" 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) OldSourceChainID ¶
func (m *BlockMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
OldSourceChainID returns the old "SourceChainID" 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) OldUUID ¶
OldUUID returns the old "UUID" 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) ResetBlockHash ¶
func (m *BlockMutation) ResetBlockHash()
ResetBlockHash resets all changes to the "BlockHash" field.
func (*BlockMutation) ResetBlockHeight ¶
func (m *BlockMutation) ResetBlockHeight()
ResetBlockHeight resets all changes to the "BlockHeight" field.
func (*BlockMutation) ResetCreatedAt ¶
func (m *BlockMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "CreatedAt" 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) ResetMsgs ¶
func (m *BlockMutation) ResetMsgs()
ResetMsgs resets all changes to the "Msgs" edge.
func (*BlockMutation) ResetReceipts ¶
func (m *BlockMutation) ResetReceipts()
ResetReceipts resets all changes to the "Receipts" edge.
func (*BlockMutation) ResetSourceChainID ¶
func (m *BlockMutation) ResetSourceChainID()
ResetSourceChainID resets all changes to the "SourceChainID" field.
func (*BlockMutation) ResetTimestamp ¶
func (m *BlockMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "Timestamp" field.
func (*BlockMutation) ResetUUID ¶
func (m *BlockMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*BlockMutation) SetBlockHash ¶
func (m *BlockMutation) SetBlockHash(b []byte)
SetBlockHash sets the "BlockHash" field.
func (*BlockMutation) SetBlockHeight ¶
func (m *BlockMutation) SetBlockHeight(u uint64)
SetBlockHeight sets the "BlockHeight" field.
func (*BlockMutation) SetCreatedAt ¶
func (m *BlockMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "CreatedAt" 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) SetOp ¶
func (m *BlockMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BlockMutation) SetSourceChainID ¶
func (m *BlockMutation) SetSourceChainID(u uint64)
SetSourceChainID sets the "SourceChainID" field.
func (*BlockMutation) SetTimestamp ¶
func (m *BlockMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "Timestamp" field.
func (*BlockMutation) SetUUID ¶
func (m *BlockMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
func (*BlockMutation) SourceChainID ¶
func (m *BlockMutation) SourceChainID() (r uint64, exists bool)
SourceChainID returns the value of the "SourceChainID" field in the mutation.
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) UUID ¶
func (m *BlockMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.Block.Query(). GroupBy(block.FieldUUID). 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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.Block.Query(). Select(block.FieldUUID). 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) AddBlockHeight ¶
func (bu *BlockUpdate) AddBlockHeight(u int64) *BlockUpdate
AddBlockHeight adds u to the "BlockHeight" 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) 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) AddSourceChainID ¶
func (bu *BlockUpdate) AddSourceChainID(u int64) *BlockUpdate
AddSourceChainID adds u to the "SourceChainID" field.
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) SetBlockHash ¶
func (bu *BlockUpdate) SetBlockHash(b []byte) *BlockUpdate
SetBlockHash sets the "BlockHash" field.
func (*BlockUpdate) SetBlockHeight ¶
func (bu *BlockUpdate) SetBlockHeight(u uint64) *BlockUpdate
SetBlockHeight sets the "BlockHeight" field.
func (*BlockUpdate) SetCreatedAt ¶
func (bu *BlockUpdate) SetCreatedAt(t time.Time) *BlockUpdate
SetCreatedAt sets the "CreatedAt" field.
func (*BlockUpdate) SetNillableBlockHeight ¶
func (bu *BlockUpdate) SetNillableBlockHeight(u *uint64) *BlockUpdate
SetNillableBlockHeight sets the "BlockHeight" field if the given value is not nil.
func (*BlockUpdate) SetNillableCreatedAt ¶
func (bu *BlockUpdate) SetNillableCreatedAt(t *time.Time) *BlockUpdate
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*BlockUpdate) SetNillableSourceChainID ¶
func (bu *BlockUpdate) SetNillableSourceChainID(u *uint64) *BlockUpdate
SetNillableSourceChainID sets the "SourceChainID" 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) SetNillableUUID ¶
func (bu *BlockUpdate) SetNillableUUID(u *uuid.UUID) *BlockUpdate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*BlockUpdate) SetSourceChainID ¶
func (bu *BlockUpdate) SetSourceChainID(u uint64) *BlockUpdate
SetSourceChainID sets the "SourceChainID" field.
func (*BlockUpdate) SetTimestamp ¶
func (bu *BlockUpdate) SetTimestamp(t time.Time) *BlockUpdate
SetTimestamp sets the "Timestamp" field.
func (*BlockUpdate) SetUUID ¶
func (bu *BlockUpdate) SetUUID(u uuid.UUID) *BlockUpdate
SetUUID sets the "UUID" 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) AddBlockHeight ¶
func (buo *BlockUpdateOne) AddBlockHeight(u int64) *BlockUpdateOne
AddBlockHeight adds u to the "BlockHeight" 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) 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) AddSourceChainID ¶
func (buo *BlockUpdateOne) AddSourceChainID(u int64) *BlockUpdateOne
AddSourceChainID adds u to the "SourceChainID" field.
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) SetBlockHash ¶
func (buo *BlockUpdateOne) SetBlockHash(b []byte) *BlockUpdateOne
SetBlockHash sets the "BlockHash" field.
func (*BlockUpdateOne) SetBlockHeight ¶
func (buo *BlockUpdateOne) SetBlockHeight(u uint64) *BlockUpdateOne
SetBlockHeight sets the "BlockHeight" field.
func (*BlockUpdateOne) SetCreatedAt ¶
func (buo *BlockUpdateOne) SetCreatedAt(t time.Time) *BlockUpdateOne
SetCreatedAt sets the "CreatedAt" field.
func (*BlockUpdateOne) SetNillableBlockHeight ¶
func (buo *BlockUpdateOne) SetNillableBlockHeight(u *uint64) *BlockUpdateOne
SetNillableBlockHeight sets the "BlockHeight" field if the given value is not nil.
func (*BlockUpdateOne) SetNillableCreatedAt ¶
func (buo *BlockUpdateOne) SetNillableCreatedAt(t *time.Time) *BlockUpdateOne
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*BlockUpdateOne) SetNillableSourceChainID ¶
func (buo *BlockUpdateOne) SetNillableSourceChainID(u *uint64) *BlockUpdateOne
SetNillableSourceChainID sets the "SourceChainID" 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) SetNillableUUID ¶
func (buo *BlockUpdateOne) SetNillableUUID(u *uuid.UUID) *BlockUpdateOne
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*BlockUpdateOne) SetSourceChainID ¶
func (buo *BlockUpdateOne) SetSourceChainID(u uint64) *BlockUpdateOne
SetSourceChainID sets the "SourceChainID" field.
func (*BlockUpdateOne) SetTimestamp ¶
func (buo *BlockUpdateOne) SetTimestamp(t time.Time) *BlockUpdateOne
SetTimestamp sets the "Timestamp" field.
func (*BlockUpdateOne) SetUUID ¶
func (buo *BlockUpdateOne) SetUUID(u uuid.UUID) *BlockUpdateOne
SetUUID sets the "UUID" 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"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // CreatedAt holds the value of the "CreatedAt" field. CreatedAt time.Time `json:"CreatedAt,omitempty"` // ChainID holds the value of the "ChainID" field. ChainID uint64 `json:"ChainID,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 "ChainID" field.
func (*ChainCreate) SetCreatedAt ¶
func (cc *ChainCreate) SetCreatedAt(t time.Time) *ChainCreate
SetCreatedAt sets the "CreatedAt" 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 "CreatedAt" field if the given value is not nil.
func (*ChainCreate) SetNillableUUID ¶
func (cc *ChainCreate) SetNillableUUID(u *uuid.UUID) *ChainCreate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*ChainCreate) SetUUID ¶
func (cc *ChainCreate) SetUUID(u uuid.UUID) *ChainCreate
SetUUID sets the "UUID" field.
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 ChainID field.
func (*ChainFilter) WhereCreatedAt ¶
func (f *ChainFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the CreatedAt 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.
func (*ChainFilter) WhereUUID ¶
func (f *ChainFilter) WhereUUID(p entql.ValueP)
WhereUUID applies the entql [16]byte predicate on the UUID 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 "ChainID" 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 "ChainID" 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 "ChainID" 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 "CreatedAt" 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 "ChainID" 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 "CreatedAt" 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) OldUUID ¶
OldUUID returns the old "UUID" 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 "ChainID" field.
func (*ChainMutation) ResetCreatedAt ¶
func (m *ChainMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "CreatedAt" 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) ResetUUID ¶
func (m *ChainMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*ChainMutation) SetChainID ¶
func (m *ChainMutation) SetChainID(u uint64)
SetChainID sets the "ChainID" field.
func (*ChainMutation) SetCreatedAt ¶
func (m *ChainMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "CreatedAt" 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) SetUUID ¶
func (m *ChainMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
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) UUID ¶
func (m *ChainMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.Chain.Query(). GroupBy(chain.FieldUUID). 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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.Chain.Query(). Select(chain.FieldUUID). 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 "ChainID" 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 "ChainID" field.
func (*ChainUpdate) SetCreatedAt ¶
func (cu *ChainUpdate) SetCreatedAt(t time.Time) *ChainUpdate
SetCreatedAt sets the "CreatedAt" 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 "ChainID" field if the given value is not nil.
func (*ChainUpdate) SetNillableCreatedAt ¶
func (cu *ChainUpdate) SetNillableCreatedAt(t *time.Time) *ChainUpdate
SetNillableCreatedAt sets the "CreatedAt" 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) SetNillableUUID ¶
func (cu *ChainUpdate) SetNillableUUID(u *uuid.UUID) *ChainUpdate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*ChainUpdate) SetUUID ¶
func (cu *ChainUpdate) SetUUID(u uuid.UUID) *ChainUpdate
SetUUID sets the "UUID" field.
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 "ChainID" 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 "ChainID" field.
func (*ChainUpdateOne) SetCreatedAt ¶
func (cuo *ChainUpdateOne) SetCreatedAt(t time.Time) *ChainUpdateOne
SetCreatedAt sets the "CreatedAt" 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 "ChainID" field if the given value is not nil.
func (*ChainUpdateOne) SetNillableCreatedAt ¶
func (cuo *ChainUpdateOne) SetNillableCreatedAt(t *time.Time) *ChainUpdateOne
SetNillableCreatedAt sets the "CreatedAt" 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) SetNillableUUID ¶
func (cuo *ChainUpdateOne) SetNillableUUID(u *uuid.UUID) *ChainUpdateOne
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*ChainUpdateOne) SetUUID ¶
func (cuo *ChainUpdateOne) SetUUID(u uuid.UUID) *ChainUpdateOne
SetUUID sets the "UUID" field.
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"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // SourceMsgSender holds the value of the "SourceMsgSender" field. SourceMsgSender []byte `json:"SourceMsgSender,omitempty"` // DestAddress holds the value of the "DestAddress" field. DestAddress []byte `json:"DestAddress,omitempty"` // Data holds the value of the "Data" field. Data []byte `json:"Data,omitempty"` // DestGasLimit holds the value of the "DestGasLimit" field. DestGasLimit uint64 `json:"DestGasLimit,omitempty"` // SourceChainID holds the value of the "SourceChainID" field. SourceChainID uint64 `json:"SourceChainID,omitempty"` // DestChainID holds the value of the "DestChainID" field. DestChainID uint64 `json:"DestChainID,omitempty"` // StreamOffset holds the value of the "StreamOffset" field. StreamOffset uint64 `json:"StreamOffset,omitempty"` // TxHash holds the value of the "TxHash" field. TxHash []byte `json:"TxHash,omitempty"` // CreatedAt holds the value of the "CreatedAt" field. CreatedAt time.Time `json:"CreatedAt,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) 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) 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) Mutation ¶
func (mc *MsgCreate) Mutation() *MsgMutation
Mutation returns the MsgMutation object of the builder.
func (*MsgCreate) SetBlockID ¶
SetBlockID sets the "Block" edge to the Block entity by ID.
func (*MsgCreate) SetCreatedAt ¶
SetCreatedAt sets the "CreatedAt" field.
func (*MsgCreate) SetDestAddress ¶
SetDestAddress sets the "DestAddress" field.
func (*MsgCreate) SetDestChainID ¶
SetDestChainID sets the "DestChainID" field.
func (*MsgCreate) SetDestGasLimit ¶
SetDestGasLimit sets the "DestGasLimit" field.
func (*MsgCreate) SetNillableBlockID ¶
SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.
func (*MsgCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*MsgCreate) SetNillableUUID ¶
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*MsgCreate) SetSourceChainID ¶
SetSourceChainID sets the "SourceChainID" field.
func (*MsgCreate) SetSourceMsgSender ¶
SetSourceMsgSender sets the "SourceMsgSender" field.
func (*MsgCreate) SetStreamOffset ¶
SetStreamOffset sets the "StreamOffset" 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"` // 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, or loaded but was not found.
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 CreatedAt field.
func (*MsgFilter) WhereDestAddress ¶
WhereDestAddress applies the entql []byte predicate on the DestAddress field.
func (*MsgFilter) WhereDestChainID ¶
WhereDestChainID applies the entql uint64 predicate on the DestChainID field.
func (*MsgFilter) WhereDestGasLimit ¶
WhereDestGasLimit applies the entql uint64 predicate on the DestGasLimit 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) WhereSourceChainID ¶
WhereSourceChainID applies the entql uint64 predicate on the SourceChainID field.
func (*MsgFilter) WhereSourceMsgSender ¶
WhereSourceMsgSender applies the entql []byte predicate on the SourceMsgSender field.
func (*MsgFilter) WhereStreamOffset ¶
WhereStreamOffset applies the entql uint64 predicate on the StreamOffset field.
func (*MsgFilter) WhereTxHash ¶
WhereTxHash applies the entql []byte predicate on the TxHash 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) AddDestChainID ¶
func (m *MsgMutation) AddDestChainID(u int64)
AddDestChainID adds u to the "DestChainID" field.
func (*MsgMutation) AddDestGasLimit ¶
func (m *MsgMutation) AddDestGasLimit(u int64)
AddDestGasLimit adds u to the "DestGasLimit" 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) AddSourceChainID ¶
func (m *MsgMutation) AddSourceChainID(u int64)
AddSourceChainID adds u to the "SourceChainID" field.
func (*MsgMutation) AddStreamOffset ¶
func (m *MsgMutation) AddStreamOffset(u int64)
AddStreamOffset adds u to the "StreamOffset" field.
func (*MsgMutation) AddedDestChainID ¶
func (m *MsgMutation) AddedDestChainID() (r int64, exists bool)
AddedDestChainID returns the value that was added to the "DestChainID" field in this mutation.
func (*MsgMutation) AddedDestGasLimit ¶
func (m *MsgMutation) AddedDestGasLimit() (r int64, exists bool)
AddedDestGasLimit returns the value that was added to the "DestGasLimit" 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) 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) AddedSourceChainID ¶
func (m *MsgMutation) AddedSourceChainID() (r int64, exists bool)
AddedSourceChainID returns the value that was added to the "SourceChainID" field in this mutation.
func (*MsgMutation) AddedStreamOffset ¶
func (m *MsgMutation) AddedStreamOffset() (r int64, exists bool)
AddedStreamOffset returns the value that was added to the "StreamOffset" 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) BlockID ¶
func (m *MsgMutation) BlockID() (id int, exists bool)
BlockID returns the "Block" edge ID in the mutation.
func (*MsgMutation) BlockIDs ¶
func (m *MsgMutation) BlockIDs() (ids []int)
BlockIDs returns the "Block" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BlockID instead. It exists only for internal usage by the builders.
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) 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 "CreatedAt" 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) DestAddress ¶
func (m *MsgMutation) DestAddress() (r []byte, exists bool)
DestAddress returns the value of the "DestAddress" field in the mutation.
func (*MsgMutation) DestChainID ¶
func (m *MsgMutation) DestChainID() (r uint64, exists bool)
DestChainID returns the value of the "DestChainID" field in the mutation.
func (*MsgMutation) DestGasLimit ¶
func (m *MsgMutation) DestGasLimit() (r uint64, exists bool)
DestGasLimit returns the value of the "DestGasLimit" 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) 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) OldCreatedAt ¶
OldCreatedAt returns the old "CreatedAt" 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) OldDestAddress ¶
func (m *MsgMutation) OldDestAddress(ctx context.Context) (v []byte, err error)
OldDestAddress returns the old "DestAddress" 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 "DestChainID" 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) OldDestGasLimit ¶
func (m *MsgMutation) OldDestGasLimit(ctx context.Context) (v uint64, err error)
OldDestGasLimit returns the old "DestGasLimit" 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) OldSourceChainID ¶
func (m *MsgMutation) OldSourceChainID(ctx context.Context) (v uint64, err error)
OldSourceChainID returns the old "SourceChainID" 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) OldSourceMsgSender ¶
func (m *MsgMutation) OldSourceMsgSender(ctx context.Context) (v []byte, err error)
OldSourceMsgSender returns the old "SourceMsgSender" 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) OldStreamOffset ¶
func (m *MsgMutation) OldStreamOffset(ctx context.Context) (v uint64, err error)
OldStreamOffset returns the old "StreamOffset" 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 "TxHash" 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) OldUUID ¶
OldUUID returns the old "UUID" 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) 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) 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 "CreatedAt" field.
func (*MsgMutation) ResetData ¶
func (m *MsgMutation) ResetData()
ResetData resets all changes to the "Data" field.
func (*MsgMutation) ResetDestAddress ¶
func (m *MsgMutation) ResetDestAddress()
ResetDestAddress resets all changes to the "DestAddress" field.
func (*MsgMutation) ResetDestChainID ¶
func (m *MsgMutation) ResetDestChainID()
ResetDestChainID resets all changes to the "DestChainID" field.
func (*MsgMutation) ResetDestGasLimit ¶
func (m *MsgMutation) ResetDestGasLimit()
ResetDestGasLimit resets all changes to the "DestGasLimit" 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) ResetSourceChainID ¶
func (m *MsgMutation) ResetSourceChainID()
ResetSourceChainID resets all changes to the "SourceChainID" field.
func (*MsgMutation) ResetSourceMsgSender ¶
func (m *MsgMutation) ResetSourceMsgSender()
ResetSourceMsgSender resets all changes to the "SourceMsgSender" field.
func (*MsgMutation) ResetStreamOffset ¶
func (m *MsgMutation) ResetStreamOffset()
ResetStreamOffset resets all changes to the "StreamOffset" field.
func (*MsgMutation) ResetTxHash ¶
func (m *MsgMutation) ResetTxHash()
ResetTxHash resets all changes to the "TxHash" field.
func (*MsgMutation) ResetUUID ¶
func (m *MsgMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*MsgMutation) SetBlockID ¶
func (m *MsgMutation) SetBlockID(id int)
SetBlockID sets the "Block" edge to the Block entity by id.
func (*MsgMutation) SetCreatedAt ¶
func (m *MsgMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "CreatedAt" field.
func (*MsgMutation) SetData ¶
func (m *MsgMutation) SetData(b []byte)
SetData sets the "Data" field.
func (*MsgMutation) SetDestAddress ¶
func (m *MsgMutation) SetDestAddress(b []byte)
SetDestAddress sets the "DestAddress" field.
func (*MsgMutation) SetDestChainID ¶
func (m *MsgMutation) SetDestChainID(u uint64)
SetDestChainID sets the "DestChainID" field.
func (*MsgMutation) SetDestGasLimit ¶
func (m *MsgMutation) SetDestGasLimit(u uint64)
SetDestGasLimit sets the "DestGasLimit" 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) SetOp ¶
func (m *MsgMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MsgMutation) SetSourceChainID ¶
func (m *MsgMutation) SetSourceChainID(u uint64)
SetSourceChainID sets the "SourceChainID" field.
func (*MsgMutation) SetSourceMsgSender ¶
func (m *MsgMutation) SetSourceMsgSender(b []byte)
SetSourceMsgSender sets the "SourceMsgSender" field.
func (*MsgMutation) SetStreamOffset ¶
func (m *MsgMutation) SetStreamOffset(u uint64)
SetStreamOffset sets the "StreamOffset" field.
func (*MsgMutation) SetTxHash ¶
func (m *MsgMutation) SetTxHash(b []byte)
SetTxHash sets the "TxHash" field.
func (*MsgMutation) SetUUID ¶
func (m *MsgMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
func (*MsgMutation) SourceChainID ¶
func (m *MsgMutation) SourceChainID() (r uint64, exists bool)
SourceChainID returns the value of the "SourceChainID" field in the mutation.
func (*MsgMutation) SourceMsgSender ¶
func (m *MsgMutation) SourceMsgSender() (r []byte, exists bool)
SourceMsgSender returns the value of the "SourceMsgSender" field in the mutation.
func (*MsgMutation) StreamOffset ¶
func (m *MsgMutation) StreamOffset() (r uint64, exists bool)
StreamOffset returns the value of the "StreamOffset" 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 "TxHash" field in the mutation.
func (*MsgMutation) Type ¶
func (m *MsgMutation) Type() string
Type returns the node type of this mutation (Msg).
func (*MsgMutation) UUID ¶
func (m *MsgMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.Msg.Query(). GroupBy(msg.FieldUUID). 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) 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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.Msg.Query(). Select(msg.FieldUUID). 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.
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) AddDestChainID ¶
AddDestChainID adds u to the "DestChainID" field.
func (*MsgUpdate) AddDestGasLimit ¶
AddDestGasLimit adds u to the "DestGasLimit" field.
func (*MsgUpdate) AddSourceChainID ¶
AddSourceChainID adds u to the "SourceChainID" field.
func (*MsgUpdate) AddStreamOffset ¶
AddStreamOffset adds u to the "StreamOffset" field.
func (*MsgUpdate) ClearBlock ¶
ClearBlock clears the "Block" edge to the Block entity.
func (*MsgUpdate) Mutation ¶
func (mu *MsgUpdate) Mutation() *MsgMutation
Mutation returns the MsgMutation object of the builder.
func (*MsgUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*MsgUpdate) SetBlockID ¶
SetBlockID sets the "Block" edge to the Block entity by ID.
func (*MsgUpdate) SetCreatedAt ¶
SetCreatedAt sets the "CreatedAt" field.
func (*MsgUpdate) SetDestAddress ¶
SetDestAddress sets the "DestAddress" field.
func (*MsgUpdate) SetDestChainID ¶
SetDestChainID sets the "DestChainID" field.
func (*MsgUpdate) SetDestGasLimit ¶
SetDestGasLimit sets the "DestGasLimit" field.
func (*MsgUpdate) SetNillableBlockID ¶
SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.
func (*MsgUpdate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*MsgUpdate) SetNillableDestChainID ¶
SetNillableDestChainID sets the "DestChainID" field if the given value is not nil.
func (*MsgUpdate) SetNillableDestGasLimit ¶
SetNillableDestGasLimit sets the "DestGasLimit" field if the given value is not nil.
func (*MsgUpdate) SetNillableSourceChainID ¶
SetNillableSourceChainID sets the "SourceChainID" field if the given value is not nil.
func (*MsgUpdate) SetNillableStreamOffset ¶
SetNillableStreamOffset sets the "StreamOffset" field if the given value is not nil.
func (*MsgUpdate) SetNillableUUID ¶
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*MsgUpdate) SetSourceChainID ¶
SetSourceChainID sets the "SourceChainID" field.
func (*MsgUpdate) SetSourceMsgSender ¶
SetSourceMsgSender sets the "SourceMsgSender" field.
func (*MsgUpdate) SetStreamOffset ¶
SetStreamOffset sets the "StreamOffset" field.
type MsgUpdateOne ¶
type MsgUpdateOne struct {
// contains filtered or unexported fields
}
MsgUpdateOne is the builder for updating a single Msg entity.
func (*MsgUpdateOne) AddDestChainID ¶
func (muo *MsgUpdateOne) AddDestChainID(u int64) *MsgUpdateOne
AddDestChainID adds u to the "DestChainID" field.
func (*MsgUpdateOne) AddDestGasLimit ¶
func (muo *MsgUpdateOne) AddDestGasLimit(u int64) *MsgUpdateOne
AddDestGasLimit adds u to the "DestGasLimit" field.
func (*MsgUpdateOne) AddSourceChainID ¶
func (muo *MsgUpdateOne) AddSourceChainID(u int64) *MsgUpdateOne
AddSourceChainID adds u to the "SourceChainID" field.
func (*MsgUpdateOne) AddStreamOffset ¶
func (muo *MsgUpdateOne) AddStreamOffset(u int64) *MsgUpdateOne
AddStreamOffset adds u to the "StreamOffset" field.
func (*MsgUpdateOne) ClearBlock ¶
func (muo *MsgUpdateOne) ClearBlock() *MsgUpdateOne
ClearBlock clears the "Block" edge to the Block entity.
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) 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) SetBlock ¶
func (muo *MsgUpdateOne) SetBlock(b *Block) *MsgUpdateOne
SetBlock sets the "Block" edge to the Block entity.
func (*MsgUpdateOne) SetBlockID ¶
func (muo *MsgUpdateOne) SetBlockID(id int) *MsgUpdateOne
SetBlockID sets the "Block" edge to the Block entity by ID.
func (*MsgUpdateOne) SetCreatedAt ¶
func (muo *MsgUpdateOne) SetCreatedAt(t time.Time) *MsgUpdateOne
SetCreatedAt sets the "CreatedAt" field.
func (*MsgUpdateOne) SetData ¶
func (muo *MsgUpdateOne) SetData(b []byte) *MsgUpdateOne
SetData sets the "Data" field.
func (*MsgUpdateOne) SetDestAddress ¶
func (muo *MsgUpdateOne) SetDestAddress(b []byte) *MsgUpdateOne
SetDestAddress sets the "DestAddress" field.
func (*MsgUpdateOne) SetDestChainID ¶
func (muo *MsgUpdateOne) SetDestChainID(u uint64) *MsgUpdateOne
SetDestChainID sets the "DestChainID" field.
func (*MsgUpdateOne) SetDestGasLimit ¶
func (muo *MsgUpdateOne) SetDestGasLimit(u uint64) *MsgUpdateOne
SetDestGasLimit sets the "DestGasLimit" field.
func (*MsgUpdateOne) SetNillableBlockID ¶
func (muo *MsgUpdateOne) SetNillableBlockID(id *int) *MsgUpdateOne
SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.
func (*MsgUpdateOne) SetNillableCreatedAt ¶
func (muo *MsgUpdateOne) SetNillableCreatedAt(t *time.Time) *MsgUpdateOne
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableDestChainID ¶
func (muo *MsgUpdateOne) SetNillableDestChainID(u *uint64) *MsgUpdateOne
SetNillableDestChainID sets the "DestChainID" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableDestGasLimit ¶
func (muo *MsgUpdateOne) SetNillableDestGasLimit(u *uint64) *MsgUpdateOne
SetNillableDestGasLimit sets the "DestGasLimit" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableSourceChainID ¶
func (muo *MsgUpdateOne) SetNillableSourceChainID(u *uint64) *MsgUpdateOne
SetNillableSourceChainID sets the "SourceChainID" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableStreamOffset ¶
func (muo *MsgUpdateOne) SetNillableStreamOffset(u *uint64) *MsgUpdateOne
SetNillableStreamOffset sets the "StreamOffset" field if the given value is not nil.
func (*MsgUpdateOne) SetNillableUUID ¶
func (muo *MsgUpdateOne) SetNillableUUID(u *uuid.UUID) *MsgUpdateOne
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*MsgUpdateOne) SetSourceChainID ¶
func (muo *MsgUpdateOne) SetSourceChainID(u uint64) *MsgUpdateOne
SetSourceChainID sets the "SourceChainID" field.
func (*MsgUpdateOne) SetSourceMsgSender ¶
func (muo *MsgUpdateOne) SetSourceMsgSender(b []byte) *MsgUpdateOne
SetSourceMsgSender sets the "SourceMsgSender" field.
func (*MsgUpdateOne) SetStreamOffset ¶
func (muo *MsgUpdateOne) SetStreamOffset(u uint64) *MsgUpdateOne
SetStreamOffset sets the "StreamOffset" field.
func (*MsgUpdateOne) SetTxHash ¶
func (muo *MsgUpdateOne) SetTxHash(b []byte) *MsgUpdateOne
SetTxHash sets the "TxHash" field.
func (*MsgUpdateOne) SetUUID ¶
func (muo *MsgUpdateOne) SetUUID(u uuid.UUID) *MsgUpdateOne
SetUUID sets the "UUID" 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"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // GasUsed holds the value of the "GasUsed" field. GasUsed uint64 `json:"GasUsed,omitempty"` // Success holds the value of the "Success" field. Success bool `json:"Success,omitempty"` // RelayerAddress holds the value of the "RelayerAddress" field. RelayerAddress []byte `json:"RelayerAddress,omitempty"` // SourceChainID holds the value of the "SourceChainID" field. SourceChainID uint64 `json:"SourceChainID,omitempty"` // DestChainID holds the value of the "DestChainID" field. DestChainID uint64 `json:"DestChainID,omitempty"` // StreamOffset holds the value of the "StreamOffset" field. StreamOffset uint64 `json:"StreamOffset,omitempty"` // TxHash holds the value of the "TxHash" field. TxHash []byte `json:"TxHash,omitempty"` // CreatedAt holds the value of the "CreatedAt" field. CreatedAt time.Time `json:"CreatedAt,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) 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) 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) 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) SetBlock ¶
func (rc *ReceiptCreate) SetBlock(b *Block) *ReceiptCreate
SetBlock sets the "Block" edge to the Block entity.
func (*ReceiptCreate) SetBlockID ¶
func (rc *ReceiptCreate) SetBlockID(id int) *ReceiptCreate
SetBlockID sets the "Block" edge to the Block entity by ID.
func (*ReceiptCreate) SetCreatedAt ¶
func (rc *ReceiptCreate) SetCreatedAt(t time.Time) *ReceiptCreate
SetCreatedAt sets the "CreatedAt" field.
func (*ReceiptCreate) SetDestChainID ¶
func (rc *ReceiptCreate) SetDestChainID(u uint64) *ReceiptCreate
SetDestChainID sets the "DestChainID" field.
func (*ReceiptCreate) SetGasUsed ¶
func (rc *ReceiptCreate) SetGasUsed(u uint64) *ReceiptCreate
SetGasUsed sets the "GasUsed" field.
func (*ReceiptCreate) SetNillableBlockID ¶
func (rc *ReceiptCreate) SetNillableBlockID(id *int) *ReceiptCreate
SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.
func (*ReceiptCreate) SetNillableCreatedAt ¶
func (rc *ReceiptCreate) SetNillableCreatedAt(t *time.Time) *ReceiptCreate
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*ReceiptCreate) SetNillableUUID ¶
func (rc *ReceiptCreate) SetNillableUUID(u *uuid.UUID) *ReceiptCreate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*ReceiptCreate) SetRelayerAddress ¶
func (rc *ReceiptCreate) SetRelayerAddress(b []byte) *ReceiptCreate
SetRelayerAddress sets the "RelayerAddress" field.
func (*ReceiptCreate) SetSourceChainID ¶
func (rc *ReceiptCreate) SetSourceChainID(u uint64) *ReceiptCreate
SetSourceChainID sets the "SourceChainID" field.
func (*ReceiptCreate) SetStreamOffset ¶
func (rc *ReceiptCreate) SetStreamOffset(u uint64) *ReceiptCreate
SetStreamOffset sets the "StreamOffset" 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 "TxHash" field.
func (*ReceiptCreate) SetUUID ¶
func (rc *ReceiptCreate) SetUUID(u uuid.UUID) *ReceiptCreate
SetUUID sets the "UUID" 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"` // 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, or loaded but was not found.
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) WhereCreatedAt ¶
func (f *ReceiptFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the CreatedAt field.
func (*ReceiptFilter) WhereDestChainID ¶
func (f *ReceiptFilter) WhereDestChainID(p entql.Uint64P)
WhereDestChainID applies the entql uint64 predicate on the DestChainID field.
func (*ReceiptFilter) WhereGasUsed ¶
func (f *ReceiptFilter) WhereGasUsed(p entql.Uint64P)
WhereGasUsed applies the entql uint64 predicate on the GasUsed 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) WhereID ¶
func (f *ReceiptFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*ReceiptFilter) WhereRelayerAddress ¶
func (f *ReceiptFilter) WhereRelayerAddress(p entql.BytesP)
WhereRelayerAddress applies the entql []byte predicate on the RelayerAddress field.
func (*ReceiptFilter) WhereSourceChainID ¶
func (f *ReceiptFilter) WhereSourceChainID(p entql.Uint64P)
WhereSourceChainID applies the entql uint64 predicate on the SourceChainID field.
func (*ReceiptFilter) WhereStreamOffset ¶
func (f *ReceiptFilter) WhereStreamOffset(p entql.Uint64P)
WhereStreamOffset applies the entql uint64 predicate on the StreamOffset 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 TxHash field.
func (*ReceiptFilter) WhereUUID ¶
func (f *ReceiptFilter) WhereUUID(p entql.ValueP)
WhereUUID applies the entql [16]byte predicate on the UUID 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) AddDestChainID ¶
func (m *ReceiptMutation) AddDestChainID(u int64)
AddDestChainID adds u to the "DestChainID" 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 "GasUsed" field.
func (*ReceiptMutation) AddSourceChainID ¶
func (m *ReceiptMutation) AddSourceChainID(u int64)
AddSourceChainID adds u to the "SourceChainID" field.
func (*ReceiptMutation) AddStreamOffset ¶
func (m *ReceiptMutation) AddStreamOffset(u int64)
AddStreamOffset adds u to the "StreamOffset" field.
func (*ReceiptMutation) AddedDestChainID ¶
func (m *ReceiptMutation) AddedDestChainID() (r int64, exists bool)
AddedDestChainID returns the value that was added to the "DestChainID" 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 "GasUsed" 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) AddedSourceChainID ¶
func (m *ReceiptMutation) AddedSourceChainID() (r int64, exists bool)
AddedSourceChainID returns the value that was added to the "SourceChainID" field in this mutation.
func (*ReceiptMutation) AddedStreamOffset ¶
func (m *ReceiptMutation) AddedStreamOffset() (r int64, exists bool)
AddedStreamOffset returns the value that was added to the "StreamOffset" 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) BlockID ¶
func (m *ReceiptMutation) BlockID() (id int, exists bool)
BlockID returns the "Block" edge ID in the mutation.
func (*ReceiptMutation) BlockIDs ¶
func (m *ReceiptMutation) BlockIDs() (ids []int)
BlockIDs returns the "Block" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BlockID instead. It exists only for internal usage by the builders.
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) 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 "CreatedAt" field in the mutation.
func (*ReceiptMutation) DestChainID ¶
func (m *ReceiptMutation) DestChainID() (r uint64, exists bool)
DestChainID returns the value of the "DestChainID" 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 "GasUsed" 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) OldCreatedAt ¶
OldCreatedAt returns the old "CreatedAt" 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 "DestChainID" 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 "GasUsed" 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 "RelayerAddress" 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 "SourceChainID" 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) OldStreamOffset ¶
func (m *ReceiptMutation) OldStreamOffset(ctx context.Context) (v uint64, err error)
OldStreamOffset returns the old "StreamOffset" 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 "TxHash" 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) OldUUID ¶
OldUUID returns the old "UUID" 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 "RelayerAddress" field in the mutation.
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) ResetBlock ¶
func (m *ReceiptMutation) ResetBlock()
ResetBlock resets all changes to the "Block" edge.
func (*ReceiptMutation) ResetCreatedAt ¶
func (m *ReceiptMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "CreatedAt" field.
func (*ReceiptMutation) ResetDestChainID ¶
func (m *ReceiptMutation) ResetDestChainID()
ResetDestChainID resets all changes to the "DestChainID" 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 "GasUsed" field.
func (*ReceiptMutation) ResetRelayerAddress ¶
func (m *ReceiptMutation) ResetRelayerAddress()
ResetRelayerAddress resets all changes to the "RelayerAddress" field.
func (*ReceiptMutation) ResetSourceChainID ¶
func (m *ReceiptMutation) ResetSourceChainID()
ResetSourceChainID resets all changes to the "SourceChainID" field.
func (*ReceiptMutation) ResetStreamOffset ¶
func (m *ReceiptMutation) ResetStreamOffset()
ResetStreamOffset resets all changes to the "StreamOffset" 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 "TxHash" field.
func (*ReceiptMutation) ResetUUID ¶
func (m *ReceiptMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*ReceiptMutation) SetBlockID ¶
func (m *ReceiptMutation) SetBlockID(id int)
SetBlockID sets the "Block" edge to the Block entity by id.
func (*ReceiptMutation) SetCreatedAt ¶
func (m *ReceiptMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "CreatedAt" field.
func (*ReceiptMutation) SetDestChainID ¶
func (m *ReceiptMutation) SetDestChainID(u uint64)
SetDestChainID sets the "DestChainID" 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 "GasUsed" 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 "RelayerAddress" field.
func (*ReceiptMutation) SetSourceChainID ¶
func (m *ReceiptMutation) SetSourceChainID(u uint64)
SetSourceChainID sets the "SourceChainID" field.
func (*ReceiptMutation) SetStreamOffset ¶
func (m *ReceiptMutation) SetStreamOffset(u uint64)
SetStreamOffset sets the "StreamOffset" 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 "TxHash" field.
func (*ReceiptMutation) SetUUID ¶
func (m *ReceiptMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
func (*ReceiptMutation) SourceChainID ¶
func (m *ReceiptMutation) SourceChainID() (r uint64, exists bool)
SourceChainID returns the value of the "SourceChainID" field in the mutation.
func (*ReceiptMutation) StreamOffset ¶
func (m *ReceiptMutation) StreamOffset() (r uint64, exists bool)
StreamOffset returns the value of the "StreamOffset" 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 "TxHash" field in the mutation.
func (*ReceiptMutation) Type ¶
func (m *ReceiptMutation) Type() string
Type returns the node type of this mutation (Receipt).
func (*ReceiptMutation) UUID ¶
func (m *ReceiptMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.Receipt.Query(). GroupBy(receipt.FieldUUID). 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) 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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.Receipt.Query(). Select(receipt.FieldUUID). 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.
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) AddDestChainID ¶
func (ru *ReceiptUpdate) AddDestChainID(u int64) *ReceiptUpdate
AddDestChainID adds u to the "DestChainID" field.
func (*ReceiptUpdate) AddGasUsed ¶
func (ru *ReceiptUpdate) AddGasUsed(u int64) *ReceiptUpdate
AddGasUsed adds u to the "GasUsed" field.
func (*ReceiptUpdate) AddSourceChainID ¶
func (ru *ReceiptUpdate) AddSourceChainID(u int64) *ReceiptUpdate
AddSourceChainID adds u to the "SourceChainID" field.
func (*ReceiptUpdate) AddStreamOffset ¶
func (ru *ReceiptUpdate) AddStreamOffset(u int64) *ReceiptUpdate
AddStreamOffset adds u to the "StreamOffset" field.
func (*ReceiptUpdate) ClearBlock ¶
func (ru *ReceiptUpdate) ClearBlock() *ReceiptUpdate
ClearBlock clears the "Block" edge to the Block entity.
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) 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) SetBlock ¶
func (ru *ReceiptUpdate) SetBlock(b *Block) *ReceiptUpdate
SetBlock sets the "Block" edge to the Block entity.
func (*ReceiptUpdate) SetBlockID ¶
func (ru *ReceiptUpdate) SetBlockID(id int) *ReceiptUpdate
SetBlockID sets the "Block" edge to the Block entity by ID.
func (*ReceiptUpdate) SetCreatedAt ¶
func (ru *ReceiptUpdate) SetCreatedAt(t time.Time) *ReceiptUpdate
SetCreatedAt sets the "CreatedAt" field.
func (*ReceiptUpdate) SetDestChainID ¶
func (ru *ReceiptUpdate) SetDestChainID(u uint64) *ReceiptUpdate
SetDestChainID sets the "DestChainID" field.
func (*ReceiptUpdate) SetGasUsed ¶
func (ru *ReceiptUpdate) SetGasUsed(u uint64) *ReceiptUpdate
SetGasUsed sets the "GasUsed" field.
func (*ReceiptUpdate) SetNillableBlockID ¶
func (ru *ReceiptUpdate) SetNillableBlockID(id *int) *ReceiptUpdate
SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.
func (*ReceiptUpdate) SetNillableCreatedAt ¶
func (ru *ReceiptUpdate) SetNillableCreatedAt(t *time.Time) *ReceiptUpdate
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableDestChainID ¶
func (ru *ReceiptUpdate) SetNillableDestChainID(u *uint64) *ReceiptUpdate
SetNillableDestChainID sets the "DestChainID" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableGasUsed ¶
func (ru *ReceiptUpdate) SetNillableGasUsed(u *uint64) *ReceiptUpdate
SetNillableGasUsed sets the "GasUsed" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableSourceChainID ¶
func (ru *ReceiptUpdate) SetNillableSourceChainID(u *uint64) *ReceiptUpdate
SetNillableSourceChainID sets the "SourceChainID" field if the given value is not nil.
func (*ReceiptUpdate) SetNillableStreamOffset ¶
func (ru *ReceiptUpdate) SetNillableStreamOffset(u *uint64) *ReceiptUpdate
SetNillableStreamOffset sets the "StreamOffset" 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) SetNillableUUID ¶
func (ru *ReceiptUpdate) SetNillableUUID(u *uuid.UUID) *ReceiptUpdate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*ReceiptUpdate) SetRelayerAddress ¶
func (ru *ReceiptUpdate) SetRelayerAddress(b []byte) *ReceiptUpdate
SetRelayerAddress sets the "RelayerAddress" field.
func (*ReceiptUpdate) SetSourceChainID ¶
func (ru *ReceiptUpdate) SetSourceChainID(u uint64) *ReceiptUpdate
SetSourceChainID sets the "SourceChainID" field.
func (*ReceiptUpdate) SetStreamOffset ¶
func (ru *ReceiptUpdate) SetStreamOffset(u uint64) *ReceiptUpdate
SetStreamOffset sets the "StreamOffset" 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 "TxHash" field.
func (*ReceiptUpdate) SetUUID ¶
func (ru *ReceiptUpdate) SetUUID(u uuid.UUID) *ReceiptUpdate
SetUUID sets the "UUID" 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) AddDestChainID ¶
func (ruo *ReceiptUpdateOne) AddDestChainID(u int64) *ReceiptUpdateOne
AddDestChainID adds u to the "DestChainID" field.
func (*ReceiptUpdateOne) AddGasUsed ¶
func (ruo *ReceiptUpdateOne) AddGasUsed(u int64) *ReceiptUpdateOne
AddGasUsed adds u to the "GasUsed" field.
func (*ReceiptUpdateOne) AddSourceChainID ¶
func (ruo *ReceiptUpdateOne) AddSourceChainID(u int64) *ReceiptUpdateOne
AddSourceChainID adds u to the "SourceChainID" field.
func (*ReceiptUpdateOne) AddStreamOffset ¶
func (ruo *ReceiptUpdateOne) AddStreamOffset(u int64) *ReceiptUpdateOne
AddStreamOffset adds u to the "StreamOffset" field.
func (*ReceiptUpdateOne) ClearBlock ¶
func (ruo *ReceiptUpdateOne) ClearBlock() *ReceiptUpdateOne
ClearBlock clears the "Block" edge to the Block entity.
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) 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) SetBlock ¶
func (ruo *ReceiptUpdateOne) SetBlock(b *Block) *ReceiptUpdateOne
SetBlock sets the "Block" edge to the Block entity.
func (*ReceiptUpdateOne) SetBlockID ¶
func (ruo *ReceiptUpdateOne) SetBlockID(id int) *ReceiptUpdateOne
SetBlockID sets the "Block" edge to the Block entity by ID.
func (*ReceiptUpdateOne) SetCreatedAt ¶
func (ruo *ReceiptUpdateOne) SetCreatedAt(t time.Time) *ReceiptUpdateOne
SetCreatedAt sets the "CreatedAt" field.
func (*ReceiptUpdateOne) SetDestChainID ¶
func (ruo *ReceiptUpdateOne) SetDestChainID(u uint64) *ReceiptUpdateOne
SetDestChainID sets the "DestChainID" field.
func (*ReceiptUpdateOne) SetGasUsed ¶
func (ruo *ReceiptUpdateOne) SetGasUsed(u uint64) *ReceiptUpdateOne
SetGasUsed sets the "GasUsed" field.
func (*ReceiptUpdateOne) SetNillableBlockID ¶
func (ruo *ReceiptUpdateOne) SetNillableBlockID(id *int) *ReceiptUpdateOne
SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableCreatedAt ¶
func (ruo *ReceiptUpdateOne) SetNillableCreatedAt(t *time.Time) *ReceiptUpdateOne
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableDestChainID ¶
func (ruo *ReceiptUpdateOne) SetNillableDestChainID(u *uint64) *ReceiptUpdateOne
SetNillableDestChainID sets the "DestChainID" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableGasUsed ¶
func (ruo *ReceiptUpdateOne) SetNillableGasUsed(u *uint64) *ReceiptUpdateOne
SetNillableGasUsed sets the "GasUsed" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableSourceChainID ¶
func (ruo *ReceiptUpdateOne) SetNillableSourceChainID(u *uint64) *ReceiptUpdateOne
SetNillableSourceChainID sets the "SourceChainID" field if the given value is not nil.
func (*ReceiptUpdateOne) SetNillableStreamOffset ¶
func (ruo *ReceiptUpdateOne) SetNillableStreamOffset(u *uint64) *ReceiptUpdateOne
SetNillableStreamOffset sets the "StreamOffset" 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) SetNillableUUID ¶
func (ruo *ReceiptUpdateOne) SetNillableUUID(u *uuid.UUID) *ReceiptUpdateOne
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*ReceiptUpdateOne) SetRelayerAddress ¶
func (ruo *ReceiptUpdateOne) SetRelayerAddress(b []byte) *ReceiptUpdateOne
SetRelayerAddress sets the "RelayerAddress" field.
func (*ReceiptUpdateOne) SetSourceChainID ¶
func (ruo *ReceiptUpdateOne) SetSourceChainID(u uint64) *ReceiptUpdateOne
SetSourceChainID sets the "SourceChainID" field.
func (*ReceiptUpdateOne) SetStreamOffset ¶
func (ruo *ReceiptUpdateOne) SetStreamOffset(u uint64) *ReceiptUpdateOne
SetStreamOffset sets the "StreamOffset" 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 "TxHash" field.
func (*ReceiptUpdateOne) SetUUID ¶
func (ruo *ReceiptUpdateOne) SetUUID(u uuid.UUID) *ReceiptUpdateOne
SetUUID sets the "UUID" 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 int `json:"id,omitempty"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // ChainID holds the value of the "ChainID" field. ChainID uint64 `json:"ChainID,omitempty"` // Height holds the value of the "Height" field. Height uint64 `json:"Height,omitempty"` // CreatedAt holds the value of the "CreatedAt" field. CreatedAt time.Time `json:"CreatedAt,omitempty"` // UpdatedAt holds the value of the "UpdatedAt" field. UpdatedAt time.Time `json:"UpdatedAt,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 int) *XProviderCursorDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*XProviderCursorClient) Get ¶
func (c *XProviderCursorClient) Get(ctx context.Context, id int) (*XProviderCursor, error)
Get returns a XProviderCursor entity by its id.
func (*XProviderCursorClient) GetX ¶
func (c *XProviderCursorClient) GetX(ctx context.Context, id int) *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 int) *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 "ChainID" field.
func (*XProviderCursorCreate) SetCreatedAt ¶
func (xcc *XProviderCursorCreate) SetCreatedAt(t time.Time) *XProviderCursorCreate
SetCreatedAt sets the "CreatedAt" field.
func (*XProviderCursorCreate) SetHeight ¶
func (xcc *XProviderCursorCreate) SetHeight(u uint64) *XProviderCursorCreate
SetHeight sets the "Height" field.
func (*XProviderCursorCreate) SetNillableCreatedAt ¶
func (xcc *XProviderCursorCreate) SetNillableCreatedAt(t *time.Time) *XProviderCursorCreate
SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.
func (*XProviderCursorCreate) SetNillableUUID ¶
func (xcc *XProviderCursorCreate) SetNillableUUID(u *uuid.UUID) *XProviderCursorCreate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*XProviderCursorCreate) SetNillableUpdatedAt ¶
func (xcc *XProviderCursorCreate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorCreate
SetNillableUpdatedAt sets the "UpdatedAt" field if the given value is not nil.
func (*XProviderCursorCreate) SetUUID ¶
func (xcc *XProviderCursorCreate) SetUUID(u uuid.UUID) *XProviderCursorCreate
SetUUID sets the "UUID" field.
func (*XProviderCursorCreate) SetUpdatedAt ¶
func (xcc *XProviderCursorCreate) SetUpdatedAt(t time.Time) *XProviderCursorCreate
SetUpdatedAt sets the "UpdatedAt" 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 ChainID field.
func (*XProviderCursorFilter) WhereCreatedAt ¶
func (f *XProviderCursorFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the CreatedAt 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.IntP)
WhereID applies the entql int predicate on the id field.
func (*XProviderCursorFilter) WhereUUID ¶
func (f *XProviderCursorFilter) WhereUUID(p entql.ValueP)
WhereUUID applies the entql [16]byte predicate on the UUID field.
func (*XProviderCursorFilter) WhereUpdatedAt ¶
func (f *XProviderCursorFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the UpdatedAt 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 "ChainID" 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) AddedChainID ¶
func (m *XProviderCursorMutation) AddedChainID() (r int64, exists bool)
AddedChainID returns the value that was added to the "ChainID" 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) ChainID ¶
func (m *XProviderCursorMutation) ChainID() (r uint64, exists bool)
ChainID returns the value of the "ChainID" 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 "CreatedAt" 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 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 (*XProviderCursorMutation) IDs ¶
func (m *XProviderCursorMutation) 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 (*XProviderCursorMutation) OldChainID ¶
func (m *XProviderCursorMutation) OldChainID(ctx context.Context) (v uint64, err error)
OldChainID returns the old "ChainID" 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 "CreatedAt" 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) OldUUID ¶
OldUUID returns the old "UUID" 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 "UpdatedAt" 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 "ChainID" field.
func (*XProviderCursorMutation) ResetCreatedAt ¶
func (m *XProviderCursorMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "CreatedAt" 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) ResetUUID ¶
func (m *XProviderCursorMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*XProviderCursorMutation) ResetUpdatedAt ¶
func (m *XProviderCursorMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "UpdatedAt" field.
func (*XProviderCursorMutation) SetChainID ¶
func (m *XProviderCursorMutation) SetChainID(u uint64)
SetChainID sets the "ChainID" field.
func (*XProviderCursorMutation) SetCreatedAt ¶
func (m *XProviderCursorMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "CreatedAt" 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) SetOp ¶
func (m *XProviderCursorMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*XProviderCursorMutation) SetUUID ¶
func (m *XProviderCursorMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
func (*XProviderCursorMutation) SetUpdatedAt ¶
func (m *XProviderCursorMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "UpdatedAt" 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) UUID ¶
func (m *XProviderCursorMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
func (*XProviderCursorMutation) UpdatedAt ¶
func (m *XProviderCursorMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "UpdatedAt" 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 ¶
func (xcq *XProviderCursorQuery) FirstID(ctx context.Context) (id int, err error)
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) int
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.XProviderCursor.Query(). GroupBy(xprovidercursor.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*XProviderCursorQuery) IDs ¶
func (xcq *XProviderCursorQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of XProviderCursor IDs.
func (*XProviderCursorQuery) IDsX ¶
func (xcq *XProviderCursorQuery) IDsX(ctx context.Context) []int
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 ¶
func (xcq *XProviderCursorQuery) OnlyID(ctx context.Context) (id int, err error)
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) int
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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.XProviderCursor.Query(). Select(xprovidercursor.FieldUUID). 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 "ChainID" field.
func (*XProviderCursorUpdate) AddHeight ¶
func (xcu *XProviderCursorUpdate) AddHeight(u int64) *XProviderCursorUpdate
AddHeight adds u to the "Height" 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 "ChainID" field.
func (*XProviderCursorUpdate) SetCreatedAt ¶
func (xcu *XProviderCursorUpdate) SetCreatedAt(t time.Time) *XProviderCursorUpdate
SetCreatedAt sets the "CreatedAt" 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 "ChainID" field if the given value is not nil.
func (*XProviderCursorUpdate) SetNillableCreatedAt ¶
func (xcu *XProviderCursorUpdate) SetNillableCreatedAt(t *time.Time) *XProviderCursorUpdate
SetNillableCreatedAt sets the "CreatedAt" 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) SetNillableUUID ¶
func (xcu *XProviderCursorUpdate) SetNillableUUID(u *uuid.UUID) *XProviderCursorUpdate
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*XProviderCursorUpdate) SetNillableUpdatedAt ¶
func (xcu *XProviderCursorUpdate) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdate
SetNillableUpdatedAt sets the "UpdatedAt" field if the given value is not nil.
func (*XProviderCursorUpdate) SetUUID ¶
func (xcu *XProviderCursorUpdate) SetUUID(u uuid.UUID) *XProviderCursorUpdate
SetUUID sets the "UUID" field.
func (*XProviderCursorUpdate) SetUpdatedAt ¶
func (xcu *XProviderCursorUpdate) SetUpdatedAt(t time.Time) *XProviderCursorUpdate
SetUpdatedAt sets the "UpdatedAt" 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 "ChainID" field.
func (*XProviderCursorUpdateOne) AddHeight ¶
func (xcuo *XProviderCursorUpdateOne) AddHeight(u int64) *XProviderCursorUpdateOne
AddHeight adds u to the "Height" 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 "ChainID" field.
func (*XProviderCursorUpdateOne) SetCreatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetCreatedAt(t time.Time) *XProviderCursorUpdateOne
SetCreatedAt sets the "CreatedAt" 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 "ChainID" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetNillableCreatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetNillableCreatedAt(t *time.Time) *XProviderCursorUpdateOne
SetNillableCreatedAt sets the "CreatedAt" 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) SetNillableUUID ¶
func (xcuo *XProviderCursorUpdateOne) SetNillableUUID(u *uuid.UUID) *XProviderCursorUpdateOne
SetNillableUUID sets the "UUID" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetNillableUpdatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetNillableUpdatedAt(t *time.Time) *XProviderCursorUpdateOne
SetNillableUpdatedAt sets the "UpdatedAt" field if the given value is not nil.
func (*XProviderCursorUpdateOne) SetUUID ¶
func (xcuo *XProviderCursorUpdateOne) SetUUID(u uuid.UUID) *XProviderCursorUpdateOne
SetUUID sets the "UUID" field.
func (*XProviderCursorUpdateOne) SetUpdatedAt ¶
func (xcuo *XProviderCursorUpdateOne) SetUpdatedAt(t time.Time) *XProviderCursorUpdateOne
SetUpdatedAt sets the "UpdatedAt" 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
- 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