ent

package
v0.1.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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 Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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) QueryMsgs

func (b *Block) QueryMsgs() *MsgQuery

QueryMsgs queries the "Msgs" edge of the Block entity.

func (*Block) QueryReceipts

func (b *Block) QueryReceipts() *ReceiptQuery

QueryReceipts queries the "Receipts" edge of the Block entity.

func (*Block) String

func (b *Block) String() string

String implements the fmt.Stringer.

func (*Block) Unwrap

func (b *Block) Unwrap() *Block

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.

func (*Block) Value

func (b *Block) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Block. This includes values selected through modifiers, order, etc.

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) Get

func (c *BlockClient) Get(ctx context.Context, id int) (*Block, error)

Get returns a Block 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) Hooks

func (c *BlockClient) Hooks() []Hook

Hooks returns the client hooks.

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.

func (*BlockCreateBulk) Save

func (bcb *BlockCreateBulk) Save(ctx context.Context) ([]*Block, error)

Save creates the Block entities in the database.

func (*BlockCreateBulk) SaveX

func (bcb *BlockCreateBulk) SaveX(ctx context.Context) []*Block

SaveX is like Save, 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

func (s *BlockGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) BoolX

func (s *BlockGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BlockGroupBy) Bools

func (s *BlockGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) BoolsX

func (s *BlockGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BlockGroupBy) Float64

func (s *BlockGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) Float64X

func (s *BlockGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BlockGroupBy) Float64s

func (s *BlockGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) Float64sX

func (s *BlockGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BlockGroupBy) Int

func (s *BlockGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) IntX

func (s *BlockGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BlockGroupBy) Ints

func (s *BlockGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) IntsX

func (s *BlockGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *BlockGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BlockGroupBy) String

func (s *BlockGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) StringX

func (s *BlockGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BlockGroupBy) Strings

func (s *BlockGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BlockGroupBy) StringsX

func (s *BlockGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *BlockMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *BlockMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *BlockMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)

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

func (m *BlockMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)

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) Op

func (m *BlockMutation) Op() Op

Op returns the operation name.

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

func (s *BlockSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BlockSelect) BoolX

func (s *BlockSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BlockSelect) Bools

func (s *BlockSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BlockSelect) BoolsX

func (s *BlockSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BlockSelect) Float64

func (s *BlockSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BlockSelect) Float64X

func (s *BlockSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BlockSelect) Float64s

func (s *BlockSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BlockSelect) Float64sX

func (s *BlockSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BlockSelect) Int

func (s *BlockSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BlockSelect) IntX

func (s *BlockSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BlockSelect) Ints

func (s *BlockSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BlockSelect) IntsX

func (s *BlockSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *BlockSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BlockSelect) String

func (s *BlockSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BlockSelect) StringX

func (s *BlockSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BlockSelect) Strings

func (s *BlockSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BlockSelect) StringsX

func (s *BlockSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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 Blocks

type Blocks []*Block

Blocks is a parsable slice of Block.

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) String

func (c *Chain) String() string

String implements the fmt.Stringer.

func (*Chain) Unwrap

func (c *Chain) Unwrap() *Chain

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.

func (*Chain) Value

func (c *Chain) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Chain. This includes values selected through modifiers, order, etc.

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) Get

func (c *ChainClient) Get(ctx context.Context, id int) (*Chain, error)

Get returns a Chain 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) Hooks

func (c *ChainClient) Hooks() []Hook

Hooks returns the client hooks.

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.

func (*ChainCreateBulk) Save

func (ccb *ChainCreateBulk) Save(ctx context.Context) ([]*Chain, error)

Save creates the Chain entities in the database.

func (*ChainCreateBulk) SaveX

func (ccb *ChainCreateBulk) SaveX(ctx context.Context) []*Chain

SaveX is like Save, 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

func (s *ChainGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) BoolX

func (s *ChainGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ChainGroupBy) Bools

func (s *ChainGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) BoolsX

func (s *ChainGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ChainGroupBy) Float64

func (s *ChainGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) Float64X

func (s *ChainGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ChainGroupBy) Float64s

func (s *ChainGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) Float64sX

func (s *ChainGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ChainGroupBy) Int

func (s *ChainGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) IntX

func (s *ChainGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ChainGroupBy) Ints

func (s *ChainGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) IntsX

func (s *ChainGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *ChainGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ChainGroupBy) String

func (s *ChainGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) StringX

func (s *ChainGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ChainGroupBy) Strings

func (s *ChainGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ChainGroupBy) StringsX

func (s *ChainGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *ChainMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *ChainMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *ChainMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)

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) Op

func (m *ChainMutation) Op() Op

Op returns the operation name.

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

func (s *ChainSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ChainSelect) BoolX

func (s *ChainSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ChainSelect) Bools

func (s *ChainSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ChainSelect) BoolsX

func (s *ChainSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ChainSelect) Float64

func (s *ChainSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ChainSelect) Float64X

func (s *ChainSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ChainSelect) Float64s

func (s *ChainSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ChainSelect) Float64sX

func (s *ChainSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ChainSelect) Int

func (s *ChainSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ChainSelect) IntX

func (s *ChainSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ChainSelect) Ints

func (s *ChainSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ChainSelect) IntsX

func (s *ChainSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *ChainSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ChainSelect) String

func (s *ChainSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ChainSelect) StringX

func (s *ChainSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ChainSelect) Strings

func (s *ChainSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ChainSelect) StringsX

func (s *ChainSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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 Chains

type Chains []*Chain

Chains is a parsable slice of Chain.

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

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

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(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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 Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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) String

func (m *Msg) String() string

String implements the fmt.Stringer.

func (*Msg) Unwrap

func (m *Msg) Unwrap() *Msg

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.

func (*Msg) Value

func (m *Msg) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Msg. This includes values selected through modifiers, order, etc.

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) Create

func (c *MsgClient) Create() *MsgCreate

Create returns a builder for creating a Msg entity.

func (*MsgClient) CreateBulk

func (c *MsgClient) CreateBulk(builders ...*MsgCreate) *MsgCreateBulk

CreateBulk returns a builder for creating a bulk of Msg entities.

func (*MsgClient) Delete

func (c *MsgClient) Delete() *MsgDelete

Delete returns a delete builder for Msg.

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) Get

func (c *MsgClient) Get(ctx context.Context, id int) (*Msg, error)

Get returns a Msg entity by its id.

func (*MsgClient) GetX

func (c *MsgClient) GetX(ctx context.Context, id int) *Msg

GetX is like Get, but panics if an error occurs.

func (*MsgClient) Hooks

func (c *MsgClient) Hooks() []Hook

Hooks returns the client hooks.

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) Query

func (c *MsgClient) Query() *MsgQuery

Query returns a query builder for Msg.

func (*MsgClient) QueryBlock

func (c *MsgClient) QueryBlock(m *Msg) *BlockQuery

QueryBlock queries the Block edge of a Msg.

func (*MsgClient) Update

func (c *MsgClient) Update() *MsgUpdate

Update returns an update builder for 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.

func (*MsgClient) Use

func (c *MsgClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `msg.Hooks(f(g(h())))`.

type MsgCreate

type MsgCreate struct {
	// contains filtered or unexported fields
}

MsgCreate is the builder for creating a Msg entity.

func (*MsgCreate) Exec

func (mc *MsgCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgCreate) ExecX

func (mc *MsgCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgCreate) Mutation

func (mc *MsgCreate) Mutation() *MsgMutation

Mutation returns the MsgMutation object of the builder.

func (*MsgCreate) Save

func (mc *MsgCreate) Save(ctx context.Context) (*Msg, error)

Save creates the Msg in the database.

func (*MsgCreate) SaveX

func (mc *MsgCreate) SaveX(ctx context.Context) *Msg

SaveX calls Save and panics if Save returns an error.

func (*MsgCreate) SetBlock

func (mc *MsgCreate) SetBlock(b *Block) *MsgCreate

SetBlock sets the "Block" edge to the Block entity.

func (*MsgCreate) SetBlockID

func (mc *MsgCreate) SetBlockID(id int) *MsgCreate

SetBlockID sets the "Block" edge to the Block entity by ID.

func (*MsgCreate) SetCreatedAt

func (mc *MsgCreate) SetCreatedAt(t time.Time) *MsgCreate

SetCreatedAt sets the "CreatedAt" field.

func (*MsgCreate) SetData

func (mc *MsgCreate) SetData(b []byte) *MsgCreate

SetData sets the "Data" field.

func (*MsgCreate) SetDestAddress

func (mc *MsgCreate) SetDestAddress(b []byte) *MsgCreate

SetDestAddress sets the "DestAddress" field.

func (*MsgCreate) SetDestChainID

func (mc *MsgCreate) SetDestChainID(u uint64) *MsgCreate

SetDestChainID sets the "DestChainID" field.

func (*MsgCreate) SetDestGasLimit

func (mc *MsgCreate) SetDestGasLimit(u uint64) *MsgCreate

SetDestGasLimit sets the "DestGasLimit" field.

func (*MsgCreate) SetNillableBlockID

func (mc *MsgCreate) SetNillableBlockID(id *int) *MsgCreate

SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.

func (*MsgCreate) SetNillableCreatedAt

func (mc *MsgCreate) SetNillableCreatedAt(t *time.Time) *MsgCreate

SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.

func (*MsgCreate) SetNillableUUID

func (mc *MsgCreate) SetNillableUUID(u *uuid.UUID) *MsgCreate

SetNillableUUID sets the "UUID" field if the given value is not nil.

func (*MsgCreate) SetSourceChainID

func (mc *MsgCreate) SetSourceChainID(u uint64) *MsgCreate

SetSourceChainID sets the "SourceChainID" field.

func (*MsgCreate) SetSourceMsgSender

func (mc *MsgCreate) SetSourceMsgSender(b []byte) *MsgCreate

SetSourceMsgSender sets the "SourceMsgSender" field.

func (*MsgCreate) SetStreamOffset

func (mc *MsgCreate) SetStreamOffset(u uint64) *MsgCreate

SetStreamOffset sets the "StreamOffset" field.

func (*MsgCreate) SetTxHash

func (mc *MsgCreate) SetTxHash(b []byte) *MsgCreate

SetTxHash sets the "TxHash" field.

func (*MsgCreate) SetUUID

func (mc *MsgCreate) SetUUID(u uuid.UUID) *MsgCreate

SetUUID sets the "UUID" 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.

func (*MsgCreateBulk) Save

func (mcb *MsgCreateBulk) Save(ctx context.Context) ([]*Msg, error)

Save creates the Msg entities in the database.

func (*MsgCreateBulk) SaveX

func (mcb *MsgCreateBulk) SaveX(ctx context.Context) []*Msg

SaveX is like Save, 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

func (md *MsgDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MsgDelete) ExecX

func (md *MsgDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MsgDelete) Where

func (md *MsgDelete) Where(ps ...predicate.Msg) *MsgDelete

Where appends a list predicates to the MsgDelete builder.

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

func (e MsgEdges) 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 MsgFilter

type MsgFilter struct {
	// contains filtered or unexported fields
}

MsgFilter provides a generic filtering capability at runtime for MsgQuery.

func (*MsgFilter) Where

func (f *MsgFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*MsgFilter) WhereCreatedAt

func (f *MsgFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the CreatedAt field.

func (*MsgFilter) WhereData

func (f *MsgFilter) WhereData(p entql.BytesP)

WhereData applies the entql []byte predicate on the Data field.

func (*MsgFilter) WhereDestAddress

func (f *MsgFilter) WhereDestAddress(p entql.BytesP)

WhereDestAddress applies the entql []byte predicate on the DestAddress field.

func (*MsgFilter) WhereDestChainID

func (f *MsgFilter) WhereDestChainID(p entql.Uint64P)

WhereDestChainID applies the entql uint64 predicate on the DestChainID field.

func (*MsgFilter) WhereDestGasLimit

func (f *MsgFilter) WhereDestGasLimit(p entql.Uint64P)

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

func (f *MsgFilter) WhereHasBlockWith(preds ...predicate.Block)

WhereHasBlockWith applies a predicate to check if query has an edge Block with a given conditions (other predicates).

func (*MsgFilter) WhereID

func (f *MsgFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*MsgFilter) WhereSourceChainID

func (f *MsgFilter) WhereSourceChainID(p entql.Uint64P)

WhereSourceChainID applies the entql uint64 predicate on the SourceChainID field.

func (*MsgFilter) WhereSourceMsgSender

func (f *MsgFilter) WhereSourceMsgSender(p entql.BytesP)

WhereSourceMsgSender applies the entql []byte predicate on the SourceMsgSender field.

func (*MsgFilter) WhereStreamOffset

func (f *MsgFilter) WhereStreamOffset(p entql.Uint64P)

WhereStreamOffset applies the entql uint64 predicate on the StreamOffset field.

func (*MsgFilter) WhereTxHash

func (f *MsgFilter) WhereTxHash(p entql.BytesP)

WhereTxHash applies the entql []byte predicate on the TxHash field.

func (*MsgFilter) WhereUUID

func (f *MsgFilter) WhereUUID(p entql.ValueP)

WhereUUID applies the entql [16]byte predicate on the UUID 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

func (s *MsgGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) BoolX

func (s *MsgGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgGroupBy) Bools

func (s *MsgGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) BoolsX

func (s *MsgGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgGroupBy) Float64

func (s *MsgGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) Float64X

func (s *MsgGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgGroupBy) Float64s

func (s *MsgGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) Float64sX

func (s *MsgGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgGroupBy) Int

func (s *MsgGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) IntX

func (s *MsgGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgGroupBy) Ints

func (s *MsgGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) IntsX

func (s *MsgGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *MsgGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgGroupBy) String

func (s *MsgGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) StringX

func (s *MsgGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgGroupBy) Strings

func (s *MsgGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgGroupBy) StringsX

func (s *MsgGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *MsgMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *MsgMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *MsgMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)

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) Op

func (m *MsgMutation) Op() Op

Op returns the operation name.

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) All

func (mq *MsgQuery) All(ctx context.Context) ([]*Msg, error)

All executes the query and returns a list of Msgs.

func (*MsgQuery) AllX

func (mq *MsgQuery) AllX(ctx context.Context) []*Msg

AllX is like All, but panics if an error occurs.

func (*MsgQuery) Clone

func (mq *MsgQuery) Clone() *MsgQuery

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) Count

func (mq *MsgQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgQuery) CountX

func (mq *MsgQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MsgQuery) Exist

func (mq *MsgQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MsgQuery) ExistX

func (mq *MsgQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MsgQuery) Filter

func (mq *MsgQuery) Filter() *MsgFilter

Filter returns a Filter implementation to apply filters on the MsgQuery builder.

func (*MsgQuery) First

func (mq *MsgQuery) First(ctx context.Context) (*Msg, error)

First returns the first Msg entity from the query. Returns a *NotFoundError when no Msg was found.

func (*MsgQuery) FirstID

func (mq *MsgQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Msg ID from the query. Returns a *NotFoundError when no Msg ID was found.

func (*MsgQuery) FirstIDX

func (mq *MsgQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MsgQuery) FirstX

func (mq *MsgQuery) FirstX(ctx context.Context) *Msg

FirstX is like First, but panics if an error occurs.

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) IDs

func (mq *MsgQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Msg IDs.

func (*MsgQuery) IDsX

func (mq *MsgQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MsgQuery) Limit

func (mq *MsgQuery) Limit(limit int) *MsgQuery

Limit the number of records to be returned by this query.

func (*MsgQuery) Offset

func (mq *MsgQuery) Offset(offset int) *MsgQuery

Offset to start from.

func (*MsgQuery) Only

func (mq *MsgQuery) Only(ctx context.Context) (*Msg, error)

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

func (mq *MsgQuery) OnlyID(ctx context.Context) (id int, err error)

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) OnlyIDX

func (mq *MsgQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MsgQuery) OnlyX

func (mq *MsgQuery) OnlyX(ctx context.Context) *Msg

OnlyX is like Only, but panics if an error occurs.

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

func (mq *MsgQuery) Select(fields ...string) *MsgSelect

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

func (mq *MsgQuery) Unique(unique bool) *MsgQuery

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) Where

func (mq *MsgQuery) Where(ps ...predicate.Msg) *MsgQuery

Where adds a new predicate for the MsgQuery builder.

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

func (s *MsgSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgSelect) BoolX

func (s *MsgSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgSelect) Bools

func (s *MsgSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgSelect) BoolsX

func (s *MsgSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgSelect) Float64

func (s *MsgSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgSelect) Float64X

func (s *MsgSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgSelect) Float64s

func (s *MsgSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgSelect) Float64sX

func (s *MsgSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgSelect) Int

func (s *MsgSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgSelect) IntX

func (s *MsgSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgSelect) Ints

func (s *MsgSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgSelect) IntsX

func (s *MsgSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgSelect) Scan

func (ms *MsgSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgSelect) ScanX

func (s *MsgSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgSelect) String

func (s *MsgSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgSelect) StringX

func (s *MsgSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgSelect) Strings

func (s *MsgSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgSelect) StringsX

func (s *MsgSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgUpdate

type MsgUpdate struct {
	// contains filtered or unexported fields
}

MsgUpdate is the builder for updating Msg entities.

func (*MsgUpdate) AddDestChainID

func (mu *MsgUpdate) AddDestChainID(u int64) *MsgUpdate

AddDestChainID adds u to the "DestChainID" field.

func (*MsgUpdate) AddDestGasLimit

func (mu *MsgUpdate) AddDestGasLimit(u int64) *MsgUpdate

AddDestGasLimit adds u to the "DestGasLimit" field.

func (*MsgUpdate) AddSourceChainID

func (mu *MsgUpdate) AddSourceChainID(u int64) *MsgUpdate

AddSourceChainID adds u to the "SourceChainID" field.

func (*MsgUpdate) AddStreamOffset

func (mu *MsgUpdate) AddStreamOffset(u int64) *MsgUpdate

AddStreamOffset adds u to the "StreamOffset" field.

func (*MsgUpdate) ClearBlock

func (mu *MsgUpdate) ClearBlock() *MsgUpdate

ClearBlock clears the "Block" edge to the Block entity.

func (*MsgUpdate) Exec

func (mu *MsgUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgUpdate) ExecX

func (mu *MsgUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgUpdate) Mutation

func (mu *MsgUpdate) Mutation() *MsgMutation

Mutation returns the MsgMutation object of the builder.

func (*MsgUpdate) Save

func (mu *MsgUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MsgUpdate) SaveX

func (mu *MsgUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MsgUpdate) SetBlock

func (mu *MsgUpdate) SetBlock(b *Block) *MsgUpdate

SetBlock sets the "Block" edge to the Block entity.

func (*MsgUpdate) SetBlockID

func (mu *MsgUpdate) SetBlockID(id int) *MsgUpdate

SetBlockID sets the "Block" edge to the Block entity by ID.

func (*MsgUpdate) SetCreatedAt

func (mu *MsgUpdate) SetCreatedAt(t time.Time) *MsgUpdate

SetCreatedAt sets the "CreatedAt" field.

func (*MsgUpdate) SetData

func (mu *MsgUpdate) SetData(b []byte) *MsgUpdate

SetData sets the "Data" field.

func (*MsgUpdate) SetDestAddress

func (mu *MsgUpdate) SetDestAddress(b []byte) *MsgUpdate

SetDestAddress sets the "DestAddress" field.

func (*MsgUpdate) SetDestChainID

func (mu *MsgUpdate) SetDestChainID(u uint64) *MsgUpdate

SetDestChainID sets the "DestChainID" field.

func (*MsgUpdate) SetDestGasLimit

func (mu *MsgUpdate) SetDestGasLimit(u uint64) *MsgUpdate

SetDestGasLimit sets the "DestGasLimit" field.

func (*MsgUpdate) SetNillableBlockID

func (mu *MsgUpdate) SetNillableBlockID(id *int) *MsgUpdate

SetNillableBlockID sets the "Block" edge to the Block entity by ID if the given value is not nil.

func (*MsgUpdate) SetNillableCreatedAt

func (mu *MsgUpdate) SetNillableCreatedAt(t *time.Time) *MsgUpdate

SetNillableCreatedAt sets the "CreatedAt" field if the given value is not nil.

func (*MsgUpdate) SetNillableDestChainID

func (mu *MsgUpdate) SetNillableDestChainID(u *uint64) *MsgUpdate

SetNillableDestChainID sets the "DestChainID" field if the given value is not nil.

func (*MsgUpdate) SetNillableDestGasLimit

func (mu *MsgUpdate) SetNillableDestGasLimit(u *uint64) *MsgUpdate

SetNillableDestGasLimit sets the "DestGasLimit" field if the given value is not nil.

func (*MsgUpdate) SetNillableSourceChainID

func (mu *MsgUpdate) SetNillableSourceChainID(u *uint64) *MsgUpdate

SetNillableSourceChainID sets the "SourceChainID" field if the given value is not nil.

func (*MsgUpdate) SetNillableStreamOffset

func (mu *MsgUpdate) SetNillableStreamOffset(u *uint64) *MsgUpdate

SetNillableStreamOffset sets the "StreamOffset" field if the given value is not nil.

func (*MsgUpdate) SetNillableUUID

func (mu *MsgUpdate) SetNillableUUID(u *uuid.UUID) *MsgUpdate

SetNillableUUID sets the "UUID" field if the given value is not nil.

func (*MsgUpdate) SetSourceChainID

func (mu *MsgUpdate) SetSourceChainID(u uint64) *MsgUpdate

SetSourceChainID sets the "SourceChainID" field.

func (*MsgUpdate) SetSourceMsgSender

func (mu *MsgUpdate) SetSourceMsgSender(b []byte) *MsgUpdate

SetSourceMsgSender sets the "SourceMsgSender" field.

func (*MsgUpdate) SetStreamOffset

func (mu *MsgUpdate) SetStreamOffset(u uint64) *MsgUpdate

SetStreamOffset sets the "StreamOffset" field.

func (*MsgUpdate) SetTxHash

func (mu *MsgUpdate) SetTxHash(b []byte) *MsgUpdate

SetTxHash sets the "TxHash" field.

func (*MsgUpdate) SetUUID

func (mu *MsgUpdate) SetUUID(u uuid.UUID) *MsgUpdate

SetUUID sets the "UUID" field.

func (*MsgUpdate) Where

func (mu *MsgUpdate) Where(ps ...predicate.Msg) *MsgUpdate

Where appends a list predicates to the MsgUpdate builder.

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 Msgs

type Msgs []*Msg

Msgs is a parsable slice of Msg.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

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) String

func (r *Receipt) String() string

String implements the fmt.Stringer.

func (*Receipt) Unwrap

func (r *Receipt) Unwrap() *Receipt

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.

func (*Receipt) Value

func (r *Receipt) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Receipt. This includes values selected through modifiers, order, etc.

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) Get

func (c *ReceiptClient) Get(ctx context.Context, id int) (*Receipt, error)

Get returns a Receipt 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.

func (*ReceiptCreateBulk) Save

func (rcb *ReceiptCreateBulk) Save(ctx context.Context) ([]*Receipt, error)

Save creates the Receipt entities in the database.

func (*ReceiptCreateBulk) SaveX

func (rcb *ReceiptCreateBulk) SaveX(ctx context.Context) []*Receipt

SaveX is like Save, 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

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

func (s *ReceiptGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) BoolX

func (s *ReceiptGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReceiptGroupBy) Bools

func (s *ReceiptGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) BoolsX

func (s *ReceiptGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReceiptGroupBy) Float64

func (s *ReceiptGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) Float64X

func (s *ReceiptGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReceiptGroupBy) Float64s

func (s *ReceiptGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) Float64sX

func (s *ReceiptGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReceiptGroupBy) Int

func (s *ReceiptGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) IntX

func (s *ReceiptGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReceiptGroupBy) Ints

func (s *ReceiptGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) IntsX

func (s *ReceiptGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *ReceiptGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ReceiptGroupBy) String

func (s *ReceiptGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) StringX

func (s *ReceiptGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReceiptGroupBy) Strings

func (s *ReceiptGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ReceiptGroupBy) StringsX

func (s *ReceiptGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *ReceiptMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *ReceiptMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *ReceiptMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)

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) Op

func (m *ReceiptMutation) Op() Op

Op returns the operation name.

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

func (s *ReceiptSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) BoolX

func (s *ReceiptSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReceiptSelect) Bools

func (s *ReceiptSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) BoolsX

func (s *ReceiptSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReceiptSelect) Float64

func (s *ReceiptSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) Float64X

func (s *ReceiptSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReceiptSelect) Float64s

func (s *ReceiptSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) Float64sX

func (s *ReceiptSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReceiptSelect) Int

func (s *ReceiptSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) IntX

func (s *ReceiptSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReceiptSelect) Ints

func (s *ReceiptSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) IntsX

func (s *ReceiptSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *ReceiptSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ReceiptSelect) String

func (s *ReceiptSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) StringX

func (s *ReceiptSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReceiptSelect) Strings

func (s *ReceiptSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ReceiptSelect) StringsX

func (s *ReceiptSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

Where appends a list predicates to the ReceiptUpdate builder.

type Receipts

type Receipts []*Receipt

Receipts is a parsable slice of Receipt.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

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 Traverser

type Traverser = ent.Traverser

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

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

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 Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

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

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.

func (*XProviderCursor) Value

func (xc *XProviderCursor) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the XProviderCursor. This includes values selected through modifiers, order, etc.

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

Create returns a builder for creating a XProviderCursor entity.

func (*XProviderCursorClient) CreateBulk

CreateBulk returns a builder for creating a bulk of XProviderCursor entities.

func (*XProviderCursorClient) Delete

Delete returns a delete builder for XProviderCursor.

func (*XProviderCursorClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*XProviderCursorClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*XProviderCursorClient) Get

Get returns a XProviderCursor entity by its id.

func (*XProviderCursorClient) GetX

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

Query returns a query builder for XProviderCursor.

func (*XProviderCursorClient) Update

Update returns an update builder for XProviderCursor.

func (*XProviderCursorClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*XProviderCursorClient) UpdateOneID

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

Mutation returns the XProviderCursorMutation object of the builder.

func (*XProviderCursorCreate) Save

Save creates the XProviderCursor in the database.

func (*XProviderCursorCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*XProviderCursorCreate) SetChainID

SetChainID sets the "ChainID" field.

func (*XProviderCursorCreate) SetCreatedAt

func (xcc *XProviderCursorCreate) SetCreatedAt(t time.Time) *XProviderCursorCreate

SetCreatedAt sets the "CreatedAt" field.

func (*XProviderCursorCreate) SetHeight

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

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

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

Save creates the XProviderCursor entities in the database.

func (*XProviderCursorCreateBulk) SaveX

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

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

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

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

Aggregate adds the given aggregation functions to the group-by query.

func (*XProviderCursorGroupBy) Bool

func (s *XProviderCursorGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) BoolX

func (s *XProviderCursorGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*XProviderCursorGroupBy) Bools

func (s *XProviderCursorGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) BoolsX

func (s *XProviderCursorGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*XProviderCursorGroupBy) Float64

func (s *XProviderCursorGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) Float64X

func (s *XProviderCursorGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*XProviderCursorGroupBy) Float64s

func (s *XProviderCursorGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) Float64sX

func (s *XProviderCursorGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*XProviderCursorGroupBy) Int

func (s *XProviderCursorGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) IntX

func (s *XProviderCursorGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*XProviderCursorGroupBy) Ints

func (s *XProviderCursorGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) IntsX

func (s *XProviderCursorGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *XProviderCursorGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*XProviderCursorGroupBy) String

func (s *XProviderCursorGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) StringX

func (s *XProviderCursorGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*XProviderCursorGroupBy) Strings

func (s *XProviderCursorGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*XProviderCursorGroupBy) StringsX

func (s *XProviderCursorGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

func (m *XProviderCursorMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *XProviderCursorMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *XProviderCursorMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)

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

func (m *XProviderCursorMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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

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

Aggregate returns a XProviderCursorSelect configured with the given aggregations.

func (*XProviderCursorQuery) All

All executes the query and returns a list of XProviderCursors.

func (*XProviderCursorQuery) AllX

AllX is like All, but panics if an error occurs.

func (*XProviderCursorQuery) Clone

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

Filter returns a Filter implementation to apply filters on the XProviderCursorQuery builder.

func (*XProviderCursorQuery) First

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*XProviderCursorQuery) Order

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

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

Aggregate adds the given aggregation functions to the selector query.

func (*XProviderCursorSelect) Bool

func (s *XProviderCursorSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) BoolX

func (s *XProviderCursorSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*XProviderCursorSelect) Bools

func (s *XProviderCursorSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) BoolsX

func (s *XProviderCursorSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*XProviderCursorSelect) Float64

func (s *XProviderCursorSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) Float64X

func (s *XProviderCursorSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*XProviderCursorSelect) Float64s

func (s *XProviderCursorSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) Float64sX

func (s *XProviderCursorSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*XProviderCursorSelect) Int

func (s *XProviderCursorSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) IntX

func (s *XProviderCursorSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*XProviderCursorSelect) Ints

func (s *XProviderCursorSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) IntsX

func (s *XProviderCursorSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *XProviderCursorSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*XProviderCursorSelect) String

func (s *XProviderCursorSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) StringX

func (s *XProviderCursorSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*XProviderCursorSelect) Strings

func (s *XProviderCursorSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*XProviderCursorSelect) StringsX

func (s *XProviderCursorSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type XProviderCursorUpdate

type XProviderCursorUpdate struct {
	// contains filtered or unexported fields
}

XProviderCursorUpdate is the builder for updating XProviderCursor entities.

func (*XProviderCursorUpdate) AddChainID

AddChainID adds u to the "ChainID" field.

func (*XProviderCursorUpdate) AddHeight

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

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

SetChainID sets the "ChainID" field.

func (*XProviderCursorUpdate) SetCreatedAt

func (xcu *XProviderCursorUpdate) SetCreatedAt(t time.Time) *XProviderCursorUpdate

SetCreatedAt sets the "CreatedAt" field.

func (*XProviderCursorUpdate) SetHeight

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

SetUUID sets the "UUID" field.

func (*XProviderCursorUpdate) SetUpdatedAt

func (xcu *XProviderCursorUpdate) SetUpdatedAt(t time.Time) *XProviderCursorUpdate

SetUpdatedAt sets the "UpdatedAt" field.

func (*XProviderCursorUpdate) Where

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

AddChainID adds u to the "ChainID" field.

func (*XProviderCursorUpdateOne) AddHeight

AddHeight adds u to the "Height" field.

func (*XProviderCursorUpdateOne) Exec

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

Mutation returns the XProviderCursorMutation object of the builder.

func (*XProviderCursorUpdateOne) Save

Save executes the query and returns the updated XProviderCursor entity.

func (*XProviderCursorUpdateOne) SaveX

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

SetChainID sets the "ChainID" field.

func (*XProviderCursorUpdateOne) SetCreatedAt

SetCreatedAt sets the "CreatedAt" field.

func (*XProviderCursorUpdateOne) SetHeight

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

SetUUID sets the "UUID" field.

func (*XProviderCursorUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "UpdatedAt" field.

func (*XProviderCursorUpdateOne) Where

Where appends a list predicates to the XProviderCursorUpdate builder.

type XProviderCursors

type XProviderCursors []*XProviderCursor

XProviderCursors is a parsable slice of XProviderCursor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL