Documentation ¶
Index ¶
- Constants
- Variables
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- func WithTx(ctx context.Context, client *Client, fn func(tx *Tx) error) error
- type AggregateFunc
- type Balance
- func (b *Balance) Account(ctx context.Context) (*Contract, error)
- func (b *Balance) Contract(ctx context.Context) (*Contract, error)
- func (b *Balance) Node(ctx context.Context) (node *Node, err error)
- func (b *Balance) QueryAccount() *ContractQuery
- func (b *Balance) QueryContract() *ContractQuery
- func (b *Balance) String() string
- func (b *Balance) ToEdge(order *BalanceOrder) *BalanceEdge
- func (b *Balance) Unwrap() *Balance
- func (b *Balance) Update() *BalanceUpdateOne
- type BalanceClient
- func (c *BalanceClient) Create() *BalanceCreate
- func (c *BalanceClient) CreateBulk(builders ...*BalanceCreate) *BalanceCreateBulk
- func (c *BalanceClient) Delete() *BalanceDelete
- func (c *BalanceClient) DeleteOne(b *Balance) *BalanceDeleteOne
- func (c *BalanceClient) DeleteOneID(id string) *BalanceDeleteOne
- func (c *BalanceClient) Get(ctx context.Context, id string) (*Balance, error)
- func (c *BalanceClient) GetX(ctx context.Context, id string) *Balance
- func (c *BalanceClient) Hooks() []Hook
- func (c *BalanceClient) Query() *BalanceQuery
- func (c *BalanceClient) QueryAccount(b *Balance) *ContractQuery
- func (c *BalanceClient) QueryContract(b *Balance) *ContractQuery
- func (c *BalanceClient) Update() *BalanceUpdate
- func (c *BalanceClient) UpdateOne(b *Balance) *BalanceUpdateOne
- func (c *BalanceClient) UpdateOneID(id string) *BalanceUpdateOne
- func (c *BalanceClient) Use(hooks ...Hook)
- type BalanceConnection
- type BalanceCreate
- func (bc *BalanceCreate) Exec(ctx context.Context) error
- func (bc *BalanceCreate) ExecX(ctx context.Context)
- func (bc *BalanceCreate) Mutation() *BalanceMutation
- func (bc *BalanceCreate) OnConflict(opts ...sql.ConflictOption) *BalanceUpsertOne
- func (bc *BalanceCreate) OnConflictColumns(columns ...string) *BalanceUpsertOne
- func (bc *BalanceCreate) Save(ctx context.Context) (*Balance, error)
- func (bc *BalanceCreate) SaveX(ctx context.Context) *Balance
- func (bc *BalanceCreate) SetAccount(c *Contract) *BalanceCreate
- func (bc *BalanceCreate) SetAccountID(id string) *BalanceCreate
- func (bc *BalanceCreate) SetBalance(b big.Int) *BalanceCreate
- func (bc *BalanceCreate) SetContract(c *Contract) *BalanceCreate
- func (bc *BalanceCreate) SetContractID(id string) *BalanceCreate
- func (bc *BalanceCreate) SetID(s string) *BalanceCreate
- func (bc *BalanceCreate) SetNillableAccountID(id *string) *BalanceCreate
- func (bc *BalanceCreate) SetNillableBalance(b *big.Int) *BalanceCreate
- func (bc *BalanceCreate) SetNillableContractID(id *string) *BalanceCreate
- func (bc *BalanceCreate) SetNillableTokenId(b *big.Int) *BalanceCreate
- func (bc *BalanceCreate) SetTokenId(b big.Int) *BalanceCreate
- type BalanceCreateBulk
- func (bcb *BalanceCreateBulk) Exec(ctx context.Context) error
- func (bcb *BalanceCreateBulk) ExecX(ctx context.Context)
- func (bcb *BalanceCreateBulk) OnConflict(opts ...sql.ConflictOption) *BalanceUpsertBulk
- func (bcb *BalanceCreateBulk) OnConflictColumns(columns ...string) *BalanceUpsertBulk
- func (bcb *BalanceCreateBulk) Save(ctx context.Context) ([]*Balance, error)
- func (bcb *BalanceCreateBulk) SaveX(ctx context.Context) []*Balance
- type BalanceDelete
- type BalanceDeleteOne
- type BalanceEdge
- type BalanceEdges
- type BalanceGroupBy
- func (bgb *BalanceGroupBy) Aggregate(fns ...AggregateFunc) *BalanceGroupBy
- func (s *BalanceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BalanceGroupBy) BoolX(ctx context.Context) bool
- func (s *BalanceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BalanceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BalanceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BalanceGroupBy) Float64X(ctx context.Context) float64
- func (s *BalanceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BalanceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BalanceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BalanceGroupBy) IntX(ctx context.Context) int
- func (s *BalanceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BalanceGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BalanceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *BalanceGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *BalanceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BalanceGroupBy) StringX(ctx context.Context) string
- func (s *BalanceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BalanceGroupBy) StringsX(ctx context.Context) []string
- type BalanceMutation
- func (m *BalanceMutation) AccountCleared() bool
- func (m *BalanceMutation) AccountID() (id string, exists bool)
- func (m *BalanceMutation) AccountIDs() (ids []string)
- func (m *BalanceMutation) AddBalance(b big.Int)
- func (m *BalanceMutation) AddField(name string, value ent.Value) error
- func (m *BalanceMutation) AddTokenId(b big.Int)
- func (m *BalanceMutation) AddedBalance() (r big.Int, exists bool)
- func (m *BalanceMutation) AddedEdges() []string
- func (m *BalanceMutation) AddedField(name string) (ent.Value, bool)
- func (m *BalanceMutation) AddedFields() []string
- func (m *BalanceMutation) AddedIDs(name string) []ent.Value
- func (m *BalanceMutation) AddedTokenId() (r big.Int, exists bool)
- func (m *BalanceMutation) Balance() (r big.Int, exists bool)
- func (m *BalanceMutation) ClearAccount()
- func (m *BalanceMutation) ClearContract()
- func (m *BalanceMutation) ClearEdge(name string) error
- func (m *BalanceMutation) ClearField(name string) error
- func (m *BalanceMutation) ClearTokenId()
- func (m *BalanceMutation) ClearedEdges() []string
- func (m *BalanceMutation) ClearedFields() []string
- func (m BalanceMutation) Client() *Client
- func (m *BalanceMutation) ContractCleared() bool
- func (m *BalanceMutation) ContractID() (id string, exists bool)
- func (m *BalanceMutation) ContractIDs() (ids []string)
- func (m *BalanceMutation) EdgeCleared(name string) bool
- func (m *BalanceMutation) Field(name string) (ent.Value, bool)
- func (m *BalanceMutation) FieldCleared(name string) bool
- func (m *BalanceMutation) Fields() []string
- func (m *BalanceMutation) ID() (id string, exists bool)
- func (m *BalanceMutation) IDs(ctx context.Context) ([]string, error)
- func (m *BalanceMutation) OldBalance(ctx context.Context) (v big.Int, err error)
- func (m *BalanceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BalanceMutation) OldTokenId(ctx context.Context) (v big.Int, err error)
- func (m *BalanceMutation) Op() Op
- func (m *BalanceMutation) RemovedEdges() []string
- func (m *BalanceMutation) RemovedIDs(name string) []ent.Value
- func (m *BalanceMutation) ResetAccount()
- func (m *BalanceMutation) ResetBalance()
- func (m *BalanceMutation) ResetContract()
- func (m *BalanceMutation) ResetEdge(name string) error
- func (m *BalanceMutation) ResetField(name string) error
- func (m *BalanceMutation) ResetTokenId()
- func (m *BalanceMutation) SetAccountID(id string)
- func (m *BalanceMutation) SetBalance(b big.Int)
- func (m *BalanceMutation) SetContractID(id string)
- func (m *BalanceMutation) SetField(name string, value ent.Value) error
- func (m *BalanceMutation) SetID(id string)
- func (m *BalanceMutation) SetTokenId(b big.Int)
- func (m *BalanceMutation) TokenId() (r big.Int, exists bool)
- func (m *BalanceMutation) TokenIdCleared() bool
- func (m BalanceMutation) Tx() (*Tx, error)
- func (m *BalanceMutation) Type() string
- func (m *BalanceMutation) Where(ps ...predicate.Balance)
- type BalanceOrder
- type BalanceOrderField
- type BalancePaginateOption
- type BalanceQuery
- func (bq *BalanceQuery) All(ctx context.Context) ([]*Balance, error)
- func (bq *BalanceQuery) AllX(ctx context.Context) []*Balance
- func (bq *BalanceQuery) Clone() *BalanceQuery
- func (b *BalanceQuery) CollectFields(ctx context.Context, satisfies ...string) (*BalanceQuery, error)
- func (bq *BalanceQuery) Count(ctx context.Context) (int, error)
- func (bq *BalanceQuery) CountX(ctx context.Context) int
- func (bq *BalanceQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BalanceQuery) ExistX(ctx context.Context) bool
- func (bq *BalanceQuery) First(ctx context.Context) (*Balance, error)
- func (bq *BalanceQuery) FirstID(ctx context.Context) (id string, err error)
- func (bq *BalanceQuery) FirstIDX(ctx context.Context) string
- func (bq *BalanceQuery) FirstX(ctx context.Context) *Balance
- func (bq *BalanceQuery) GroupBy(field string, fields ...string) *BalanceGroupBy
- func (bq *BalanceQuery) IDs(ctx context.Context) ([]string, error)
- func (bq *BalanceQuery) IDsX(ctx context.Context) []string
- func (bq *BalanceQuery) Limit(limit int) *BalanceQuery
- func (bq *BalanceQuery) Offset(offset int) *BalanceQuery
- func (bq *BalanceQuery) Only(ctx context.Context) (*Balance, error)
- func (bq *BalanceQuery) OnlyID(ctx context.Context) (id string, err error)
- func (bq *BalanceQuery) OnlyIDX(ctx context.Context) string
- func (bq *BalanceQuery) OnlyX(ctx context.Context) *Balance
- func (bq *BalanceQuery) Order(o ...OrderFunc) *BalanceQuery
- func (b *BalanceQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*BalanceConnection, error)
- func (bq *BalanceQuery) QueryAccount() *ContractQuery
- func (bq *BalanceQuery) QueryContract() *ContractQuery
- func (bq *BalanceQuery) Select(fields ...string) *BalanceSelect
- func (bq *BalanceQuery) Unique(unique bool) *BalanceQuery
- func (bq *BalanceQuery) Where(ps ...predicate.Balance) *BalanceQuery
- func (bq *BalanceQuery) WithAccount(opts ...func(*ContractQuery)) *BalanceQuery
- func (bq *BalanceQuery) WithContract(opts ...func(*ContractQuery)) *BalanceQuery
- type BalanceSelect
- func (s *BalanceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BalanceSelect) BoolX(ctx context.Context) bool
- func (s *BalanceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BalanceSelect) BoolsX(ctx context.Context) []bool
- func (s *BalanceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BalanceSelect) Float64X(ctx context.Context) float64
- func (s *BalanceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BalanceSelect) Float64sX(ctx context.Context) []float64
- func (s *BalanceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BalanceSelect) IntX(ctx context.Context) int
- func (s *BalanceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BalanceSelect) IntsX(ctx context.Context) []int
- func (bs *BalanceSelect) Scan(ctx context.Context, v interface{}) error
- func (s *BalanceSelect) ScanX(ctx context.Context, v interface{})
- func (s *BalanceSelect) String(ctx context.Context) (_ string, err error)
- func (s *BalanceSelect) StringX(ctx context.Context) string
- func (s *BalanceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BalanceSelect) StringsX(ctx context.Context) []string
- type BalanceUpdate
- func (bu *BalanceUpdate) AddBalance(b big.Int) *BalanceUpdate
- func (bu *BalanceUpdate) AddTokenId(b big.Int) *BalanceUpdate
- func (bu *BalanceUpdate) ClearAccount() *BalanceUpdate
- func (bu *BalanceUpdate) ClearContract() *BalanceUpdate
- func (bu *BalanceUpdate) ClearTokenId() *BalanceUpdate
- func (bu *BalanceUpdate) Exec(ctx context.Context) error
- func (bu *BalanceUpdate) ExecX(ctx context.Context)
- func (bu *BalanceUpdate) Mutation() *BalanceMutation
- func (bu *BalanceUpdate) Save(ctx context.Context) (int, error)
- func (bu *BalanceUpdate) SaveX(ctx context.Context) int
- func (bu *BalanceUpdate) SetAccount(c *Contract) *BalanceUpdate
- func (bu *BalanceUpdate) SetAccountID(id string) *BalanceUpdate
- func (bu *BalanceUpdate) SetBalance(b big.Int) *BalanceUpdate
- func (bu *BalanceUpdate) SetContract(c *Contract) *BalanceUpdate
- func (bu *BalanceUpdate) SetContractID(id string) *BalanceUpdate
- func (bu *BalanceUpdate) SetNillableAccountID(id *string) *BalanceUpdate
- func (bu *BalanceUpdate) SetNillableBalance(b *big.Int) *BalanceUpdate
- func (bu *BalanceUpdate) SetNillableContractID(id *string) *BalanceUpdate
- func (bu *BalanceUpdate) SetNillableTokenId(b *big.Int) *BalanceUpdate
- func (bu *BalanceUpdate) SetTokenId(b big.Int) *BalanceUpdate
- func (bu *BalanceUpdate) Where(ps ...predicate.Balance) *BalanceUpdate
- type BalanceUpdateOne
- func (buo *BalanceUpdateOne) AddBalance(b big.Int) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) AddTokenId(b big.Int) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) ClearAccount() *BalanceUpdateOne
- func (buo *BalanceUpdateOne) ClearContract() *BalanceUpdateOne
- func (buo *BalanceUpdateOne) ClearTokenId() *BalanceUpdateOne
- func (buo *BalanceUpdateOne) Exec(ctx context.Context) error
- func (buo *BalanceUpdateOne) ExecX(ctx context.Context)
- func (buo *BalanceUpdateOne) Mutation() *BalanceMutation
- func (buo *BalanceUpdateOne) Save(ctx context.Context) (*Balance, error)
- func (buo *BalanceUpdateOne) SaveX(ctx context.Context) *Balance
- func (buo *BalanceUpdateOne) Select(field string, fields ...string) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetAccount(c *Contract) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetAccountID(id string) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetBalance(b big.Int) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetContract(c *Contract) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetContractID(id string) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetNillableAccountID(id *string) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetNillableBalance(b *big.Int) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetNillableContractID(id *string) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetNillableTokenId(b *big.Int) *BalanceUpdateOne
- func (buo *BalanceUpdateOne) SetTokenId(b big.Int) *BalanceUpdateOne
- type BalanceUpsert
- func (u *BalanceUpsert) AddBalance(v big.Int) *BalanceUpsert
- func (u *BalanceUpsert) AddTokenId(v big.Int) *BalanceUpsert
- func (u *BalanceUpsert) ClearTokenId() *BalanceUpsert
- func (u *BalanceUpsert) SetBalance(v big.Int) *BalanceUpsert
- func (u *BalanceUpsert) SetTokenId(v big.Int) *BalanceUpsert
- func (u *BalanceUpsert) UpdateBalance() *BalanceUpsert
- func (u *BalanceUpsert) UpdateTokenId() *BalanceUpsert
- type BalanceUpsertBulk
- func (u *BalanceUpsertBulk) AddBalance(v big.Int) *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) AddTokenId(v big.Int) *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) ClearTokenId() *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) DoNothing() *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) Exec(ctx context.Context) error
- func (u *BalanceUpsertBulk) ExecX(ctx context.Context)
- func (u *BalanceUpsertBulk) Ignore() *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) SetBalance(v big.Int) *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) SetTokenId(v big.Int) *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) Update(set func(*BalanceUpsert)) *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) UpdateBalance() *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) UpdateNewValues() *BalanceUpsertBulk
- func (u *BalanceUpsertBulk) UpdateTokenId() *BalanceUpsertBulk
- type BalanceUpsertOne
- func (u *BalanceUpsertOne) AddBalance(v big.Int) *BalanceUpsertOne
- func (u *BalanceUpsertOne) AddTokenId(v big.Int) *BalanceUpsertOne
- func (u *BalanceUpsertOne) ClearTokenId() *BalanceUpsertOne
- func (u *BalanceUpsertOne) DoNothing() *BalanceUpsertOne
- func (u *BalanceUpsertOne) Exec(ctx context.Context) error
- func (u *BalanceUpsertOne) ExecX(ctx context.Context)
- func (u *BalanceUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *BalanceUpsertOne) IDX(ctx context.Context) string
- func (u *BalanceUpsertOne) Ignore() *BalanceUpsertOne
- func (u *BalanceUpsertOne) SetBalance(v big.Int) *BalanceUpsertOne
- func (u *BalanceUpsertOne) SetTokenId(v big.Int) *BalanceUpsertOne
- func (u *BalanceUpsertOne) Update(set func(*BalanceUpsert)) *BalanceUpsertOne
- func (u *BalanceUpsertOne) UpdateBalance() *BalanceUpsertOne
- func (u *BalanceUpsertOne) UpdateNewValues() *BalanceUpsertOne
- func (u *BalanceUpsertOne) UpdateTokenId() *BalanceUpsertOne
- type BalanceWhereInput
- type Balances
- type Block
- func (b *Block) Node(ctx context.Context) (node *Node, err error)
- func (b *Block) QueryTransactionReceipts() *TransactionReceiptQuery
- func (b *Block) QueryTransactions() *TransactionQuery
- func (b *Block) String() string
- func (b *Block) ToEdge(order *BlockOrder) *BlockEdge
- func (b *Block) TransactionReceipts(ctx context.Context) ([]*TransactionReceipt, error)
- func (b *Block) Transactions(ctx context.Context) ([]*Transaction, error)
- func (b *Block) Unwrap() *Block
- func (b *Block) Update() *BlockUpdateOne
- type BlockClient
- func (c *BlockClient) Create() *BlockCreate
- func (c *BlockClient) CreateBulk(builders ...*BlockCreate) *BlockCreateBulk
- func (c *BlockClient) Delete() *BlockDelete
- func (c *BlockClient) DeleteOne(b *Block) *BlockDeleteOne
- func (c *BlockClient) DeleteOneID(id string) *BlockDeleteOne
- func (c *BlockClient) Get(ctx context.Context, id string) (*Block, error)
- func (c *BlockClient) GetX(ctx context.Context, id string) *Block
- func (c *BlockClient) Hooks() []Hook
- func (c *BlockClient) Query() *BlockQuery
- func (c *BlockClient) QueryTransactionReceipts(b *Block) *TransactionReceiptQuery
- func (c *BlockClient) QueryTransactions(b *Block) *TransactionQuery
- func (c *BlockClient) Update() *BlockUpdate
- func (c *BlockClient) UpdateOne(b *Block) *BlockUpdateOne
- func (c *BlockClient) UpdateOneID(id string) *BlockUpdateOne
- func (c *BlockClient) Use(hooks ...Hook)
- type BlockConnection
- type BlockCreate
- func (bc *BlockCreate) AddTransactionIDs(ids ...string) *BlockCreate
- func (bc *BlockCreate) AddTransactionReceiptIDs(ids ...string) *BlockCreate
- func (bc *BlockCreate) AddTransactionReceipts(t ...*TransactionReceipt) *BlockCreate
- func (bc *BlockCreate) AddTransactions(t ...*Transaction) *BlockCreate
- func (bc *BlockCreate) Exec(ctx context.Context) error
- func (bc *BlockCreate) ExecX(ctx context.Context)
- func (bc *BlockCreate) Mutation() *BlockMutation
- func (bc *BlockCreate) OnConflict(opts ...sql.ConflictOption) *BlockUpsertOne
- func (bc *BlockCreate) OnConflictColumns(columns ...string) *BlockUpsertOne
- func (bc *BlockCreate) Save(ctx context.Context) (*Block, error)
- func (bc *BlockCreate) SaveX(ctx context.Context) *Block
- func (bc *BlockCreate) SetBlockHash(s string) *BlockCreate
- func (bc *BlockCreate) SetBlockNumber(u uint64) *BlockCreate
- func (bc *BlockCreate) SetID(s string) *BlockCreate
- func (bc *BlockCreate) SetParentBlockHash(s string) *BlockCreate
- func (bc *BlockCreate) SetStateRoot(s string) *BlockCreate
- func (bc *BlockCreate) SetStatus(b block.Status) *BlockCreate
- func (bc *BlockCreate) SetTimestamp(t time.Time) *BlockCreate
- type BlockCreateBulk
- func (bcb *BlockCreateBulk) Exec(ctx context.Context) error
- func (bcb *BlockCreateBulk) ExecX(ctx context.Context)
- func (bcb *BlockCreateBulk) OnConflict(opts ...sql.ConflictOption) *BlockUpsertBulk
- func (bcb *BlockCreateBulk) OnConflictColumns(columns ...string) *BlockUpsertBulk
- func (bcb *BlockCreateBulk) Save(ctx context.Context) ([]*Block, error)
- func (bcb *BlockCreateBulk) SaveX(ctx context.Context) []*Block
- type BlockDelete
- type BlockDeleteOne
- type BlockEdge
- type BlockEdges
- type BlockGroupBy
- func (bgb *BlockGroupBy) Aggregate(fns ...AggregateFunc) *BlockGroupBy
- func (s *BlockGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BlockGroupBy) BoolX(ctx context.Context) bool
- func (s *BlockGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BlockGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BlockGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BlockGroupBy) Float64X(ctx context.Context) float64
- func (s *BlockGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BlockGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BlockGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BlockGroupBy) IntX(ctx context.Context) int
- func (s *BlockGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BlockGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BlockGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *BlockGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *BlockGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BlockGroupBy) StringX(ctx context.Context) string
- func (s *BlockGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BlockGroupBy) StringsX(ctx context.Context) []string
- type BlockMutation
- func (m *BlockMutation) AddBlockNumber(u int64)
- func (m *BlockMutation) AddField(name string, value ent.Value) error
- func (m *BlockMutation) AddTransactionIDs(ids ...string)
- func (m *BlockMutation) AddTransactionReceiptIDs(ids ...string)
- func (m *BlockMutation) AddedBlockNumber() (r int64, exists bool)
- func (m *BlockMutation) AddedEdges() []string
- func (m *BlockMutation) AddedField(name string) (ent.Value, bool)
- func (m *BlockMutation) AddedFields() []string
- func (m *BlockMutation) AddedIDs(name string) []ent.Value
- func (m *BlockMutation) BlockHash() (r string, exists bool)
- func (m *BlockMutation) BlockNumber() (r uint64, exists bool)
- func (m *BlockMutation) ClearEdge(name string) error
- func (m *BlockMutation) ClearField(name string) error
- func (m *BlockMutation) ClearTransactionReceipts()
- func (m *BlockMutation) ClearTransactions()
- func (m *BlockMutation) ClearedEdges() []string
- func (m *BlockMutation) ClearedFields() []string
- func (m BlockMutation) Client() *Client
- func (m *BlockMutation) EdgeCleared(name string) bool
- func (m *BlockMutation) Field(name string) (ent.Value, bool)
- func (m *BlockMutation) FieldCleared(name string) bool
- func (m *BlockMutation) Fields() []string
- func (m *BlockMutation) ID() (id string, exists bool)
- func (m *BlockMutation) IDs(ctx context.Context) ([]string, error)
- func (m *BlockMutation) OldBlockHash(ctx context.Context) (v string, err error)
- func (m *BlockMutation) OldBlockNumber(ctx context.Context) (v uint64, err error)
- func (m *BlockMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BlockMutation) OldParentBlockHash(ctx context.Context) (v string, err error)
- func (m *BlockMutation) OldStateRoot(ctx context.Context) (v string, err error)
- func (m *BlockMutation) OldStatus(ctx context.Context) (v block.Status, err error)
- func (m *BlockMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *BlockMutation) Op() Op
- func (m *BlockMutation) ParentBlockHash() (r string, exists bool)
- func (m *BlockMutation) RemoveTransactionIDs(ids ...string)
- func (m *BlockMutation) RemoveTransactionReceiptIDs(ids ...string)
- func (m *BlockMutation) RemovedEdges() []string
- func (m *BlockMutation) RemovedIDs(name string) []ent.Value
- func (m *BlockMutation) RemovedTransactionReceiptsIDs() (ids []string)
- func (m *BlockMutation) RemovedTransactionsIDs() (ids []string)
- func (m *BlockMutation) ResetBlockHash()
- func (m *BlockMutation) ResetBlockNumber()
- func (m *BlockMutation) ResetEdge(name string) error
- func (m *BlockMutation) ResetField(name string) error
- func (m *BlockMutation) ResetParentBlockHash()
- func (m *BlockMutation) ResetStateRoot()
- func (m *BlockMutation) ResetStatus()
- func (m *BlockMutation) ResetTimestamp()
- func (m *BlockMutation) ResetTransactionReceipts()
- func (m *BlockMutation) ResetTransactions()
- func (m *BlockMutation) SetBlockHash(s string)
- func (m *BlockMutation) SetBlockNumber(u uint64)
- func (m *BlockMutation) SetField(name string, value ent.Value) error
- func (m *BlockMutation) SetID(id string)
- func (m *BlockMutation) SetParentBlockHash(s string)
- func (m *BlockMutation) SetStateRoot(s string)
- func (m *BlockMutation) SetStatus(b block.Status)
- func (m *BlockMutation) SetTimestamp(t time.Time)
- func (m *BlockMutation) StateRoot() (r string, exists bool)
- func (m *BlockMutation) Status() (r block.Status, exists bool)
- func (m *BlockMutation) Timestamp() (r time.Time, exists bool)
- func (m *BlockMutation) TransactionReceiptsCleared() bool
- func (m *BlockMutation) TransactionReceiptsIDs() (ids []string)
- func (m *BlockMutation) TransactionsCleared() bool
- func (m *BlockMutation) TransactionsIDs() (ids []string)
- func (m BlockMutation) Tx() (*Tx, error)
- func (m *BlockMutation) Type() string
- func (m *BlockMutation) Where(ps ...predicate.Block)
- type BlockOrder
- type BlockOrderField
- type BlockPaginateOption
- type BlockQuery
- func (bq *BlockQuery) All(ctx context.Context) ([]*Block, error)
- func (bq *BlockQuery) AllX(ctx context.Context) []*Block
- func (bq *BlockQuery) Clone() *BlockQuery
- func (b *BlockQuery) CollectFields(ctx context.Context, satisfies ...string) (*BlockQuery, error)
- func (bq *BlockQuery) Count(ctx context.Context) (int, error)
- func (bq *BlockQuery) CountX(ctx context.Context) int
- func (bq *BlockQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BlockQuery) ExistX(ctx context.Context) bool
- func (bq *BlockQuery) First(ctx context.Context) (*Block, error)
- func (bq *BlockQuery) FirstID(ctx context.Context) (id string, err error)
- func (bq *BlockQuery) FirstIDX(ctx context.Context) string
- func (bq *BlockQuery) FirstX(ctx context.Context) *Block
- func (bq *BlockQuery) GroupBy(field string, fields ...string) *BlockGroupBy
- func (bq *BlockQuery) IDs(ctx context.Context) ([]string, error)
- func (bq *BlockQuery) IDsX(ctx context.Context) []string
- func (bq *BlockQuery) Limit(limit int) *BlockQuery
- func (bq *BlockQuery) Offset(offset int) *BlockQuery
- func (bq *BlockQuery) Only(ctx context.Context) (*Block, error)
- func (bq *BlockQuery) OnlyID(ctx context.Context) (id string, err error)
- func (bq *BlockQuery) OnlyIDX(ctx context.Context) string
- func (bq *BlockQuery) OnlyX(ctx context.Context) *Block
- func (bq *BlockQuery) Order(o ...OrderFunc) *BlockQuery
- func (b *BlockQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*BlockConnection, error)
- func (bq *BlockQuery) QueryTransactionReceipts() *TransactionReceiptQuery
- func (bq *BlockQuery) QueryTransactions() *TransactionQuery
- func (bq *BlockQuery) Select(fields ...string) *BlockSelect
- func (bq *BlockQuery) Unique(unique bool) *BlockQuery
- func (bq *BlockQuery) Where(ps ...predicate.Block) *BlockQuery
- func (bq *BlockQuery) WithTransactionReceipts(opts ...func(*TransactionReceiptQuery)) *BlockQuery
- func (bq *BlockQuery) WithTransactions(opts ...func(*TransactionQuery)) *BlockQuery
- type BlockSelect
- func (s *BlockSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BlockSelect) BoolX(ctx context.Context) bool
- func (s *BlockSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BlockSelect) BoolsX(ctx context.Context) []bool
- func (s *BlockSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BlockSelect) Float64X(ctx context.Context) float64
- func (s *BlockSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BlockSelect) Float64sX(ctx context.Context) []float64
- func (s *BlockSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BlockSelect) IntX(ctx context.Context) int
- func (s *BlockSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BlockSelect) IntsX(ctx context.Context) []int
- func (bs *BlockSelect) Scan(ctx context.Context, v interface{}) error
- func (s *BlockSelect) ScanX(ctx context.Context, v interface{})
- func (s *BlockSelect) String(ctx context.Context) (_ string, err error)
- func (s *BlockSelect) StringX(ctx context.Context) string
- func (s *BlockSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BlockSelect) StringsX(ctx context.Context) []string
- type BlockUpdate
- func (bu *BlockUpdate) AddBlockNumber(u int64) *BlockUpdate
- func (bu *BlockUpdate) AddTransactionIDs(ids ...string) *BlockUpdate
- func (bu *BlockUpdate) AddTransactionReceiptIDs(ids ...string) *BlockUpdate
- func (bu *BlockUpdate) AddTransactionReceipts(t ...*TransactionReceipt) *BlockUpdate
- func (bu *BlockUpdate) AddTransactions(t ...*Transaction) *BlockUpdate
- func (bu *BlockUpdate) ClearTransactionReceipts() *BlockUpdate
- func (bu *BlockUpdate) ClearTransactions() *BlockUpdate
- func (bu *BlockUpdate) Exec(ctx context.Context) error
- func (bu *BlockUpdate) ExecX(ctx context.Context)
- func (bu *BlockUpdate) Mutation() *BlockMutation
- func (bu *BlockUpdate) RemoveTransactionIDs(ids ...string) *BlockUpdate
- func (bu *BlockUpdate) RemoveTransactionReceiptIDs(ids ...string) *BlockUpdate
- func (bu *BlockUpdate) RemoveTransactionReceipts(t ...*TransactionReceipt) *BlockUpdate
- func (bu *BlockUpdate) RemoveTransactions(t ...*Transaction) *BlockUpdate
- func (bu *BlockUpdate) Save(ctx context.Context) (int, error)
- func (bu *BlockUpdate) SaveX(ctx context.Context) int
- func (bu *BlockUpdate) SetBlockHash(s string) *BlockUpdate
- func (bu *BlockUpdate) SetBlockNumber(u uint64) *BlockUpdate
- func (bu *BlockUpdate) SetParentBlockHash(s string) *BlockUpdate
- func (bu *BlockUpdate) SetStateRoot(s string) *BlockUpdate
- func (bu *BlockUpdate) SetStatus(b block.Status) *BlockUpdate
- func (bu *BlockUpdate) Where(ps ...predicate.Block) *BlockUpdate
- type BlockUpdateOne
- func (buo *BlockUpdateOne) AddBlockNumber(u int64) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddTransactionIDs(ids ...string) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddTransactionReceiptIDs(ids ...string) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddTransactionReceipts(t ...*TransactionReceipt) *BlockUpdateOne
- func (buo *BlockUpdateOne) AddTransactions(t ...*Transaction) *BlockUpdateOne
- func (buo *BlockUpdateOne) ClearTransactionReceipts() *BlockUpdateOne
- func (buo *BlockUpdateOne) ClearTransactions() *BlockUpdateOne
- func (buo *BlockUpdateOne) Exec(ctx context.Context) error
- func (buo *BlockUpdateOne) ExecX(ctx context.Context)
- func (buo *BlockUpdateOne) Mutation() *BlockMutation
- func (buo *BlockUpdateOne) RemoveTransactionIDs(ids ...string) *BlockUpdateOne
- func (buo *BlockUpdateOne) RemoveTransactionReceiptIDs(ids ...string) *BlockUpdateOne
- func (buo *BlockUpdateOne) RemoveTransactionReceipts(t ...*TransactionReceipt) *BlockUpdateOne
- func (buo *BlockUpdateOne) RemoveTransactions(t ...*Transaction) *BlockUpdateOne
- func (buo *BlockUpdateOne) Save(ctx context.Context) (*Block, error)
- func (buo *BlockUpdateOne) SaveX(ctx context.Context) *Block
- func (buo *BlockUpdateOne) Select(field string, fields ...string) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetBlockHash(s string) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetBlockNumber(u uint64) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetParentBlockHash(s string) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetStateRoot(s string) *BlockUpdateOne
- func (buo *BlockUpdateOne) SetStatus(b block.Status) *BlockUpdateOne
- type BlockUpsert
- func (u *BlockUpsert) AddBlockNumber(v uint64) *BlockUpsert
- func (u *BlockUpsert) SetBlockHash(v string) *BlockUpsert
- func (u *BlockUpsert) SetBlockNumber(v uint64) *BlockUpsert
- func (u *BlockUpsert) SetParentBlockHash(v string) *BlockUpsert
- func (u *BlockUpsert) SetStateRoot(v string) *BlockUpsert
- func (u *BlockUpsert) SetStatus(v block.Status) *BlockUpsert
- func (u *BlockUpsert) SetTimestamp(v time.Time) *BlockUpsert
- func (u *BlockUpsert) UpdateBlockHash() *BlockUpsert
- func (u *BlockUpsert) UpdateBlockNumber() *BlockUpsert
- func (u *BlockUpsert) UpdateParentBlockHash() *BlockUpsert
- func (u *BlockUpsert) UpdateStateRoot() *BlockUpsert
- func (u *BlockUpsert) UpdateStatus() *BlockUpsert
- func (u *BlockUpsert) UpdateTimestamp() *BlockUpsert
- type BlockUpsertBulk
- func (u *BlockUpsertBulk) AddBlockNumber(v uint64) *BlockUpsertBulk
- func (u *BlockUpsertBulk) DoNothing() *BlockUpsertBulk
- func (u *BlockUpsertBulk) Exec(ctx context.Context) error
- func (u *BlockUpsertBulk) ExecX(ctx context.Context)
- func (u *BlockUpsertBulk) Ignore() *BlockUpsertBulk
- func (u *BlockUpsertBulk) SetBlockHash(v string) *BlockUpsertBulk
- func (u *BlockUpsertBulk) SetBlockNumber(v uint64) *BlockUpsertBulk
- func (u *BlockUpsertBulk) SetParentBlockHash(v string) *BlockUpsertBulk
- func (u *BlockUpsertBulk) SetStateRoot(v string) *BlockUpsertBulk
- func (u *BlockUpsertBulk) SetStatus(v block.Status) *BlockUpsertBulk
- func (u *BlockUpsertBulk) SetTimestamp(v time.Time) *BlockUpsertBulk
- func (u *BlockUpsertBulk) Update(set func(*BlockUpsert)) *BlockUpsertBulk
- func (u *BlockUpsertBulk) UpdateBlockHash() *BlockUpsertBulk
- func (u *BlockUpsertBulk) UpdateBlockNumber() *BlockUpsertBulk
- func (u *BlockUpsertBulk) UpdateNewValues() *BlockUpsertBulk
- func (u *BlockUpsertBulk) UpdateParentBlockHash() *BlockUpsertBulk
- func (u *BlockUpsertBulk) UpdateStateRoot() *BlockUpsertBulk
- func (u *BlockUpsertBulk) UpdateStatus() *BlockUpsertBulk
- func (u *BlockUpsertBulk) UpdateTimestamp() *BlockUpsertBulk
- type BlockUpsertOne
- func (u *BlockUpsertOne) AddBlockNumber(v uint64) *BlockUpsertOne
- func (u *BlockUpsertOne) DoNothing() *BlockUpsertOne
- func (u *BlockUpsertOne) Exec(ctx context.Context) error
- func (u *BlockUpsertOne) ExecX(ctx context.Context)
- func (u *BlockUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *BlockUpsertOne) IDX(ctx context.Context) string
- func (u *BlockUpsertOne) Ignore() *BlockUpsertOne
- func (u *BlockUpsertOne) SetBlockHash(v string) *BlockUpsertOne
- func (u *BlockUpsertOne) SetBlockNumber(v uint64) *BlockUpsertOne
- func (u *BlockUpsertOne) SetParentBlockHash(v string) *BlockUpsertOne
- func (u *BlockUpsertOne) SetStateRoot(v string) *BlockUpsertOne
- func (u *BlockUpsertOne) SetStatus(v block.Status) *BlockUpsertOne
- func (u *BlockUpsertOne) SetTimestamp(v time.Time) *BlockUpsertOne
- func (u *BlockUpsertOne) Update(set func(*BlockUpsert)) *BlockUpsertOne
- func (u *BlockUpsertOne) UpdateBlockHash() *BlockUpsertOne
- func (u *BlockUpsertOne) UpdateBlockNumber() *BlockUpsertOne
- func (u *BlockUpsertOne) UpdateNewValues() *BlockUpsertOne
- func (u *BlockUpsertOne) UpdateParentBlockHash() *BlockUpsertOne
- func (u *BlockUpsertOne) UpdateStateRoot() *BlockUpsertOne
- func (u *BlockUpsertOne) UpdateStatus() *BlockUpsertOne
- func (u *BlockUpsertOne) UpdateTimestamp() *BlockUpsertOne
- type BlockWhereInput
- type Blocks
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Node(ctx context.Context, id string) (*Node, error)
- func (c *Client) Noder(ctx context.Context, id string, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []string, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Contract
- func (c *Contract) Node(ctx context.Context) (node *Node, err error)
- func (c *Contract) QueryTransactions() *TransactionQuery
- func (c *Contract) String() string
- func (c *Contract) ToEdge(order *ContractOrder) *ContractEdge
- func (c *Contract) Transactions(ctx context.Context) ([]*Transaction, error)
- func (c *Contract) Unwrap() *Contract
- func (c *Contract) Update() *ContractUpdateOne
- type ContractClient
- func (c *ContractClient) Create() *ContractCreate
- func (c *ContractClient) CreateBulk(builders ...*ContractCreate) *ContractCreateBulk
- func (c *ContractClient) Delete() *ContractDelete
- func (c *ContractClient) DeleteOne(co *Contract) *ContractDeleteOne
- func (c *ContractClient) DeleteOneID(id string) *ContractDeleteOne
- func (c *ContractClient) Get(ctx context.Context, id string) (*Contract, error)
- func (c *ContractClient) GetX(ctx context.Context, id string) *Contract
- func (c *ContractClient) Hooks() []Hook
- func (c *ContractClient) Query() *ContractQuery
- func (c *ContractClient) QueryTransactions(co *Contract) *TransactionQuery
- func (c *ContractClient) Update() *ContractUpdate
- func (c *ContractClient) UpdateOne(co *Contract) *ContractUpdateOne
- func (c *ContractClient) UpdateOneID(id string) *ContractUpdateOne
- func (c *ContractClient) Use(hooks ...Hook)
- type ContractConnection
- type ContractCreate
- func (cc *ContractCreate) AddTransactionIDs(ids ...string) *ContractCreate
- func (cc *ContractCreate) AddTransactions(t ...*Transaction) *ContractCreate
- func (cc *ContractCreate) Exec(ctx context.Context) error
- func (cc *ContractCreate) ExecX(ctx context.Context)
- func (cc *ContractCreate) Mutation() *ContractMutation
- func (cc *ContractCreate) OnConflict(opts ...sql.ConflictOption) *ContractUpsertOne
- func (cc *ContractCreate) OnConflictColumns(columns ...string) *ContractUpsertOne
- func (cc *ContractCreate) Save(ctx context.Context) (*Contract, error)
- func (cc *ContractCreate) SaveX(ctx context.Context) *Contract
- func (cc *ContractCreate) SetCreatedAt(t time.Time) *ContractCreate
- func (cc *ContractCreate) SetID(s string) *ContractCreate
- func (cc *ContractCreate) SetNillableCreatedAt(t *time.Time) *ContractCreate
- func (cc *ContractCreate) SetNillableType(c *contract.Type) *ContractCreate
- func (cc *ContractCreate) SetNillableUpdatedAt(t *time.Time) *ContractCreate
- func (cc *ContractCreate) SetType(c contract.Type) *ContractCreate
- func (cc *ContractCreate) SetUpdatedAt(t time.Time) *ContractCreate
- type ContractCreateBulk
- func (ccb *ContractCreateBulk) Exec(ctx context.Context) error
- func (ccb *ContractCreateBulk) ExecX(ctx context.Context)
- func (ccb *ContractCreateBulk) OnConflict(opts ...sql.ConflictOption) *ContractUpsertBulk
- func (ccb *ContractCreateBulk) OnConflictColumns(columns ...string) *ContractUpsertBulk
- func (ccb *ContractCreateBulk) Save(ctx context.Context) ([]*Contract, error)
- func (ccb *ContractCreateBulk) SaveX(ctx context.Context) []*Contract
- type ContractDelete
- type ContractDeleteOne
- type ContractEdge
- type ContractEdges
- type ContractGroupBy
- func (cgb *ContractGroupBy) Aggregate(fns ...AggregateFunc) *ContractGroupBy
- func (s *ContractGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContractGroupBy) BoolX(ctx context.Context) bool
- func (s *ContractGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ContractGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ContractGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContractGroupBy) Float64X(ctx context.Context) float64
- func (s *ContractGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContractGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ContractGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ContractGroupBy) IntX(ctx context.Context) int
- func (s *ContractGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ContractGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ContractGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ContractGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ContractGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ContractGroupBy) StringX(ctx context.Context) string
- func (s *ContractGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ContractGroupBy) StringsX(ctx context.Context) []string
- type ContractMutation
- func (m *ContractMutation) AddField(name string, value ent.Value) error
- func (m *ContractMutation) AddTransactionIDs(ids ...string)
- func (m *ContractMutation) AddedEdges() []string
- func (m *ContractMutation) AddedField(name string) (ent.Value, bool)
- func (m *ContractMutation) AddedFields() []string
- func (m *ContractMutation) AddedIDs(name string) []ent.Value
- func (m *ContractMutation) ClearEdge(name string) error
- func (m *ContractMutation) ClearField(name string) error
- func (m *ContractMutation) ClearTransactions()
- func (m *ContractMutation) ClearedEdges() []string
- func (m *ContractMutation) ClearedFields() []string
- func (m ContractMutation) Client() *Client
- func (m *ContractMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ContractMutation) EdgeCleared(name string) bool
- func (m *ContractMutation) Field(name string) (ent.Value, bool)
- func (m *ContractMutation) FieldCleared(name string) bool
- func (m *ContractMutation) Fields() []string
- func (m *ContractMutation) GetType() (r contract.Type, exists bool)
- func (m *ContractMutation) ID() (id string, exists bool)
- func (m *ContractMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ContractMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ContractMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ContractMutation) OldType(ctx context.Context) (v contract.Type, err error)
- func (m *ContractMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ContractMutation) Op() Op
- func (m *ContractMutation) RemoveTransactionIDs(ids ...string)
- func (m *ContractMutation) RemovedEdges() []string
- func (m *ContractMutation) RemovedIDs(name string) []ent.Value
- func (m *ContractMutation) RemovedTransactionsIDs() (ids []string)
- func (m *ContractMutation) ResetCreatedAt()
- func (m *ContractMutation) ResetEdge(name string) error
- func (m *ContractMutation) ResetField(name string) error
- func (m *ContractMutation) ResetTransactions()
- func (m *ContractMutation) ResetType()
- func (m *ContractMutation) ResetUpdatedAt()
- func (m *ContractMutation) SetCreatedAt(t time.Time)
- func (m *ContractMutation) SetField(name string, value ent.Value) error
- func (m *ContractMutation) SetID(id string)
- func (m *ContractMutation) SetType(c contract.Type)
- func (m *ContractMutation) SetUpdatedAt(t time.Time)
- func (m *ContractMutation) TransactionsCleared() bool
- func (m *ContractMutation) TransactionsIDs() (ids []string)
- func (m ContractMutation) Tx() (*Tx, error)
- func (m *ContractMutation) Type() string
- func (m *ContractMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ContractMutation) Where(ps ...predicate.Contract)
- type ContractOrder
- type ContractOrderField
- type ContractPaginateOption
- type ContractQuery
- func (cq *ContractQuery) All(ctx context.Context) ([]*Contract, error)
- func (cq *ContractQuery) AllX(ctx context.Context) []*Contract
- func (cq *ContractQuery) Clone() *ContractQuery
- func (c *ContractQuery) CollectFields(ctx context.Context, satisfies ...string) (*ContractQuery, error)
- func (cq *ContractQuery) Count(ctx context.Context) (int, error)
- func (cq *ContractQuery) CountX(ctx context.Context) int
- func (cq *ContractQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ContractQuery) ExistX(ctx context.Context) bool
- func (cq *ContractQuery) First(ctx context.Context) (*Contract, error)
- func (cq *ContractQuery) FirstID(ctx context.Context) (id string, err error)
- func (cq *ContractQuery) FirstIDX(ctx context.Context) string
- func (cq *ContractQuery) FirstX(ctx context.Context) *Contract
- func (cq *ContractQuery) GroupBy(field string, fields ...string) *ContractGroupBy
- func (cq *ContractQuery) IDs(ctx context.Context) ([]string, error)
- func (cq *ContractQuery) IDsX(ctx context.Context) []string
- func (cq *ContractQuery) Limit(limit int) *ContractQuery
- func (cq *ContractQuery) Offset(offset int) *ContractQuery
- func (cq *ContractQuery) Only(ctx context.Context) (*Contract, error)
- func (cq *ContractQuery) OnlyID(ctx context.Context) (id string, err error)
- func (cq *ContractQuery) OnlyIDX(ctx context.Context) string
- func (cq *ContractQuery) OnlyX(ctx context.Context) *Contract
- func (cq *ContractQuery) Order(o ...OrderFunc) *ContractQuery
- func (c *ContractQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ContractConnection, error)
- func (cq *ContractQuery) QueryTransactions() *TransactionQuery
- func (cq *ContractQuery) Select(fields ...string) *ContractSelect
- func (cq *ContractQuery) Unique(unique bool) *ContractQuery
- func (cq *ContractQuery) Where(ps ...predicate.Contract) *ContractQuery
- func (cq *ContractQuery) WithTransactions(opts ...func(*TransactionQuery)) *ContractQuery
- type ContractSelect
- func (s *ContractSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContractSelect) BoolX(ctx context.Context) bool
- func (s *ContractSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ContractSelect) BoolsX(ctx context.Context) []bool
- func (s *ContractSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContractSelect) Float64X(ctx context.Context) float64
- func (s *ContractSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContractSelect) Float64sX(ctx context.Context) []float64
- func (s *ContractSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ContractSelect) IntX(ctx context.Context) int
- func (s *ContractSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ContractSelect) IntsX(ctx context.Context) []int
- func (cs *ContractSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ContractSelect) ScanX(ctx context.Context, v interface{})
- func (s *ContractSelect) String(ctx context.Context) (_ string, err error)
- func (s *ContractSelect) StringX(ctx context.Context) string
- func (s *ContractSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ContractSelect) StringsX(ctx context.Context) []string
- type ContractUpdate
- func (cu *ContractUpdate) AddTransactionIDs(ids ...string) *ContractUpdate
- func (cu *ContractUpdate) AddTransactions(t ...*Transaction) *ContractUpdate
- func (cu *ContractUpdate) ClearTransactions() *ContractUpdate
- func (cu *ContractUpdate) Exec(ctx context.Context) error
- func (cu *ContractUpdate) ExecX(ctx context.Context)
- func (cu *ContractUpdate) Mutation() *ContractMutation
- func (cu *ContractUpdate) RemoveTransactionIDs(ids ...string) *ContractUpdate
- func (cu *ContractUpdate) RemoveTransactions(t ...*Transaction) *ContractUpdate
- func (cu *ContractUpdate) Save(ctx context.Context) (int, error)
- func (cu *ContractUpdate) SaveX(ctx context.Context) int
- func (cu *ContractUpdate) SetCreatedAt(t time.Time) *ContractUpdate
- func (cu *ContractUpdate) SetNillableCreatedAt(t *time.Time) *ContractUpdate
- func (cu *ContractUpdate) SetNillableType(c *contract.Type) *ContractUpdate
- func (cu *ContractUpdate) SetType(c contract.Type) *ContractUpdate
- func (cu *ContractUpdate) SetUpdatedAt(t time.Time) *ContractUpdate
- func (cu *ContractUpdate) Where(ps ...predicate.Contract) *ContractUpdate
- type ContractUpdateOne
- func (cuo *ContractUpdateOne) AddTransactionIDs(ids ...string) *ContractUpdateOne
- func (cuo *ContractUpdateOne) AddTransactions(t ...*Transaction) *ContractUpdateOne
- func (cuo *ContractUpdateOne) ClearTransactions() *ContractUpdateOne
- func (cuo *ContractUpdateOne) Exec(ctx context.Context) error
- func (cuo *ContractUpdateOne) ExecX(ctx context.Context)
- func (cuo *ContractUpdateOne) Mutation() *ContractMutation
- func (cuo *ContractUpdateOne) RemoveTransactionIDs(ids ...string) *ContractUpdateOne
- func (cuo *ContractUpdateOne) RemoveTransactions(t ...*Transaction) *ContractUpdateOne
- func (cuo *ContractUpdateOne) Save(ctx context.Context) (*Contract, error)
- func (cuo *ContractUpdateOne) SaveX(ctx context.Context) *Contract
- func (cuo *ContractUpdateOne) Select(field string, fields ...string) *ContractUpdateOne
- func (cuo *ContractUpdateOne) SetCreatedAt(t time.Time) *ContractUpdateOne
- func (cuo *ContractUpdateOne) SetNillableCreatedAt(t *time.Time) *ContractUpdateOne
- func (cuo *ContractUpdateOne) SetNillableType(c *contract.Type) *ContractUpdateOne
- func (cuo *ContractUpdateOne) SetType(c contract.Type) *ContractUpdateOne
- func (cuo *ContractUpdateOne) SetUpdatedAt(t time.Time) *ContractUpdateOne
- type ContractUpsert
- func (u *ContractUpsert) SetCreatedAt(v time.Time) *ContractUpsert
- func (u *ContractUpsert) SetType(v contract.Type) *ContractUpsert
- func (u *ContractUpsert) SetUpdatedAt(v time.Time) *ContractUpsert
- func (u *ContractUpsert) UpdateCreatedAt() *ContractUpsert
- func (u *ContractUpsert) UpdateType() *ContractUpsert
- func (u *ContractUpsert) UpdateUpdatedAt() *ContractUpsert
- type ContractUpsertBulk
- func (u *ContractUpsertBulk) DoNothing() *ContractUpsertBulk
- func (u *ContractUpsertBulk) Exec(ctx context.Context) error
- func (u *ContractUpsertBulk) ExecX(ctx context.Context)
- func (u *ContractUpsertBulk) Ignore() *ContractUpsertBulk
- func (u *ContractUpsertBulk) SetCreatedAt(v time.Time) *ContractUpsertBulk
- func (u *ContractUpsertBulk) SetType(v contract.Type) *ContractUpsertBulk
- func (u *ContractUpsertBulk) SetUpdatedAt(v time.Time) *ContractUpsertBulk
- func (u *ContractUpsertBulk) Update(set func(*ContractUpsert)) *ContractUpsertBulk
- func (u *ContractUpsertBulk) UpdateCreatedAt() *ContractUpsertBulk
- func (u *ContractUpsertBulk) UpdateNewValues() *ContractUpsertBulk
- func (u *ContractUpsertBulk) UpdateType() *ContractUpsertBulk
- func (u *ContractUpsertBulk) UpdateUpdatedAt() *ContractUpsertBulk
- type ContractUpsertOne
- func (u *ContractUpsertOne) DoNothing() *ContractUpsertOne
- func (u *ContractUpsertOne) Exec(ctx context.Context) error
- func (u *ContractUpsertOne) ExecX(ctx context.Context)
- func (u *ContractUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *ContractUpsertOne) IDX(ctx context.Context) string
- func (u *ContractUpsertOne) Ignore() *ContractUpsertOne
- func (u *ContractUpsertOne) SetCreatedAt(v time.Time) *ContractUpsertOne
- func (u *ContractUpsertOne) SetType(v contract.Type) *ContractUpsertOne
- func (u *ContractUpsertOne) SetUpdatedAt(v time.Time) *ContractUpsertOne
- func (u *ContractUpsertOne) Update(set func(*ContractUpsert)) *ContractUpsertOne
- func (u *ContractUpsertOne) UpdateCreatedAt() *ContractUpsertOne
- func (u *ContractUpsertOne) UpdateNewValues() *ContractUpsertOne
- func (u *ContractUpsertOne) UpdateType() *ContractUpsertOne
- func (u *ContractUpsertOne) UpdateUpdatedAt() *ContractUpsertOne
- type ContractWhereInput
- type Contracts
- type Cursor
- type Edge
- type Event
- func (e *Event) Node(ctx context.Context) (node *Node, err error)
- func (e *Event) QueryTransaction() *TransactionQuery
- func (e *Event) String() string
- func (e *Event) ToEdge(order *EventOrder) *EventEdge
- func (e *Event) Transaction(ctx context.Context) (*Transaction, error)
- func (e *Event) Unwrap() *Event
- func (e *Event) Update() *EventUpdateOne
- type EventClient
- func (c *EventClient) Create() *EventCreate
- func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
- func (c *EventClient) Delete() *EventDelete
- func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
- func (c *EventClient) DeleteOneID(id string) *EventDeleteOne
- func (c *EventClient) Get(ctx context.Context, id string) (*Event, error)
- func (c *EventClient) GetX(ctx context.Context, id string) *Event
- func (c *EventClient) Hooks() []Hook
- func (c *EventClient) Query() *EventQuery
- func (c *EventClient) QueryTransaction(e *Event) *TransactionQuery
- func (c *EventClient) Update() *EventUpdate
- func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
- func (c *EventClient) UpdateOneID(id string) *EventUpdateOne
- func (c *EventClient) Use(hooks ...Hook)
- type EventConnection
- type EventCreate
- func (ec *EventCreate) Exec(ctx context.Context) error
- func (ec *EventCreate) ExecX(ctx context.Context)
- func (ec *EventCreate) Mutation() *EventMutation
- func (ec *EventCreate) OnConflict(opts ...sql.ConflictOption) *EventUpsertOne
- func (ec *EventCreate) OnConflictColumns(columns ...string) *EventUpsertOne
- func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
- func (ec *EventCreate) SaveX(ctx context.Context) *Event
- func (ec *EventCreate) SetData(t []*types.Felt) *EventCreate
- func (ec *EventCreate) SetFrom(s string) *EventCreate
- func (ec *EventCreate) SetID(s string) *EventCreate
- func (ec *EventCreate) SetKeys(t []*types.Felt) *EventCreate
- func (ec *EventCreate) SetNillableTransactionID(id *string) *EventCreate
- func (ec *EventCreate) SetTransaction(t *Transaction) *EventCreate
- func (ec *EventCreate) SetTransactionID(id string) *EventCreate
- type EventCreateBulk
- func (ecb *EventCreateBulk) Exec(ctx context.Context) error
- func (ecb *EventCreateBulk) ExecX(ctx context.Context)
- func (ecb *EventCreateBulk) OnConflict(opts ...sql.ConflictOption) *EventUpsertBulk
- func (ecb *EventCreateBulk) OnConflictColumns(columns ...string) *EventUpsertBulk
- func (ecb *EventCreateBulk) Save(ctx context.Context) ([]*Event, error)
- func (ecb *EventCreateBulk) SaveX(ctx context.Context) []*Event
- type EventDelete
- type EventDeleteOne
- type EventEdge
- type EventEdges
- type EventGroupBy
- func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
- func (s *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EventGroupBy) BoolX(ctx context.Context) bool
- func (s *EventGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EventGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EventGroupBy) Float64X(ctx context.Context) float64
- func (s *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EventGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EventGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EventGroupBy) IntX(ctx context.Context) int
- func (s *EventGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EventGroupBy) IntsX(ctx context.Context) []int
- func (egb *EventGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *EventGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *EventGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EventGroupBy) StringX(ctx context.Context) string
- func (s *EventGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EventGroupBy) StringsX(ctx context.Context) []string
- type EventMutation
- func (m *EventMutation) AddField(name string, value ent.Value) error
- func (m *EventMutation) AddedEdges() []string
- func (m *EventMutation) AddedField(name string) (ent.Value, bool)
- func (m *EventMutation) AddedFields() []string
- func (m *EventMutation) AddedIDs(name string) []ent.Value
- func (m *EventMutation) ClearEdge(name string) error
- func (m *EventMutation) ClearField(name string) error
- func (m *EventMutation) ClearTransaction()
- func (m *EventMutation) ClearedEdges() []string
- func (m *EventMutation) ClearedFields() []string
- func (m EventMutation) Client() *Client
- func (m *EventMutation) Data() (r []*types.Felt, exists bool)
- func (m *EventMutation) EdgeCleared(name string) bool
- func (m *EventMutation) Field(name string) (ent.Value, bool)
- func (m *EventMutation) FieldCleared(name string) bool
- func (m *EventMutation) Fields() []string
- func (m *EventMutation) From() (r string, exists bool)
- func (m *EventMutation) ID() (id string, exists bool)
- func (m *EventMutation) IDs(ctx context.Context) ([]string, error)
- func (m *EventMutation) Keys() (r []*types.Felt, exists bool)
- func (m *EventMutation) OldData(ctx context.Context) (v []*types.Felt, err error)
- func (m *EventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EventMutation) OldFrom(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldKeys(ctx context.Context) (v []*types.Felt, err error)
- func (m *EventMutation) Op() Op
- func (m *EventMutation) RemovedEdges() []string
- func (m *EventMutation) RemovedIDs(name string) []ent.Value
- func (m *EventMutation) ResetData()
- func (m *EventMutation) ResetEdge(name string) error
- func (m *EventMutation) ResetField(name string) error
- func (m *EventMutation) ResetFrom()
- func (m *EventMutation) ResetKeys()
- func (m *EventMutation) ResetTransaction()
- func (m *EventMutation) SetData(t []*types.Felt)
- func (m *EventMutation) SetField(name string, value ent.Value) error
- func (m *EventMutation) SetFrom(s string)
- func (m *EventMutation) SetID(id string)
- func (m *EventMutation) SetKeys(t []*types.Felt)
- func (m *EventMutation) SetTransactionID(id string)
- func (m *EventMutation) TransactionCleared() bool
- func (m *EventMutation) TransactionID() (id string, exists bool)
- func (m *EventMutation) TransactionIDs() (ids []string)
- func (m EventMutation) Tx() (*Tx, error)
- func (m *EventMutation) Type() string
- func (m *EventMutation) Where(ps ...predicate.Event)
- type EventOrder
- type EventOrderField
- type EventPaginateOption
- type EventQuery
- func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
- func (eq *EventQuery) AllX(ctx context.Context) []*Event
- func (eq *EventQuery) Clone() *EventQuery
- func (e *EventQuery) CollectFields(ctx context.Context, satisfies ...string) (*EventQuery, error)
- func (eq *EventQuery) Count(ctx context.Context) (int, error)
- func (eq *EventQuery) CountX(ctx context.Context) int
- func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EventQuery) ExistX(ctx context.Context) bool
- func (eq *EventQuery) First(ctx context.Context) (*Event, error)
- func (eq *EventQuery) FirstID(ctx context.Context) (id string, err error)
- func (eq *EventQuery) FirstIDX(ctx context.Context) string
- func (eq *EventQuery) FirstX(ctx context.Context) *Event
- func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
- func (eq *EventQuery) IDs(ctx context.Context) ([]string, error)
- func (eq *EventQuery) IDsX(ctx context.Context) []string
- func (eq *EventQuery) Limit(limit int) *EventQuery
- func (eq *EventQuery) Offset(offset int) *EventQuery
- func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
- func (eq *EventQuery) OnlyID(ctx context.Context) (id string, err error)
- func (eq *EventQuery) OnlyIDX(ctx context.Context) string
- func (eq *EventQuery) OnlyX(ctx context.Context) *Event
- func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery
- func (e *EventQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*EventConnection, error)
- func (eq *EventQuery) QueryTransaction() *TransactionQuery
- func (eq *EventQuery) Select(fields ...string) *EventSelect
- func (eq *EventQuery) Unique(unique bool) *EventQuery
- func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
- func (eq *EventQuery) WithTransaction(opts ...func(*TransactionQuery)) *EventQuery
- type EventSelect
- func (s *EventSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EventSelect) BoolX(ctx context.Context) bool
- func (s *EventSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EventSelect) BoolsX(ctx context.Context) []bool
- func (s *EventSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EventSelect) Float64X(ctx context.Context) float64
- func (s *EventSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EventSelect) Float64sX(ctx context.Context) []float64
- func (s *EventSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EventSelect) IntX(ctx context.Context) int
- func (s *EventSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EventSelect) IntsX(ctx context.Context) []int
- func (es *EventSelect) Scan(ctx context.Context, v interface{}) error
- func (s *EventSelect) ScanX(ctx context.Context, v interface{})
- func (s *EventSelect) String(ctx context.Context) (_ string, err error)
- func (s *EventSelect) StringX(ctx context.Context) string
- func (s *EventSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EventSelect) StringsX(ctx context.Context) []string
- type EventUpdate
- func (eu *EventUpdate) ClearTransaction() *EventUpdate
- func (eu *EventUpdate) Exec(ctx context.Context) error
- func (eu *EventUpdate) ExecX(ctx context.Context)
- func (eu *EventUpdate) Mutation() *EventMutation
- func (eu *EventUpdate) Save(ctx context.Context) (int, error)
- func (eu *EventUpdate) SaveX(ctx context.Context) int
- func (eu *EventUpdate) SetData(t []*types.Felt) *EventUpdate
- func (eu *EventUpdate) SetFrom(s string) *EventUpdate
- func (eu *EventUpdate) SetKeys(t []*types.Felt) *EventUpdate
- func (eu *EventUpdate) SetNillableTransactionID(id *string) *EventUpdate
- func (eu *EventUpdate) SetTransaction(t *Transaction) *EventUpdate
- func (eu *EventUpdate) SetTransactionID(id string) *EventUpdate
- func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
- type EventUpdateOne
- func (euo *EventUpdateOne) ClearTransaction() *EventUpdateOne
- func (euo *EventUpdateOne) Exec(ctx context.Context) error
- func (euo *EventUpdateOne) ExecX(ctx context.Context)
- func (euo *EventUpdateOne) Mutation() *EventMutation
- func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
- func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
- func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
- func (euo *EventUpdateOne) SetData(t []*types.Felt) *EventUpdateOne
- func (euo *EventUpdateOne) SetFrom(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetKeys(t []*types.Felt) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableTransactionID(id *string) *EventUpdateOne
- func (euo *EventUpdateOne) SetTransaction(t *Transaction) *EventUpdateOne
- func (euo *EventUpdateOne) SetTransactionID(id string) *EventUpdateOne
- type EventUpsert
- func (u *EventUpsert) SetData(v []*types.Felt) *EventUpsert
- func (u *EventUpsert) SetFrom(v string) *EventUpsert
- func (u *EventUpsert) SetKeys(v []*types.Felt) *EventUpsert
- func (u *EventUpsert) UpdateData() *EventUpsert
- func (u *EventUpsert) UpdateFrom() *EventUpsert
- func (u *EventUpsert) UpdateKeys() *EventUpsert
- type EventUpsertBulk
- func (u *EventUpsertBulk) DoNothing() *EventUpsertBulk
- func (u *EventUpsertBulk) Exec(ctx context.Context) error
- func (u *EventUpsertBulk) ExecX(ctx context.Context)
- func (u *EventUpsertBulk) Ignore() *EventUpsertBulk
- func (u *EventUpsertBulk) SetData(v []*types.Felt) *EventUpsertBulk
- func (u *EventUpsertBulk) SetFrom(v string) *EventUpsertBulk
- func (u *EventUpsertBulk) SetKeys(v []*types.Felt) *EventUpsertBulk
- func (u *EventUpsertBulk) Update(set func(*EventUpsert)) *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateData() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateFrom() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateKeys() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateNewValues() *EventUpsertBulk
- type EventUpsertOne
- func (u *EventUpsertOne) DoNothing() *EventUpsertOne
- func (u *EventUpsertOne) Exec(ctx context.Context) error
- func (u *EventUpsertOne) ExecX(ctx context.Context)
- func (u *EventUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *EventUpsertOne) IDX(ctx context.Context) string
- func (u *EventUpsertOne) Ignore() *EventUpsertOne
- func (u *EventUpsertOne) SetData(v []*types.Felt) *EventUpsertOne
- func (u *EventUpsertOne) SetFrom(v string) *EventUpsertOne
- func (u *EventUpsertOne) SetKeys(v []*types.Felt) *EventUpsertOne
- func (u *EventUpsertOne) Update(set func(*EventUpsert)) *EventUpsertOne
- func (u *EventUpsertOne) UpdateData() *EventUpsertOne
- func (u *EventUpsertOne) UpdateFrom() *EventUpsertOne
- func (u *EventUpsertOne) UpdateKeys() *EventUpsertOne
- func (u *EventUpsertOne) UpdateNewValues() *EventUpsertOne
- type EventWhereInput
- type Events
- type Field
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Transaction
- func (t *Transaction) Block(ctx context.Context) (*Block, error)
- func (t *Transaction) Events(ctx context.Context) ([]*Event, error)
- func (t *Transaction) Node(ctx context.Context) (node *Node, err error)
- func (t *Transaction) QueryBlock() *BlockQuery
- func (t *Transaction) QueryEvents() *EventQuery
- func (t *Transaction) QueryReceipt() *TransactionReceiptQuery
- func (t *Transaction) Receipt(ctx context.Context) (*TransactionReceipt, error)
- func (t *Transaction) String() string
- func (t *Transaction) ToEdge(order *TransactionOrder) *TransactionEdge
- func (t *Transaction) Unwrap() *Transaction
- func (t *Transaction) Update() *TransactionUpdateOne
- type TransactionClient
- func (c *TransactionClient) Create() *TransactionCreate
- func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk
- func (c *TransactionClient) Delete() *TransactionDelete
- func (c *TransactionClient) DeleteOne(t *Transaction) *TransactionDeleteOne
- func (c *TransactionClient) DeleteOneID(id string) *TransactionDeleteOne
- func (c *TransactionClient) Get(ctx context.Context, id string) (*Transaction, error)
- func (c *TransactionClient) GetX(ctx context.Context, id string) *Transaction
- func (c *TransactionClient) Hooks() []Hook
- func (c *TransactionClient) Query() *TransactionQuery
- func (c *TransactionClient) QueryBlock(t *Transaction) *BlockQuery
- func (c *TransactionClient) QueryEvents(t *Transaction) *EventQuery
- func (c *TransactionClient) QueryReceipt(t *Transaction) *TransactionReceiptQuery
- func (c *TransactionClient) Update() *TransactionUpdate
- func (c *TransactionClient) UpdateOne(t *Transaction) *TransactionUpdateOne
- func (c *TransactionClient) UpdateOneID(id string) *TransactionUpdateOne
- func (c *TransactionClient) Use(hooks ...Hook)
- type TransactionConnection
- type TransactionCreate
- func (tc *TransactionCreate) AddEventIDs(ids ...string) *TransactionCreate
- func (tc *TransactionCreate) AddEvents(e ...*Event) *TransactionCreate
- func (tc *TransactionCreate) Exec(ctx context.Context) error
- func (tc *TransactionCreate) ExecX(ctx context.Context)
- func (tc *TransactionCreate) Mutation() *TransactionMutation
- func (tc *TransactionCreate) OnConflict(opts ...sql.ConflictOption) *TransactionUpsertOne
- func (tc *TransactionCreate) OnConflictColumns(columns ...string) *TransactionUpsertOne
- func (tc *TransactionCreate) Save(ctx context.Context) (*Transaction, error)
- func (tc *TransactionCreate) SaveX(ctx context.Context) *Transaction
- func (tc *TransactionCreate) SetBlock(b *Block) *TransactionCreate
- func (tc *TransactionCreate) SetBlockID(id string) *TransactionCreate
- func (tc *TransactionCreate) SetCalldata(s []string) *TransactionCreate
- func (tc *TransactionCreate) SetContractAddress(s string) *TransactionCreate
- func (tc *TransactionCreate) SetEntryPointSelector(s string) *TransactionCreate
- func (tc *TransactionCreate) SetID(s string) *TransactionCreate
- func (tc *TransactionCreate) SetNillableBlockID(id *string) *TransactionCreate
- func (tc *TransactionCreate) SetNillableEntryPointSelector(s *string) *TransactionCreate
- func (tc *TransactionCreate) SetNillableNonce(s *string) *TransactionCreate
- func (tc *TransactionCreate) SetNillableReceiptID(id *string) *TransactionCreate
- func (tc *TransactionCreate) SetNonce(s string) *TransactionCreate
- func (tc *TransactionCreate) SetReceipt(t *TransactionReceipt) *TransactionCreate
- func (tc *TransactionCreate) SetReceiptID(id string) *TransactionCreate
- func (tc *TransactionCreate) SetSignature(s []string) *TransactionCreate
- func (tc *TransactionCreate) SetTransactionHash(s string) *TransactionCreate
- type TransactionCreateBulk
- func (tcb *TransactionCreateBulk) Exec(ctx context.Context) error
- func (tcb *TransactionCreateBulk) ExecX(ctx context.Context)
- func (tcb *TransactionCreateBulk) OnConflict(opts ...sql.ConflictOption) *TransactionUpsertBulk
- func (tcb *TransactionCreateBulk) OnConflictColumns(columns ...string) *TransactionUpsertBulk
- func (tcb *TransactionCreateBulk) Save(ctx context.Context) ([]*Transaction, error)
- func (tcb *TransactionCreateBulk) SaveX(ctx context.Context) []*Transaction
- type TransactionDelete
- type TransactionDeleteOne
- type TransactionEdge
- type TransactionEdges
- type TransactionGroupBy
- func (tgb *TransactionGroupBy) Aggregate(fns ...AggregateFunc) *TransactionGroupBy
- func (s *TransactionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TransactionGroupBy) BoolX(ctx context.Context) bool
- func (s *TransactionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TransactionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TransactionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TransactionGroupBy) Float64X(ctx context.Context) float64
- func (s *TransactionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TransactionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TransactionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TransactionGroupBy) IntX(ctx context.Context) int
- func (s *TransactionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TransactionGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TransactionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TransactionGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TransactionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TransactionGroupBy) StringX(ctx context.Context) string
- func (s *TransactionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TransactionGroupBy) StringsX(ctx context.Context) []string
- type TransactionMutation
- func (m *TransactionMutation) AddEventIDs(ids ...string)
- func (m *TransactionMutation) AddField(name string, value ent.Value) error
- func (m *TransactionMutation) AddedEdges() []string
- func (m *TransactionMutation) AddedField(name string) (ent.Value, bool)
- func (m *TransactionMutation) AddedFields() []string
- func (m *TransactionMutation) AddedIDs(name string) []ent.Value
- func (m *TransactionMutation) BlockCleared() bool
- func (m *TransactionMutation) BlockID() (id string, exists bool)
- func (m *TransactionMutation) BlockIDs() (ids []string)
- func (m *TransactionMutation) Calldata() (r []string, exists bool)
- func (m *TransactionMutation) ClearBlock()
- func (m *TransactionMutation) ClearEdge(name string) error
- func (m *TransactionMutation) ClearEntryPointSelector()
- func (m *TransactionMutation) ClearEvents()
- func (m *TransactionMutation) ClearField(name string) error
- func (m *TransactionMutation) ClearNonce()
- func (m *TransactionMutation) ClearReceipt()
- func (m *TransactionMutation) ClearSignature()
- func (m *TransactionMutation) ClearedEdges() []string
- func (m *TransactionMutation) ClearedFields() []string
- func (m TransactionMutation) Client() *Client
- func (m *TransactionMutation) ContractAddress() (r string, exists bool)
- func (m *TransactionMutation) EdgeCleared(name string) bool
- func (m *TransactionMutation) EntryPointSelector() (r string, exists bool)
- func (m *TransactionMutation) EntryPointSelectorCleared() bool
- func (m *TransactionMutation) EventsCleared() bool
- func (m *TransactionMutation) EventsIDs() (ids []string)
- func (m *TransactionMutation) Field(name string) (ent.Value, bool)
- func (m *TransactionMutation) FieldCleared(name string) bool
- func (m *TransactionMutation) Fields() []string
- func (m *TransactionMutation) ID() (id string, exists bool)
- func (m *TransactionMutation) IDs(ctx context.Context) ([]string, error)
- func (m *TransactionMutation) Nonce() (r string, exists bool)
- func (m *TransactionMutation) NonceCleared() bool
- func (m *TransactionMutation) OldCalldata(ctx context.Context) (v []string, err error)
- func (m *TransactionMutation) OldContractAddress(ctx context.Context) (v string, err error)
- func (m *TransactionMutation) OldEntryPointSelector(ctx context.Context) (v string, err error)
- func (m *TransactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TransactionMutation) OldNonce(ctx context.Context) (v string, err error)
- func (m *TransactionMutation) OldSignature(ctx context.Context) (v []string, err error)
- func (m *TransactionMutation) OldTransactionHash(ctx context.Context) (v string, err error)
- func (m *TransactionMutation) Op() Op
- func (m *TransactionMutation) ReceiptCleared() bool
- func (m *TransactionMutation) ReceiptID() (id string, exists bool)
- func (m *TransactionMutation) ReceiptIDs() (ids []string)
- func (m *TransactionMutation) RemoveEventIDs(ids ...string)
- func (m *TransactionMutation) RemovedEdges() []string
- func (m *TransactionMutation) RemovedEventsIDs() (ids []string)
- func (m *TransactionMutation) RemovedIDs(name string) []ent.Value
- func (m *TransactionMutation) ResetBlock()
- func (m *TransactionMutation) ResetCalldata()
- func (m *TransactionMutation) ResetContractAddress()
- func (m *TransactionMutation) ResetEdge(name string) error
- func (m *TransactionMutation) ResetEntryPointSelector()
- func (m *TransactionMutation) ResetEvents()
- func (m *TransactionMutation) ResetField(name string) error
- func (m *TransactionMutation) ResetNonce()
- func (m *TransactionMutation) ResetReceipt()
- func (m *TransactionMutation) ResetSignature()
- func (m *TransactionMutation) ResetTransactionHash()
- func (m *TransactionMutation) SetBlockID(id string)
- func (m *TransactionMutation) SetCalldata(s []string)
- func (m *TransactionMutation) SetContractAddress(s string)
- func (m *TransactionMutation) SetEntryPointSelector(s string)
- func (m *TransactionMutation) SetField(name string, value ent.Value) error
- func (m *TransactionMutation) SetID(id string)
- func (m *TransactionMutation) SetNonce(s string)
- func (m *TransactionMutation) SetReceiptID(id string)
- func (m *TransactionMutation) SetSignature(s []string)
- func (m *TransactionMutation) SetTransactionHash(s string)
- func (m *TransactionMutation) Signature() (r []string, exists bool)
- func (m *TransactionMutation) SignatureCleared() bool
- func (m *TransactionMutation) TransactionHash() (r string, exists bool)
- func (m TransactionMutation) Tx() (*Tx, error)
- func (m *TransactionMutation) Type() string
- func (m *TransactionMutation) Where(ps ...predicate.Transaction)
- type TransactionOrder
- type TransactionOrderField
- type TransactionPaginateOption
- type TransactionQuery
- func (tq *TransactionQuery) All(ctx context.Context) ([]*Transaction, error)
- func (tq *TransactionQuery) AllX(ctx context.Context) []*Transaction
- func (tq *TransactionQuery) Clone() *TransactionQuery
- func (t *TransactionQuery) CollectFields(ctx context.Context, satisfies ...string) (*TransactionQuery, error)
- func (tq *TransactionQuery) Count(ctx context.Context) (int, error)
- func (tq *TransactionQuery) CountX(ctx context.Context) int
- func (tq *TransactionQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TransactionQuery) ExistX(ctx context.Context) bool
- func (tq *TransactionQuery) First(ctx context.Context) (*Transaction, error)
- func (tq *TransactionQuery) FirstID(ctx context.Context) (id string, err error)
- func (tq *TransactionQuery) FirstIDX(ctx context.Context) string
- func (tq *TransactionQuery) FirstX(ctx context.Context) *Transaction
- func (tq *TransactionQuery) GroupBy(field string, fields ...string) *TransactionGroupBy
- func (tq *TransactionQuery) IDs(ctx context.Context) ([]string, error)
- func (tq *TransactionQuery) IDsX(ctx context.Context) []string
- func (tq *TransactionQuery) Limit(limit int) *TransactionQuery
- func (tq *TransactionQuery) Offset(offset int) *TransactionQuery
- func (tq *TransactionQuery) Only(ctx context.Context) (*Transaction, error)
- func (tq *TransactionQuery) OnlyID(ctx context.Context) (id string, err error)
- func (tq *TransactionQuery) OnlyIDX(ctx context.Context) string
- func (tq *TransactionQuery) OnlyX(ctx context.Context) *Transaction
- func (tq *TransactionQuery) Order(o ...OrderFunc) *TransactionQuery
- func (t *TransactionQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TransactionConnection, error)
- func (tq *TransactionQuery) QueryBlock() *BlockQuery
- func (tq *TransactionQuery) QueryEvents() *EventQuery
- func (tq *TransactionQuery) QueryReceipt() *TransactionReceiptQuery
- func (tq *TransactionQuery) Select(fields ...string) *TransactionSelect
- func (tq *TransactionQuery) Unique(unique bool) *TransactionQuery
- func (tq *TransactionQuery) Where(ps ...predicate.Transaction) *TransactionQuery
- func (tq *TransactionQuery) WithBlock(opts ...func(*BlockQuery)) *TransactionQuery
- func (tq *TransactionQuery) WithEvents(opts ...func(*EventQuery)) *TransactionQuery
- func (tq *TransactionQuery) WithReceipt(opts ...func(*TransactionReceiptQuery)) *TransactionQuery
- type TransactionReceipt
- func (tr *TransactionReceipt) Block(ctx context.Context) (*Block, error)
- func (tr *TransactionReceipt) Node(ctx context.Context) (node *Node, err error)
- func (tr *TransactionReceipt) QueryBlock() *BlockQuery
- func (tr *TransactionReceipt) QueryTransaction() *TransactionQuery
- func (tr *TransactionReceipt) String() string
- func (tr *TransactionReceipt) ToEdge(order *TransactionReceiptOrder) *TransactionReceiptEdge
- func (tr *TransactionReceipt) Transaction(ctx context.Context) (*Transaction, error)
- func (tr *TransactionReceipt) Unwrap() *TransactionReceipt
- func (tr *TransactionReceipt) Update() *TransactionReceiptUpdateOne
- type TransactionReceiptClient
- func (c *TransactionReceiptClient) Create() *TransactionReceiptCreate
- func (c *TransactionReceiptClient) CreateBulk(builders ...*TransactionReceiptCreate) *TransactionReceiptCreateBulk
- func (c *TransactionReceiptClient) Delete() *TransactionReceiptDelete
- func (c *TransactionReceiptClient) DeleteOne(tr *TransactionReceipt) *TransactionReceiptDeleteOne
- func (c *TransactionReceiptClient) DeleteOneID(id string) *TransactionReceiptDeleteOne
- func (c *TransactionReceiptClient) Get(ctx context.Context, id string) (*TransactionReceipt, error)
- func (c *TransactionReceiptClient) GetX(ctx context.Context, id string) *TransactionReceipt
- func (c *TransactionReceiptClient) Hooks() []Hook
- func (c *TransactionReceiptClient) Query() *TransactionReceiptQuery
- func (c *TransactionReceiptClient) QueryBlock(tr *TransactionReceipt) *BlockQuery
- func (c *TransactionReceiptClient) QueryTransaction(tr *TransactionReceipt) *TransactionQuery
- func (c *TransactionReceiptClient) Update() *TransactionReceiptUpdate
- func (c *TransactionReceiptClient) UpdateOne(tr *TransactionReceipt) *TransactionReceiptUpdateOne
- func (c *TransactionReceiptClient) UpdateOneID(id string) *TransactionReceiptUpdateOne
- func (c *TransactionReceiptClient) Use(hooks ...Hook)
- type TransactionReceiptConnection
- type TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) Exec(ctx context.Context) error
- func (trc *TransactionReceiptCreate) ExecX(ctx context.Context)
- func (trc *TransactionReceiptCreate) Mutation() *TransactionReceiptMutation
- func (trc *TransactionReceiptCreate) OnConflict(opts ...sql.ConflictOption) *TransactionReceiptUpsertOne
- func (trc *TransactionReceiptCreate) OnConflictColumns(columns ...string) *TransactionReceiptUpsertOne
- func (trc *TransactionReceiptCreate) Save(ctx context.Context) (*TransactionReceipt, error)
- func (trc *TransactionReceiptCreate) SaveX(ctx context.Context) *TransactionReceipt
- func (trc *TransactionReceiptCreate) SetBlock(b *Block) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetBlockID(id string) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetID(s string) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetL1OriginMessage(t *types.L2Message) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetMessagesSent(t []*types.L1Message) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetNillableBlockID(id *string) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetStatus(t transactionreceipt.Status) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetStatusData(s string) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetTransaction(t *Transaction) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetTransactionHash(s string) *TransactionReceiptCreate
- func (trc *TransactionReceiptCreate) SetTransactionID(id string) *TransactionReceiptCreate
- type TransactionReceiptCreateBulk
- func (trcb *TransactionReceiptCreateBulk) Exec(ctx context.Context) error
- func (trcb *TransactionReceiptCreateBulk) ExecX(ctx context.Context)
- func (trcb *TransactionReceiptCreateBulk) OnConflict(opts ...sql.ConflictOption) *TransactionReceiptUpsertBulk
- func (trcb *TransactionReceiptCreateBulk) OnConflictColumns(columns ...string) *TransactionReceiptUpsertBulk
- func (trcb *TransactionReceiptCreateBulk) Save(ctx context.Context) ([]*TransactionReceipt, error)
- func (trcb *TransactionReceiptCreateBulk) SaveX(ctx context.Context) []*TransactionReceipt
- type TransactionReceiptDelete
- type TransactionReceiptDeleteOne
- type TransactionReceiptEdge
- type TransactionReceiptEdges
- type TransactionReceiptGroupBy
- func (trgb *TransactionReceiptGroupBy) Aggregate(fns ...AggregateFunc) *TransactionReceiptGroupBy
- func (s *TransactionReceiptGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TransactionReceiptGroupBy) BoolX(ctx context.Context) bool
- func (s *TransactionReceiptGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TransactionReceiptGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TransactionReceiptGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TransactionReceiptGroupBy) Float64X(ctx context.Context) float64
- func (s *TransactionReceiptGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TransactionReceiptGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TransactionReceiptGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TransactionReceiptGroupBy) IntX(ctx context.Context) int
- func (s *TransactionReceiptGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TransactionReceiptGroupBy) IntsX(ctx context.Context) []int
- func (trgb *TransactionReceiptGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TransactionReceiptGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TransactionReceiptGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TransactionReceiptGroupBy) StringX(ctx context.Context) string
- func (s *TransactionReceiptGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TransactionReceiptGroupBy) StringsX(ctx context.Context) []string
- type TransactionReceiptMutation
- func (m *TransactionReceiptMutation) AddField(name string, value ent.Value) error
- func (m *TransactionReceiptMutation) AddedEdges() []string
- func (m *TransactionReceiptMutation) AddedField(name string) (ent.Value, bool)
- func (m *TransactionReceiptMutation) AddedFields() []string
- func (m *TransactionReceiptMutation) AddedIDs(name string) []ent.Value
- func (m *TransactionReceiptMutation) BlockCleared() bool
- func (m *TransactionReceiptMutation) BlockID() (id string, exists bool)
- func (m *TransactionReceiptMutation) BlockIDs() (ids []string)
- func (m *TransactionReceiptMutation) ClearBlock()
- func (m *TransactionReceiptMutation) ClearEdge(name string) error
- func (m *TransactionReceiptMutation) ClearField(name string) error
- func (m *TransactionReceiptMutation) ClearTransaction()
- func (m *TransactionReceiptMutation) ClearedEdges() []string
- func (m *TransactionReceiptMutation) ClearedFields() []string
- func (m TransactionReceiptMutation) Client() *Client
- func (m *TransactionReceiptMutation) EdgeCleared(name string) bool
- func (m *TransactionReceiptMutation) Field(name string) (ent.Value, bool)
- func (m *TransactionReceiptMutation) FieldCleared(name string) bool
- func (m *TransactionReceiptMutation) Fields() []string
- func (m *TransactionReceiptMutation) ID() (id string, exists bool)
- func (m *TransactionReceiptMutation) IDs(ctx context.Context) ([]string, error)
- func (m *TransactionReceiptMutation) L1OriginMessage() (r *types.L2Message, exists bool)
- func (m *TransactionReceiptMutation) MessagesSent() (r []*types.L1Message, exists bool)
- func (m *TransactionReceiptMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TransactionReceiptMutation) OldL1OriginMessage(ctx context.Context) (v *types.L2Message, err error)
- func (m *TransactionReceiptMutation) OldMessagesSent(ctx context.Context) (v []*types.L1Message, err error)
- func (m *TransactionReceiptMutation) OldStatus(ctx context.Context) (v transactionreceipt.Status, err error)
- func (m *TransactionReceiptMutation) OldStatusData(ctx context.Context) (v string, err error)
- func (m *TransactionReceiptMutation) OldTransactionHash(ctx context.Context) (v string, err error)
- func (m *TransactionReceiptMutation) Op() Op
- func (m *TransactionReceiptMutation) RemovedEdges() []string
- func (m *TransactionReceiptMutation) RemovedIDs(name string) []ent.Value
- func (m *TransactionReceiptMutation) ResetBlock()
- func (m *TransactionReceiptMutation) ResetEdge(name string) error
- func (m *TransactionReceiptMutation) ResetField(name string) error
- func (m *TransactionReceiptMutation) ResetL1OriginMessage()
- func (m *TransactionReceiptMutation) ResetMessagesSent()
- func (m *TransactionReceiptMutation) ResetStatus()
- func (m *TransactionReceiptMutation) ResetStatusData()
- func (m *TransactionReceiptMutation) ResetTransaction()
- func (m *TransactionReceiptMutation) ResetTransactionHash()
- func (m *TransactionReceiptMutation) SetBlockID(id string)
- func (m *TransactionReceiptMutation) SetField(name string, value ent.Value) error
- func (m *TransactionReceiptMutation) SetID(id string)
- func (m *TransactionReceiptMutation) SetL1OriginMessage(t *types.L2Message)
- func (m *TransactionReceiptMutation) SetMessagesSent(t []*types.L1Message)
- func (m *TransactionReceiptMutation) SetStatus(t transactionreceipt.Status)
- func (m *TransactionReceiptMutation) SetStatusData(s string)
- func (m *TransactionReceiptMutation) SetTransactionHash(s string)
- func (m *TransactionReceiptMutation) SetTransactionID(id string)
- func (m *TransactionReceiptMutation) Status() (r transactionreceipt.Status, exists bool)
- func (m *TransactionReceiptMutation) StatusData() (r string, exists bool)
- func (m *TransactionReceiptMutation) TransactionCleared() bool
- func (m *TransactionReceiptMutation) TransactionHash() (r string, exists bool)
- func (m *TransactionReceiptMutation) TransactionID() (id string, exists bool)
- func (m *TransactionReceiptMutation) TransactionIDs() (ids []string)
- func (m TransactionReceiptMutation) Tx() (*Tx, error)
- func (m *TransactionReceiptMutation) Type() string
- func (m *TransactionReceiptMutation) Where(ps ...predicate.TransactionReceipt)
- type TransactionReceiptOrder
- type TransactionReceiptOrderField
- type TransactionReceiptPaginateOption
- type TransactionReceiptQuery
- func (trq *TransactionReceiptQuery) All(ctx context.Context) ([]*TransactionReceipt, error)
- func (trq *TransactionReceiptQuery) AllX(ctx context.Context) []*TransactionReceipt
- func (trq *TransactionReceiptQuery) Clone() *TransactionReceiptQuery
- func (tr *TransactionReceiptQuery) CollectFields(ctx context.Context, satisfies ...string) (*TransactionReceiptQuery, error)
- func (trq *TransactionReceiptQuery) Count(ctx context.Context) (int, error)
- func (trq *TransactionReceiptQuery) CountX(ctx context.Context) int
- func (trq *TransactionReceiptQuery) Exist(ctx context.Context) (bool, error)
- func (trq *TransactionReceiptQuery) ExistX(ctx context.Context) bool
- func (trq *TransactionReceiptQuery) First(ctx context.Context) (*TransactionReceipt, error)
- func (trq *TransactionReceiptQuery) FirstID(ctx context.Context) (id string, err error)
- func (trq *TransactionReceiptQuery) FirstIDX(ctx context.Context) string
- func (trq *TransactionReceiptQuery) FirstX(ctx context.Context) *TransactionReceipt
- func (trq *TransactionReceiptQuery) GroupBy(field string, fields ...string) *TransactionReceiptGroupBy
- func (trq *TransactionReceiptQuery) IDs(ctx context.Context) ([]string, error)
- func (trq *TransactionReceiptQuery) IDsX(ctx context.Context) []string
- func (trq *TransactionReceiptQuery) Limit(limit int) *TransactionReceiptQuery
- func (trq *TransactionReceiptQuery) Offset(offset int) *TransactionReceiptQuery
- func (trq *TransactionReceiptQuery) Only(ctx context.Context) (*TransactionReceipt, error)
- func (trq *TransactionReceiptQuery) OnlyID(ctx context.Context) (id string, err error)
- func (trq *TransactionReceiptQuery) OnlyIDX(ctx context.Context) string
- func (trq *TransactionReceiptQuery) OnlyX(ctx context.Context) *TransactionReceipt
- func (trq *TransactionReceiptQuery) Order(o ...OrderFunc) *TransactionReceiptQuery
- func (tr *TransactionReceiptQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TransactionReceiptConnection, error)
- func (trq *TransactionReceiptQuery) QueryBlock() *BlockQuery
- func (trq *TransactionReceiptQuery) QueryTransaction() *TransactionQuery
- func (trq *TransactionReceiptQuery) Select(fields ...string) *TransactionReceiptSelect
- func (trq *TransactionReceiptQuery) Unique(unique bool) *TransactionReceiptQuery
- func (trq *TransactionReceiptQuery) Where(ps ...predicate.TransactionReceipt) *TransactionReceiptQuery
- func (trq *TransactionReceiptQuery) WithBlock(opts ...func(*BlockQuery)) *TransactionReceiptQuery
- func (trq *TransactionReceiptQuery) WithTransaction(opts ...func(*TransactionQuery)) *TransactionReceiptQuery
- type TransactionReceiptSelect
- func (s *TransactionReceiptSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TransactionReceiptSelect) BoolX(ctx context.Context) bool
- func (s *TransactionReceiptSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TransactionReceiptSelect) BoolsX(ctx context.Context) []bool
- func (s *TransactionReceiptSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TransactionReceiptSelect) Float64X(ctx context.Context) float64
- func (s *TransactionReceiptSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TransactionReceiptSelect) Float64sX(ctx context.Context) []float64
- func (s *TransactionReceiptSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TransactionReceiptSelect) IntX(ctx context.Context) int
- func (s *TransactionReceiptSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TransactionReceiptSelect) IntsX(ctx context.Context) []int
- func (trs *TransactionReceiptSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TransactionReceiptSelect) ScanX(ctx context.Context, v interface{})
- func (s *TransactionReceiptSelect) String(ctx context.Context) (_ string, err error)
- func (s *TransactionReceiptSelect) StringX(ctx context.Context) string
- func (s *TransactionReceiptSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TransactionReceiptSelect) StringsX(ctx context.Context) []string
- type TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) ClearBlock() *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) ClearTransaction() *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) Exec(ctx context.Context) error
- func (tru *TransactionReceiptUpdate) ExecX(ctx context.Context)
- func (tru *TransactionReceiptUpdate) Mutation() *TransactionReceiptMutation
- func (tru *TransactionReceiptUpdate) Save(ctx context.Context) (int, error)
- func (tru *TransactionReceiptUpdate) SaveX(ctx context.Context) int
- func (tru *TransactionReceiptUpdate) SetBlock(b *Block) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetBlockID(id string) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetL1OriginMessage(t *types.L2Message) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetMessagesSent(t []*types.L1Message) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetNillableBlockID(id *string) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetStatus(t transactionreceipt.Status) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetStatusData(s string) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetTransaction(t *Transaction) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetTransactionHash(s string) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) SetTransactionID(id string) *TransactionReceiptUpdate
- func (tru *TransactionReceiptUpdate) Where(ps ...predicate.TransactionReceipt) *TransactionReceiptUpdate
- type TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) ClearBlock() *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) ClearTransaction() *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) Exec(ctx context.Context) error
- func (truo *TransactionReceiptUpdateOne) ExecX(ctx context.Context)
- func (truo *TransactionReceiptUpdateOne) Mutation() *TransactionReceiptMutation
- func (truo *TransactionReceiptUpdateOne) Save(ctx context.Context) (*TransactionReceipt, error)
- func (truo *TransactionReceiptUpdateOne) SaveX(ctx context.Context) *TransactionReceipt
- func (truo *TransactionReceiptUpdateOne) Select(field string, fields ...string) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetBlock(b *Block) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetBlockID(id string) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetL1OriginMessage(t *types.L2Message) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetMessagesSent(t []*types.L1Message) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetNillableBlockID(id *string) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetStatus(t transactionreceipt.Status) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetStatusData(s string) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetTransaction(t *Transaction) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetTransactionHash(s string) *TransactionReceiptUpdateOne
- func (truo *TransactionReceiptUpdateOne) SetTransactionID(id string) *TransactionReceiptUpdateOne
- type TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) SetL1OriginMessage(v *types.L2Message) *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) SetMessagesSent(v []*types.L1Message) *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) SetStatus(v transactionreceipt.Status) *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) SetStatusData(v string) *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) SetTransactionHash(v string) *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) UpdateL1OriginMessage() *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) UpdateMessagesSent() *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) UpdateStatus() *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) UpdateStatusData() *TransactionReceiptUpsert
- func (u *TransactionReceiptUpsert) UpdateTransactionHash() *TransactionReceiptUpsert
- type TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) DoNothing() *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) Exec(ctx context.Context) error
- func (u *TransactionReceiptUpsertBulk) ExecX(ctx context.Context)
- func (u *TransactionReceiptUpsertBulk) Ignore() *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) SetL1OriginMessage(v *types.L2Message) *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) SetMessagesSent(v []*types.L1Message) *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) SetStatus(v transactionreceipt.Status) *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) SetStatusData(v string) *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) SetTransactionHash(v string) *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) Update(set func(*TransactionReceiptUpsert)) *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) UpdateL1OriginMessage() *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) UpdateMessagesSent() *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) UpdateNewValues() *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) UpdateStatus() *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) UpdateStatusData() *TransactionReceiptUpsertBulk
- func (u *TransactionReceiptUpsertBulk) UpdateTransactionHash() *TransactionReceiptUpsertBulk
- type TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) DoNothing() *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) Exec(ctx context.Context) error
- func (u *TransactionReceiptUpsertOne) ExecX(ctx context.Context)
- func (u *TransactionReceiptUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *TransactionReceiptUpsertOne) IDX(ctx context.Context) string
- func (u *TransactionReceiptUpsertOne) Ignore() *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) SetL1OriginMessage(v *types.L2Message) *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) SetMessagesSent(v []*types.L1Message) *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) SetStatus(v transactionreceipt.Status) *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) SetStatusData(v string) *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) SetTransactionHash(v string) *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) Update(set func(*TransactionReceiptUpsert)) *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) UpdateL1OriginMessage() *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) UpdateMessagesSent() *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) UpdateNewValues() *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) UpdateStatus() *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) UpdateStatusData() *TransactionReceiptUpsertOne
- func (u *TransactionReceiptUpsertOne) UpdateTransactionHash() *TransactionReceiptUpsertOne
- type TransactionReceiptWhereInput
- type TransactionReceipts
- type TransactionSelect
- func (s *TransactionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TransactionSelect) BoolX(ctx context.Context) bool
- func (s *TransactionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TransactionSelect) BoolsX(ctx context.Context) []bool
- func (s *TransactionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TransactionSelect) Float64X(ctx context.Context) float64
- func (s *TransactionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TransactionSelect) Float64sX(ctx context.Context) []float64
- func (s *TransactionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TransactionSelect) IntX(ctx context.Context) int
- func (s *TransactionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TransactionSelect) IntsX(ctx context.Context) []int
- func (ts *TransactionSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TransactionSelect) ScanX(ctx context.Context, v interface{})
- func (s *TransactionSelect) String(ctx context.Context) (_ string, err error)
- func (s *TransactionSelect) StringX(ctx context.Context) string
- func (s *TransactionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TransactionSelect) StringsX(ctx context.Context) []string
- type TransactionUpdate
- func (tu *TransactionUpdate) AddEventIDs(ids ...string) *TransactionUpdate
- func (tu *TransactionUpdate) AddEvents(e ...*Event) *TransactionUpdate
- func (tu *TransactionUpdate) ClearBlock() *TransactionUpdate
- func (tu *TransactionUpdate) ClearEntryPointSelector() *TransactionUpdate
- func (tu *TransactionUpdate) ClearEvents() *TransactionUpdate
- func (tu *TransactionUpdate) ClearNonce() *TransactionUpdate
- func (tu *TransactionUpdate) ClearReceipt() *TransactionUpdate
- func (tu *TransactionUpdate) ClearSignature() *TransactionUpdate
- func (tu *TransactionUpdate) Exec(ctx context.Context) error
- func (tu *TransactionUpdate) ExecX(ctx context.Context)
- func (tu *TransactionUpdate) Mutation() *TransactionMutation
- func (tu *TransactionUpdate) RemoveEventIDs(ids ...string) *TransactionUpdate
- func (tu *TransactionUpdate) RemoveEvents(e ...*Event) *TransactionUpdate
- func (tu *TransactionUpdate) Save(ctx context.Context) (int, error)
- func (tu *TransactionUpdate) SaveX(ctx context.Context) int
- func (tu *TransactionUpdate) SetBlock(b *Block) *TransactionUpdate
- func (tu *TransactionUpdate) SetBlockID(id string) *TransactionUpdate
- func (tu *TransactionUpdate) SetCalldata(s []string) *TransactionUpdate
- func (tu *TransactionUpdate) SetContractAddress(s string) *TransactionUpdate
- func (tu *TransactionUpdate) SetEntryPointSelector(s string) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableBlockID(id *string) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableEntryPointSelector(s *string) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableNonce(s *string) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableReceiptID(id *string) *TransactionUpdate
- func (tu *TransactionUpdate) SetNonce(s string) *TransactionUpdate
- func (tu *TransactionUpdate) SetReceipt(t *TransactionReceipt) *TransactionUpdate
- func (tu *TransactionUpdate) SetReceiptID(id string) *TransactionUpdate
- func (tu *TransactionUpdate) SetSignature(s []string) *TransactionUpdate
- func (tu *TransactionUpdate) SetTransactionHash(s string) *TransactionUpdate
- func (tu *TransactionUpdate) Where(ps ...predicate.Transaction) *TransactionUpdate
- type TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddEventIDs(ids ...string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddEvents(e ...*Event) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearBlock() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearEntryPointSelector() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearEvents() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearNonce() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearReceipt() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearSignature() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) Exec(ctx context.Context) error
- func (tuo *TransactionUpdateOne) ExecX(ctx context.Context)
- func (tuo *TransactionUpdateOne) Mutation() *TransactionMutation
- func (tuo *TransactionUpdateOne) RemoveEventIDs(ids ...string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) RemoveEvents(e ...*Event) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) Save(ctx context.Context) (*Transaction, error)
- func (tuo *TransactionUpdateOne) SaveX(ctx context.Context) *Transaction
- func (tuo *TransactionUpdateOne) Select(field string, fields ...string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetBlock(b *Block) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetBlockID(id string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetCalldata(s []string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetContractAddress(s string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetEntryPointSelector(s string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableBlockID(id *string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableEntryPointSelector(s *string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableNonce(s *string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableReceiptID(id *string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNonce(s string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetReceipt(t *TransactionReceipt) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetReceiptID(id string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetSignature(s []string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetTransactionHash(s string) *TransactionUpdateOne
- type TransactionUpsert
- func (u *TransactionUpsert) ClearEntryPointSelector() *TransactionUpsert
- func (u *TransactionUpsert) ClearNonce() *TransactionUpsert
- func (u *TransactionUpsert) ClearSignature() *TransactionUpsert
- func (u *TransactionUpsert) SetCalldata(v []string) *TransactionUpsert
- func (u *TransactionUpsert) SetContractAddress(v string) *TransactionUpsert
- func (u *TransactionUpsert) SetEntryPointSelector(v string) *TransactionUpsert
- func (u *TransactionUpsert) SetNonce(v string) *TransactionUpsert
- func (u *TransactionUpsert) SetSignature(v []string) *TransactionUpsert
- func (u *TransactionUpsert) SetTransactionHash(v string) *TransactionUpsert
- func (u *TransactionUpsert) UpdateCalldata() *TransactionUpsert
- func (u *TransactionUpsert) UpdateContractAddress() *TransactionUpsert
- func (u *TransactionUpsert) UpdateEntryPointSelector() *TransactionUpsert
- func (u *TransactionUpsert) UpdateNonce() *TransactionUpsert
- func (u *TransactionUpsert) UpdateSignature() *TransactionUpsert
- func (u *TransactionUpsert) UpdateTransactionHash() *TransactionUpsert
- type TransactionUpsertBulk
- func (u *TransactionUpsertBulk) ClearEntryPointSelector() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) ClearNonce() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) ClearSignature() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) DoNothing() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) Exec(ctx context.Context) error
- func (u *TransactionUpsertBulk) ExecX(ctx context.Context)
- func (u *TransactionUpsertBulk) Ignore() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) SetCalldata(v []string) *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) SetContractAddress(v string) *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) SetEntryPointSelector(v string) *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) SetNonce(v string) *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) SetSignature(v []string) *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) SetTransactionHash(v string) *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) Update(set func(*TransactionUpsert)) *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) UpdateCalldata() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) UpdateContractAddress() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) UpdateEntryPointSelector() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) UpdateNewValues() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) UpdateNonce() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) UpdateSignature() *TransactionUpsertBulk
- func (u *TransactionUpsertBulk) UpdateTransactionHash() *TransactionUpsertBulk
- type TransactionUpsertOne
- func (u *TransactionUpsertOne) ClearEntryPointSelector() *TransactionUpsertOne
- func (u *TransactionUpsertOne) ClearNonce() *TransactionUpsertOne
- func (u *TransactionUpsertOne) ClearSignature() *TransactionUpsertOne
- func (u *TransactionUpsertOne) DoNothing() *TransactionUpsertOne
- func (u *TransactionUpsertOne) Exec(ctx context.Context) error
- func (u *TransactionUpsertOne) ExecX(ctx context.Context)
- func (u *TransactionUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *TransactionUpsertOne) IDX(ctx context.Context) string
- func (u *TransactionUpsertOne) Ignore() *TransactionUpsertOne
- func (u *TransactionUpsertOne) SetCalldata(v []string) *TransactionUpsertOne
- func (u *TransactionUpsertOne) SetContractAddress(v string) *TransactionUpsertOne
- func (u *TransactionUpsertOne) SetEntryPointSelector(v string) *TransactionUpsertOne
- func (u *TransactionUpsertOne) SetNonce(v string) *TransactionUpsertOne
- func (u *TransactionUpsertOne) SetSignature(v []string) *TransactionUpsertOne
- func (u *TransactionUpsertOne) SetTransactionHash(v string) *TransactionUpsertOne
- func (u *TransactionUpsertOne) Update(set func(*TransactionUpsert)) *TransactionUpsertOne
- func (u *TransactionUpsertOne) UpdateCalldata() *TransactionUpsertOne
- func (u *TransactionUpsertOne) UpdateContractAddress() *TransactionUpsertOne
- func (u *TransactionUpsertOne) UpdateEntryPointSelector() *TransactionUpsertOne
- func (u *TransactionUpsertOne) UpdateNewValues() *TransactionUpsertOne
- func (u *TransactionUpsertOne) UpdateNonce() *TransactionUpsertOne
- func (u *TransactionUpsertOne) UpdateSignature() *TransactionUpsertOne
- func (u *TransactionUpsertOne) UpdateTransactionHash() *TransactionUpsertOne
- type TransactionWhereInput
- type Transactions
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeBalance = "Balance" TypeBlock = "Block" TypeContract = "Contract" TypeEvent = "Event" TypeTransaction = "Transaction" TypeTransactionReceipt = "TransactionReceipt" )
Variables ¶
var ( // BlockOrderFieldBlockNumber orders Block by block_number. BlockOrderFieldBlockNumber = &BlockOrderField{ field: block.FieldBlockNumber, toCursor: func(b *Block) Cursor { return Cursor{ ID: b.ID, Value: b.BlockNumber, } }, } // BlockOrderFieldTimestamp orders Block by timestamp. BlockOrderFieldTimestamp = &BlockOrderField{ field: block.FieldTimestamp, toCursor: func(b *Block) Cursor { return Cursor{ ID: b.ID, Value: b.Timestamp, } }, } )
var ( // ContractOrderFieldCreatedAt orders Contract by created_at. ContractOrderFieldCreatedAt = &ContractOrderField{ field: contract.FieldCreatedAt, toCursor: func(c *Contract) Cursor { return Cursor{ ID: c.ID, Value: c.CreatedAt, } }, } )
var DefaultBalanceOrder = &BalanceOrder{ Direction: OrderDirectionAsc, Field: &BalanceOrderField{ field: balance.FieldID, toCursor: func(b *Balance) Cursor { return Cursor{ID: b.ID} }, }, }
DefaultBalanceOrder is the default ordering of Balance.
var DefaultBlockOrder = &BlockOrder{ Direction: OrderDirectionAsc, Field: &BlockOrderField{ field: block.FieldID, toCursor: func(b *Block) Cursor { return Cursor{ID: b.ID} }, }, }
DefaultBlockOrder is the default ordering of Block.
var DefaultContractOrder = &ContractOrder{ Direction: OrderDirectionAsc, Field: &ContractOrderField{ field: contract.FieldID, toCursor: func(c *Contract) Cursor { return Cursor{ID: c.ID} }, }, }
DefaultContractOrder is the default ordering of Contract.
var DefaultEventOrder = &EventOrder{ Direction: OrderDirectionAsc, Field: &EventOrderField{ field: event.FieldID, toCursor: func(e *Event) Cursor { return Cursor{ID: e.ID} }, }, }
DefaultEventOrder is the default ordering of Event.
var DefaultTransactionOrder = &TransactionOrder{ Direction: OrderDirectionAsc, Field: &TransactionOrderField{ field: transaction.FieldID, toCursor: func(t *Transaction) Cursor { return Cursor{ID: t.ID} }, }, }
DefaultTransactionOrder is the default ordering of Transaction.
var DefaultTransactionReceiptOrder = &TransactionReceiptOrder{ Direction: OrderDirectionAsc, Field: &TransactionReceiptOrderField{ field: transactionreceipt.FieldID, toCursor: func(tr *TransactionReceipt) Cursor { return Cursor{ID: tr.ID} }, }, }
DefaultTransactionReceiptOrder is the default ordering of TransactionReceipt.
var ( // TransactionOrderFieldNonce orders Transaction by nonce. TransactionOrderFieldNonce = &TransactionOrderField{ field: transaction.FieldNonce, toCursor: func(t *Transaction) Cursor { return Cursor{ ID: t.ID, Value: t.Nonce, } }, } )
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
func OpenTxFromContext ¶
OpenTxFromContext open transactions from client stored in context.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Balance ¶
type Balance struct { // ID of the ent. ID string `json:"id,omitempty"` // TokenId holds the value of the "tokenId" field. TokenId big.Int `json:"tokenId,omitempty"` // Balance holds the value of the "balance" field. Balance big.Int `json:"balance,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BalanceQuery when eager-loading is set. Edges BalanceEdges `json:"edges"` // contains filtered or unexported fields }
Balance is the model entity for the Balance schema.
func (*Balance) QueryAccount ¶
func (b *Balance) QueryAccount() *ContractQuery
QueryAccount queries the "account" edge of the Balance entity.
func (*Balance) QueryContract ¶
func (b *Balance) QueryContract() *ContractQuery
QueryContract queries the "contract" edge of the Balance entity.
func (*Balance) ToEdge ¶
func (b *Balance) ToEdge(order *BalanceOrder) *BalanceEdge
ToEdge converts Balance into BalanceEdge.
func (*Balance) Unwrap ¶
Unwrap unwraps the Balance 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 (*Balance) Update ¶
func (b *Balance) Update() *BalanceUpdateOne
Update returns a builder for updating this Balance. Note that you need to call Balance.Unwrap() before calling this method if this Balance was returned from a transaction, and the transaction was committed or rolled back.
type BalanceClient ¶
type BalanceClient struct {
// contains filtered or unexported fields
}
BalanceClient is a client for the Balance schema.
func NewBalanceClient ¶
func NewBalanceClient(c config) *BalanceClient
NewBalanceClient returns a client for the Balance from the given config.
func (*BalanceClient) Create ¶
func (c *BalanceClient) Create() *BalanceCreate
Create returns a builder for creating a Balance entity.
func (*BalanceClient) CreateBulk ¶
func (c *BalanceClient) CreateBulk(builders ...*BalanceCreate) *BalanceCreateBulk
CreateBulk returns a builder for creating a bulk of Balance entities.
func (*BalanceClient) Delete ¶
func (c *BalanceClient) Delete() *BalanceDelete
Delete returns a delete builder for Balance.
func (*BalanceClient) DeleteOne ¶
func (c *BalanceClient) DeleteOne(b *Balance) *BalanceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BalanceClient) DeleteOneID ¶
func (c *BalanceClient) DeleteOneID(id string) *BalanceDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*BalanceClient) GetX ¶
func (c *BalanceClient) GetX(ctx context.Context, id string) *Balance
GetX is like Get, but panics if an error occurs.
func (*BalanceClient) Hooks ¶
func (c *BalanceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BalanceClient) Query ¶
func (c *BalanceClient) Query() *BalanceQuery
Query returns a query builder for Balance.
func (*BalanceClient) QueryAccount ¶
func (c *BalanceClient) QueryAccount(b *Balance) *ContractQuery
QueryAccount queries the account edge of a Balance.
func (*BalanceClient) QueryContract ¶
func (c *BalanceClient) QueryContract(b *Balance) *ContractQuery
QueryContract queries the contract edge of a Balance.
func (*BalanceClient) Update ¶
func (c *BalanceClient) Update() *BalanceUpdate
Update returns an update builder for Balance.
func (*BalanceClient) UpdateOne ¶
func (c *BalanceClient) UpdateOne(b *Balance) *BalanceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BalanceClient) UpdateOneID ¶
func (c *BalanceClient) UpdateOneID(id string) *BalanceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BalanceClient) Use ¶
func (c *BalanceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `balance.Hooks(f(g(h())))`.
type BalanceConnection ¶
type BalanceConnection struct { Edges []*BalanceEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
BalanceConnection is the connection containing edges to Balance.
type BalanceCreate ¶
type BalanceCreate struct {
// contains filtered or unexported fields
}
BalanceCreate is the builder for creating a Balance entity.
func (*BalanceCreate) Exec ¶
func (bc *BalanceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BalanceCreate) ExecX ¶
func (bc *BalanceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BalanceCreate) Mutation ¶
func (bc *BalanceCreate) Mutation() *BalanceMutation
Mutation returns the BalanceMutation object of the builder.
func (*BalanceCreate) OnConflict ¶
func (bc *BalanceCreate) OnConflict(opts ...sql.ConflictOption) *BalanceUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Balance.Create(). SetTokenId(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BalanceUpsert) { SetTokenId(v+v). }). Exec(ctx)
func (*BalanceCreate) OnConflictColumns ¶
func (bc *BalanceCreate) OnConflictColumns(columns ...string) *BalanceUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Balance.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*BalanceCreate) Save ¶
func (bc *BalanceCreate) Save(ctx context.Context) (*Balance, error)
Save creates the Balance in the database.
func (*BalanceCreate) SaveX ¶
func (bc *BalanceCreate) SaveX(ctx context.Context) *Balance
SaveX calls Save and panics if Save returns an error.
func (*BalanceCreate) SetAccount ¶
func (bc *BalanceCreate) SetAccount(c *Contract) *BalanceCreate
SetAccount sets the "account" edge to the Contract entity.
func (*BalanceCreate) SetAccountID ¶
func (bc *BalanceCreate) SetAccountID(id string) *BalanceCreate
SetAccountID sets the "account" edge to the Contract entity by ID.
func (*BalanceCreate) SetBalance ¶
func (bc *BalanceCreate) SetBalance(b big.Int) *BalanceCreate
SetBalance sets the "balance" field.
func (*BalanceCreate) SetContract ¶
func (bc *BalanceCreate) SetContract(c *Contract) *BalanceCreate
SetContract sets the "contract" edge to the Contract entity.
func (*BalanceCreate) SetContractID ¶
func (bc *BalanceCreate) SetContractID(id string) *BalanceCreate
SetContractID sets the "contract" edge to the Contract entity by ID.
func (*BalanceCreate) SetID ¶
func (bc *BalanceCreate) SetID(s string) *BalanceCreate
SetID sets the "id" field.
func (*BalanceCreate) SetNillableAccountID ¶
func (bc *BalanceCreate) SetNillableAccountID(id *string) *BalanceCreate
SetNillableAccountID sets the "account" edge to the Contract entity by ID if the given value is not nil.
func (*BalanceCreate) SetNillableBalance ¶
func (bc *BalanceCreate) SetNillableBalance(b *big.Int) *BalanceCreate
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*BalanceCreate) SetNillableContractID ¶
func (bc *BalanceCreate) SetNillableContractID(id *string) *BalanceCreate
SetNillableContractID sets the "contract" edge to the Contract entity by ID if the given value is not nil.
func (*BalanceCreate) SetNillableTokenId ¶
func (bc *BalanceCreate) SetNillableTokenId(b *big.Int) *BalanceCreate
SetNillableTokenId sets the "tokenId" field if the given value is not nil.
func (*BalanceCreate) SetTokenId ¶
func (bc *BalanceCreate) SetTokenId(b big.Int) *BalanceCreate
SetTokenId sets the "tokenId" field.
type BalanceCreateBulk ¶
type BalanceCreateBulk struct {
// contains filtered or unexported fields
}
BalanceCreateBulk is the builder for creating many Balance entities in bulk.
func (*BalanceCreateBulk) Exec ¶
func (bcb *BalanceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BalanceCreateBulk) ExecX ¶
func (bcb *BalanceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BalanceCreateBulk) OnConflict ¶
func (bcb *BalanceCreateBulk) OnConflict(opts ...sql.ConflictOption) *BalanceUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Balance.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BalanceUpsert) { SetTokenId(v+v). }). Exec(ctx)
func (*BalanceCreateBulk) OnConflictColumns ¶
func (bcb *BalanceCreateBulk) OnConflictColumns(columns ...string) *BalanceUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Balance.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type BalanceDelete ¶
type BalanceDelete struct {
// contains filtered or unexported fields
}
BalanceDelete is the builder for deleting a Balance entity.
func (*BalanceDelete) Exec ¶
func (bd *BalanceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BalanceDelete) ExecX ¶
func (bd *BalanceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BalanceDelete) Where ¶
func (bd *BalanceDelete) Where(ps ...predicate.Balance) *BalanceDelete
Where appends a list predicates to the BalanceDelete builder.
type BalanceDeleteOne ¶
type BalanceDeleteOne struct {
// contains filtered or unexported fields
}
BalanceDeleteOne is the builder for deleting a single Balance entity.
func (*BalanceDeleteOne) Exec ¶
func (bdo *BalanceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BalanceDeleteOne) ExecX ¶
func (bdo *BalanceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BalanceEdge ¶
BalanceEdge is the edge representation of Balance.
type BalanceEdges ¶
type BalanceEdges struct { // Account holds the value of the account edge. Account *Contract `json:"account,omitempty"` // Contract holds the value of the contract edge. Contract *Contract `json:"contract,omitempty"` // contains filtered or unexported fields }
BalanceEdges holds the relations/edges for other nodes in the graph.
func (BalanceEdges) AccountOrErr ¶
func (e BalanceEdges) AccountOrErr() (*Contract, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (BalanceEdges) ContractOrErr ¶
func (e BalanceEdges) ContractOrErr() (*Contract, error)
ContractOrErr returns the Contract value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type BalanceGroupBy ¶
type BalanceGroupBy struct {
// contains filtered or unexported fields
}
BalanceGroupBy is the group-by builder for Balance entities.
func (*BalanceGroupBy) Aggregate ¶
func (bgb *BalanceGroupBy) Aggregate(fns ...AggregateFunc) *BalanceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BalanceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BalanceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BalanceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BalanceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BalanceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BalanceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BalanceGroupBy) Scan ¶
func (bgb *BalanceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*BalanceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BalanceMutation ¶
type BalanceMutation struct {
// contains filtered or unexported fields
}
BalanceMutation represents an operation that mutates the Balance nodes in the graph.
func (*BalanceMutation) AccountCleared ¶
func (m *BalanceMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Contract entity was cleared.
func (*BalanceMutation) AccountID ¶
func (m *BalanceMutation) AccountID() (id string, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*BalanceMutation) AccountIDs ¶
func (m *BalanceMutation) AccountIDs() (ids []string)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*BalanceMutation) AddBalance ¶
func (m *BalanceMutation) AddBalance(b big.Int)
AddBalance adds b to the "balance" field.
func (*BalanceMutation) AddField ¶
func (m *BalanceMutation) 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 (*BalanceMutation) AddTokenId ¶
func (m *BalanceMutation) AddTokenId(b big.Int)
AddTokenId adds b to the "tokenId" field.
func (*BalanceMutation) AddedBalance ¶
func (m *BalanceMutation) AddedBalance() (r big.Int, exists bool)
AddedBalance returns the value that was added to the "balance" field in this mutation.
func (*BalanceMutation) AddedEdges ¶
func (m *BalanceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BalanceMutation) AddedField ¶
func (m *BalanceMutation) 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 (*BalanceMutation) AddedFields ¶
func (m *BalanceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BalanceMutation) AddedIDs ¶
func (m *BalanceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BalanceMutation) AddedTokenId ¶
func (m *BalanceMutation) AddedTokenId() (r big.Int, exists bool)
AddedTokenId returns the value that was added to the "tokenId" field in this mutation.
func (*BalanceMutation) Balance ¶
func (m *BalanceMutation) Balance() (r big.Int, exists bool)
Balance returns the value of the "balance" field in the mutation.
func (*BalanceMutation) ClearAccount ¶
func (m *BalanceMutation) ClearAccount()
ClearAccount clears the "account" edge to the Contract entity.
func (*BalanceMutation) ClearContract ¶
func (m *BalanceMutation) ClearContract()
ClearContract clears the "contract" edge to the Contract entity.
func (*BalanceMutation) ClearEdge ¶
func (m *BalanceMutation) 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 (*BalanceMutation) ClearField ¶
func (m *BalanceMutation) 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 (*BalanceMutation) ClearTokenId ¶
func (m *BalanceMutation) ClearTokenId()
ClearTokenId clears the value of the "tokenId" field.
func (*BalanceMutation) ClearedEdges ¶
func (m *BalanceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BalanceMutation) ClearedFields ¶
func (m *BalanceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BalanceMutation) Client ¶
func (m BalanceMutation) 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 (*BalanceMutation) ContractCleared ¶
func (m *BalanceMutation) ContractCleared() bool
ContractCleared reports if the "contract" edge to the Contract entity was cleared.
func (*BalanceMutation) ContractID ¶
func (m *BalanceMutation) ContractID() (id string, exists bool)
ContractID returns the "contract" edge ID in the mutation.
func (*BalanceMutation) ContractIDs ¶
func (m *BalanceMutation) ContractIDs() (ids []string)
ContractIDs returns the "contract" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ContractID instead. It exists only for internal usage by the builders.
func (*BalanceMutation) EdgeCleared ¶
func (m *BalanceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BalanceMutation) Field ¶
func (m *BalanceMutation) 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 (*BalanceMutation) FieldCleared ¶
func (m *BalanceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BalanceMutation) Fields ¶
func (m *BalanceMutation) 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 (*BalanceMutation) ID ¶
func (m *BalanceMutation) ID() (id string, 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 (*BalanceMutation) IDs ¶
func (m *BalanceMutation) IDs(ctx context.Context) ([]string, 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 (*BalanceMutation) OldBalance ¶
OldBalance returns the old "balance" field's value of the Balance entity. If the Balance 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 (*BalanceMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*BalanceMutation) OldTokenId ¶
OldTokenId returns the old "tokenId" field's value of the Balance entity. If the Balance 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 (*BalanceMutation) RemovedEdges ¶
func (m *BalanceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BalanceMutation) RemovedIDs ¶
func (m *BalanceMutation) 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 (*BalanceMutation) ResetAccount ¶
func (m *BalanceMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*BalanceMutation) ResetBalance ¶
func (m *BalanceMutation) ResetBalance()
ResetBalance resets all changes to the "balance" field.
func (*BalanceMutation) ResetContract ¶
func (m *BalanceMutation) ResetContract()
ResetContract resets all changes to the "contract" edge.
func (*BalanceMutation) ResetEdge ¶
func (m *BalanceMutation) 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 (*BalanceMutation) ResetField ¶
func (m *BalanceMutation) 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 (*BalanceMutation) ResetTokenId ¶
func (m *BalanceMutation) ResetTokenId()
ResetTokenId resets all changes to the "tokenId" field.
func (*BalanceMutation) SetAccountID ¶
func (m *BalanceMutation) SetAccountID(id string)
SetAccountID sets the "account" edge to the Contract entity by id.
func (*BalanceMutation) SetBalance ¶
func (m *BalanceMutation) SetBalance(b big.Int)
SetBalance sets the "balance" field.
func (*BalanceMutation) SetContractID ¶
func (m *BalanceMutation) SetContractID(id string)
SetContractID sets the "contract" edge to the Contract entity by id.
func (*BalanceMutation) SetField ¶
func (m *BalanceMutation) 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 (*BalanceMutation) SetID ¶
func (m *BalanceMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Balance entities.
func (*BalanceMutation) SetTokenId ¶
func (m *BalanceMutation) SetTokenId(b big.Int)
SetTokenId sets the "tokenId" field.
func (*BalanceMutation) TokenId ¶
func (m *BalanceMutation) TokenId() (r big.Int, exists bool)
TokenId returns the value of the "tokenId" field in the mutation.
func (*BalanceMutation) TokenIdCleared ¶
func (m *BalanceMutation) TokenIdCleared() bool
TokenIdCleared returns if the "tokenId" field was cleared in this mutation.
func (BalanceMutation) Tx ¶
func (m BalanceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BalanceMutation) Type ¶
func (m *BalanceMutation) Type() string
Type returns the node type of this mutation (Balance).
func (*BalanceMutation) Where ¶
func (m *BalanceMutation) Where(ps ...predicate.Balance)
Where appends a list predicates to the BalanceMutation builder.
type BalanceOrder ¶
type BalanceOrder struct { Direction OrderDirection `json:"direction"` Field *BalanceOrderField `json:"field"` }
BalanceOrder defines the ordering of Balance.
type BalanceOrderField ¶
type BalanceOrderField struct {
// contains filtered or unexported fields
}
BalanceOrderField defines the ordering field of Balance.
type BalancePaginateOption ¶
type BalancePaginateOption func(*balancePager) error
BalancePaginateOption enables pagination customization.
func WithBalanceFilter ¶
func WithBalanceFilter(filter func(*BalanceQuery) (*BalanceQuery, error)) BalancePaginateOption
WithBalanceFilter configures pagination filter.
func WithBalanceOrder ¶
func WithBalanceOrder(order *BalanceOrder) BalancePaginateOption
WithBalanceOrder configures pagination ordering.
type BalanceQuery ¶
type BalanceQuery struct {
// contains filtered or unexported fields
}
BalanceQuery is the builder for querying Balance entities.
func (*BalanceQuery) All ¶
func (bq *BalanceQuery) All(ctx context.Context) ([]*Balance, error)
All executes the query and returns a list of Balances.
func (*BalanceQuery) AllX ¶
func (bq *BalanceQuery) AllX(ctx context.Context) []*Balance
AllX is like All, but panics if an error occurs.
func (*BalanceQuery) Clone ¶
func (bq *BalanceQuery) Clone() *BalanceQuery
Clone returns a duplicate of the BalanceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BalanceQuery) CollectFields ¶
func (b *BalanceQuery) CollectFields(ctx context.Context, satisfies ...string) (*BalanceQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*BalanceQuery) Count ¶
func (bq *BalanceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BalanceQuery) CountX ¶
func (bq *BalanceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BalanceQuery) Exist ¶
func (bq *BalanceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BalanceQuery) ExistX ¶
func (bq *BalanceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BalanceQuery) First ¶
func (bq *BalanceQuery) First(ctx context.Context) (*Balance, error)
First returns the first Balance entity from the query. Returns a *NotFoundError when no Balance was found.
func (*BalanceQuery) FirstID ¶
func (bq *BalanceQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Balance ID from the query. Returns a *NotFoundError when no Balance ID was found.
func (*BalanceQuery) FirstIDX ¶
func (bq *BalanceQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*BalanceQuery) FirstX ¶
func (bq *BalanceQuery) FirstX(ctx context.Context) *Balance
FirstX is like First, but panics if an error occurs.
func (*BalanceQuery) GroupBy ¶
func (bq *BalanceQuery) GroupBy(field string, fields ...string) *BalanceGroupBy
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 { TokenId big.Int `json:"tokenId,omitempty"` Count int `json:"count,omitempty"` } client.Balance.Query(). GroupBy(balance.FieldTokenId). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BalanceQuery) IDs ¶
func (bq *BalanceQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Balance IDs.
func (*BalanceQuery) IDsX ¶
func (bq *BalanceQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*BalanceQuery) Limit ¶
func (bq *BalanceQuery) Limit(limit int) *BalanceQuery
Limit adds a limit step to the query.
func (*BalanceQuery) Offset ¶
func (bq *BalanceQuery) Offset(offset int) *BalanceQuery
Offset adds an offset step to the query.
func (*BalanceQuery) Only ¶
func (bq *BalanceQuery) Only(ctx context.Context) (*Balance, error)
Only returns a single Balance entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Balance entity is found. Returns a *NotFoundError when no Balance entities are found.
func (*BalanceQuery) OnlyID ¶
func (bq *BalanceQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Balance ID in the query. Returns a *NotSingularError when more than one Balance ID is found. Returns a *NotFoundError when no entities are found.
func (*BalanceQuery) OnlyIDX ¶
func (bq *BalanceQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BalanceQuery) OnlyX ¶
func (bq *BalanceQuery) OnlyX(ctx context.Context) *Balance
OnlyX is like Only, but panics if an error occurs.
func (*BalanceQuery) Order ¶
func (bq *BalanceQuery) Order(o ...OrderFunc) *BalanceQuery
Order adds an order step to the query.
func (*BalanceQuery) Paginate ¶
func (b *BalanceQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...BalancePaginateOption, ) (*BalanceConnection, error)
Paginate executes the query and returns a relay based cursor connection to Balance.
func (*BalanceQuery) QueryAccount ¶
func (bq *BalanceQuery) QueryAccount() *ContractQuery
QueryAccount chains the current query on the "account" edge.
func (*BalanceQuery) QueryContract ¶
func (bq *BalanceQuery) QueryContract() *ContractQuery
QueryContract chains the current query on the "contract" edge.
func (*BalanceQuery) Select ¶
func (bq *BalanceQuery) Select(fields ...string) *BalanceSelect
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 { TokenId big.Int `json:"tokenId,omitempty"` } client.Balance.Query(). Select(balance.FieldTokenId). Scan(ctx, &v)
func (*BalanceQuery) Unique ¶
func (bq *BalanceQuery) Unique(unique bool) *BalanceQuery
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 (*BalanceQuery) Where ¶
func (bq *BalanceQuery) Where(ps ...predicate.Balance) *BalanceQuery
Where adds a new predicate for the BalanceQuery builder.
func (*BalanceQuery) WithAccount ¶
func (bq *BalanceQuery) WithAccount(opts ...func(*ContractQuery)) *BalanceQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
func (*BalanceQuery) WithContract ¶
func (bq *BalanceQuery) WithContract(opts ...func(*ContractQuery)) *BalanceQuery
WithContract tells the query-builder to eager-load the nodes that are connected to the "contract" edge. The optional arguments are used to configure the query builder of the edge.
type BalanceSelect ¶
type BalanceSelect struct { *BalanceQuery // contains filtered or unexported fields }
BalanceSelect is the builder for selecting fields of Balance entities.
func (*BalanceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BalanceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BalanceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BalanceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BalanceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BalanceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BalanceSelect) Scan ¶
func (bs *BalanceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*BalanceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BalanceUpdate ¶
type BalanceUpdate struct {
// contains filtered or unexported fields
}
BalanceUpdate is the builder for updating Balance entities.
func (*BalanceUpdate) AddBalance ¶
func (bu *BalanceUpdate) AddBalance(b big.Int) *BalanceUpdate
AddBalance adds b to the "balance" field.
func (*BalanceUpdate) AddTokenId ¶
func (bu *BalanceUpdate) AddTokenId(b big.Int) *BalanceUpdate
AddTokenId adds b to the "tokenId" field.
func (*BalanceUpdate) ClearAccount ¶
func (bu *BalanceUpdate) ClearAccount() *BalanceUpdate
ClearAccount clears the "account" edge to the Contract entity.
func (*BalanceUpdate) ClearContract ¶
func (bu *BalanceUpdate) ClearContract() *BalanceUpdate
ClearContract clears the "contract" edge to the Contract entity.
func (*BalanceUpdate) ClearTokenId ¶
func (bu *BalanceUpdate) ClearTokenId() *BalanceUpdate
ClearTokenId clears the value of the "tokenId" field.
func (*BalanceUpdate) Exec ¶
func (bu *BalanceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BalanceUpdate) ExecX ¶
func (bu *BalanceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BalanceUpdate) Mutation ¶
func (bu *BalanceUpdate) Mutation() *BalanceMutation
Mutation returns the BalanceMutation object of the builder.
func (*BalanceUpdate) Save ¶
func (bu *BalanceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BalanceUpdate) SaveX ¶
func (bu *BalanceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BalanceUpdate) SetAccount ¶
func (bu *BalanceUpdate) SetAccount(c *Contract) *BalanceUpdate
SetAccount sets the "account" edge to the Contract entity.
func (*BalanceUpdate) SetAccountID ¶
func (bu *BalanceUpdate) SetAccountID(id string) *BalanceUpdate
SetAccountID sets the "account" edge to the Contract entity by ID.
func (*BalanceUpdate) SetBalance ¶
func (bu *BalanceUpdate) SetBalance(b big.Int) *BalanceUpdate
SetBalance sets the "balance" field.
func (*BalanceUpdate) SetContract ¶
func (bu *BalanceUpdate) SetContract(c *Contract) *BalanceUpdate
SetContract sets the "contract" edge to the Contract entity.
func (*BalanceUpdate) SetContractID ¶
func (bu *BalanceUpdate) SetContractID(id string) *BalanceUpdate
SetContractID sets the "contract" edge to the Contract entity by ID.
func (*BalanceUpdate) SetNillableAccountID ¶
func (bu *BalanceUpdate) SetNillableAccountID(id *string) *BalanceUpdate
SetNillableAccountID sets the "account" edge to the Contract entity by ID if the given value is not nil.
func (*BalanceUpdate) SetNillableBalance ¶
func (bu *BalanceUpdate) SetNillableBalance(b *big.Int) *BalanceUpdate
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*BalanceUpdate) SetNillableContractID ¶
func (bu *BalanceUpdate) SetNillableContractID(id *string) *BalanceUpdate
SetNillableContractID sets the "contract" edge to the Contract entity by ID if the given value is not nil.
func (*BalanceUpdate) SetNillableTokenId ¶
func (bu *BalanceUpdate) SetNillableTokenId(b *big.Int) *BalanceUpdate
SetNillableTokenId sets the "tokenId" field if the given value is not nil.
func (*BalanceUpdate) SetTokenId ¶
func (bu *BalanceUpdate) SetTokenId(b big.Int) *BalanceUpdate
SetTokenId sets the "tokenId" field.
func (*BalanceUpdate) Where ¶
func (bu *BalanceUpdate) Where(ps ...predicate.Balance) *BalanceUpdate
Where appends a list predicates to the BalanceUpdate builder.
type BalanceUpdateOne ¶
type BalanceUpdateOne struct {
// contains filtered or unexported fields
}
BalanceUpdateOne is the builder for updating a single Balance entity.
func (*BalanceUpdateOne) AddBalance ¶
func (buo *BalanceUpdateOne) AddBalance(b big.Int) *BalanceUpdateOne
AddBalance adds b to the "balance" field.
func (*BalanceUpdateOne) AddTokenId ¶
func (buo *BalanceUpdateOne) AddTokenId(b big.Int) *BalanceUpdateOne
AddTokenId adds b to the "tokenId" field.
func (*BalanceUpdateOne) ClearAccount ¶
func (buo *BalanceUpdateOne) ClearAccount() *BalanceUpdateOne
ClearAccount clears the "account" edge to the Contract entity.
func (*BalanceUpdateOne) ClearContract ¶
func (buo *BalanceUpdateOne) ClearContract() *BalanceUpdateOne
ClearContract clears the "contract" edge to the Contract entity.
func (*BalanceUpdateOne) ClearTokenId ¶
func (buo *BalanceUpdateOne) ClearTokenId() *BalanceUpdateOne
ClearTokenId clears the value of the "tokenId" field.
func (*BalanceUpdateOne) Exec ¶
func (buo *BalanceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BalanceUpdateOne) ExecX ¶
func (buo *BalanceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BalanceUpdateOne) Mutation ¶
func (buo *BalanceUpdateOne) Mutation() *BalanceMutation
Mutation returns the BalanceMutation object of the builder.
func (*BalanceUpdateOne) Save ¶
func (buo *BalanceUpdateOne) Save(ctx context.Context) (*Balance, error)
Save executes the query and returns the updated Balance entity.
func (*BalanceUpdateOne) SaveX ¶
func (buo *BalanceUpdateOne) SaveX(ctx context.Context) *Balance
SaveX is like Save, but panics if an error occurs.
func (*BalanceUpdateOne) Select ¶
func (buo *BalanceUpdateOne) Select(field string, fields ...string) *BalanceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BalanceUpdateOne) SetAccount ¶
func (buo *BalanceUpdateOne) SetAccount(c *Contract) *BalanceUpdateOne
SetAccount sets the "account" edge to the Contract entity.
func (*BalanceUpdateOne) SetAccountID ¶
func (buo *BalanceUpdateOne) SetAccountID(id string) *BalanceUpdateOne
SetAccountID sets the "account" edge to the Contract entity by ID.
func (*BalanceUpdateOne) SetBalance ¶
func (buo *BalanceUpdateOne) SetBalance(b big.Int) *BalanceUpdateOne
SetBalance sets the "balance" field.
func (*BalanceUpdateOne) SetContract ¶
func (buo *BalanceUpdateOne) SetContract(c *Contract) *BalanceUpdateOne
SetContract sets the "contract" edge to the Contract entity.
func (*BalanceUpdateOne) SetContractID ¶
func (buo *BalanceUpdateOne) SetContractID(id string) *BalanceUpdateOne
SetContractID sets the "contract" edge to the Contract entity by ID.
func (*BalanceUpdateOne) SetNillableAccountID ¶
func (buo *BalanceUpdateOne) SetNillableAccountID(id *string) *BalanceUpdateOne
SetNillableAccountID sets the "account" edge to the Contract entity by ID if the given value is not nil.
func (*BalanceUpdateOne) SetNillableBalance ¶
func (buo *BalanceUpdateOne) SetNillableBalance(b *big.Int) *BalanceUpdateOne
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*BalanceUpdateOne) SetNillableContractID ¶
func (buo *BalanceUpdateOne) SetNillableContractID(id *string) *BalanceUpdateOne
SetNillableContractID sets the "contract" edge to the Contract entity by ID if the given value is not nil.
func (*BalanceUpdateOne) SetNillableTokenId ¶
func (buo *BalanceUpdateOne) SetNillableTokenId(b *big.Int) *BalanceUpdateOne
SetNillableTokenId sets the "tokenId" field if the given value is not nil.
func (*BalanceUpdateOne) SetTokenId ¶
func (buo *BalanceUpdateOne) SetTokenId(b big.Int) *BalanceUpdateOne
SetTokenId sets the "tokenId" field.
type BalanceUpsert ¶
BalanceUpsert is the "OnConflict" setter.
func (*BalanceUpsert) AddBalance ¶
func (u *BalanceUpsert) AddBalance(v big.Int) *BalanceUpsert
AddBalance adds v to the "balance" field.
func (*BalanceUpsert) AddTokenId ¶
func (u *BalanceUpsert) AddTokenId(v big.Int) *BalanceUpsert
AddTokenId adds v to the "tokenId" field.
func (*BalanceUpsert) ClearTokenId ¶
func (u *BalanceUpsert) ClearTokenId() *BalanceUpsert
ClearTokenId clears the value of the "tokenId" field.
func (*BalanceUpsert) SetBalance ¶
func (u *BalanceUpsert) SetBalance(v big.Int) *BalanceUpsert
SetBalance sets the "balance" field.
func (*BalanceUpsert) SetTokenId ¶
func (u *BalanceUpsert) SetTokenId(v big.Int) *BalanceUpsert
SetTokenId sets the "tokenId" field.
func (*BalanceUpsert) UpdateBalance ¶
func (u *BalanceUpsert) UpdateBalance() *BalanceUpsert
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*BalanceUpsert) UpdateTokenId ¶
func (u *BalanceUpsert) UpdateTokenId() *BalanceUpsert
UpdateTokenId sets the "tokenId" field to the value that was provided on create.
type BalanceUpsertBulk ¶
type BalanceUpsertBulk struct {
// contains filtered or unexported fields
}
BalanceUpsertBulk is the builder for "upsert"-ing a bulk of Balance nodes.
func (*BalanceUpsertBulk) AddBalance ¶
func (u *BalanceUpsertBulk) AddBalance(v big.Int) *BalanceUpsertBulk
AddBalance adds v to the "balance" field.
func (*BalanceUpsertBulk) AddTokenId ¶
func (u *BalanceUpsertBulk) AddTokenId(v big.Int) *BalanceUpsertBulk
AddTokenId adds v to the "tokenId" field.
func (*BalanceUpsertBulk) ClearTokenId ¶
func (u *BalanceUpsertBulk) ClearTokenId() *BalanceUpsertBulk
ClearTokenId clears the value of the "tokenId" field.
func (*BalanceUpsertBulk) DoNothing ¶
func (u *BalanceUpsertBulk) DoNothing() *BalanceUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BalanceUpsertBulk) Exec ¶
func (u *BalanceUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BalanceUpsertBulk) ExecX ¶
func (u *BalanceUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BalanceUpsertBulk) Ignore ¶
func (u *BalanceUpsertBulk) Ignore() *BalanceUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Balance.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BalanceUpsertBulk) SetBalance ¶
func (u *BalanceUpsertBulk) SetBalance(v big.Int) *BalanceUpsertBulk
SetBalance sets the "balance" field.
func (*BalanceUpsertBulk) SetTokenId ¶
func (u *BalanceUpsertBulk) SetTokenId(v big.Int) *BalanceUpsertBulk
SetTokenId sets the "tokenId" field.
func (*BalanceUpsertBulk) Update ¶
func (u *BalanceUpsertBulk) Update(set func(*BalanceUpsert)) *BalanceUpsertBulk
Update allows overriding fields `UPDATE` values. See the BalanceCreateBulk.OnConflict documentation for more info.
func (*BalanceUpsertBulk) UpdateBalance ¶
func (u *BalanceUpsertBulk) UpdateBalance() *BalanceUpsertBulk
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*BalanceUpsertBulk) UpdateNewValues ¶
func (u *BalanceUpsertBulk) UpdateNewValues() *BalanceUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Balance.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(balance.FieldID) }), ). Exec(ctx)
func (*BalanceUpsertBulk) UpdateTokenId ¶
func (u *BalanceUpsertBulk) UpdateTokenId() *BalanceUpsertBulk
UpdateTokenId sets the "tokenId" field to the value that was provided on create.
type BalanceUpsertOne ¶
type BalanceUpsertOne struct {
// contains filtered or unexported fields
}
BalanceUpsertOne is the builder for "upsert"-ing
one Balance node.
func (*BalanceUpsertOne) AddBalance ¶
func (u *BalanceUpsertOne) AddBalance(v big.Int) *BalanceUpsertOne
AddBalance adds v to the "balance" field.
func (*BalanceUpsertOne) AddTokenId ¶
func (u *BalanceUpsertOne) AddTokenId(v big.Int) *BalanceUpsertOne
AddTokenId adds v to the "tokenId" field.
func (*BalanceUpsertOne) ClearTokenId ¶
func (u *BalanceUpsertOne) ClearTokenId() *BalanceUpsertOne
ClearTokenId clears the value of the "tokenId" field.
func (*BalanceUpsertOne) DoNothing ¶
func (u *BalanceUpsertOne) DoNothing() *BalanceUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BalanceUpsertOne) Exec ¶
func (u *BalanceUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*BalanceUpsertOne) ExecX ¶
func (u *BalanceUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BalanceUpsertOne) ID ¶
func (u *BalanceUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*BalanceUpsertOne) IDX ¶
func (u *BalanceUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*BalanceUpsertOne) Ignore ¶
func (u *BalanceUpsertOne) Ignore() *BalanceUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Balance.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BalanceUpsertOne) SetBalance ¶
func (u *BalanceUpsertOne) SetBalance(v big.Int) *BalanceUpsertOne
SetBalance sets the "balance" field.
func (*BalanceUpsertOne) SetTokenId ¶
func (u *BalanceUpsertOne) SetTokenId(v big.Int) *BalanceUpsertOne
SetTokenId sets the "tokenId" field.
func (*BalanceUpsertOne) Update ¶
func (u *BalanceUpsertOne) Update(set func(*BalanceUpsert)) *BalanceUpsertOne
Update allows overriding fields `UPDATE` values. See the BalanceCreate.OnConflict documentation for more info.
func (*BalanceUpsertOne) UpdateBalance ¶
func (u *BalanceUpsertOne) UpdateBalance() *BalanceUpsertOne
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*BalanceUpsertOne) UpdateNewValues ¶
func (u *BalanceUpsertOne) UpdateNewValues() *BalanceUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Balance.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(balance.FieldID) }), ). Exec(ctx)
func (*BalanceUpsertOne) UpdateTokenId ¶
func (u *BalanceUpsertOne) UpdateTokenId() *BalanceUpsertOne
UpdateTokenId sets the "tokenId" field to the value that was provided on create.
type BalanceWhereInput ¶
type BalanceWhereInput struct { Not *BalanceWhereInput `json:"not,omitempty"` Or []*BalanceWhereInput `json:"or,omitempty"` And []*BalanceWhereInput `json:"and,omitempty"` // "id" field predicates. ID *string `json:"id,omitempty"` IDNEQ *string `json:"idNEQ,omitempty"` IDIn []string `json:"idIn,omitempty"` IDNotIn []string `json:"idNotIn,omitempty"` IDGT *string `json:"idGT,omitempty"` IDGTE *string `json:"idGTE,omitempty"` IDLT *string `json:"idLT,omitempty"` IDLTE *string `json:"idLTE,omitempty"` // "tokenId" field predicates. TokenId *big.Int `json:"tokenid,omitempty"` TokenIdNEQ *big.Int `json:"tokenidNEQ,omitempty"` TokenIdIn []big.Int `json:"tokenidIn,omitempty"` TokenIdNotIn []big.Int `json:"tokenidNotIn,omitempty"` TokenIdGT *big.Int `json:"tokenidGT,omitempty"` TokenIdGTE *big.Int `json:"tokenidGTE,omitempty"` TokenIdLT *big.Int `json:"tokenidLT,omitempty"` TokenIdLTE *big.Int `json:"tokenidLTE,omitempty"` TokenIdIsNil bool `json:"tokenidIsNil,omitempty"` TokenIdNotNil bool `json:"tokenidNotNil,omitempty"` // "balance" field predicates. Balance *big.Int `json:"balance,omitempty"` BalanceNEQ *big.Int `json:"balanceNEQ,omitempty"` BalanceIn []big.Int `json:"balanceIn,omitempty"` BalanceNotIn []big.Int `json:"balanceNotIn,omitempty"` BalanceGT *big.Int `json:"balanceGT,omitempty"` BalanceGTE *big.Int `json:"balanceGTE,omitempty"` BalanceLT *big.Int `json:"balanceLT,omitempty"` BalanceLTE *big.Int `json:"balanceLTE,omitempty"` // "account" edge predicates. HasAccount *bool `json:"hasAccount,omitempty"` HasAccountWith []*ContractWhereInput `json:"hasAccountWith,omitempty"` // "contract" edge predicates. HasContract *bool `json:"hasContract,omitempty"` HasContractWith []*ContractWhereInput `json:"hasContractWith,omitempty"` }
BalanceWhereInput represents a where input for filtering Balance queries.
func (*BalanceWhereInput) Filter ¶
func (i *BalanceWhereInput) Filter(q *BalanceQuery) (*BalanceQuery, error)
Filter applies the BalanceWhereInput filter on the BalanceQuery builder.
type Block ¶
type Block struct { // ID of the ent. ID string `json:"id,omitempty"` // BlockHash holds the value of the "block_hash" field. BlockHash string `json:"block_hash,omitempty"` // ParentBlockHash holds the value of the "parent_block_hash" field. ParentBlockHash string `json:"parent_block_hash,omitempty"` // BlockNumber holds the value of the "block_number" field. BlockNumber uint64 `json:"block_number,omitempty"` // StateRoot holds the value of the "state_root" field. StateRoot string `json:"state_root,omitempty"` // Status holds the value of the "status" field. Status block.Status `json:"status,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,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) QueryTransactionReceipts ¶
func (b *Block) QueryTransactionReceipts() *TransactionReceiptQuery
QueryTransactionReceipts queries the "transaction_receipts" edge of the Block entity.
func (*Block) QueryTransactions ¶
func (b *Block) QueryTransactions() *TransactionQuery
QueryTransactions queries the "transactions" edge of the Block entity.
func (*Block) ToEdge ¶
func (b *Block) ToEdge(order *BlockOrder) *BlockEdge
ToEdge converts Block into BlockEdge.
func (*Block) TransactionReceipts ¶
func (b *Block) TransactionReceipts(ctx context.Context) ([]*TransactionReceipt, error)
func (*Block) Transactions ¶
func (b *Block) Transactions(ctx context.Context) ([]*Transaction, error)
func (*Block) Unwrap ¶
Unwrap unwraps the Block entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Block) Update ¶
func (b *Block) Update() *BlockUpdateOne
Update returns a builder for updating this Block. Note that you need to call Block.Unwrap() before calling this method if this Block was returned from a transaction, and the transaction was committed or rolled back.
type BlockClient ¶
type BlockClient struct {
// contains filtered or unexported fields
}
BlockClient is a client for the Block schema.
func NewBlockClient ¶
func NewBlockClient(c config) *BlockClient
NewBlockClient returns a client for the Block from the given config.
func (*BlockClient) Create ¶
func (c *BlockClient) Create() *BlockCreate
Create returns a builder for creating a Block entity.
func (*BlockClient) CreateBulk ¶
func (c *BlockClient) CreateBulk(builders ...*BlockCreate) *BlockCreateBulk
CreateBulk returns a builder for creating a bulk of Block entities.
func (*BlockClient) Delete ¶
func (c *BlockClient) Delete() *BlockDelete
Delete returns a delete builder for Block.
func (*BlockClient) DeleteOne ¶
func (c *BlockClient) DeleteOne(b *Block) *BlockDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BlockClient) DeleteOneID ¶
func (c *BlockClient) DeleteOneID(id string) *BlockDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*BlockClient) GetX ¶
func (c *BlockClient) GetX(ctx context.Context, id string) *Block
GetX is like Get, but panics if an error occurs.
func (*BlockClient) Query ¶
func (c *BlockClient) Query() *BlockQuery
Query returns a query builder for Block.
func (*BlockClient) QueryTransactionReceipts ¶
func (c *BlockClient) QueryTransactionReceipts(b *Block) *TransactionReceiptQuery
QueryTransactionReceipts queries the transaction_receipts edge of a Block.
func (*BlockClient) QueryTransactions ¶
func (c *BlockClient) QueryTransactions(b *Block) *TransactionQuery
QueryTransactions queries the transactions 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 string) *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 BlockConnection ¶
type BlockConnection struct { Edges []*BlockEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
BlockConnection is the connection containing edges to Block.
type BlockCreate ¶
type BlockCreate struct {
// contains filtered or unexported fields
}
BlockCreate is the builder for creating a Block entity.
func (*BlockCreate) AddTransactionIDs ¶
func (bc *BlockCreate) AddTransactionIDs(ids ...string) *BlockCreate
AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.
func (*BlockCreate) AddTransactionReceiptIDs ¶
func (bc *BlockCreate) AddTransactionReceiptIDs(ids ...string) *BlockCreate
AddTransactionReceiptIDs adds the "transaction_receipts" edge to the TransactionReceipt entity by IDs.
func (*BlockCreate) AddTransactionReceipts ¶
func (bc *BlockCreate) AddTransactionReceipts(t ...*TransactionReceipt) *BlockCreate
AddTransactionReceipts adds the "transaction_receipts" edges to the TransactionReceipt entity.
func (*BlockCreate) AddTransactions ¶
func (bc *BlockCreate) AddTransactions(t ...*Transaction) *BlockCreate
AddTransactions adds the "transactions" edges to the Transaction 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) OnConflict ¶
func (bc *BlockCreate) OnConflict(opts ...sql.ConflictOption) *BlockUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Block.Create(). SetBlockHash(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BlockUpsert) { SetBlockHash(v+v). }). Exec(ctx)
func (*BlockCreate) OnConflictColumns ¶
func (bc *BlockCreate) OnConflictColumns(columns ...string) *BlockUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Block.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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(s string) *BlockCreate
SetBlockHash sets the "block_hash" field.
func (*BlockCreate) SetBlockNumber ¶
func (bc *BlockCreate) SetBlockNumber(u uint64) *BlockCreate
SetBlockNumber sets the "block_number" field.
func (*BlockCreate) SetID ¶
func (bc *BlockCreate) SetID(s string) *BlockCreate
SetID sets the "id" field.
func (*BlockCreate) SetParentBlockHash ¶
func (bc *BlockCreate) SetParentBlockHash(s string) *BlockCreate
SetParentBlockHash sets the "parent_block_hash" field.
func (*BlockCreate) SetStateRoot ¶
func (bc *BlockCreate) SetStateRoot(s string) *BlockCreate
SetStateRoot sets the "state_root" field.
func (*BlockCreate) SetStatus ¶
func (bc *BlockCreate) SetStatus(b block.Status) *BlockCreate
SetStatus sets the "status" field.
func (*BlockCreate) SetTimestamp ¶
func (bc *BlockCreate) SetTimestamp(t time.Time) *BlockCreate
SetTimestamp sets the "timestamp" field.
type BlockCreateBulk ¶
type BlockCreateBulk struct {
// contains filtered or unexported fields
}
BlockCreateBulk is the builder for creating many Block entities in bulk.
func (*BlockCreateBulk) Exec ¶
func (bcb *BlockCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BlockCreateBulk) ExecX ¶
func (bcb *BlockCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlockCreateBulk) OnConflict ¶
func (bcb *BlockCreateBulk) OnConflict(opts ...sql.ConflictOption) *BlockUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Block.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BlockUpsert) { SetBlockHash(v+v). }). Exec(ctx)
func (*BlockCreateBulk) OnConflictColumns ¶
func (bcb *BlockCreateBulk) OnConflictColumns(columns ...string) *BlockUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Block.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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.
type BlockEdges ¶
type BlockEdges struct { // Transactions holds the value of the transactions edge. Transactions []*Transaction `json:"transactions,omitempty"` // TransactionReceipts holds the value of the transaction_receipts edge. TransactionReceipts []*TransactionReceipt `json:"transaction_receipts,omitempty"` // contains filtered or unexported fields }
BlockEdges holds the relations/edges for other nodes in the graph.
func (BlockEdges) TransactionReceiptsOrErr ¶
func (e BlockEdges) TransactionReceiptsOrErr() ([]*TransactionReceipt, error)
TransactionReceiptsOrErr returns the TransactionReceipts value or an error if the edge was not loaded in eager-loading.
func (BlockEdges) TransactionsOrErr ¶
func (e BlockEdges) TransactionsOrErr() ([]*Transaction, error)
TransactionsOrErr returns the Transactions value or an error if the edge was not loaded in eager-loading.
type BlockGroupBy ¶
type BlockGroupBy struct {
// contains filtered or unexported fields
}
BlockGroupBy is the group-by builder for Block entities.
func (*BlockGroupBy) Aggregate ¶
func (bgb *BlockGroupBy) Aggregate(fns ...AggregateFunc) *BlockGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BlockGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BlockGroupBy) Scan ¶
func (bgb *BlockGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*BlockGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BlockMutation ¶
type BlockMutation struct {
// contains filtered or unexported fields
}
BlockMutation represents an operation that mutates the Block nodes in the graph.
func (*BlockMutation) AddBlockNumber ¶
func (m *BlockMutation) AddBlockNumber(u int64)
AddBlockNumber adds u to the "block_number" 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) AddTransactionIDs ¶
func (m *BlockMutation) AddTransactionIDs(ids ...string)
AddTransactionIDs adds the "transactions" edge to the Transaction entity by ids.
func (*BlockMutation) AddTransactionReceiptIDs ¶
func (m *BlockMutation) AddTransactionReceiptIDs(ids ...string)
AddTransactionReceiptIDs adds the "transaction_receipts" edge to the TransactionReceipt entity by ids.
func (*BlockMutation) AddedBlockNumber ¶
func (m *BlockMutation) AddedBlockNumber() (r int64, exists bool)
AddedBlockNumber returns the value that was added to the "block_number" 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) BlockHash ¶
func (m *BlockMutation) BlockHash() (r string, exists bool)
BlockHash returns the value of the "block_hash" field in the mutation.
func (*BlockMutation) BlockNumber ¶
func (m *BlockMutation) BlockNumber() (r uint64, exists bool)
BlockNumber returns the value of the "block_number" 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) ClearTransactionReceipts ¶
func (m *BlockMutation) ClearTransactionReceipts()
ClearTransactionReceipts clears the "transaction_receipts" edge to the TransactionReceipt entity.
func (*BlockMutation) ClearTransactions ¶
func (m *BlockMutation) ClearTransactions()
ClearTransactions clears the "transactions" edge to the Transaction 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) 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) ID ¶
func (m *BlockMutation) ID() (id string, 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) ([]string, 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) OldBlockHash ¶
func (m *BlockMutation) OldBlockHash(ctx context.Context) (v string, err error)
OldBlockHash returns the old "block_hash" field's value of the Block entity. If the Block object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BlockMutation) OldBlockNumber ¶
func (m *BlockMutation) OldBlockNumber(ctx context.Context) (v uint64, err error)
OldBlockNumber returns the old "block_number" field's value of the Block entity. If the Block object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BlockMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*BlockMutation) OldParentBlockHash ¶
func (m *BlockMutation) OldParentBlockHash(ctx context.Context) (v string, err error)
OldParentBlockHash returns the old "parent_block_hash" field's value of the Block entity. If the Block object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BlockMutation) OldStateRoot ¶
func (m *BlockMutation) OldStateRoot(ctx context.Context) (v string, err error)
OldStateRoot returns the old "state_root" 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) OldStatus ¶
OldStatus returns the old "status" field's value of the Block entity. If the Block object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BlockMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the Block entity. If the Block object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BlockMutation) ParentBlockHash ¶
func (m *BlockMutation) ParentBlockHash() (r string, exists bool)
ParentBlockHash returns the value of the "parent_block_hash" field in the mutation.
func (*BlockMutation) RemoveTransactionIDs ¶
func (m *BlockMutation) RemoveTransactionIDs(ids ...string)
RemoveTransactionIDs removes the "transactions" edge to the Transaction entity by IDs.
func (*BlockMutation) RemoveTransactionReceiptIDs ¶
func (m *BlockMutation) RemoveTransactionReceiptIDs(ids ...string)
RemoveTransactionReceiptIDs removes the "transaction_receipts" edge to the TransactionReceipt 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) RemovedTransactionReceiptsIDs ¶
func (m *BlockMutation) RemovedTransactionReceiptsIDs() (ids []string)
RemovedTransactionReceipts returns the removed IDs of the "transaction_receipts" edge to the TransactionReceipt entity.
func (*BlockMutation) RemovedTransactionsIDs ¶
func (m *BlockMutation) RemovedTransactionsIDs() (ids []string)
RemovedTransactions returns the removed IDs of the "transactions" edge to the Transaction entity.
func (*BlockMutation) ResetBlockHash ¶
func (m *BlockMutation) ResetBlockHash()
ResetBlockHash resets all changes to the "block_hash" field.
func (*BlockMutation) ResetBlockNumber ¶
func (m *BlockMutation) ResetBlockNumber()
ResetBlockNumber resets all changes to the "block_number" 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) ResetParentBlockHash ¶
func (m *BlockMutation) ResetParentBlockHash()
ResetParentBlockHash resets all changes to the "parent_block_hash" field.
func (*BlockMutation) ResetStateRoot ¶
func (m *BlockMutation) ResetStateRoot()
ResetStateRoot resets all changes to the "state_root" field.
func (*BlockMutation) ResetStatus ¶
func (m *BlockMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*BlockMutation) ResetTimestamp ¶
func (m *BlockMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*BlockMutation) ResetTransactionReceipts ¶
func (m *BlockMutation) ResetTransactionReceipts()
ResetTransactionReceipts resets all changes to the "transaction_receipts" edge.
func (*BlockMutation) ResetTransactions ¶
func (m *BlockMutation) ResetTransactions()
ResetTransactions resets all changes to the "transactions" edge.
func (*BlockMutation) SetBlockHash ¶
func (m *BlockMutation) SetBlockHash(s string)
SetBlockHash sets the "block_hash" field.
func (*BlockMutation) SetBlockNumber ¶
func (m *BlockMutation) SetBlockNumber(u uint64)
SetBlockNumber sets the "block_number" 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) SetID ¶
func (m *BlockMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Block entities.
func (*BlockMutation) SetParentBlockHash ¶
func (m *BlockMutation) SetParentBlockHash(s string)
SetParentBlockHash sets the "parent_block_hash" field.
func (*BlockMutation) SetStateRoot ¶
func (m *BlockMutation) SetStateRoot(s string)
SetStateRoot sets the "state_root" field.
func (*BlockMutation) SetStatus ¶
func (m *BlockMutation) SetStatus(b block.Status)
SetStatus sets the "status" field.
func (*BlockMutation) SetTimestamp ¶
func (m *BlockMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*BlockMutation) StateRoot ¶
func (m *BlockMutation) StateRoot() (r string, exists bool)
StateRoot returns the value of the "state_root" field in the mutation.
func (*BlockMutation) Status ¶
func (m *BlockMutation) Status() (r block.Status, exists bool)
Status returns the value of the "status" 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) TransactionReceiptsCleared ¶
func (m *BlockMutation) TransactionReceiptsCleared() bool
TransactionReceiptsCleared reports if the "transaction_receipts" edge to the TransactionReceipt entity was cleared.
func (*BlockMutation) TransactionReceiptsIDs ¶
func (m *BlockMutation) TransactionReceiptsIDs() (ids []string)
TransactionReceiptsIDs returns the "transaction_receipts" edge IDs in the mutation.
func (*BlockMutation) TransactionsCleared ¶
func (m *BlockMutation) TransactionsCleared() bool
TransactionsCleared reports if the "transactions" edge to the Transaction entity was cleared.
func (*BlockMutation) TransactionsIDs ¶
func (m *BlockMutation) TransactionsIDs() (ids []string)
TransactionsIDs returns the "transactions" edge IDs in the mutation.
func (BlockMutation) Tx ¶
func (m BlockMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BlockMutation) Type ¶
func (m *BlockMutation) Type() string
Type returns the node type of this mutation (Block).
func (*BlockMutation) Where ¶
func (m *BlockMutation) Where(ps ...predicate.Block)
Where appends a list predicates to the BlockMutation builder.
type BlockOrder ¶
type BlockOrder struct { Direction OrderDirection `json:"direction"` Field *BlockOrderField `json:"field"` }
BlockOrder defines the ordering of Block.
type BlockOrderField ¶
type BlockOrderField struct {
// contains filtered or unexported fields
}
BlockOrderField defines the ordering field of Block.
func (BlockOrderField) MarshalGQL ¶
func (f BlockOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (BlockOrderField) String ¶
func (f BlockOrderField) String() string
String implement fmt.Stringer interface.
func (*BlockOrderField) UnmarshalGQL ¶
func (f *BlockOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type BlockPaginateOption ¶
type BlockPaginateOption func(*blockPager) error
BlockPaginateOption enables pagination customization.
func WithBlockFilter ¶
func WithBlockFilter(filter func(*BlockQuery) (*BlockQuery, error)) BlockPaginateOption
WithBlockFilter configures pagination filter.
func WithBlockOrder ¶
func WithBlockOrder(order *BlockOrder) BlockPaginateOption
WithBlockOrder configures pagination ordering.
type BlockQuery ¶
type BlockQuery struct {
// contains filtered or unexported fields
}
BlockQuery is the builder for querying Block entities.
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) CollectFields ¶
func (b *BlockQuery) CollectFields(ctx context.Context, satisfies ...string) (*BlockQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
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) 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 string, 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) string
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 { BlockHash string `json:"block_hash,omitempty"` Count int `json:"count,omitempty"` } client.Block.Query(). GroupBy(block.FieldBlockHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BlockQuery) IDs ¶
func (bq *BlockQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Block IDs.
func (*BlockQuery) IDsX ¶
func (bq *BlockQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*BlockQuery) Limit ¶
func (bq *BlockQuery) Limit(limit int) *BlockQuery
Limit adds a limit step to the query.
func (*BlockQuery) Offset ¶
func (bq *BlockQuery) Offset(offset int) *BlockQuery
Offset adds an offset step to the query.
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 string, 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) string
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 ...OrderFunc) *BlockQuery
Order adds an order step to the query.
func (*BlockQuery) Paginate ¶
func (b *BlockQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...BlockPaginateOption, ) (*BlockConnection, error)
Paginate executes the query and returns a relay based cursor connection to Block.
func (*BlockQuery) QueryTransactionReceipts ¶
func (bq *BlockQuery) QueryTransactionReceipts() *TransactionReceiptQuery
QueryTransactionReceipts chains the current query on the "transaction_receipts" edge.
func (*BlockQuery) QueryTransactions ¶
func (bq *BlockQuery) QueryTransactions() *TransactionQuery
QueryTransactions chains the current query on the "transactions" 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 { BlockHash string `json:"block_hash,omitempty"` } client.Block.Query(). Select(block.FieldBlockHash). 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) WithTransactionReceipts ¶
func (bq *BlockQuery) WithTransactionReceipts(opts ...func(*TransactionReceiptQuery)) *BlockQuery
WithTransactionReceipts tells the query-builder to eager-load the nodes that are connected to the "transaction_receipts" edge. The optional arguments are used to configure the query builder of the edge.
func (*BlockQuery) WithTransactions ¶
func (bq *BlockQuery) WithTransactions(opts ...func(*TransactionQuery)) *BlockQuery
WithTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" 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) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BlockSelect) Scan ¶
func (bs *BlockSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*BlockSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BlockUpdate ¶
type BlockUpdate struct {
// contains filtered or unexported fields
}
BlockUpdate is the builder for updating Block entities.
func (*BlockUpdate) AddBlockNumber ¶
func (bu *BlockUpdate) AddBlockNumber(u int64) *BlockUpdate
AddBlockNumber adds u to the "block_number" field.
func (*BlockUpdate) AddTransactionIDs ¶
func (bu *BlockUpdate) AddTransactionIDs(ids ...string) *BlockUpdate
AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.
func (*BlockUpdate) AddTransactionReceiptIDs ¶
func (bu *BlockUpdate) AddTransactionReceiptIDs(ids ...string) *BlockUpdate
AddTransactionReceiptIDs adds the "transaction_receipts" edge to the TransactionReceipt entity by IDs.
func (*BlockUpdate) AddTransactionReceipts ¶
func (bu *BlockUpdate) AddTransactionReceipts(t ...*TransactionReceipt) *BlockUpdate
AddTransactionReceipts adds the "transaction_receipts" edges to the TransactionReceipt entity.
func (*BlockUpdate) AddTransactions ¶
func (bu *BlockUpdate) AddTransactions(t ...*Transaction) *BlockUpdate
AddTransactions adds the "transactions" edges to the Transaction entity.
func (*BlockUpdate) ClearTransactionReceipts ¶
func (bu *BlockUpdate) ClearTransactionReceipts() *BlockUpdate
ClearTransactionReceipts clears all "transaction_receipts" edges to the TransactionReceipt entity.
func (*BlockUpdate) ClearTransactions ¶
func (bu *BlockUpdate) ClearTransactions() *BlockUpdate
ClearTransactions clears all "transactions" edges to the Transaction 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) RemoveTransactionIDs ¶
func (bu *BlockUpdate) RemoveTransactionIDs(ids ...string) *BlockUpdate
RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.
func (*BlockUpdate) RemoveTransactionReceiptIDs ¶
func (bu *BlockUpdate) RemoveTransactionReceiptIDs(ids ...string) *BlockUpdate
RemoveTransactionReceiptIDs removes the "transaction_receipts" edge to TransactionReceipt entities by IDs.
func (*BlockUpdate) RemoveTransactionReceipts ¶
func (bu *BlockUpdate) RemoveTransactionReceipts(t ...*TransactionReceipt) *BlockUpdate
RemoveTransactionReceipts removes "transaction_receipts" edges to TransactionReceipt entities.
func (*BlockUpdate) RemoveTransactions ¶
func (bu *BlockUpdate) RemoveTransactions(t ...*Transaction) *BlockUpdate
RemoveTransactions removes "transactions" edges to Transaction 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(s string) *BlockUpdate
SetBlockHash sets the "block_hash" field.
func (*BlockUpdate) SetBlockNumber ¶
func (bu *BlockUpdate) SetBlockNumber(u uint64) *BlockUpdate
SetBlockNumber sets the "block_number" field.
func (*BlockUpdate) SetParentBlockHash ¶
func (bu *BlockUpdate) SetParentBlockHash(s string) *BlockUpdate
SetParentBlockHash sets the "parent_block_hash" field.
func (*BlockUpdate) SetStateRoot ¶
func (bu *BlockUpdate) SetStateRoot(s string) *BlockUpdate
SetStateRoot sets the "state_root" field.
func (*BlockUpdate) SetStatus ¶
func (bu *BlockUpdate) SetStatus(b block.Status) *BlockUpdate
SetStatus sets the "status" 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) AddBlockNumber ¶
func (buo *BlockUpdateOne) AddBlockNumber(u int64) *BlockUpdateOne
AddBlockNumber adds u to the "block_number" field.
func (*BlockUpdateOne) AddTransactionIDs ¶
func (buo *BlockUpdateOne) AddTransactionIDs(ids ...string) *BlockUpdateOne
AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.
func (*BlockUpdateOne) AddTransactionReceiptIDs ¶
func (buo *BlockUpdateOne) AddTransactionReceiptIDs(ids ...string) *BlockUpdateOne
AddTransactionReceiptIDs adds the "transaction_receipts" edge to the TransactionReceipt entity by IDs.
func (*BlockUpdateOne) AddTransactionReceipts ¶
func (buo *BlockUpdateOne) AddTransactionReceipts(t ...*TransactionReceipt) *BlockUpdateOne
AddTransactionReceipts adds the "transaction_receipts" edges to the TransactionReceipt entity.
func (*BlockUpdateOne) AddTransactions ¶
func (buo *BlockUpdateOne) AddTransactions(t ...*Transaction) *BlockUpdateOne
AddTransactions adds the "transactions" edges to the Transaction entity.
func (*BlockUpdateOne) ClearTransactionReceipts ¶
func (buo *BlockUpdateOne) ClearTransactionReceipts() *BlockUpdateOne
ClearTransactionReceipts clears all "transaction_receipts" edges to the TransactionReceipt entity.
func (*BlockUpdateOne) ClearTransactions ¶
func (buo *BlockUpdateOne) ClearTransactions() *BlockUpdateOne
ClearTransactions clears all "transactions" edges to the Transaction 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) RemoveTransactionIDs ¶
func (buo *BlockUpdateOne) RemoveTransactionIDs(ids ...string) *BlockUpdateOne
RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.
func (*BlockUpdateOne) RemoveTransactionReceiptIDs ¶
func (buo *BlockUpdateOne) RemoveTransactionReceiptIDs(ids ...string) *BlockUpdateOne
RemoveTransactionReceiptIDs removes the "transaction_receipts" edge to TransactionReceipt entities by IDs.
func (*BlockUpdateOne) RemoveTransactionReceipts ¶
func (buo *BlockUpdateOne) RemoveTransactionReceipts(t ...*TransactionReceipt) *BlockUpdateOne
RemoveTransactionReceipts removes "transaction_receipts" edges to TransactionReceipt entities.
func (*BlockUpdateOne) RemoveTransactions ¶
func (buo *BlockUpdateOne) RemoveTransactions(t ...*Transaction) *BlockUpdateOne
RemoveTransactions removes "transactions" edges to Transaction 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(s string) *BlockUpdateOne
SetBlockHash sets the "block_hash" field.
func (*BlockUpdateOne) SetBlockNumber ¶
func (buo *BlockUpdateOne) SetBlockNumber(u uint64) *BlockUpdateOne
SetBlockNumber sets the "block_number" field.
func (*BlockUpdateOne) SetParentBlockHash ¶
func (buo *BlockUpdateOne) SetParentBlockHash(s string) *BlockUpdateOne
SetParentBlockHash sets the "parent_block_hash" field.
func (*BlockUpdateOne) SetStateRoot ¶
func (buo *BlockUpdateOne) SetStateRoot(s string) *BlockUpdateOne
SetStateRoot sets the "state_root" field.
func (*BlockUpdateOne) SetStatus ¶
func (buo *BlockUpdateOne) SetStatus(b block.Status) *BlockUpdateOne
SetStatus sets the "status" field.
type BlockUpsert ¶
BlockUpsert is the "OnConflict" setter.
func (*BlockUpsert) AddBlockNumber ¶
func (u *BlockUpsert) AddBlockNumber(v uint64) *BlockUpsert
AddBlockNumber adds v to the "block_number" field.
func (*BlockUpsert) SetBlockHash ¶
func (u *BlockUpsert) SetBlockHash(v string) *BlockUpsert
SetBlockHash sets the "block_hash" field.
func (*BlockUpsert) SetBlockNumber ¶
func (u *BlockUpsert) SetBlockNumber(v uint64) *BlockUpsert
SetBlockNumber sets the "block_number" field.
func (*BlockUpsert) SetParentBlockHash ¶
func (u *BlockUpsert) SetParentBlockHash(v string) *BlockUpsert
SetParentBlockHash sets the "parent_block_hash" field.
func (*BlockUpsert) SetStateRoot ¶
func (u *BlockUpsert) SetStateRoot(v string) *BlockUpsert
SetStateRoot sets the "state_root" field.
func (*BlockUpsert) SetStatus ¶
func (u *BlockUpsert) SetStatus(v block.Status) *BlockUpsert
SetStatus sets the "status" field.
func (*BlockUpsert) SetTimestamp ¶
func (u *BlockUpsert) SetTimestamp(v time.Time) *BlockUpsert
SetTimestamp sets the "timestamp" field.
func (*BlockUpsert) UpdateBlockHash ¶
func (u *BlockUpsert) UpdateBlockHash() *BlockUpsert
UpdateBlockHash sets the "block_hash" field to the value that was provided on create.
func (*BlockUpsert) UpdateBlockNumber ¶
func (u *BlockUpsert) UpdateBlockNumber() *BlockUpsert
UpdateBlockNumber sets the "block_number" field to the value that was provided on create.
func (*BlockUpsert) UpdateParentBlockHash ¶
func (u *BlockUpsert) UpdateParentBlockHash() *BlockUpsert
UpdateParentBlockHash sets the "parent_block_hash" field to the value that was provided on create.
func (*BlockUpsert) UpdateStateRoot ¶
func (u *BlockUpsert) UpdateStateRoot() *BlockUpsert
UpdateStateRoot sets the "state_root" field to the value that was provided on create.
func (*BlockUpsert) UpdateStatus ¶
func (u *BlockUpsert) UpdateStatus() *BlockUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*BlockUpsert) UpdateTimestamp ¶
func (u *BlockUpsert) UpdateTimestamp() *BlockUpsert
UpdateTimestamp sets the "timestamp" field to the value that was provided on create.
type BlockUpsertBulk ¶
type BlockUpsertBulk struct {
// contains filtered or unexported fields
}
BlockUpsertBulk is the builder for "upsert"-ing a bulk of Block nodes.
func (*BlockUpsertBulk) AddBlockNumber ¶
func (u *BlockUpsertBulk) AddBlockNumber(v uint64) *BlockUpsertBulk
AddBlockNumber adds v to the "block_number" field.
func (*BlockUpsertBulk) DoNothing ¶
func (u *BlockUpsertBulk) DoNothing() *BlockUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BlockUpsertBulk) Exec ¶
func (u *BlockUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BlockUpsertBulk) ExecX ¶
func (u *BlockUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlockUpsertBulk) Ignore ¶
func (u *BlockUpsertBulk) Ignore() *BlockUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Block.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BlockUpsertBulk) SetBlockHash ¶
func (u *BlockUpsertBulk) SetBlockHash(v string) *BlockUpsertBulk
SetBlockHash sets the "block_hash" field.
func (*BlockUpsertBulk) SetBlockNumber ¶
func (u *BlockUpsertBulk) SetBlockNumber(v uint64) *BlockUpsertBulk
SetBlockNumber sets the "block_number" field.
func (*BlockUpsertBulk) SetParentBlockHash ¶
func (u *BlockUpsertBulk) SetParentBlockHash(v string) *BlockUpsertBulk
SetParentBlockHash sets the "parent_block_hash" field.
func (*BlockUpsertBulk) SetStateRoot ¶
func (u *BlockUpsertBulk) SetStateRoot(v string) *BlockUpsertBulk
SetStateRoot sets the "state_root" field.
func (*BlockUpsertBulk) SetStatus ¶
func (u *BlockUpsertBulk) SetStatus(v block.Status) *BlockUpsertBulk
SetStatus sets the "status" field.
func (*BlockUpsertBulk) SetTimestamp ¶
func (u *BlockUpsertBulk) SetTimestamp(v time.Time) *BlockUpsertBulk
SetTimestamp sets the "timestamp" field.
func (*BlockUpsertBulk) Update ¶
func (u *BlockUpsertBulk) Update(set func(*BlockUpsert)) *BlockUpsertBulk
Update allows overriding fields `UPDATE` values. See the BlockCreateBulk.OnConflict documentation for more info.
func (*BlockUpsertBulk) UpdateBlockHash ¶
func (u *BlockUpsertBulk) UpdateBlockHash() *BlockUpsertBulk
UpdateBlockHash sets the "block_hash" field to the value that was provided on create.
func (*BlockUpsertBulk) UpdateBlockNumber ¶
func (u *BlockUpsertBulk) UpdateBlockNumber() *BlockUpsertBulk
UpdateBlockNumber sets the "block_number" field to the value that was provided on create.
func (*BlockUpsertBulk) UpdateNewValues ¶
func (u *BlockUpsertBulk) UpdateNewValues() *BlockUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Block.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(block.FieldID) }), ). Exec(ctx)
func (*BlockUpsertBulk) UpdateParentBlockHash ¶
func (u *BlockUpsertBulk) UpdateParentBlockHash() *BlockUpsertBulk
UpdateParentBlockHash sets the "parent_block_hash" field to the value that was provided on create.
func (*BlockUpsertBulk) UpdateStateRoot ¶
func (u *BlockUpsertBulk) UpdateStateRoot() *BlockUpsertBulk
UpdateStateRoot sets the "state_root" field to the value that was provided on create.
func (*BlockUpsertBulk) UpdateStatus ¶
func (u *BlockUpsertBulk) UpdateStatus() *BlockUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*BlockUpsertBulk) UpdateTimestamp ¶
func (u *BlockUpsertBulk) UpdateTimestamp() *BlockUpsertBulk
UpdateTimestamp sets the "timestamp" field to the value that was provided on create.
type BlockUpsertOne ¶
type BlockUpsertOne struct {
// contains filtered or unexported fields
}
BlockUpsertOne is the builder for "upsert"-ing
one Block node.
func (*BlockUpsertOne) AddBlockNumber ¶
func (u *BlockUpsertOne) AddBlockNumber(v uint64) *BlockUpsertOne
AddBlockNumber adds v to the "block_number" field.
func (*BlockUpsertOne) DoNothing ¶
func (u *BlockUpsertOne) DoNothing() *BlockUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BlockUpsertOne) Exec ¶
func (u *BlockUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*BlockUpsertOne) ExecX ¶
func (u *BlockUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlockUpsertOne) ID ¶
func (u *BlockUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*BlockUpsertOne) IDX ¶
func (u *BlockUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*BlockUpsertOne) Ignore ¶
func (u *BlockUpsertOne) Ignore() *BlockUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Block.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BlockUpsertOne) SetBlockHash ¶
func (u *BlockUpsertOne) SetBlockHash(v string) *BlockUpsertOne
SetBlockHash sets the "block_hash" field.
func (*BlockUpsertOne) SetBlockNumber ¶
func (u *BlockUpsertOne) SetBlockNumber(v uint64) *BlockUpsertOne
SetBlockNumber sets the "block_number" field.
func (*BlockUpsertOne) SetParentBlockHash ¶
func (u *BlockUpsertOne) SetParentBlockHash(v string) *BlockUpsertOne
SetParentBlockHash sets the "parent_block_hash" field.
func (*BlockUpsertOne) SetStateRoot ¶
func (u *BlockUpsertOne) SetStateRoot(v string) *BlockUpsertOne
SetStateRoot sets the "state_root" field.
func (*BlockUpsertOne) SetStatus ¶
func (u *BlockUpsertOne) SetStatus(v block.Status) *BlockUpsertOne
SetStatus sets the "status" field.
func (*BlockUpsertOne) SetTimestamp ¶
func (u *BlockUpsertOne) SetTimestamp(v time.Time) *BlockUpsertOne
SetTimestamp sets the "timestamp" field.
func (*BlockUpsertOne) Update ¶
func (u *BlockUpsertOne) Update(set func(*BlockUpsert)) *BlockUpsertOne
Update allows overriding fields `UPDATE` values. See the BlockCreate.OnConflict documentation for more info.
func (*BlockUpsertOne) UpdateBlockHash ¶
func (u *BlockUpsertOne) UpdateBlockHash() *BlockUpsertOne
UpdateBlockHash sets the "block_hash" field to the value that was provided on create.
func (*BlockUpsertOne) UpdateBlockNumber ¶
func (u *BlockUpsertOne) UpdateBlockNumber() *BlockUpsertOne
UpdateBlockNumber sets the "block_number" field to the value that was provided on create.
func (*BlockUpsertOne) UpdateNewValues ¶
func (u *BlockUpsertOne) UpdateNewValues() *BlockUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Block.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(block.FieldID) }), ). Exec(ctx)
func (*BlockUpsertOne) UpdateParentBlockHash ¶
func (u *BlockUpsertOne) UpdateParentBlockHash() *BlockUpsertOne
UpdateParentBlockHash sets the "parent_block_hash" field to the value that was provided on create.
func (*BlockUpsertOne) UpdateStateRoot ¶
func (u *BlockUpsertOne) UpdateStateRoot() *BlockUpsertOne
UpdateStateRoot sets the "state_root" field to the value that was provided on create.
func (*BlockUpsertOne) UpdateStatus ¶
func (u *BlockUpsertOne) UpdateStatus() *BlockUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*BlockUpsertOne) UpdateTimestamp ¶
func (u *BlockUpsertOne) UpdateTimestamp() *BlockUpsertOne
UpdateTimestamp sets the "timestamp" field to the value that was provided on create.
type BlockWhereInput ¶
type BlockWhereInput struct { Not *BlockWhereInput `json:"not,omitempty"` Or []*BlockWhereInput `json:"or,omitempty"` And []*BlockWhereInput `json:"and,omitempty"` // "id" field predicates. ID *string `json:"id,omitempty"` IDNEQ *string `json:"idNEQ,omitempty"` IDIn []string `json:"idIn,omitempty"` IDNotIn []string `json:"idNotIn,omitempty"` IDGT *string `json:"idGT,omitempty"` IDGTE *string `json:"idGTE,omitempty"` IDLT *string `json:"idLT,omitempty"` IDLTE *string `json:"idLTE,omitempty"` // "block_hash" field predicates. BlockHash *string `json:"blockHash,omitempty"` BlockHashNEQ *string `json:"blockHashNEQ,omitempty"` BlockHashIn []string `json:"blockHashIn,omitempty"` BlockHashNotIn []string `json:"blockHashNotIn,omitempty"` BlockHashGT *string `json:"blockHashGT,omitempty"` BlockHashGTE *string `json:"blockHashGTE,omitempty"` BlockHashLT *string `json:"blockHashLT,omitempty"` BlockHashLTE *string `json:"blockHashLTE,omitempty"` BlockHashContains *string `json:"blockHashContains,omitempty"` BlockHashHasPrefix *string `json:"blockHashHasPrefix,omitempty"` BlockHashHasSuffix *string `json:"blockHashHasSuffix,omitempty"` BlockHashEqualFold *string `json:"blockHashEqualFold,omitempty"` BlockHashContainsFold *string `json:"blockHashContainsFold,omitempty"` // "parent_block_hash" field predicates. ParentBlockHash *string `json:"parentBlockHash,omitempty"` ParentBlockHashNEQ *string `json:"parentBlockHashNEQ,omitempty"` ParentBlockHashIn []string `json:"parentBlockHashIn,omitempty"` ParentBlockHashNotIn []string `json:"parentBlockHashNotIn,omitempty"` ParentBlockHashGT *string `json:"parentBlockHashGT,omitempty"` ParentBlockHashGTE *string `json:"parentBlockHashGTE,omitempty"` ParentBlockHashLT *string `json:"parentBlockHashLT,omitempty"` ParentBlockHashLTE *string `json:"parentBlockHashLTE,omitempty"` ParentBlockHashContains *string `json:"parentBlockHashContains,omitempty"` ParentBlockHashHasPrefix *string `json:"parentBlockHashHasPrefix,omitempty"` ParentBlockHashHasSuffix *string `json:"parentBlockHashHasSuffix,omitempty"` ParentBlockHashEqualFold *string `json:"parentBlockHashEqualFold,omitempty"` ParentBlockHashContainsFold *string `json:"parentBlockHashContainsFold,omitempty"` // "block_number" field predicates. BlockNumber *uint64 `json:"blockNumber,omitempty"` BlockNumberNEQ *uint64 `json:"blockNumberNEQ,omitempty"` BlockNumberIn []uint64 `json:"blockNumberIn,omitempty"` BlockNumberNotIn []uint64 `json:"blockNumberNotIn,omitempty"` BlockNumberGT *uint64 `json:"blockNumberGT,omitempty"` BlockNumberGTE *uint64 `json:"blockNumberGTE,omitempty"` BlockNumberLT *uint64 `json:"blockNumberLT,omitempty"` BlockNumberLTE *uint64 `json:"blockNumberLTE,omitempty"` // "state_root" field predicates. StateRoot *string `json:"stateRoot,omitempty"` StateRootNEQ *string `json:"stateRootNEQ,omitempty"` StateRootIn []string `json:"stateRootIn,omitempty"` StateRootNotIn []string `json:"stateRootNotIn,omitempty"` StateRootGT *string `json:"stateRootGT,omitempty"` StateRootGTE *string `json:"stateRootGTE,omitempty"` StateRootLT *string `json:"stateRootLT,omitempty"` StateRootLTE *string `json:"stateRootLTE,omitempty"` StateRootContains *string `json:"stateRootContains,omitempty"` StateRootHasPrefix *string `json:"stateRootHasPrefix,omitempty"` StateRootHasSuffix *string `json:"stateRootHasSuffix,omitempty"` StateRootEqualFold *string `json:"stateRootEqualFold,omitempty"` StateRootContainsFold *string `json:"stateRootContainsFold,omitempty"` // "status" field predicates. Status *block.Status `json:"status,omitempty"` StatusNEQ *block.Status `json:"statusNEQ,omitempty"` StatusIn []block.Status `json:"statusIn,omitempty"` StatusNotIn []block.Status `json:"statusNotIn,omitempty"` // "timestamp" field predicates. Timestamp *time.Time `json:"timestamp,omitempty"` TimestampNEQ *time.Time `json:"timestampNEQ,omitempty"` TimestampIn []time.Time `json:"timestampIn,omitempty"` TimestampNotIn []time.Time `json:"timestampNotIn,omitempty"` TimestampGT *time.Time `json:"timestampGT,omitempty"` TimestampGTE *time.Time `json:"timestampGTE,omitempty"` TimestampLT *time.Time `json:"timestampLT,omitempty"` TimestampLTE *time.Time `json:"timestampLTE,omitempty"` // "transactions" edge predicates. HasTransactions *bool `json:"hasTransactions,omitempty"` HasTransactionsWith []*TransactionWhereInput `json:"hasTransactionsWith,omitempty"` // "transaction_receipts" edge predicates. HasTransactionReceipts *bool `json:"hasTransactionReceipts,omitempty"` HasTransactionReceiptsWith []*TransactionReceiptWhereInput `json:"hasTransactionReceiptsWith,omitempty"` }
BlockWhereInput represents a where input for filtering Block queries.
func (*BlockWhereInput) Filter ¶
func (i *BlockWhereInput) Filter(q *BlockQuery) (*BlockQuery, error)
Filter applies the BlockWhereInput filter on the BlockQuery builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Balance is the client for interacting with the Balance builders. Balance *BalanceClient // Block is the client for interacting with the Block builders. Block *BlockClient // Contract is the client for interacting with the Contract builders. Contract *ContractClient // Event is the client for interacting with the Event builders. Event *EventClient // Transaction is the client for interacting with the Transaction builders. Transaction *TransactionClient // TransactionReceipt is the client for interacting with the TransactionReceipt builders. TransactionReceipt *TransactionReceiptClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Balance. Query(). Count(ctx)
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(pet.Table))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Contract ¶
type Contract struct { // ID of the ent. ID string `json:"id,omitempty"` // Type holds the value of the "type" field. Type contract.Type `json:"type,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ContractQuery when eager-loading is set. Edges ContractEdges `json:"edges"` // contains filtered or unexported fields }
Contract is the model entity for the Contract schema.
func (*Contract) QueryTransactions ¶
func (c *Contract) QueryTransactions() *TransactionQuery
QueryTransactions queries the "transactions" edge of the Contract entity.
func (*Contract) ToEdge ¶
func (c *Contract) ToEdge(order *ContractOrder) *ContractEdge
ToEdge converts Contract into ContractEdge.
func (*Contract) Transactions ¶
func (c *Contract) Transactions(ctx context.Context) ([]*Transaction, error)
func (*Contract) Unwrap ¶
Unwrap unwraps the Contract 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 (*Contract) Update ¶
func (c *Contract) Update() *ContractUpdateOne
Update returns a builder for updating this Contract. Note that you need to call Contract.Unwrap() before calling this method if this Contract was returned from a transaction, and the transaction was committed or rolled back.
type ContractClient ¶
type ContractClient struct {
// contains filtered or unexported fields
}
ContractClient is a client for the Contract schema.
func NewContractClient ¶
func NewContractClient(c config) *ContractClient
NewContractClient returns a client for the Contract from the given config.
func (*ContractClient) Create ¶
func (c *ContractClient) Create() *ContractCreate
Create returns a builder for creating a Contract entity.
func (*ContractClient) CreateBulk ¶
func (c *ContractClient) CreateBulk(builders ...*ContractCreate) *ContractCreateBulk
CreateBulk returns a builder for creating a bulk of Contract entities.
func (*ContractClient) Delete ¶
func (c *ContractClient) Delete() *ContractDelete
Delete returns a delete builder for Contract.
func (*ContractClient) DeleteOne ¶
func (c *ContractClient) DeleteOne(co *Contract) *ContractDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ContractClient) DeleteOneID ¶
func (c *ContractClient) DeleteOneID(id string) *ContractDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ContractClient) GetX ¶
func (c *ContractClient) GetX(ctx context.Context, id string) *Contract
GetX is like Get, but panics if an error occurs.
func (*ContractClient) Hooks ¶
func (c *ContractClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ContractClient) Query ¶
func (c *ContractClient) Query() *ContractQuery
Query returns a query builder for Contract.
func (*ContractClient) QueryTransactions ¶
func (c *ContractClient) QueryTransactions(co *Contract) *TransactionQuery
QueryTransactions queries the transactions edge of a Contract.
func (*ContractClient) Update ¶
func (c *ContractClient) Update() *ContractUpdate
Update returns an update builder for Contract.
func (*ContractClient) UpdateOne ¶
func (c *ContractClient) UpdateOne(co *Contract) *ContractUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContractClient) UpdateOneID ¶
func (c *ContractClient) UpdateOneID(id string) *ContractUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ContractClient) Use ¶
func (c *ContractClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `contract.Hooks(f(g(h())))`.
type ContractConnection ¶
type ContractConnection struct { Edges []*ContractEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ContractConnection is the connection containing edges to Contract.
type ContractCreate ¶
type ContractCreate struct {
// contains filtered or unexported fields
}
ContractCreate is the builder for creating a Contract entity.
func (*ContractCreate) AddTransactionIDs ¶
func (cc *ContractCreate) AddTransactionIDs(ids ...string) *ContractCreate
AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.
func (*ContractCreate) AddTransactions ¶
func (cc *ContractCreate) AddTransactions(t ...*Transaction) *ContractCreate
AddTransactions adds the "transactions" edges to the Transaction entity.
func (*ContractCreate) Exec ¶
func (cc *ContractCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContractCreate) ExecX ¶
func (cc *ContractCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContractCreate) Mutation ¶
func (cc *ContractCreate) Mutation() *ContractMutation
Mutation returns the ContractMutation object of the builder.
func (*ContractCreate) OnConflict ¶
func (cc *ContractCreate) OnConflict(opts ...sql.ConflictOption) *ContractUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Contract.Create(). SetType(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ContractUpsert) { SetType(v+v). }). Exec(ctx)
func (*ContractCreate) OnConflictColumns ¶
func (cc *ContractCreate) OnConflictColumns(columns ...string) *ContractUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Contract.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ContractCreate) Save ¶
func (cc *ContractCreate) Save(ctx context.Context) (*Contract, error)
Save creates the Contract in the database.
func (*ContractCreate) SaveX ¶
func (cc *ContractCreate) SaveX(ctx context.Context) *Contract
SaveX calls Save and panics if Save returns an error.
func (*ContractCreate) SetCreatedAt ¶
func (cc *ContractCreate) SetCreatedAt(t time.Time) *ContractCreate
SetCreatedAt sets the "created_at" field.
func (*ContractCreate) SetID ¶
func (cc *ContractCreate) SetID(s string) *ContractCreate
SetID sets the "id" field.
func (*ContractCreate) SetNillableCreatedAt ¶
func (cc *ContractCreate) SetNillableCreatedAt(t *time.Time) *ContractCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ContractCreate) SetNillableType ¶
func (cc *ContractCreate) SetNillableType(c *contract.Type) *ContractCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*ContractCreate) SetNillableUpdatedAt ¶
func (cc *ContractCreate) SetNillableUpdatedAt(t *time.Time) *ContractCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ContractCreate) SetType ¶
func (cc *ContractCreate) SetType(c contract.Type) *ContractCreate
SetType sets the "type" field.
func (*ContractCreate) SetUpdatedAt ¶
func (cc *ContractCreate) SetUpdatedAt(t time.Time) *ContractCreate
SetUpdatedAt sets the "updated_at" field.
type ContractCreateBulk ¶
type ContractCreateBulk struct {
// contains filtered or unexported fields
}
ContractCreateBulk is the builder for creating many Contract entities in bulk.
func (*ContractCreateBulk) Exec ¶
func (ccb *ContractCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContractCreateBulk) ExecX ¶
func (ccb *ContractCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContractCreateBulk) OnConflict ¶
func (ccb *ContractCreateBulk) OnConflict(opts ...sql.ConflictOption) *ContractUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Contract.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ContractUpsert) { SetType(v+v). }). Exec(ctx)
func (*ContractCreateBulk) OnConflictColumns ¶
func (ccb *ContractCreateBulk) OnConflictColumns(columns ...string) *ContractUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Contract.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ContractDelete ¶
type ContractDelete struct {
// contains filtered or unexported fields
}
ContractDelete is the builder for deleting a Contract entity.
func (*ContractDelete) Exec ¶
func (cd *ContractDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContractDelete) ExecX ¶
func (cd *ContractDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContractDelete) Where ¶
func (cd *ContractDelete) Where(ps ...predicate.Contract) *ContractDelete
Where appends a list predicates to the ContractDelete builder.
type ContractDeleteOne ¶
type ContractDeleteOne struct {
// contains filtered or unexported fields
}
ContractDeleteOne is the builder for deleting a single Contract entity.
func (*ContractDeleteOne) Exec ¶
func (cdo *ContractDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContractDeleteOne) ExecX ¶
func (cdo *ContractDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ContractEdge ¶
ContractEdge is the edge representation of Contract.
type ContractEdges ¶
type ContractEdges struct { // Transactions holds the value of the transactions edge. Transactions []*Transaction `json:"transactions,omitempty"` // contains filtered or unexported fields }
ContractEdges holds the relations/edges for other nodes in the graph.
func (ContractEdges) TransactionsOrErr ¶
func (e ContractEdges) TransactionsOrErr() ([]*Transaction, error)
TransactionsOrErr returns the Transactions value or an error if the edge was not loaded in eager-loading.
type ContractGroupBy ¶
type ContractGroupBy struct {
// contains filtered or unexported fields
}
ContractGroupBy is the group-by builder for Contract entities.
func (*ContractGroupBy) Aggregate ¶
func (cgb *ContractGroupBy) Aggregate(fns ...AggregateFunc) *ContractGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ContractGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContractGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContractGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContractGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContractGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContractGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContractGroupBy) Scan ¶
func (cgb *ContractGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ContractGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContractMutation ¶
type ContractMutation struct {
// contains filtered or unexported fields
}
ContractMutation represents an operation that mutates the Contract nodes in the graph.
func (*ContractMutation) AddField ¶
func (m *ContractMutation) 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 (*ContractMutation) AddTransactionIDs ¶
func (m *ContractMutation) AddTransactionIDs(ids ...string)
AddTransactionIDs adds the "transactions" edge to the Transaction entity by ids.
func (*ContractMutation) AddedEdges ¶
func (m *ContractMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ContractMutation) AddedField ¶
func (m *ContractMutation) 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 (*ContractMutation) AddedFields ¶
func (m *ContractMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ContractMutation) AddedIDs ¶
func (m *ContractMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ContractMutation) ClearEdge ¶
func (m *ContractMutation) 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 (*ContractMutation) ClearField ¶
func (m *ContractMutation) 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 (*ContractMutation) ClearTransactions ¶
func (m *ContractMutation) ClearTransactions()
ClearTransactions clears the "transactions" edge to the Transaction entity.
func (*ContractMutation) ClearedEdges ¶
func (m *ContractMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ContractMutation) ClearedFields ¶
func (m *ContractMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ContractMutation) Client ¶
func (m ContractMutation) 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 (*ContractMutation) CreatedAt ¶
func (m *ContractMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ContractMutation) EdgeCleared ¶
func (m *ContractMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ContractMutation) Field ¶
func (m *ContractMutation) 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 (*ContractMutation) FieldCleared ¶
func (m *ContractMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ContractMutation) Fields ¶
func (m *ContractMutation) 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 (*ContractMutation) GetType ¶
func (m *ContractMutation) GetType() (r contract.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ContractMutation) ID ¶
func (m *ContractMutation) ID() (id string, 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 (*ContractMutation) IDs ¶
func (m *ContractMutation) IDs(ctx context.Context) ([]string, 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 (*ContractMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Contract entity. If the Contract 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 (*ContractMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ContractMutation) OldType ¶
OldType returns the old "type" field's value of the Contract entity. If the Contract 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 (*ContractMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Contract entity. If the Contract 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 (*ContractMutation) RemoveTransactionIDs ¶
func (m *ContractMutation) RemoveTransactionIDs(ids ...string)
RemoveTransactionIDs removes the "transactions" edge to the Transaction entity by IDs.
func (*ContractMutation) RemovedEdges ¶
func (m *ContractMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ContractMutation) RemovedIDs ¶
func (m *ContractMutation) 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 (*ContractMutation) RemovedTransactionsIDs ¶
func (m *ContractMutation) RemovedTransactionsIDs() (ids []string)
RemovedTransactions returns the removed IDs of the "transactions" edge to the Transaction entity.
func (*ContractMutation) ResetCreatedAt ¶
func (m *ContractMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ContractMutation) ResetEdge ¶
func (m *ContractMutation) 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 (*ContractMutation) ResetField ¶
func (m *ContractMutation) 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 (*ContractMutation) ResetTransactions ¶
func (m *ContractMutation) ResetTransactions()
ResetTransactions resets all changes to the "transactions" edge.
func (*ContractMutation) ResetType ¶
func (m *ContractMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ContractMutation) ResetUpdatedAt ¶
func (m *ContractMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ContractMutation) SetCreatedAt ¶
func (m *ContractMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ContractMutation) SetField ¶
func (m *ContractMutation) 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 (*ContractMutation) SetID ¶
func (m *ContractMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Contract entities.
func (*ContractMutation) SetType ¶
func (m *ContractMutation) SetType(c contract.Type)
SetType sets the "type" field.
func (*ContractMutation) SetUpdatedAt ¶
func (m *ContractMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ContractMutation) TransactionsCleared ¶
func (m *ContractMutation) TransactionsCleared() bool
TransactionsCleared reports if the "transactions" edge to the Transaction entity was cleared.
func (*ContractMutation) TransactionsIDs ¶
func (m *ContractMutation) TransactionsIDs() (ids []string)
TransactionsIDs returns the "transactions" edge IDs in the mutation.
func (ContractMutation) Tx ¶
func (m ContractMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ContractMutation) Type ¶
func (m *ContractMutation) Type() string
Type returns the node type of this mutation (Contract).
func (*ContractMutation) UpdatedAt ¶
func (m *ContractMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ContractMutation) Where ¶
func (m *ContractMutation) Where(ps ...predicate.Contract)
Where appends a list predicates to the ContractMutation builder.
type ContractOrder ¶
type ContractOrder struct { Direction OrderDirection `json:"direction"` Field *ContractOrderField `json:"field"` }
ContractOrder defines the ordering of Contract.
type ContractOrderField ¶
type ContractOrderField struct {
// contains filtered or unexported fields
}
ContractOrderField defines the ordering field of Contract.
func (ContractOrderField) MarshalGQL ¶
func (f ContractOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (ContractOrderField) String ¶
func (f ContractOrderField) String() string
String implement fmt.Stringer interface.
func (*ContractOrderField) UnmarshalGQL ¶
func (f *ContractOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type ContractPaginateOption ¶
type ContractPaginateOption func(*contractPager) error
ContractPaginateOption enables pagination customization.
func WithContractFilter ¶
func WithContractFilter(filter func(*ContractQuery) (*ContractQuery, error)) ContractPaginateOption
WithContractFilter configures pagination filter.
func WithContractOrder ¶
func WithContractOrder(order *ContractOrder) ContractPaginateOption
WithContractOrder configures pagination ordering.
type ContractQuery ¶
type ContractQuery struct {
// contains filtered or unexported fields
}
ContractQuery is the builder for querying Contract entities.
func (*ContractQuery) All ¶
func (cq *ContractQuery) All(ctx context.Context) ([]*Contract, error)
All executes the query and returns a list of Contracts.
func (*ContractQuery) AllX ¶
func (cq *ContractQuery) AllX(ctx context.Context) []*Contract
AllX is like All, but panics if an error occurs.
func (*ContractQuery) Clone ¶
func (cq *ContractQuery) Clone() *ContractQuery
Clone returns a duplicate of the ContractQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ContractQuery) CollectFields ¶
func (c *ContractQuery) CollectFields(ctx context.Context, satisfies ...string) (*ContractQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ContractQuery) Count ¶
func (cq *ContractQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContractQuery) CountX ¶
func (cq *ContractQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContractQuery) Exist ¶
func (cq *ContractQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContractQuery) ExistX ¶
func (cq *ContractQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContractQuery) First ¶
func (cq *ContractQuery) First(ctx context.Context) (*Contract, error)
First returns the first Contract entity from the query. Returns a *NotFoundError when no Contract was found.
func (*ContractQuery) FirstID ¶
func (cq *ContractQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Contract ID from the query. Returns a *NotFoundError when no Contract ID was found.
func (*ContractQuery) FirstIDX ¶
func (cq *ContractQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ContractQuery) FirstX ¶
func (cq *ContractQuery) FirstX(ctx context.Context) *Contract
FirstX is like First, but panics if an error occurs.
func (*ContractQuery) GroupBy ¶
func (cq *ContractQuery) GroupBy(field string, fields ...string) *ContractGroupBy
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 { Type contract.Type `json:"type,omitempty"` Count int `json:"count,omitempty"` } client.Contract.Query(). GroupBy(contract.FieldType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ContractQuery) IDs ¶
func (cq *ContractQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Contract IDs.
func (*ContractQuery) IDsX ¶
func (cq *ContractQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ContractQuery) Limit ¶
func (cq *ContractQuery) Limit(limit int) *ContractQuery
Limit adds a limit step to the query.
func (*ContractQuery) Offset ¶
func (cq *ContractQuery) Offset(offset int) *ContractQuery
Offset adds an offset step to the query.
func (*ContractQuery) Only ¶
func (cq *ContractQuery) Only(ctx context.Context) (*Contract, error)
Only returns a single Contract entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Contract entity is found. Returns a *NotFoundError when no Contract entities are found.
func (*ContractQuery) OnlyID ¶
func (cq *ContractQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Contract ID in the query. Returns a *NotSingularError when more than one Contract ID is found. Returns a *NotFoundError when no entities are found.
func (*ContractQuery) OnlyIDX ¶
func (cq *ContractQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ContractQuery) OnlyX ¶
func (cq *ContractQuery) OnlyX(ctx context.Context) *Contract
OnlyX is like Only, but panics if an error occurs.
func (*ContractQuery) Order ¶
func (cq *ContractQuery) Order(o ...OrderFunc) *ContractQuery
Order adds an order step to the query.
func (*ContractQuery) Paginate ¶
func (c *ContractQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ContractPaginateOption, ) (*ContractConnection, error)
Paginate executes the query and returns a relay based cursor connection to Contract.
func (*ContractQuery) QueryTransactions ¶
func (cq *ContractQuery) QueryTransactions() *TransactionQuery
QueryTransactions chains the current query on the "transactions" edge.
func (*ContractQuery) Select ¶
func (cq *ContractQuery) Select(fields ...string) *ContractSelect
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 { Type contract.Type `json:"type,omitempty"` } client.Contract.Query(). Select(contract.FieldType). Scan(ctx, &v)
func (*ContractQuery) Unique ¶
func (cq *ContractQuery) Unique(unique bool) *ContractQuery
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 (*ContractQuery) Where ¶
func (cq *ContractQuery) Where(ps ...predicate.Contract) *ContractQuery
Where adds a new predicate for the ContractQuery builder.
func (*ContractQuery) WithTransactions ¶
func (cq *ContractQuery) WithTransactions(opts ...func(*TransactionQuery)) *ContractQuery
WithTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" edge. The optional arguments are used to configure the query builder of the edge.
type ContractSelect ¶
type ContractSelect struct { *ContractQuery // contains filtered or unexported fields }
ContractSelect is the builder for selecting fields of Contract entities.
func (*ContractSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContractSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContractSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContractSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContractSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContractSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContractSelect) Scan ¶
func (cs *ContractSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ContractSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContractUpdate ¶
type ContractUpdate struct {
// contains filtered or unexported fields
}
ContractUpdate is the builder for updating Contract entities.
func (*ContractUpdate) AddTransactionIDs ¶
func (cu *ContractUpdate) AddTransactionIDs(ids ...string) *ContractUpdate
AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.
func (*ContractUpdate) AddTransactions ¶
func (cu *ContractUpdate) AddTransactions(t ...*Transaction) *ContractUpdate
AddTransactions adds the "transactions" edges to the Transaction entity.
func (*ContractUpdate) ClearTransactions ¶
func (cu *ContractUpdate) ClearTransactions() *ContractUpdate
ClearTransactions clears all "transactions" edges to the Transaction entity.
func (*ContractUpdate) Exec ¶
func (cu *ContractUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContractUpdate) ExecX ¶
func (cu *ContractUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContractUpdate) Mutation ¶
func (cu *ContractUpdate) Mutation() *ContractMutation
Mutation returns the ContractMutation object of the builder.
func (*ContractUpdate) RemoveTransactionIDs ¶
func (cu *ContractUpdate) RemoveTransactionIDs(ids ...string) *ContractUpdate
RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.
func (*ContractUpdate) RemoveTransactions ¶
func (cu *ContractUpdate) RemoveTransactions(t ...*Transaction) *ContractUpdate
RemoveTransactions removes "transactions" edges to Transaction entities.
func (*ContractUpdate) Save ¶
func (cu *ContractUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ContractUpdate) SaveX ¶
func (cu *ContractUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContractUpdate) SetCreatedAt ¶
func (cu *ContractUpdate) SetCreatedAt(t time.Time) *ContractUpdate
SetCreatedAt sets the "created_at" field.
func (*ContractUpdate) SetNillableCreatedAt ¶
func (cu *ContractUpdate) SetNillableCreatedAt(t *time.Time) *ContractUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ContractUpdate) SetNillableType ¶
func (cu *ContractUpdate) SetNillableType(c *contract.Type) *ContractUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*ContractUpdate) SetType ¶
func (cu *ContractUpdate) SetType(c contract.Type) *ContractUpdate
SetType sets the "type" field.
func (*ContractUpdate) SetUpdatedAt ¶
func (cu *ContractUpdate) SetUpdatedAt(t time.Time) *ContractUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ContractUpdate) Where ¶
func (cu *ContractUpdate) Where(ps ...predicate.Contract) *ContractUpdate
Where appends a list predicates to the ContractUpdate builder.
type ContractUpdateOne ¶
type ContractUpdateOne struct {
// contains filtered or unexported fields
}
ContractUpdateOne is the builder for updating a single Contract entity.
func (*ContractUpdateOne) AddTransactionIDs ¶
func (cuo *ContractUpdateOne) AddTransactionIDs(ids ...string) *ContractUpdateOne
AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.
func (*ContractUpdateOne) AddTransactions ¶
func (cuo *ContractUpdateOne) AddTransactions(t ...*Transaction) *ContractUpdateOne
AddTransactions adds the "transactions" edges to the Transaction entity.
func (*ContractUpdateOne) ClearTransactions ¶
func (cuo *ContractUpdateOne) ClearTransactions() *ContractUpdateOne
ClearTransactions clears all "transactions" edges to the Transaction entity.
func (*ContractUpdateOne) Exec ¶
func (cuo *ContractUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContractUpdateOne) ExecX ¶
func (cuo *ContractUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContractUpdateOne) Mutation ¶
func (cuo *ContractUpdateOne) Mutation() *ContractMutation
Mutation returns the ContractMutation object of the builder.
func (*ContractUpdateOne) RemoveTransactionIDs ¶
func (cuo *ContractUpdateOne) RemoveTransactionIDs(ids ...string) *ContractUpdateOne
RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.
func (*ContractUpdateOne) RemoveTransactions ¶
func (cuo *ContractUpdateOne) RemoveTransactions(t ...*Transaction) *ContractUpdateOne
RemoveTransactions removes "transactions" edges to Transaction entities.
func (*ContractUpdateOne) Save ¶
func (cuo *ContractUpdateOne) Save(ctx context.Context) (*Contract, error)
Save executes the query and returns the updated Contract entity.
func (*ContractUpdateOne) SaveX ¶
func (cuo *ContractUpdateOne) SaveX(ctx context.Context) *Contract
SaveX is like Save, but panics if an error occurs.
func (*ContractUpdateOne) Select ¶
func (cuo *ContractUpdateOne) Select(field string, fields ...string) *ContractUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ContractUpdateOne) SetCreatedAt ¶
func (cuo *ContractUpdateOne) SetCreatedAt(t time.Time) *ContractUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ContractUpdateOne) SetNillableCreatedAt ¶
func (cuo *ContractUpdateOne) SetNillableCreatedAt(t *time.Time) *ContractUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ContractUpdateOne) SetNillableType ¶
func (cuo *ContractUpdateOne) SetNillableType(c *contract.Type) *ContractUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*ContractUpdateOne) SetType ¶
func (cuo *ContractUpdateOne) SetType(c contract.Type) *ContractUpdateOne
SetType sets the "type" field.
func (*ContractUpdateOne) SetUpdatedAt ¶
func (cuo *ContractUpdateOne) SetUpdatedAt(t time.Time) *ContractUpdateOne
SetUpdatedAt sets the "updated_at" field.
type ContractUpsert ¶
ContractUpsert is the "OnConflict" setter.
func (*ContractUpsert) SetCreatedAt ¶
func (u *ContractUpsert) SetCreatedAt(v time.Time) *ContractUpsert
SetCreatedAt sets the "created_at" field.
func (*ContractUpsert) SetType ¶
func (u *ContractUpsert) SetType(v contract.Type) *ContractUpsert
SetType sets the "type" field.
func (*ContractUpsert) SetUpdatedAt ¶
func (u *ContractUpsert) SetUpdatedAt(v time.Time) *ContractUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ContractUpsert) UpdateCreatedAt ¶
func (u *ContractUpsert) UpdateCreatedAt() *ContractUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ContractUpsert) UpdateType ¶
func (u *ContractUpsert) UpdateType() *ContractUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*ContractUpsert) UpdateUpdatedAt ¶
func (u *ContractUpsert) UpdateUpdatedAt() *ContractUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ContractUpsertBulk ¶
type ContractUpsertBulk struct {
// contains filtered or unexported fields
}
ContractUpsertBulk is the builder for "upsert"-ing a bulk of Contract nodes.
func (*ContractUpsertBulk) DoNothing ¶
func (u *ContractUpsertBulk) DoNothing() *ContractUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ContractUpsertBulk) Exec ¶
func (u *ContractUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContractUpsertBulk) ExecX ¶
func (u *ContractUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContractUpsertBulk) Ignore ¶
func (u *ContractUpsertBulk) Ignore() *ContractUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Contract.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ContractUpsertBulk) SetCreatedAt ¶
func (u *ContractUpsertBulk) SetCreatedAt(v time.Time) *ContractUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*ContractUpsertBulk) SetType ¶
func (u *ContractUpsertBulk) SetType(v contract.Type) *ContractUpsertBulk
SetType sets the "type" field.
func (*ContractUpsertBulk) SetUpdatedAt ¶
func (u *ContractUpsertBulk) SetUpdatedAt(v time.Time) *ContractUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ContractUpsertBulk) Update ¶
func (u *ContractUpsertBulk) Update(set func(*ContractUpsert)) *ContractUpsertBulk
Update allows overriding fields `UPDATE` values. See the ContractCreateBulk.OnConflict documentation for more info.
func (*ContractUpsertBulk) UpdateCreatedAt ¶
func (u *ContractUpsertBulk) UpdateCreatedAt() *ContractUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ContractUpsertBulk) UpdateNewValues ¶
func (u *ContractUpsertBulk) UpdateNewValues() *ContractUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Contract.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(contract.FieldID) }), ). Exec(ctx)
func (*ContractUpsertBulk) UpdateType ¶
func (u *ContractUpsertBulk) UpdateType() *ContractUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*ContractUpsertBulk) UpdateUpdatedAt ¶
func (u *ContractUpsertBulk) UpdateUpdatedAt() *ContractUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ContractUpsertOne ¶
type ContractUpsertOne struct {
// contains filtered or unexported fields
}
ContractUpsertOne is the builder for "upsert"-ing
one Contract node.
func (*ContractUpsertOne) DoNothing ¶
func (u *ContractUpsertOne) DoNothing() *ContractUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ContractUpsertOne) Exec ¶
func (u *ContractUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ContractUpsertOne) ExecX ¶
func (u *ContractUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContractUpsertOne) ID ¶
func (u *ContractUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ContractUpsertOne) IDX ¶
func (u *ContractUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*ContractUpsertOne) Ignore ¶
func (u *ContractUpsertOne) Ignore() *ContractUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Contract.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ContractUpsertOne) SetCreatedAt ¶
func (u *ContractUpsertOne) SetCreatedAt(v time.Time) *ContractUpsertOne
SetCreatedAt sets the "created_at" field.
func (*ContractUpsertOne) SetType ¶
func (u *ContractUpsertOne) SetType(v contract.Type) *ContractUpsertOne
SetType sets the "type" field.
func (*ContractUpsertOne) SetUpdatedAt ¶
func (u *ContractUpsertOne) SetUpdatedAt(v time.Time) *ContractUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ContractUpsertOne) Update ¶
func (u *ContractUpsertOne) Update(set func(*ContractUpsert)) *ContractUpsertOne
Update allows overriding fields `UPDATE` values. See the ContractCreate.OnConflict documentation for more info.
func (*ContractUpsertOne) UpdateCreatedAt ¶
func (u *ContractUpsertOne) UpdateCreatedAt() *ContractUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ContractUpsertOne) UpdateNewValues ¶
func (u *ContractUpsertOne) UpdateNewValues() *ContractUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Contract.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(contract.FieldID) }), ). Exec(ctx)
func (*ContractUpsertOne) UpdateType ¶
func (u *ContractUpsertOne) UpdateType() *ContractUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*ContractUpsertOne) UpdateUpdatedAt ¶
func (u *ContractUpsertOne) UpdateUpdatedAt() *ContractUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ContractWhereInput ¶
type ContractWhereInput struct { Not *ContractWhereInput `json:"not,omitempty"` Or []*ContractWhereInput `json:"or,omitempty"` And []*ContractWhereInput `json:"and,omitempty"` // "id" field predicates. ID *string `json:"id,omitempty"` IDNEQ *string `json:"idNEQ,omitempty"` IDIn []string `json:"idIn,omitempty"` IDNotIn []string `json:"idNotIn,omitempty"` IDGT *string `json:"idGT,omitempty"` IDGTE *string `json:"idGTE,omitempty"` IDLT *string `json:"idLT,omitempty"` IDLTE *string `json:"idLTE,omitempty"` // "type" field predicates. Type *contract.Type `json:"type,omitempty"` TypeNEQ *contract.Type `json:"typeNEQ,omitempty"` TypeIn []contract.Type `json:"typeIn,omitempty"` TypeNotIn []contract.Type `json:"typeNotIn,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "transactions" edge predicates. HasTransactions *bool `json:"hasTransactions,omitempty"` HasTransactionsWith []*TransactionWhereInput `json:"hasTransactionsWith,omitempty"` }
ContractWhereInput represents a where input for filtering Contract queries.
func (*ContractWhereInput) Filter ¶
func (i *ContractWhereInput) Filter(q *ContractQuery) (*ContractQuery, error)
Filter applies the ContractWhereInput filter on the ContractQuery builder.
type Cursor ¶
Cursor of an edge type.
func (Cursor) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Cursor) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.
type Edge ¶
type Edge struct { Type string `json:"type,omitempty"` // edge type. Name string `json:"name,omitempty"` // edge name. IDs []string `json:"ids,omitempty"` // node ids (where this edge point to). }
Edges between two nodes.
type Event ¶
type Event struct { // ID of the ent. ID string `json:"id,omitempty"` // From holds the value of the "from" field. From string `json:"from,omitempty"` // Keys holds the value of the "keys" field. Keys []*types.Felt `json:"keys,omitempty"` // Data holds the value of the "data" field. Data []*types.Felt `json:"data,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EventQuery when eager-loading is set. Edges EventEdges `json:"edges"` // contains filtered or unexported fields }
Event is the model entity for the Event schema.
func (*Event) QueryTransaction ¶
func (e *Event) QueryTransaction() *TransactionQuery
QueryTransaction queries the "transaction" edge of the Event entity.
func (*Event) ToEdge ¶
func (e *Event) ToEdge(order *EventOrder) *EventEdge
ToEdge converts Event into EventEdge.
func (*Event) Transaction ¶
func (e *Event) Transaction(ctx context.Context) (*Transaction, error)
func (*Event) Unwrap ¶
Unwrap unwraps the Event 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 (*Event) Update ¶
func (e *Event) Update() *EventUpdateOne
Update returns a builder for updating this Event. Note that you need to call Event.Unwrap() before calling this method if this Event was returned from a transaction, and the transaction was committed or rolled back.
type EventClient ¶
type EventClient struct {
// contains filtered or unexported fields
}
EventClient is a client for the Event schema.
func NewEventClient ¶
func NewEventClient(c config) *EventClient
NewEventClient returns a client for the Event from the given config.
func (*EventClient) Create ¶
func (c *EventClient) Create() *EventCreate
Create returns a builder for creating a Event entity.
func (*EventClient) CreateBulk ¶
func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
CreateBulk returns a builder for creating a bulk of Event entities.
func (*EventClient) Delete ¶
func (c *EventClient) Delete() *EventDelete
Delete returns a delete builder for Event.
func (*EventClient) DeleteOne ¶
func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EventClient) DeleteOneID ¶
func (c *EventClient) DeleteOneID(id string) *EventDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*EventClient) GetX ¶
func (c *EventClient) GetX(ctx context.Context, id string) *Event
GetX is like Get, but panics if an error occurs.
func (*EventClient) Query ¶
func (c *EventClient) Query() *EventQuery
Query returns a query builder for Event.
func (*EventClient) QueryTransaction ¶
func (c *EventClient) QueryTransaction(e *Event) *TransactionQuery
QueryTransaction queries the transaction edge of a Event.
func (*EventClient) Update ¶
func (c *EventClient) Update() *EventUpdate
Update returns an update builder for Event.
func (*EventClient) UpdateOne ¶
func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EventClient) UpdateOneID ¶
func (c *EventClient) UpdateOneID(id string) *EventUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EventClient) Use ¶
func (c *EventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `event.Hooks(f(g(h())))`.
type EventConnection ¶
type EventConnection struct { Edges []*EventEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
EventConnection is the connection containing edges to Event.
type EventCreate ¶
type EventCreate struct {
// contains filtered or unexported fields
}
EventCreate is the builder for creating a Event entity.
func (*EventCreate) Exec ¶
func (ec *EventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreate) ExecX ¶
func (ec *EventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventCreate) Mutation ¶
func (ec *EventCreate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventCreate) OnConflict ¶
func (ec *EventCreate) OnConflict(opts ...sql.ConflictOption) *EventUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Event.Create(). SetFrom(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.EventUpsert) { SetFrom(v+v). }). Exec(ctx)
func (*EventCreate) OnConflictColumns ¶
func (ec *EventCreate) OnConflictColumns(columns ...string) *EventUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*EventCreate) Save ¶
func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
Save creates the Event in the database.
func (*EventCreate) SaveX ¶
func (ec *EventCreate) SaveX(ctx context.Context) *Event
SaveX calls Save and panics if Save returns an error.
func (*EventCreate) SetData ¶
func (ec *EventCreate) SetData(t []*types.Felt) *EventCreate
SetData sets the "data" field.
func (*EventCreate) SetFrom ¶
func (ec *EventCreate) SetFrom(s string) *EventCreate
SetFrom sets the "from" field.
func (*EventCreate) SetID ¶
func (ec *EventCreate) SetID(s string) *EventCreate
SetID sets the "id" field.
func (*EventCreate) SetKeys ¶
func (ec *EventCreate) SetKeys(t []*types.Felt) *EventCreate
SetKeys sets the "keys" field.
func (*EventCreate) SetNillableTransactionID ¶
func (ec *EventCreate) SetNillableTransactionID(id *string) *EventCreate
SetNillableTransactionID sets the "transaction" edge to the Transaction entity by ID if the given value is not nil.
func (*EventCreate) SetTransaction ¶
func (ec *EventCreate) SetTransaction(t *Transaction) *EventCreate
SetTransaction sets the "transaction" edge to the Transaction entity.
func (*EventCreate) SetTransactionID ¶
func (ec *EventCreate) SetTransactionID(id string) *EventCreate
SetTransactionID sets the "transaction" edge to the Transaction entity by ID.
type EventCreateBulk ¶
type EventCreateBulk struct {
// contains filtered or unexported fields
}
EventCreateBulk is the builder for creating many Event entities in bulk.
func (*EventCreateBulk) Exec ¶
func (ecb *EventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreateBulk) ExecX ¶
func (ecb *EventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventCreateBulk) OnConflict ¶
func (ecb *EventCreateBulk) OnConflict(opts ...sql.ConflictOption) *EventUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Event.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.EventUpsert) { SetFrom(v+v). }). Exec(ctx)
func (*EventCreateBulk) OnConflictColumns ¶
func (ecb *EventCreateBulk) OnConflictColumns(columns ...string) *EventUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type EventDelete ¶
type EventDelete struct {
// contains filtered or unexported fields
}
EventDelete is the builder for deleting a Event entity.
func (*EventDelete) Exec ¶
func (ed *EventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EventDelete) ExecX ¶
func (ed *EventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EventDelete) Where ¶
func (ed *EventDelete) Where(ps ...predicate.Event) *EventDelete
Where appends a list predicates to the EventDelete builder.
type EventDeleteOne ¶
type EventDeleteOne struct {
// contains filtered or unexported fields
}
EventDeleteOne is the builder for deleting a single Event entity.
func (*EventDeleteOne) Exec ¶
func (edo *EventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EventDeleteOne) ExecX ¶
func (edo *EventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EventEdges ¶
type EventEdges struct { // Transaction holds the value of the transaction edge. Transaction *Transaction `json:"transaction,omitempty"` // contains filtered or unexported fields }
EventEdges holds the relations/edges for other nodes in the graph.
func (EventEdges) TransactionOrErr ¶
func (e EventEdges) TransactionOrErr() (*Transaction, error)
TransactionOrErr returns the Transaction value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type EventGroupBy ¶
type EventGroupBy struct {
// contains filtered or unexported fields
}
EventGroupBy is the group-by builder for Event entities.
func (*EventGroupBy) Aggregate ¶
func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EventGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Scan ¶
func (egb *EventGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*EventGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EventMutation ¶
type EventMutation struct {
// contains filtered or unexported fields
}
EventMutation represents an operation that mutates the Event nodes in the graph.
func (*EventMutation) AddField ¶
func (m *EventMutation) 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 (*EventMutation) AddedEdges ¶
func (m *EventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EventMutation) AddedField ¶
func (m *EventMutation) 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 (*EventMutation) AddedFields ¶
func (m *EventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EventMutation) AddedIDs ¶
func (m *EventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EventMutation) ClearEdge ¶
func (m *EventMutation) 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 (*EventMutation) ClearField ¶
func (m *EventMutation) 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 (*EventMutation) ClearTransaction ¶
func (m *EventMutation) ClearTransaction()
ClearTransaction clears the "transaction" edge to the Transaction entity.
func (*EventMutation) ClearedEdges ¶
func (m *EventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EventMutation) ClearedFields ¶
func (m *EventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EventMutation) Client ¶
func (m EventMutation) 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 (*EventMutation) Data ¶
func (m *EventMutation) Data() (r []*types.Felt, exists bool)
Data returns the value of the "data" field in the mutation.
func (*EventMutation) EdgeCleared ¶
func (m *EventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EventMutation) Field ¶
func (m *EventMutation) 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 (*EventMutation) FieldCleared ¶
func (m *EventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EventMutation) Fields ¶
func (m *EventMutation) 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 (*EventMutation) From ¶
func (m *EventMutation) From() (r string, exists bool)
From returns the value of the "from" field in the mutation.
func (*EventMutation) ID ¶
func (m *EventMutation) ID() (id string, 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 (*EventMutation) IDs ¶
func (m *EventMutation) IDs(ctx context.Context) ([]string, 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 (*EventMutation) Keys ¶
func (m *EventMutation) Keys() (r []*types.Felt, exists bool)
Keys returns the value of the "keys" field in the mutation.
func (*EventMutation) OldData ¶
OldData returns the old "data" field's value of the Event entity. If the Event 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 (*EventMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*EventMutation) OldFrom ¶
func (m *EventMutation) OldFrom(ctx context.Context) (v string, err error)
OldFrom returns the old "from" field's value of the Event entity. If the Event 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 (*EventMutation) OldKeys ¶
OldKeys returns the old "keys" field's value of the Event entity. If the Event 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 (*EventMutation) RemovedEdges ¶
func (m *EventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EventMutation) RemovedIDs ¶
func (m *EventMutation) 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 (*EventMutation) ResetData ¶
func (m *EventMutation) ResetData()
ResetData resets all changes to the "data" field.
func (*EventMutation) ResetEdge ¶
func (m *EventMutation) 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 (*EventMutation) ResetField ¶
func (m *EventMutation) 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 (*EventMutation) ResetFrom ¶
func (m *EventMutation) ResetFrom()
ResetFrom resets all changes to the "from" field.
func (*EventMutation) ResetKeys ¶
func (m *EventMutation) ResetKeys()
ResetKeys resets all changes to the "keys" field.
func (*EventMutation) ResetTransaction ¶
func (m *EventMutation) ResetTransaction()
ResetTransaction resets all changes to the "transaction" edge.
func (*EventMutation) SetData ¶
func (m *EventMutation) SetData(t []*types.Felt)
SetData sets the "data" field.
func (*EventMutation) SetField ¶
func (m *EventMutation) 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 (*EventMutation) SetFrom ¶
func (m *EventMutation) SetFrom(s string)
SetFrom sets the "from" field.
func (*EventMutation) SetID ¶
func (m *EventMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Event entities.
func (*EventMutation) SetKeys ¶
func (m *EventMutation) SetKeys(t []*types.Felt)
SetKeys sets the "keys" field.
func (*EventMutation) SetTransactionID ¶
func (m *EventMutation) SetTransactionID(id string)
SetTransactionID sets the "transaction" edge to the Transaction entity by id.
func (*EventMutation) TransactionCleared ¶
func (m *EventMutation) TransactionCleared() bool
TransactionCleared reports if the "transaction" edge to the Transaction entity was cleared.
func (*EventMutation) TransactionID ¶
func (m *EventMutation) TransactionID() (id string, exists bool)
TransactionID returns the "transaction" edge ID in the mutation.
func (*EventMutation) TransactionIDs ¶
func (m *EventMutation) TransactionIDs() (ids []string)
TransactionIDs returns the "transaction" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TransactionID instead. It exists only for internal usage by the builders.
func (EventMutation) Tx ¶
func (m EventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EventMutation) Type ¶
func (m *EventMutation) Type() string
Type returns the node type of this mutation (Event).
func (*EventMutation) Where ¶
func (m *EventMutation) Where(ps ...predicate.Event)
Where appends a list predicates to the EventMutation builder.
type EventOrder ¶
type EventOrder struct { Direction OrderDirection `json:"direction"` Field *EventOrderField `json:"field"` }
EventOrder defines the ordering of Event.
type EventOrderField ¶
type EventOrderField struct {
// contains filtered or unexported fields
}
EventOrderField defines the ordering field of Event.
type EventPaginateOption ¶
type EventPaginateOption func(*eventPager) error
EventPaginateOption enables pagination customization.
func WithEventFilter ¶
func WithEventFilter(filter func(*EventQuery) (*EventQuery, error)) EventPaginateOption
WithEventFilter configures pagination filter.
func WithEventOrder ¶
func WithEventOrder(order *EventOrder) EventPaginateOption
WithEventOrder configures pagination ordering.
type EventQuery ¶
type EventQuery struct {
// contains filtered or unexported fields
}
EventQuery is the builder for querying Event entities.
func (*EventQuery) All ¶
func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
All executes the query and returns a list of Events.
func (*EventQuery) AllX ¶
func (eq *EventQuery) AllX(ctx context.Context) []*Event
AllX is like All, but panics if an error occurs.
func (*EventQuery) Clone ¶
func (eq *EventQuery) Clone() *EventQuery
Clone returns a duplicate of the EventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EventQuery) CollectFields ¶
func (e *EventQuery) CollectFields(ctx context.Context, satisfies ...string) (*EventQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*EventQuery) Count ¶
func (eq *EventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EventQuery) CountX ¶
func (eq *EventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EventQuery) Exist ¶
func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EventQuery) ExistX ¶
func (eq *EventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EventQuery) First ¶
func (eq *EventQuery) First(ctx context.Context) (*Event, error)
First returns the first Event entity from the query. Returns a *NotFoundError when no Event was found.
func (*EventQuery) FirstID ¶
func (eq *EventQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Event ID from the query. Returns a *NotFoundError when no Event ID was found.
func (*EventQuery) FirstIDX ¶
func (eq *EventQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*EventQuery) FirstX ¶
func (eq *EventQuery) FirstX(ctx context.Context) *Event
FirstX is like First, but panics if an error occurs.
func (*EventQuery) GroupBy ¶
func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
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 { From string `json:"from,omitempty"` Count int `json:"count,omitempty"` } client.Event.Query(). GroupBy(event.FieldFrom). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EventQuery) IDs ¶
func (eq *EventQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Event IDs.
func (*EventQuery) IDsX ¶
func (eq *EventQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*EventQuery) Limit ¶
func (eq *EventQuery) Limit(limit int) *EventQuery
Limit adds a limit step to the query.
func (*EventQuery) Offset ¶
func (eq *EventQuery) Offset(offset int) *EventQuery
Offset adds an offset step to the query.
func (*EventQuery) Only ¶
func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
Only returns a single Event entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Event entity is found. Returns a *NotFoundError when no Event entities are found.
func (*EventQuery) OnlyID ¶
func (eq *EventQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Event ID in the query. Returns a *NotSingularError when more than one Event ID is found. Returns a *NotFoundError when no entities are found.
func (*EventQuery) OnlyIDX ¶
func (eq *EventQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EventQuery) OnlyX ¶
func (eq *EventQuery) OnlyX(ctx context.Context) *Event
OnlyX is like Only, but panics if an error occurs.
func (*EventQuery) Order ¶
func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery
Order adds an order step to the query.
func (*EventQuery) Paginate ¶
func (e *EventQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...EventPaginateOption, ) (*EventConnection, error)
Paginate executes the query and returns a relay based cursor connection to Event.
func (*EventQuery) QueryTransaction ¶
func (eq *EventQuery) QueryTransaction() *TransactionQuery
QueryTransaction chains the current query on the "transaction" edge.
func (*EventQuery) Select ¶
func (eq *EventQuery) Select(fields ...string) *EventSelect
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 { From string `json:"from,omitempty"` } client.Event.Query(). Select(event.FieldFrom). Scan(ctx, &v)
func (*EventQuery) Unique ¶
func (eq *EventQuery) Unique(unique bool) *EventQuery
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 (*EventQuery) Where ¶
func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
Where adds a new predicate for the EventQuery builder.
func (*EventQuery) WithTransaction ¶
func (eq *EventQuery) WithTransaction(opts ...func(*TransactionQuery)) *EventQuery
WithTransaction tells the query-builder to eager-load the nodes that are connected to the "transaction" edge. The optional arguments are used to configure the query builder of the edge.
type EventSelect ¶
type EventSelect struct { *EventQuery // contains filtered or unexported fields }
EventSelect is the builder for selecting fields of Event entities.
func (*EventSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventSelect) Scan ¶
func (es *EventSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*EventSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EventUpdate ¶
type EventUpdate struct {
// contains filtered or unexported fields
}
EventUpdate is the builder for updating Event entities.
func (*EventUpdate) ClearTransaction ¶
func (eu *EventUpdate) ClearTransaction() *EventUpdate
ClearTransaction clears the "transaction" edge to the Transaction entity.
func (*EventUpdate) Exec ¶
func (eu *EventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpdate) ExecX ¶
func (eu *EventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdate) Mutation ¶
func (eu *EventUpdate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdate) Save ¶
func (eu *EventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EventUpdate) SaveX ¶
func (eu *EventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EventUpdate) SetData ¶
func (eu *EventUpdate) SetData(t []*types.Felt) *EventUpdate
SetData sets the "data" field.
func (*EventUpdate) SetFrom ¶
func (eu *EventUpdate) SetFrom(s string) *EventUpdate
SetFrom sets the "from" field.
func (*EventUpdate) SetKeys ¶
func (eu *EventUpdate) SetKeys(t []*types.Felt) *EventUpdate
SetKeys sets the "keys" field.
func (*EventUpdate) SetNillableTransactionID ¶
func (eu *EventUpdate) SetNillableTransactionID(id *string) *EventUpdate
SetNillableTransactionID sets the "transaction" edge to the Transaction entity by ID if the given value is not nil.
func (*EventUpdate) SetTransaction ¶
func (eu *EventUpdate) SetTransaction(t *Transaction) *EventUpdate
SetTransaction sets the "transaction" edge to the Transaction entity.
func (*EventUpdate) SetTransactionID ¶
func (eu *EventUpdate) SetTransactionID(id string) *EventUpdate
SetTransactionID sets the "transaction" edge to the Transaction entity by ID.
func (*EventUpdate) Where ¶
func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
Where appends a list predicates to the EventUpdate builder.
type EventUpdateOne ¶
type EventUpdateOne struct {
// contains filtered or unexported fields
}
EventUpdateOne is the builder for updating a single Event entity.
func (*EventUpdateOne) ClearTransaction ¶
func (euo *EventUpdateOne) ClearTransaction() *EventUpdateOne
ClearTransaction clears the "transaction" edge to the Transaction entity.
func (*EventUpdateOne) Exec ¶
func (euo *EventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EventUpdateOne) ExecX ¶
func (euo *EventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdateOne) Mutation ¶
func (euo *EventUpdateOne) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdateOne) Save ¶
func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
Save executes the query and returns the updated Event entity.
func (*EventUpdateOne) SaveX ¶
func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
SaveX is like Save, but panics if an error occurs.
func (*EventUpdateOne) Select ¶
func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EventUpdateOne) SetData ¶
func (euo *EventUpdateOne) SetData(t []*types.Felt) *EventUpdateOne
SetData sets the "data" field.
func (*EventUpdateOne) SetFrom ¶
func (euo *EventUpdateOne) SetFrom(s string) *EventUpdateOne
SetFrom sets the "from" field.
func (*EventUpdateOne) SetKeys ¶
func (euo *EventUpdateOne) SetKeys(t []*types.Felt) *EventUpdateOne
SetKeys sets the "keys" field.
func (*EventUpdateOne) SetNillableTransactionID ¶
func (euo *EventUpdateOne) SetNillableTransactionID(id *string) *EventUpdateOne
SetNillableTransactionID sets the "transaction" edge to the Transaction entity by ID if the given value is not nil.
func (*EventUpdateOne) SetTransaction ¶
func (euo *EventUpdateOne) SetTransaction(t *Transaction) *EventUpdateOne
SetTransaction sets the "transaction" edge to the Transaction entity.
func (*EventUpdateOne) SetTransactionID ¶
func (euo *EventUpdateOne) SetTransactionID(id string) *EventUpdateOne
SetTransactionID sets the "transaction" edge to the Transaction entity by ID.
type EventUpsert ¶
EventUpsert is the "OnConflict" setter.
func (*EventUpsert) SetData ¶
func (u *EventUpsert) SetData(v []*types.Felt) *EventUpsert
SetData sets the "data" field.
func (*EventUpsert) SetFrom ¶
func (u *EventUpsert) SetFrom(v string) *EventUpsert
SetFrom sets the "from" field.
func (*EventUpsert) SetKeys ¶
func (u *EventUpsert) SetKeys(v []*types.Felt) *EventUpsert
SetKeys sets the "keys" field.
func (*EventUpsert) UpdateData ¶
func (u *EventUpsert) UpdateData() *EventUpsert
UpdateData sets the "data" field to the value that was provided on create.
func (*EventUpsert) UpdateFrom ¶
func (u *EventUpsert) UpdateFrom() *EventUpsert
UpdateFrom sets the "from" field to the value that was provided on create.
func (*EventUpsert) UpdateKeys ¶
func (u *EventUpsert) UpdateKeys() *EventUpsert
UpdateKeys sets the "keys" field to the value that was provided on create.
type EventUpsertBulk ¶
type EventUpsertBulk struct {
// contains filtered or unexported fields
}
EventUpsertBulk is the builder for "upsert"-ing a bulk of Event nodes.
func (*EventUpsertBulk) DoNothing ¶
func (u *EventUpsertBulk) DoNothing() *EventUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*EventUpsertBulk) Exec ¶
func (u *EventUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpsertBulk) ExecX ¶
func (u *EventUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpsertBulk) Ignore ¶
func (u *EventUpsertBulk) Ignore() *EventUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*EventUpsertBulk) SetData ¶
func (u *EventUpsertBulk) SetData(v []*types.Felt) *EventUpsertBulk
SetData sets the "data" field.
func (*EventUpsertBulk) SetFrom ¶
func (u *EventUpsertBulk) SetFrom(v string) *EventUpsertBulk
SetFrom sets the "from" field.
func (*EventUpsertBulk) SetKeys ¶
func (u *EventUpsertBulk) SetKeys(v []*types.Felt) *EventUpsertBulk
SetKeys sets the "keys" field.
func (*EventUpsertBulk) Update ¶
func (u *EventUpsertBulk) Update(set func(*EventUpsert)) *EventUpsertBulk
Update allows overriding fields `UPDATE` values. See the EventCreateBulk.OnConflict documentation for more info.
func (*EventUpsertBulk) UpdateData ¶
func (u *EventUpsertBulk) UpdateData() *EventUpsertBulk
UpdateData sets the "data" field to the value that was provided on create.
func (*EventUpsertBulk) UpdateFrom ¶
func (u *EventUpsertBulk) UpdateFrom() *EventUpsertBulk
UpdateFrom sets the "from" field to the value that was provided on create.
func (*EventUpsertBulk) UpdateKeys ¶
func (u *EventUpsertBulk) UpdateKeys() *EventUpsertBulk
UpdateKeys sets the "keys" field to the value that was provided on create.
func (*EventUpsertBulk) UpdateNewValues ¶
func (u *EventUpsertBulk) UpdateNewValues() *EventUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Event.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(event.FieldID) }), ). Exec(ctx)
type EventUpsertOne ¶
type EventUpsertOne struct {
// contains filtered or unexported fields
}
EventUpsertOne is the builder for "upsert"-ing
one Event node.
func (*EventUpsertOne) DoNothing ¶
func (u *EventUpsertOne) DoNothing() *EventUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*EventUpsertOne) Exec ¶
func (u *EventUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpsertOne) ExecX ¶
func (u *EventUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpsertOne) ID ¶
func (u *EventUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*EventUpsertOne) IDX ¶
func (u *EventUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*EventUpsertOne) Ignore ¶
func (u *EventUpsertOne) Ignore() *EventUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*EventUpsertOne) SetData ¶
func (u *EventUpsertOne) SetData(v []*types.Felt) *EventUpsertOne
SetData sets the "data" field.
func (*EventUpsertOne) SetFrom ¶
func (u *EventUpsertOne) SetFrom(v string) *EventUpsertOne
SetFrom sets the "from" field.
func (*EventUpsertOne) SetKeys ¶
func (u *EventUpsertOne) SetKeys(v []*types.Felt) *EventUpsertOne
SetKeys sets the "keys" field.
func (*EventUpsertOne) Update ¶
func (u *EventUpsertOne) Update(set func(*EventUpsert)) *EventUpsertOne
Update allows overriding fields `UPDATE` values. See the EventCreate.OnConflict documentation for more info.
func (*EventUpsertOne) UpdateData ¶
func (u *EventUpsertOne) UpdateData() *EventUpsertOne
UpdateData sets the "data" field to the value that was provided on create.
func (*EventUpsertOne) UpdateFrom ¶
func (u *EventUpsertOne) UpdateFrom() *EventUpsertOne
UpdateFrom sets the "from" field to the value that was provided on create.
func (*EventUpsertOne) UpdateKeys ¶
func (u *EventUpsertOne) UpdateKeys() *EventUpsertOne
UpdateKeys sets the "keys" field to the value that was provided on create.
func (*EventUpsertOne) UpdateNewValues ¶
func (u *EventUpsertOne) UpdateNewValues() *EventUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Event.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(event.FieldID) }), ). Exec(ctx)
type EventWhereInput ¶
type EventWhereInput struct { Not *EventWhereInput `json:"not,omitempty"` Or []*EventWhereInput `json:"or,omitempty"` And []*EventWhereInput `json:"and,omitempty"` // "id" field predicates. ID *string `json:"id,omitempty"` IDNEQ *string `json:"idNEQ,omitempty"` IDIn []string `json:"idIn,omitempty"` IDNotIn []string `json:"idNotIn,omitempty"` IDGT *string `json:"idGT,omitempty"` IDGTE *string `json:"idGTE,omitempty"` IDLT *string `json:"idLT,omitempty"` IDLTE *string `json:"idLTE,omitempty"` // "from" field predicates. From *string `json:"from,omitempty"` FromNEQ *string `json:"fromNEQ,omitempty"` FromIn []string `json:"fromIn,omitempty"` FromNotIn []string `json:"fromNotIn,omitempty"` FromGT *string `json:"fromGT,omitempty"` FromGTE *string `json:"fromGTE,omitempty"` FromLT *string `json:"fromLT,omitempty"` FromLTE *string `json:"fromLTE,omitempty"` FromContains *string `json:"fromContains,omitempty"` FromHasPrefix *string `json:"fromHasPrefix,omitempty"` FromHasSuffix *string `json:"fromHasSuffix,omitempty"` FromEqualFold *string `json:"fromEqualFold,omitempty"` FromContainsFold *string `json:"fromContainsFold,omitempty"` // "transaction" edge predicates. HasTransaction *bool `json:"hasTransaction,omitempty"` HasTransactionWith []*TransactionWhereInput `json:"hasTransactionWith,omitempty"` }
EventWhereInput represents a where input for filtering Event queries.
func (*EventWhereInput) Filter ¶
func (i *EventWhereInput) Filter(q *EventQuery) (*EventQuery, error)
Filter applies the EventWhereInput filter on the EventQuery builder.
type Field ¶
type Field struct { Type string `json:"type,omitempty"` // field type. Name string `json:"name,omitempty"` // field name (as in struct). Value string `json:"value,omitempty"` // stringified value. }
Field of a node.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct { ID string `json:"id,omitempty"` // node id. Type string `json:"type,omitempty"` // node type. Fields []*Field `json:"fields,omitempty"` // node fields. Edges []*Edge `json:"edges,omitempty"` // node edges. }
Node in the graph.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) MarshalGQL ¶
func (o OrderDirection) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (*OrderDirection) UnmarshalGQL ¶
func (o *OrderDirection) UnmarshalGQL(val interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type PageInfo ¶
type PageInfo struct { HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` StartCursor *Cursor `json:"startCursor"` EndCursor *Cursor `json:"endCursor"` }
PageInfo of a connection type.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Transaction ¶
type Transaction struct { // ID of the ent. ID string `json:"id,omitempty"` // ContractAddress holds the value of the "contract_address" field. ContractAddress string `json:"contract_address,omitempty"` // EntryPointSelector holds the value of the "entry_point_selector" field. EntryPointSelector string `json:"entry_point_selector,omitempty"` // TransactionHash holds the value of the "transaction_hash" field. TransactionHash string `json:"transaction_hash,omitempty"` // Calldata holds the value of the "calldata" field. Calldata []string `json:"calldata,omitempty"` // Signature holds the value of the "signature" field. Signature []string `json:"signature,omitempty"` // Nonce holds the value of the "nonce" field. Nonce string `json:"nonce,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TransactionQuery when eager-loading is set. Edges TransactionEdges `json:"edges"` // contains filtered or unexported fields }
Transaction is the model entity for the Transaction schema.
func (*Transaction) QueryBlock ¶
func (t *Transaction) QueryBlock() *BlockQuery
QueryBlock queries the "block" edge of the Transaction entity.
func (*Transaction) QueryEvents ¶
func (t *Transaction) QueryEvents() *EventQuery
QueryEvents queries the "events" edge of the Transaction entity.
func (*Transaction) QueryReceipt ¶
func (t *Transaction) QueryReceipt() *TransactionReceiptQuery
QueryReceipt queries the "receipt" edge of the Transaction entity.
func (*Transaction) Receipt ¶
func (t *Transaction) Receipt(ctx context.Context) (*TransactionReceipt, error)
func (*Transaction) String ¶
func (t *Transaction) String() string
String implements the fmt.Stringer.
func (*Transaction) ToEdge ¶
func (t *Transaction) ToEdge(order *TransactionOrder) *TransactionEdge
ToEdge converts Transaction into TransactionEdge.
func (*Transaction) Unwrap ¶
func (t *Transaction) Unwrap() *Transaction
Unwrap unwraps the Transaction 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 (*Transaction) Update ¶
func (t *Transaction) Update() *TransactionUpdateOne
Update returns a builder for updating this Transaction. Note that you need to call Transaction.Unwrap() before calling this method if this Transaction was returned from a transaction, and the transaction was committed or rolled back.
type TransactionClient ¶
type TransactionClient struct {
// contains filtered or unexported fields
}
TransactionClient is a client for the Transaction schema.
func NewTransactionClient ¶
func NewTransactionClient(c config) *TransactionClient
NewTransactionClient returns a client for the Transaction from the given config.
func (*TransactionClient) Create ¶
func (c *TransactionClient) Create() *TransactionCreate
Create returns a builder for creating a Transaction entity.
func (*TransactionClient) CreateBulk ¶
func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk
CreateBulk returns a builder for creating a bulk of Transaction entities.
func (*TransactionClient) Delete ¶
func (c *TransactionClient) Delete() *TransactionDelete
Delete returns a delete builder for Transaction.
func (*TransactionClient) DeleteOne ¶
func (c *TransactionClient) DeleteOne(t *Transaction) *TransactionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TransactionClient) DeleteOneID ¶
func (c *TransactionClient) DeleteOneID(id string) *TransactionDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TransactionClient) Get ¶
func (c *TransactionClient) Get(ctx context.Context, id string) (*Transaction, error)
Get returns a Transaction entity by its id.
func (*TransactionClient) GetX ¶
func (c *TransactionClient) GetX(ctx context.Context, id string) *Transaction
GetX is like Get, but panics if an error occurs.
func (*TransactionClient) Hooks ¶
func (c *TransactionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TransactionClient) Query ¶
func (c *TransactionClient) Query() *TransactionQuery
Query returns a query builder for Transaction.
func (*TransactionClient) QueryBlock ¶
func (c *TransactionClient) QueryBlock(t *Transaction) *BlockQuery
QueryBlock queries the block edge of a Transaction.
func (*TransactionClient) QueryEvents ¶
func (c *TransactionClient) QueryEvents(t *Transaction) *EventQuery
QueryEvents queries the events edge of a Transaction.
func (*TransactionClient) QueryReceipt ¶
func (c *TransactionClient) QueryReceipt(t *Transaction) *TransactionReceiptQuery
QueryReceipt queries the receipt edge of a Transaction.
func (*TransactionClient) Update ¶
func (c *TransactionClient) Update() *TransactionUpdate
Update returns an update builder for Transaction.
func (*TransactionClient) UpdateOne ¶
func (c *TransactionClient) UpdateOne(t *Transaction) *TransactionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TransactionClient) UpdateOneID ¶
func (c *TransactionClient) UpdateOneID(id string) *TransactionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TransactionClient) Use ¶
func (c *TransactionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `transaction.Hooks(f(g(h())))`.
type TransactionConnection ¶
type TransactionConnection struct { Edges []*TransactionEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
TransactionConnection is the connection containing edges to Transaction.
type TransactionCreate ¶
type TransactionCreate struct {
// contains filtered or unexported fields
}
TransactionCreate is the builder for creating a Transaction entity.
func (*TransactionCreate) AddEventIDs ¶
func (tc *TransactionCreate) AddEventIDs(ids ...string) *TransactionCreate
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*TransactionCreate) AddEvents ¶
func (tc *TransactionCreate) AddEvents(e ...*Event) *TransactionCreate
AddEvents adds the "events" edges to the Event entity.
func (*TransactionCreate) Exec ¶
func (tc *TransactionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionCreate) ExecX ¶
func (tc *TransactionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionCreate) Mutation ¶
func (tc *TransactionCreate) Mutation() *TransactionMutation
Mutation returns the TransactionMutation object of the builder.
func (*TransactionCreate) OnConflict ¶
func (tc *TransactionCreate) OnConflict(opts ...sql.ConflictOption) *TransactionUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Transaction.Create(). SetContractAddress(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TransactionUpsert) { SetContractAddress(v+v). }). Exec(ctx)
func (*TransactionCreate) OnConflictColumns ¶
func (tc *TransactionCreate) OnConflictColumns(columns ...string) *TransactionUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Transaction.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TransactionCreate) Save ¶
func (tc *TransactionCreate) Save(ctx context.Context) (*Transaction, error)
Save creates the Transaction in the database.
func (*TransactionCreate) SaveX ¶
func (tc *TransactionCreate) SaveX(ctx context.Context) *Transaction
SaveX calls Save and panics if Save returns an error.
func (*TransactionCreate) SetBlock ¶
func (tc *TransactionCreate) SetBlock(b *Block) *TransactionCreate
SetBlock sets the "block" edge to the Block entity.
func (*TransactionCreate) SetBlockID ¶
func (tc *TransactionCreate) SetBlockID(id string) *TransactionCreate
SetBlockID sets the "block" edge to the Block entity by ID.
func (*TransactionCreate) SetCalldata ¶
func (tc *TransactionCreate) SetCalldata(s []string) *TransactionCreate
SetCalldata sets the "calldata" field.
func (*TransactionCreate) SetContractAddress ¶
func (tc *TransactionCreate) SetContractAddress(s string) *TransactionCreate
SetContractAddress sets the "contract_address" field.
func (*TransactionCreate) SetEntryPointSelector ¶
func (tc *TransactionCreate) SetEntryPointSelector(s string) *TransactionCreate
SetEntryPointSelector sets the "entry_point_selector" field.
func (*TransactionCreate) SetID ¶
func (tc *TransactionCreate) SetID(s string) *TransactionCreate
SetID sets the "id" field.
func (*TransactionCreate) SetNillableBlockID ¶
func (tc *TransactionCreate) SetNillableBlockID(id *string) *TransactionCreate
SetNillableBlockID sets the "block" edge to the Block entity by ID if the given value is not nil.
func (*TransactionCreate) SetNillableEntryPointSelector ¶
func (tc *TransactionCreate) SetNillableEntryPointSelector(s *string) *TransactionCreate
SetNillableEntryPointSelector sets the "entry_point_selector" field if the given value is not nil.
func (*TransactionCreate) SetNillableNonce ¶
func (tc *TransactionCreate) SetNillableNonce(s *string) *TransactionCreate
SetNillableNonce sets the "nonce" field if the given value is not nil.
func (*TransactionCreate) SetNillableReceiptID ¶
func (tc *TransactionCreate) SetNillableReceiptID(id *string) *TransactionCreate
SetNillableReceiptID sets the "receipt" edge to the TransactionReceipt entity by ID if the given value is not nil.
func (*TransactionCreate) SetNonce ¶
func (tc *TransactionCreate) SetNonce(s string) *TransactionCreate
SetNonce sets the "nonce" field.
func (*TransactionCreate) SetReceipt ¶
func (tc *TransactionCreate) SetReceipt(t *TransactionReceipt) *TransactionCreate
SetReceipt sets the "receipt" edge to the TransactionReceipt entity.
func (*TransactionCreate) SetReceiptID ¶
func (tc *TransactionCreate) SetReceiptID(id string) *TransactionCreate
SetReceiptID sets the "receipt" edge to the TransactionReceipt entity by ID.
func (*TransactionCreate) SetSignature ¶
func (tc *TransactionCreate) SetSignature(s []string) *TransactionCreate
SetSignature sets the "signature" field.
func (*TransactionCreate) SetTransactionHash ¶
func (tc *TransactionCreate) SetTransactionHash(s string) *TransactionCreate
SetTransactionHash sets the "transaction_hash" field.
type TransactionCreateBulk ¶
type TransactionCreateBulk struct {
// contains filtered or unexported fields
}
TransactionCreateBulk is the builder for creating many Transaction entities in bulk.
func (*TransactionCreateBulk) Exec ¶
func (tcb *TransactionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionCreateBulk) ExecX ¶
func (tcb *TransactionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionCreateBulk) OnConflict ¶
func (tcb *TransactionCreateBulk) OnConflict(opts ...sql.ConflictOption) *TransactionUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Transaction.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TransactionUpsert) { SetContractAddress(v+v). }). Exec(ctx)
func (*TransactionCreateBulk) OnConflictColumns ¶
func (tcb *TransactionCreateBulk) OnConflictColumns(columns ...string) *TransactionUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Transaction.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TransactionCreateBulk) Save ¶
func (tcb *TransactionCreateBulk) Save(ctx context.Context) ([]*Transaction, error)
Save creates the Transaction entities in the database.
func (*TransactionCreateBulk) SaveX ¶
func (tcb *TransactionCreateBulk) SaveX(ctx context.Context) []*Transaction
SaveX is like Save, but panics if an error occurs.
type TransactionDelete ¶
type TransactionDelete struct {
// contains filtered or unexported fields
}
TransactionDelete is the builder for deleting a Transaction entity.
func (*TransactionDelete) Exec ¶
func (td *TransactionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TransactionDelete) ExecX ¶
func (td *TransactionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TransactionDelete) Where ¶
func (td *TransactionDelete) Where(ps ...predicate.Transaction) *TransactionDelete
Where appends a list predicates to the TransactionDelete builder.
type TransactionDeleteOne ¶
type TransactionDeleteOne struct {
// contains filtered or unexported fields
}
TransactionDeleteOne is the builder for deleting a single Transaction entity.
func (*TransactionDeleteOne) Exec ¶
func (tdo *TransactionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TransactionDeleteOne) ExecX ¶
func (tdo *TransactionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TransactionEdge ¶
type TransactionEdge struct { Node *Transaction `json:"node"` Cursor Cursor `json:"cursor"` }
TransactionEdge is the edge representation of Transaction.
type TransactionEdges ¶
type TransactionEdges struct { // Block holds the value of the block edge. Block *Block `json:"block,omitempty"` // Receipt holds the value of the receipt edge. Receipt *TransactionReceipt `json:"receipt,omitempty"` // Events holds the value of the events edge. Events []*Event `json:"events,omitempty"` // contains filtered or unexported fields }
TransactionEdges holds the relations/edges for other nodes in the graph.
func (TransactionEdges) BlockOrErr ¶
func (e TransactionEdges) 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.
func (TransactionEdges) EventsOrErr ¶
func (e TransactionEdges) EventsOrErr() ([]*Event, error)
EventsOrErr returns the Events value or an error if the edge was not loaded in eager-loading.
func (TransactionEdges) ReceiptOrErr ¶
func (e TransactionEdges) ReceiptOrErr() (*TransactionReceipt, error)
ReceiptOrErr returns the Receipt value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TransactionGroupBy ¶
type TransactionGroupBy struct {
// contains filtered or unexported fields
}
TransactionGroupBy is the group-by builder for Transaction entities.
func (*TransactionGroupBy) Aggregate ¶
func (tgb *TransactionGroupBy) Aggregate(fns ...AggregateFunc) *TransactionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TransactionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Scan ¶
func (tgb *TransactionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TransactionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TransactionMutation ¶
type TransactionMutation struct {
// contains filtered or unexported fields
}
TransactionMutation represents an operation that mutates the Transaction nodes in the graph.
func (*TransactionMutation) AddEventIDs ¶
func (m *TransactionMutation) AddEventIDs(ids ...string)
AddEventIDs adds the "events" edge to the Event entity by ids.
func (*TransactionMutation) AddField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) AddedEdges ¶
func (m *TransactionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TransactionMutation) AddedField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) AddedFields ¶
func (m *TransactionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TransactionMutation) AddedIDs ¶
func (m *TransactionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TransactionMutation) BlockCleared ¶
func (m *TransactionMutation) BlockCleared() bool
BlockCleared reports if the "block" edge to the Block entity was cleared.
func (*TransactionMutation) BlockID ¶
func (m *TransactionMutation) BlockID() (id string, exists bool)
BlockID returns the "block" edge ID in the mutation.
func (*TransactionMutation) BlockIDs ¶
func (m *TransactionMutation) BlockIDs() (ids []string)
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 (*TransactionMutation) Calldata ¶
func (m *TransactionMutation) Calldata() (r []string, exists bool)
Calldata returns the value of the "calldata" field in the mutation.
func (*TransactionMutation) ClearBlock ¶
func (m *TransactionMutation) ClearBlock()
ClearBlock clears the "block" edge to the Block entity.
func (*TransactionMutation) ClearEdge ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ClearEntryPointSelector ¶
func (m *TransactionMutation) ClearEntryPointSelector()
ClearEntryPointSelector clears the value of the "entry_point_selector" field.
func (*TransactionMutation) ClearEvents ¶
func (m *TransactionMutation) ClearEvents()
ClearEvents clears the "events" edge to the Event entity.
func (*TransactionMutation) ClearField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ClearNonce ¶
func (m *TransactionMutation) ClearNonce()
ClearNonce clears the value of the "nonce" field.
func (*TransactionMutation) ClearReceipt ¶
func (m *TransactionMutation) ClearReceipt()
ClearReceipt clears the "receipt" edge to the TransactionReceipt entity.
func (*TransactionMutation) ClearSignature ¶
func (m *TransactionMutation) ClearSignature()
ClearSignature clears the value of the "signature" field.
func (*TransactionMutation) ClearedEdges ¶
func (m *TransactionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TransactionMutation) ClearedFields ¶
func (m *TransactionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TransactionMutation) Client ¶
func (m TransactionMutation) 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 (*TransactionMutation) ContractAddress ¶
func (m *TransactionMutation) ContractAddress() (r string, exists bool)
ContractAddress returns the value of the "contract_address" field in the mutation.
func (*TransactionMutation) EdgeCleared ¶
func (m *TransactionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TransactionMutation) EntryPointSelector ¶
func (m *TransactionMutation) EntryPointSelector() (r string, exists bool)
EntryPointSelector returns the value of the "entry_point_selector" field in the mutation.
func (*TransactionMutation) EntryPointSelectorCleared ¶
func (m *TransactionMutation) EntryPointSelectorCleared() bool
EntryPointSelectorCleared returns if the "entry_point_selector" field was cleared in this mutation.
func (*TransactionMutation) EventsCleared ¶
func (m *TransactionMutation) EventsCleared() bool
EventsCleared reports if the "events" edge to the Event entity was cleared.
func (*TransactionMutation) EventsIDs ¶
func (m *TransactionMutation) EventsIDs() (ids []string)
EventsIDs returns the "events" edge IDs in the mutation.
func (*TransactionMutation) Field ¶
func (m *TransactionMutation) 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 (*TransactionMutation) FieldCleared ¶
func (m *TransactionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TransactionMutation) Fields ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ID ¶
func (m *TransactionMutation) ID() (id string, 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 (*TransactionMutation) IDs ¶
func (m *TransactionMutation) IDs(ctx context.Context) ([]string, 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 (*TransactionMutation) Nonce ¶
func (m *TransactionMutation) Nonce() (r string, exists bool)
Nonce returns the value of the "nonce" field in the mutation.
func (*TransactionMutation) NonceCleared ¶
func (m *TransactionMutation) NonceCleared() bool
NonceCleared returns if the "nonce" field was cleared in this mutation.
func (*TransactionMutation) OldCalldata ¶
func (m *TransactionMutation) OldCalldata(ctx context.Context) (v []string, err error)
OldCalldata returns the old "calldata" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldContractAddress ¶
func (m *TransactionMutation) OldContractAddress(ctx context.Context) (v string, err error)
OldContractAddress returns the old "contract_address" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldEntryPointSelector ¶
func (m *TransactionMutation) OldEntryPointSelector(ctx context.Context) (v string, err error)
OldEntryPointSelector returns the old "entry_point_selector" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*TransactionMutation) OldNonce ¶
func (m *TransactionMutation) OldNonce(ctx context.Context) (v string, err error)
OldNonce returns the old "nonce" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldSignature ¶
func (m *TransactionMutation) OldSignature(ctx context.Context) (v []string, err error)
OldSignature returns the old "signature" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldTransactionHash ¶
func (m *TransactionMutation) OldTransactionHash(ctx context.Context) (v string, err error)
OldTransactionHash returns the old "transaction_hash" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) Op ¶
func (m *TransactionMutation) Op() Op
Op returns the operation name.
func (*TransactionMutation) ReceiptCleared ¶
func (m *TransactionMutation) ReceiptCleared() bool
ReceiptCleared reports if the "receipt" edge to the TransactionReceipt entity was cleared.
func (*TransactionMutation) ReceiptID ¶
func (m *TransactionMutation) ReceiptID() (id string, exists bool)
ReceiptID returns the "receipt" edge ID in the mutation.
func (*TransactionMutation) ReceiptIDs ¶
func (m *TransactionMutation) ReceiptIDs() (ids []string)
ReceiptIDs returns the "receipt" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ReceiptID instead. It exists only for internal usage by the builders.
func (*TransactionMutation) RemoveEventIDs ¶
func (m *TransactionMutation) RemoveEventIDs(ids ...string)
RemoveEventIDs removes the "events" edge to the Event entity by IDs.
func (*TransactionMutation) RemovedEdges ¶
func (m *TransactionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TransactionMutation) RemovedEventsIDs ¶
func (m *TransactionMutation) RemovedEventsIDs() (ids []string)
RemovedEvents returns the removed IDs of the "events" edge to the Event entity.
func (*TransactionMutation) RemovedIDs ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ResetBlock ¶
func (m *TransactionMutation) ResetBlock()
ResetBlock resets all changes to the "block" edge.
func (*TransactionMutation) ResetCalldata ¶
func (m *TransactionMutation) ResetCalldata()
ResetCalldata resets all changes to the "calldata" field.
func (*TransactionMutation) ResetContractAddress ¶
func (m *TransactionMutation) ResetContractAddress()
ResetContractAddress resets all changes to the "contract_address" field.
func (*TransactionMutation) ResetEdge ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ResetEntryPointSelector ¶
func (m *TransactionMutation) ResetEntryPointSelector()
ResetEntryPointSelector resets all changes to the "entry_point_selector" field.
func (*TransactionMutation) ResetEvents ¶
func (m *TransactionMutation) ResetEvents()
ResetEvents resets all changes to the "events" edge.
func (*TransactionMutation) ResetField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ResetNonce ¶
func (m *TransactionMutation) ResetNonce()
ResetNonce resets all changes to the "nonce" field.
func (*TransactionMutation) ResetReceipt ¶
func (m *TransactionMutation) ResetReceipt()
ResetReceipt resets all changes to the "receipt" edge.
func (*TransactionMutation) ResetSignature ¶
func (m *TransactionMutation) ResetSignature()
ResetSignature resets all changes to the "signature" field.
func (*TransactionMutation) ResetTransactionHash ¶
func (m *TransactionMutation) ResetTransactionHash()
ResetTransactionHash resets all changes to the "transaction_hash" field.
func (*TransactionMutation) SetBlockID ¶
func (m *TransactionMutation) SetBlockID(id string)
SetBlockID sets the "block" edge to the Block entity by id.
func (*TransactionMutation) SetCalldata ¶
func (m *TransactionMutation) SetCalldata(s []string)
SetCalldata sets the "calldata" field.
func (*TransactionMutation) SetContractAddress ¶
func (m *TransactionMutation) SetContractAddress(s string)
SetContractAddress sets the "contract_address" field.
func (*TransactionMutation) SetEntryPointSelector ¶
func (m *TransactionMutation) SetEntryPointSelector(s string)
SetEntryPointSelector sets the "entry_point_selector" field.
func (*TransactionMutation) SetField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) SetID ¶
func (m *TransactionMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Transaction entities.
func (*TransactionMutation) SetNonce ¶
func (m *TransactionMutation) SetNonce(s string)
SetNonce sets the "nonce" field.
func (*TransactionMutation) SetReceiptID ¶
func (m *TransactionMutation) SetReceiptID(id string)
SetReceiptID sets the "receipt" edge to the TransactionReceipt entity by id.
func (*TransactionMutation) SetSignature ¶
func (m *TransactionMutation) SetSignature(s []string)
SetSignature sets the "signature" field.
func (*TransactionMutation) SetTransactionHash ¶
func (m *TransactionMutation) SetTransactionHash(s string)
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionMutation) Signature ¶
func (m *TransactionMutation) Signature() (r []string, exists bool)
Signature returns the value of the "signature" field in the mutation.
func (*TransactionMutation) SignatureCleared ¶
func (m *TransactionMutation) SignatureCleared() bool
SignatureCleared returns if the "signature" field was cleared in this mutation.
func (*TransactionMutation) TransactionHash ¶
func (m *TransactionMutation) TransactionHash() (r string, exists bool)
TransactionHash returns the value of the "transaction_hash" field in the mutation.
func (TransactionMutation) Tx ¶
func (m TransactionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TransactionMutation) Type ¶
func (m *TransactionMutation) Type() string
Type returns the node type of this mutation (Transaction).
func (*TransactionMutation) Where ¶
func (m *TransactionMutation) Where(ps ...predicate.Transaction)
Where appends a list predicates to the TransactionMutation builder.
type TransactionOrder ¶
type TransactionOrder struct { Direction OrderDirection `json:"direction"` Field *TransactionOrderField `json:"field"` }
TransactionOrder defines the ordering of Transaction.
type TransactionOrderField ¶
type TransactionOrderField struct {
// contains filtered or unexported fields
}
TransactionOrderField defines the ordering field of Transaction.
func (TransactionOrderField) MarshalGQL ¶
func (f TransactionOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (TransactionOrderField) String ¶
func (f TransactionOrderField) String() string
String implement fmt.Stringer interface.
func (*TransactionOrderField) UnmarshalGQL ¶
func (f *TransactionOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type TransactionPaginateOption ¶
type TransactionPaginateOption func(*transactionPager) error
TransactionPaginateOption enables pagination customization.
func WithTransactionFilter ¶
func WithTransactionFilter(filter func(*TransactionQuery) (*TransactionQuery, error)) TransactionPaginateOption
WithTransactionFilter configures pagination filter.
func WithTransactionOrder ¶
func WithTransactionOrder(order *TransactionOrder) TransactionPaginateOption
WithTransactionOrder configures pagination ordering.
type TransactionQuery ¶
type TransactionQuery struct {
// contains filtered or unexported fields
}
TransactionQuery is the builder for querying Transaction entities.
func (*TransactionQuery) All ¶
func (tq *TransactionQuery) All(ctx context.Context) ([]*Transaction, error)
All executes the query and returns a list of Transactions.
func (*TransactionQuery) AllX ¶
func (tq *TransactionQuery) AllX(ctx context.Context) []*Transaction
AllX is like All, but panics if an error occurs.
func (*TransactionQuery) Clone ¶
func (tq *TransactionQuery) Clone() *TransactionQuery
Clone returns a duplicate of the TransactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TransactionQuery) CollectFields ¶
func (t *TransactionQuery) CollectFields(ctx context.Context, satisfies ...string) (*TransactionQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*TransactionQuery) Count ¶
func (tq *TransactionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TransactionQuery) CountX ¶
func (tq *TransactionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TransactionQuery) Exist ¶
func (tq *TransactionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TransactionQuery) ExistX ¶
func (tq *TransactionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TransactionQuery) First ¶
func (tq *TransactionQuery) First(ctx context.Context) (*Transaction, error)
First returns the first Transaction entity from the query. Returns a *NotFoundError when no Transaction was found.
func (*TransactionQuery) FirstID ¶
func (tq *TransactionQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Transaction ID from the query. Returns a *NotFoundError when no Transaction ID was found.
func (*TransactionQuery) FirstIDX ¶
func (tq *TransactionQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*TransactionQuery) FirstX ¶
func (tq *TransactionQuery) FirstX(ctx context.Context) *Transaction
FirstX is like First, but panics if an error occurs.
func (*TransactionQuery) GroupBy ¶
func (tq *TransactionQuery) GroupBy(field string, fields ...string) *TransactionGroupBy
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 { ContractAddress string `json:"contract_address,omitempty"` Count int `json:"count,omitempty"` } client.Transaction.Query(). GroupBy(transaction.FieldContractAddress). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TransactionQuery) IDs ¶
func (tq *TransactionQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Transaction IDs.
func (*TransactionQuery) IDsX ¶
func (tq *TransactionQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*TransactionQuery) Limit ¶
func (tq *TransactionQuery) Limit(limit int) *TransactionQuery
Limit adds a limit step to the query.
func (*TransactionQuery) Offset ¶
func (tq *TransactionQuery) Offset(offset int) *TransactionQuery
Offset adds an offset step to the query.
func (*TransactionQuery) Only ¶
func (tq *TransactionQuery) Only(ctx context.Context) (*Transaction, error)
Only returns a single Transaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Transaction entity is found. Returns a *NotFoundError when no Transaction entities are found.
func (*TransactionQuery) OnlyID ¶
func (tq *TransactionQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Transaction ID in the query. Returns a *NotSingularError when more than one Transaction ID is found. Returns a *NotFoundError when no entities are found.
func (*TransactionQuery) OnlyIDX ¶
func (tq *TransactionQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TransactionQuery) OnlyX ¶
func (tq *TransactionQuery) OnlyX(ctx context.Context) *Transaction
OnlyX is like Only, but panics if an error occurs.
func (*TransactionQuery) Order ¶
func (tq *TransactionQuery) Order(o ...OrderFunc) *TransactionQuery
Order adds an order step to the query.
func (*TransactionQuery) Paginate ¶
func (t *TransactionQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...TransactionPaginateOption, ) (*TransactionConnection, error)
Paginate executes the query and returns a relay based cursor connection to Transaction.
func (*TransactionQuery) QueryBlock ¶
func (tq *TransactionQuery) QueryBlock() *BlockQuery
QueryBlock chains the current query on the "block" edge.
func (*TransactionQuery) QueryEvents ¶
func (tq *TransactionQuery) QueryEvents() *EventQuery
QueryEvents chains the current query on the "events" edge.
func (*TransactionQuery) QueryReceipt ¶
func (tq *TransactionQuery) QueryReceipt() *TransactionReceiptQuery
QueryReceipt chains the current query on the "receipt" edge.
func (*TransactionQuery) Select ¶
func (tq *TransactionQuery) Select(fields ...string) *TransactionSelect
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 { ContractAddress string `json:"contract_address,omitempty"` } client.Transaction.Query(). Select(transaction.FieldContractAddress). Scan(ctx, &v)
func (*TransactionQuery) Unique ¶
func (tq *TransactionQuery) Unique(unique bool) *TransactionQuery
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 (*TransactionQuery) Where ¶
func (tq *TransactionQuery) Where(ps ...predicate.Transaction) *TransactionQuery
Where adds a new predicate for the TransactionQuery builder.
func (*TransactionQuery) WithBlock ¶
func (tq *TransactionQuery) WithBlock(opts ...func(*BlockQuery)) *TransactionQuery
WithBlock tells the query-builder to eager-load the nodes that are connected to the "block" edge. The optional arguments are used to configure the query builder of the edge.
func (*TransactionQuery) WithEvents ¶
func (tq *TransactionQuery) WithEvents(opts ...func(*EventQuery)) *TransactionQuery
WithEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge. The optional arguments are used to configure the query builder of the edge.
func (*TransactionQuery) WithReceipt ¶
func (tq *TransactionQuery) WithReceipt(opts ...func(*TransactionReceiptQuery)) *TransactionQuery
WithReceipt tells the query-builder to eager-load the nodes that are connected to the "receipt" edge. The optional arguments are used to configure the query builder of the edge.
type TransactionReceipt ¶
type TransactionReceipt struct { // ID of the ent. ID string `json:"id,omitempty"` // TransactionHash holds the value of the "transaction_hash" field. TransactionHash string `json:"transaction_hash,omitempty"` // Status holds the value of the "status" field. Status transactionreceipt.Status `json:"status,omitempty"` // StatusData holds the value of the "status_data" field. StatusData string `json:"status_data,omitempty"` // MessagesSent holds the value of the "messages_sent" field. MessagesSent []*types.L1Message `json:"messages_sent,omitempty"` // L1OriginMessage holds the value of the "l1_origin_message" field. L1OriginMessage *types.L2Message `json:"l1_origin_message,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TransactionReceiptQuery when eager-loading is set. Edges TransactionReceiptEdges `json:"edges"` // contains filtered or unexported fields }
TransactionReceipt is the model entity for the TransactionReceipt schema.
func (*TransactionReceipt) Block ¶
func (tr *TransactionReceipt) Block(ctx context.Context) (*Block, error)
func (*TransactionReceipt) Node ¶
func (tr *TransactionReceipt) Node(ctx context.Context) (node *Node, err error)
func (*TransactionReceipt) QueryBlock ¶
func (tr *TransactionReceipt) QueryBlock() *BlockQuery
QueryBlock queries the "block" edge of the TransactionReceipt entity.
func (*TransactionReceipt) QueryTransaction ¶
func (tr *TransactionReceipt) QueryTransaction() *TransactionQuery
QueryTransaction queries the "transaction" edge of the TransactionReceipt entity.
func (*TransactionReceipt) String ¶
func (tr *TransactionReceipt) String() string
String implements the fmt.Stringer.
func (*TransactionReceipt) ToEdge ¶
func (tr *TransactionReceipt) ToEdge(order *TransactionReceiptOrder) *TransactionReceiptEdge
ToEdge converts TransactionReceipt into TransactionReceiptEdge.
func (*TransactionReceipt) Transaction ¶
func (tr *TransactionReceipt) Transaction(ctx context.Context) (*Transaction, error)
func (*TransactionReceipt) Unwrap ¶
func (tr *TransactionReceipt) Unwrap() *TransactionReceipt
Unwrap unwraps the TransactionReceipt 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 (*TransactionReceipt) Update ¶
func (tr *TransactionReceipt) Update() *TransactionReceiptUpdateOne
Update returns a builder for updating this TransactionReceipt. Note that you need to call TransactionReceipt.Unwrap() before calling this method if this TransactionReceipt was returned from a transaction, and the transaction was committed or rolled back.
type TransactionReceiptClient ¶
type TransactionReceiptClient struct {
// contains filtered or unexported fields
}
TransactionReceiptClient is a client for the TransactionReceipt schema.
func NewTransactionReceiptClient ¶
func NewTransactionReceiptClient(c config) *TransactionReceiptClient
NewTransactionReceiptClient returns a client for the TransactionReceipt from the given config.
func (*TransactionReceiptClient) Create ¶
func (c *TransactionReceiptClient) Create() *TransactionReceiptCreate
Create returns a builder for creating a TransactionReceipt entity.
func (*TransactionReceiptClient) CreateBulk ¶
func (c *TransactionReceiptClient) CreateBulk(builders ...*TransactionReceiptCreate) *TransactionReceiptCreateBulk
CreateBulk returns a builder for creating a bulk of TransactionReceipt entities.
func (*TransactionReceiptClient) Delete ¶
func (c *TransactionReceiptClient) Delete() *TransactionReceiptDelete
Delete returns a delete builder for TransactionReceipt.
func (*TransactionReceiptClient) DeleteOne ¶
func (c *TransactionReceiptClient) DeleteOne(tr *TransactionReceipt) *TransactionReceiptDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TransactionReceiptClient) DeleteOneID ¶
func (c *TransactionReceiptClient) DeleteOneID(id string) *TransactionReceiptDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TransactionReceiptClient) Get ¶
func (c *TransactionReceiptClient) Get(ctx context.Context, id string) (*TransactionReceipt, error)
Get returns a TransactionReceipt entity by its id.
func (*TransactionReceiptClient) GetX ¶
func (c *TransactionReceiptClient) GetX(ctx context.Context, id string) *TransactionReceipt
GetX is like Get, but panics if an error occurs.
func (*TransactionReceiptClient) Hooks ¶
func (c *TransactionReceiptClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TransactionReceiptClient) Query ¶
func (c *TransactionReceiptClient) Query() *TransactionReceiptQuery
Query returns a query builder for TransactionReceipt.
func (*TransactionReceiptClient) QueryBlock ¶
func (c *TransactionReceiptClient) QueryBlock(tr *TransactionReceipt) *BlockQuery
QueryBlock queries the block edge of a TransactionReceipt.
func (*TransactionReceiptClient) QueryTransaction ¶
func (c *TransactionReceiptClient) QueryTransaction(tr *TransactionReceipt) *TransactionQuery
QueryTransaction queries the transaction edge of a TransactionReceipt.
func (*TransactionReceiptClient) Update ¶
func (c *TransactionReceiptClient) Update() *TransactionReceiptUpdate
Update returns an update builder for TransactionReceipt.
func (*TransactionReceiptClient) UpdateOne ¶
func (c *TransactionReceiptClient) UpdateOne(tr *TransactionReceipt) *TransactionReceiptUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TransactionReceiptClient) UpdateOneID ¶
func (c *TransactionReceiptClient) UpdateOneID(id string) *TransactionReceiptUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TransactionReceiptClient) Use ¶
func (c *TransactionReceiptClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `transactionreceipt.Hooks(f(g(h())))`.
type TransactionReceiptConnection ¶
type TransactionReceiptConnection struct { Edges []*TransactionReceiptEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
TransactionReceiptConnection is the connection containing edges to TransactionReceipt.
type TransactionReceiptCreate ¶
type TransactionReceiptCreate struct {
// contains filtered or unexported fields
}
TransactionReceiptCreate is the builder for creating a TransactionReceipt entity.
func (*TransactionReceiptCreate) Exec ¶
func (trc *TransactionReceiptCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionReceiptCreate) ExecX ¶
func (trc *TransactionReceiptCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionReceiptCreate) Mutation ¶
func (trc *TransactionReceiptCreate) Mutation() *TransactionReceiptMutation
Mutation returns the TransactionReceiptMutation object of the builder.
func (*TransactionReceiptCreate) OnConflict ¶
func (trc *TransactionReceiptCreate) OnConflict(opts ...sql.ConflictOption) *TransactionReceiptUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TransactionReceipt.Create(). SetTransactionHash(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TransactionReceiptUpsert) { SetTransactionHash(v+v). }). Exec(ctx)
func (*TransactionReceiptCreate) OnConflictColumns ¶
func (trc *TransactionReceiptCreate) OnConflictColumns(columns ...string) *TransactionReceiptUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TransactionReceipt.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TransactionReceiptCreate) Save ¶
func (trc *TransactionReceiptCreate) Save(ctx context.Context) (*TransactionReceipt, error)
Save creates the TransactionReceipt in the database.
func (*TransactionReceiptCreate) SaveX ¶
func (trc *TransactionReceiptCreate) SaveX(ctx context.Context) *TransactionReceipt
SaveX calls Save and panics if Save returns an error.
func (*TransactionReceiptCreate) SetBlock ¶
func (trc *TransactionReceiptCreate) SetBlock(b *Block) *TransactionReceiptCreate
SetBlock sets the "block" edge to the Block entity.
func (*TransactionReceiptCreate) SetBlockID ¶
func (trc *TransactionReceiptCreate) SetBlockID(id string) *TransactionReceiptCreate
SetBlockID sets the "block" edge to the Block entity by ID.
func (*TransactionReceiptCreate) SetID ¶
func (trc *TransactionReceiptCreate) SetID(s string) *TransactionReceiptCreate
SetID sets the "id" field.
func (*TransactionReceiptCreate) SetL1OriginMessage ¶
func (trc *TransactionReceiptCreate) SetL1OriginMessage(t *types.L2Message) *TransactionReceiptCreate
SetL1OriginMessage sets the "l1_origin_message" field.
func (*TransactionReceiptCreate) SetMessagesSent ¶
func (trc *TransactionReceiptCreate) SetMessagesSent(t []*types.L1Message) *TransactionReceiptCreate
SetMessagesSent sets the "messages_sent" field.
func (*TransactionReceiptCreate) SetNillableBlockID ¶
func (trc *TransactionReceiptCreate) SetNillableBlockID(id *string) *TransactionReceiptCreate
SetNillableBlockID sets the "block" edge to the Block entity by ID if the given value is not nil.
func (*TransactionReceiptCreate) SetStatus ¶
func (trc *TransactionReceiptCreate) SetStatus(t transactionreceipt.Status) *TransactionReceiptCreate
SetStatus sets the "status" field.
func (*TransactionReceiptCreate) SetStatusData ¶
func (trc *TransactionReceiptCreate) SetStatusData(s string) *TransactionReceiptCreate
SetStatusData sets the "status_data" field.
func (*TransactionReceiptCreate) SetTransaction ¶
func (trc *TransactionReceiptCreate) SetTransaction(t *Transaction) *TransactionReceiptCreate
SetTransaction sets the "transaction" edge to the Transaction entity.
func (*TransactionReceiptCreate) SetTransactionHash ¶
func (trc *TransactionReceiptCreate) SetTransactionHash(s string) *TransactionReceiptCreate
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionReceiptCreate) SetTransactionID ¶
func (trc *TransactionReceiptCreate) SetTransactionID(id string) *TransactionReceiptCreate
SetTransactionID sets the "transaction" edge to the Transaction entity by ID.
type TransactionReceiptCreateBulk ¶
type TransactionReceiptCreateBulk struct {
// contains filtered or unexported fields
}
TransactionReceiptCreateBulk is the builder for creating many TransactionReceipt entities in bulk.
func (*TransactionReceiptCreateBulk) Exec ¶
func (trcb *TransactionReceiptCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionReceiptCreateBulk) ExecX ¶
func (trcb *TransactionReceiptCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionReceiptCreateBulk) OnConflict ¶
func (trcb *TransactionReceiptCreateBulk) OnConflict(opts ...sql.ConflictOption) *TransactionReceiptUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TransactionReceipt.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TransactionReceiptUpsert) { SetTransactionHash(v+v). }). Exec(ctx)
func (*TransactionReceiptCreateBulk) OnConflictColumns ¶
func (trcb *TransactionReceiptCreateBulk) OnConflictColumns(columns ...string) *TransactionReceiptUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TransactionReceipt.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TransactionReceiptCreateBulk) Save ¶
func (trcb *TransactionReceiptCreateBulk) Save(ctx context.Context) ([]*TransactionReceipt, error)
Save creates the TransactionReceipt entities in the database.
func (*TransactionReceiptCreateBulk) SaveX ¶
func (trcb *TransactionReceiptCreateBulk) SaveX(ctx context.Context) []*TransactionReceipt
SaveX is like Save, but panics if an error occurs.
type TransactionReceiptDelete ¶
type TransactionReceiptDelete struct {
// contains filtered or unexported fields
}
TransactionReceiptDelete is the builder for deleting a TransactionReceipt entity.
func (*TransactionReceiptDelete) Exec ¶
func (trd *TransactionReceiptDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TransactionReceiptDelete) ExecX ¶
func (trd *TransactionReceiptDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TransactionReceiptDelete) Where ¶
func (trd *TransactionReceiptDelete) Where(ps ...predicate.TransactionReceipt) *TransactionReceiptDelete
Where appends a list predicates to the TransactionReceiptDelete builder.
type TransactionReceiptDeleteOne ¶
type TransactionReceiptDeleteOne struct {
// contains filtered or unexported fields
}
TransactionReceiptDeleteOne is the builder for deleting a single TransactionReceipt entity.
func (*TransactionReceiptDeleteOne) Exec ¶
func (trdo *TransactionReceiptDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TransactionReceiptDeleteOne) ExecX ¶
func (trdo *TransactionReceiptDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TransactionReceiptEdge ¶
type TransactionReceiptEdge struct { Node *TransactionReceipt `json:"node"` Cursor Cursor `json:"cursor"` }
TransactionReceiptEdge is the edge representation of TransactionReceipt.
type TransactionReceiptEdges ¶
type TransactionReceiptEdges struct { // Block holds the value of the block edge. Block *Block `json:"block,omitempty"` // Transaction holds the value of the transaction edge. Transaction *Transaction `json:"transaction,omitempty"` // contains filtered or unexported fields }
TransactionReceiptEdges holds the relations/edges for other nodes in the graph.
func (TransactionReceiptEdges) BlockOrErr ¶
func (e TransactionReceiptEdges) 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.
func (TransactionReceiptEdges) TransactionOrErr ¶
func (e TransactionReceiptEdges) TransactionOrErr() (*Transaction, error)
TransactionOrErr returns the Transaction value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TransactionReceiptGroupBy ¶
type TransactionReceiptGroupBy struct {
// contains filtered or unexported fields
}
TransactionReceiptGroupBy is the group-by builder for TransactionReceipt entities.
func (*TransactionReceiptGroupBy) Aggregate ¶
func (trgb *TransactionReceiptGroupBy) Aggregate(fns ...AggregateFunc) *TransactionReceiptGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TransactionReceiptGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*TransactionReceiptGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TransactionReceiptGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptGroupBy) Scan ¶
func (trgb *TransactionReceiptGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TransactionReceiptGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TransactionReceiptMutation ¶
type TransactionReceiptMutation struct {
// contains filtered or unexported fields
}
TransactionReceiptMutation represents an operation that mutates the TransactionReceipt nodes in the graph.
func (*TransactionReceiptMutation) AddField ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) AddedEdges ¶
func (m *TransactionReceiptMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TransactionReceiptMutation) AddedField ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) AddedFields ¶
func (m *TransactionReceiptMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TransactionReceiptMutation) AddedIDs ¶
func (m *TransactionReceiptMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TransactionReceiptMutation) BlockCleared ¶
func (m *TransactionReceiptMutation) BlockCleared() bool
BlockCleared reports if the "block" edge to the Block entity was cleared.
func (*TransactionReceiptMutation) BlockID ¶
func (m *TransactionReceiptMutation) BlockID() (id string, exists bool)
BlockID returns the "block" edge ID in the mutation.
func (*TransactionReceiptMutation) BlockIDs ¶
func (m *TransactionReceiptMutation) BlockIDs() (ids []string)
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 (*TransactionReceiptMutation) ClearBlock ¶
func (m *TransactionReceiptMutation) ClearBlock()
ClearBlock clears the "block" edge to the Block entity.
func (*TransactionReceiptMutation) ClearEdge ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) ClearField ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) ClearTransaction ¶
func (m *TransactionReceiptMutation) ClearTransaction()
ClearTransaction clears the "transaction" edge to the Transaction entity.
func (*TransactionReceiptMutation) ClearedEdges ¶
func (m *TransactionReceiptMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TransactionReceiptMutation) ClearedFields ¶
func (m *TransactionReceiptMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TransactionReceiptMutation) Client ¶
func (m TransactionReceiptMutation) 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 (*TransactionReceiptMutation) EdgeCleared ¶
func (m *TransactionReceiptMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TransactionReceiptMutation) Field ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) FieldCleared ¶
func (m *TransactionReceiptMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TransactionReceiptMutation) Fields ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) ID ¶
func (m *TransactionReceiptMutation) ID() (id string, 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 (*TransactionReceiptMutation) IDs ¶
func (m *TransactionReceiptMutation) IDs(ctx context.Context) ([]string, 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 (*TransactionReceiptMutation) L1OriginMessage ¶
func (m *TransactionReceiptMutation) L1OriginMessage() (r *types.L2Message, exists bool)
L1OriginMessage returns the value of the "l1_origin_message" field in the mutation.
func (*TransactionReceiptMutation) MessagesSent ¶
func (m *TransactionReceiptMutation) MessagesSent() (r []*types.L1Message, exists bool)
MessagesSent returns the value of the "messages_sent" field in the mutation.
func (*TransactionReceiptMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*TransactionReceiptMutation) OldL1OriginMessage ¶
func (m *TransactionReceiptMutation) OldL1OriginMessage(ctx context.Context) (v *types.L2Message, err error)
OldL1OriginMessage returns the old "l1_origin_message" field's value of the TransactionReceipt entity. If the TransactionReceipt 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 (*TransactionReceiptMutation) OldMessagesSent ¶
func (m *TransactionReceiptMutation) OldMessagesSent(ctx context.Context) (v []*types.L1Message, err error)
OldMessagesSent returns the old "messages_sent" field's value of the TransactionReceipt entity. If the TransactionReceipt 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 (*TransactionReceiptMutation) OldStatus ¶
func (m *TransactionReceiptMutation) OldStatus(ctx context.Context) (v transactionreceipt.Status, err error)
OldStatus returns the old "status" field's value of the TransactionReceipt entity. If the TransactionReceipt 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 (*TransactionReceiptMutation) OldStatusData ¶
func (m *TransactionReceiptMutation) OldStatusData(ctx context.Context) (v string, err error)
OldStatusData returns the old "status_data" field's value of the TransactionReceipt entity. If the TransactionReceipt 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 (*TransactionReceiptMutation) OldTransactionHash ¶
func (m *TransactionReceiptMutation) OldTransactionHash(ctx context.Context) (v string, err error)
OldTransactionHash returns the old "transaction_hash" field's value of the TransactionReceipt entity. If the TransactionReceipt 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 (*TransactionReceiptMutation) Op ¶
func (m *TransactionReceiptMutation) Op() Op
Op returns the operation name.
func (*TransactionReceiptMutation) RemovedEdges ¶
func (m *TransactionReceiptMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TransactionReceiptMutation) RemovedIDs ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) ResetBlock ¶
func (m *TransactionReceiptMutation) ResetBlock()
ResetBlock resets all changes to the "block" edge.
func (*TransactionReceiptMutation) ResetEdge ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) ResetField ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) ResetL1OriginMessage ¶
func (m *TransactionReceiptMutation) ResetL1OriginMessage()
ResetL1OriginMessage resets all changes to the "l1_origin_message" field.
func (*TransactionReceiptMutation) ResetMessagesSent ¶
func (m *TransactionReceiptMutation) ResetMessagesSent()
ResetMessagesSent resets all changes to the "messages_sent" field.
func (*TransactionReceiptMutation) ResetStatus ¶
func (m *TransactionReceiptMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TransactionReceiptMutation) ResetStatusData ¶
func (m *TransactionReceiptMutation) ResetStatusData()
ResetStatusData resets all changes to the "status_data" field.
func (*TransactionReceiptMutation) ResetTransaction ¶
func (m *TransactionReceiptMutation) ResetTransaction()
ResetTransaction resets all changes to the "transaction" edge.
func (*TransactionReceiptMutation) ResetTransactionHash ¶
func (m *TransactionReceiptMutation) ResetTransactionHash()
ResetTransactionHash resets all changes to the "transaction_hash" field.
func (*TransactionReceiptMutation) SetBlockID ¶
func (m *TransactionReceiptMutation) SetBlockID(id string)
SetBlockID sets the "block" edge to the Block entity by id.
func (*TransactionReceiptMutation) SetField ¶
func (m *TransactionReceiptMutation) 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 (*TransactionReceiptMutation) SetID ¶
func (m *TransactionReceiptMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TransactionReceipt entities.
func (*TransactionReceiptMutation) SetL1OriginMessage ¶
func (m *TransactionReceiptMutation) SetL1OriginMessage(t *types.L2Message)
SetL1OriginMessage sets the "l1_origin_message" field.
func (*TransactionReceiptMutation) SetMessagesSent ¶
func (m *TransactionReceiptMutation) SetMessagesSent(t []*types.L1Message)
SetMessagesSent sets the "messages_sent" field.
func (*TransactionReceiptMutation) SetStatus ¶
func (m *TransactionReceiptMutation) SetStatus(t transactionreceipt.Status)
SetStatus sets the "status" field.
func (*TransactionReceiptMutation) SetStatusData ¶
func (m *TransactionReceiptMutation) SetStatusData(s string)
SetStatusData sets the "status_data" field.
func (*TransactionReceiptMutation) SetTransactionHash ¶
func (m *TransactionReceiptMutation) SetTransactionHash(s string)
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionReceiptMutation) SetTransactionID ¶
func (m *TransactionReceiptMutation) SetTransactionID(id string)
SetTransactionID sets the "transaction" edge to the Transaction entity by id.
func (*TransactionReceiptMutation) Status ¶
func (m *TransactionReceiptMutation) Status() (r transactionreceipt.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*TransactionReceiptMutation) StatusData ¶
func (m *TransactionReceiptMutation) StatusData() (r string, exists bool)
StatusData returns the value of the "status_data" field in the mutation.
func (*TransactionReceiptMutation) TransactionCleared ¶
func (m *TransactionReceiptMutation) TransactionCleared() bool
TransactionCleared reports if the "transaction" edge to the Transaction entity was cleared.
func (*TransactionReceiptMutation) TransactionHash ¶
func (m *TransactionReceiptMutation) TransactionHash() (r string, exists bool)
TransactionHash returns the value of the "transaction_hash" field in the mutation.
func (*TransactionReceiptMutation) TransactionID ¶
func (m *TransactionReceiptMutation) TransactionID() (id string, exists bool)
TransactionID returns the "transaction" edge ID in the mutation.
func (*TransactionReceiptMutation) TransactionIDs ¶
func (m *TransactionReceiptMutation) TransactionIDs() (ids []string)
TransactionIDs returns the "transaction" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TransactionID instead. It exists only for internal usage by the builders.
func (TransactionReceiptMutation) Tx ¶
func (m TransactionReceiptMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TransactionReceiptMutation) Type ¶
func (m *TransactionReceiptMutation) Type() string
Type returns the node type of this mutation (TransactionReceipt).
func (*TransactionReceiptMutation) Where ¶
func (m *TransactionReceiptMutation) Where(ps ...predicate.TransactionReceipt)
Where appends a list predicates to the TransactionReceiptMutation builder.
type TransactionReceiptOrder ¶
type TransactionReceiptOrder struct { Direction OrderDirection `json:"direction"` Field *TransactionReceiptOrderField `json:"field"` }
TransactionReceiptOrder defines the ordering of TransactionReceipt.
type TransactionReceiptOrderField ¶
type TransactionReceiptOrderField struct {
// contains filtered or unexported fields
}
TransactionReceiptOrderField defines the ordering field of TransactionReceipt.
type TransactionReceiptPaginateOption ¶
type TransactionReceiptPaginateOption func(*transactionreceiptPager) error
TransactionReceiptPaginateOption enables pagination customization.
func WithTransactionReceiptFilter ¶
func WithTransactionReceiptFilter(filter func(*TransactionReceiptQuery) (*TransactionReceiptQuery, error)) TransactionReceiptPaginateOption
WithTransactionReceiptFilter configures pagination filter.
func WithTransactionReceiptOrder ¶
func WithTransactionReceiptOrder(order *TransactionReceiptOrder) TransactionReceiptPaginateOption
WithTransactionReceiptOrder configures pagination ordering.
type TransactionReceiptQuery ¶
type TransactionReceiptQuery struct {
// contains filtered or unexported fields
}
TransactionReceiptQuery is the builder for querying TransactionReceipt entities.
func (*TransactionReceiptQuery) All ¶
func (trq *TransactionReceiptQuery) All(ctx context.Context) ([]*TransactionReceipt, error)
All executes the query and returns a list of TransactionReceipts.
func (*TransactionReceiptQuery) AllX ¶
func (trq *TransactionReceiptQuery) AllX(ctx context.Context) []*TransactionReceipt
AllX is like All, but panics if an error occurs.
func (*TransactionReceiptQuery) Clone ¶
func (trq *TransactionReceiptQuery) Clone() *TransactionReceiptQuery
Clone returns a duplicate of the TransactionReceiptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TransactionReceiptQuery) CollectFields ¶
func (tr *TransactionReceiptQuery) CollectFields(ctx context.Context, satisfies ...string) (*TransactionReceiptQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*TransactionReceiptQuery) Count ¶
func (trq *TransactionReceiptQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TransactionReceiptQuery) CountX ¶
func (trq *TransactionReceiptQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TransactionReceiptQuery) Exist ¶
func (trq *TransactionReceiptQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TransactionReceiptQuery) ExistX ¶
func (trq *TransactionReceiptQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TransactionReceiptQuery) First ¶
func (trq *TransactionReceiptQuery) First(ctx context.Context) (*TransactionReceipt, error)
First returns the first TransactionReceipt entity from the query. Returns a *NotFoundError when no TransactionReceipt was found.
func (*TransactionReceiptQuery) FirstID ¶
func (trq *TransactionReceiptQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first TransactionReceipt ID from the query. Returns a *NotFoundError when no TransactionReceipt ID was found.
func (*TransactionReceiptQuery) FirstIDX ¶
func (trq *TransactionReceiptQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*TransactionReceiptQuery) FirstX ¶
func (trq *TransactionReceiptQuery) FirstX(ctx context.Context) *TransactionReceipt
FirstX is like First, but panics if an error occurs.
func (*TransactionReceiptQuery) GroupBy ¶
func (trq *TransactionReceiptQuery) GroupBy(field string, fields ...string) *TransactionReceiptGroupBy
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 { TransactionHash string `json:"transaction_hash,omitempty"` Count int `json:"count,omitempty"` } client.TransactionReceipt.Query(). GroupBy(transactionreceipt.FieldTransactionHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TransactionReceiptQuery) IDs ¶
func (trq *TransactionReceiptQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of TransactionReceipt IDs.
func (*TransactionReceiptQuery) IDsX ¶
func (trq *TransactionReceiptQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*TransactionReceiptQuery) Limit ¶
func (trq *TransactionReceiptQuery) Limit(limit int) *TransactionReceiptQuery
Limit adds a limit step to the query.
func (*TransactionReceiptQuery) Offset ¶
func (trq *TransactionReceiptQuery) Offset(offset int) *TransactionReceiptQuery
Offset adds an offset step to the query.
func (*TransactionReceiptQuery) Only ¶
func (trq *TransactionReceiptQuery) Only(ctx context.Context) (*TransactionReceipt, error)
Only returns a single TransactionReceipt entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TransactionReceipt entity is found. Returns a *NotFoundError when no TransactionReceipt entities are found.
func (*TransactionReceiptQuery) OnlyID ¶
func (trq *TransactionReceiptQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only TransactionReceipt ID in the query. Returns a *NotSingularError when more than one TransactionReceipt ID is found. Returns a *NotFoundError when no entities are found.
func (*TransactionReceiptQuery) OnlyIDX ¶
func (trq *TransactionReceiptQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TransactionReceiptQuery) OnlyX ¶
func (trq *TransactionReceiptQuery) OnlyX(ctx context.Context) *TransactionReceipt
OnlyX is like Only, but panics if an error occurs.
func (*TransactionReceiptQuery) Order ¶
func (trq *TransactionReceiptQuery) Order(o ...OrderFunc) *TransactionReceiptQuery
Order adds an order step to the query.
func (*TransactionReceiptQuery) Paginate ¶
func (tr *TransactionReceiptQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...TransactionReceiptPaginateOption, ) (*TransactionReceiptConnection, error)
Paginate executes the query and returns a relay based cursor connection to TransactionReceipt.
func (*TransactionReceiptQuery) QueryBlock ¶
func (trq *TransactionReceiptQuery) QueryBlock() *BlockQuery
QueryBlock chains the current query on the "block" edge.
func (*TransactionReceiptQuery) QueryTransaction ¶
func (trq *TransactionReceiptQuery) QueryTransaction() *TransactionQuery
QueryTransaction chains the current query on the "transaction" edge.
func (*TransactionReceiptQuery) Select ¶
func (trq *TransactionReceiptQuery) Select(fields ...string) *TransactionReceiptSelect
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 { TransactionHash string `json:"transaction_hash,omitempty"` } client.TransactionReceipt.Query(). Select(transactionreceipt.FieldTransactionHash). Scan(ctx, &v)
func (*TransactionReceiptQuery) Unique ¶
func (trq *TransactionReceiptQuery) Unique(unique bool) *TransactionReceiptQuery
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 (*TransactionReceiptQuery) Where ¶
func (trq *TransactionReceiptQuery) Where(ps ...predicate.TransactionReceipt) *TransactionReceiptQuery
Where adds a new predicate for the TransactionReceiptQuery builder.
func (*TransactionReceiptQuery) WithBlock ¶
func (trq *TransactionReceiptQuery) WithBlock(opts ...func(*BlockQuery)) *TransactionReceiptQuery
WithBlock tells the query-builder to eager-load the nodes that are connected to the "block" edge. The optional arguments are used to configure the query builder of the edge.
func (*TransactionReceiptQuery) WithTransaction ¶
func (trq *TransactionReceiptQuery) WithTransaction(opts ...func(*TransactionQuery)) *TransactionReceiptQuery
WithTransaction tells the query-builder to eager-load the nodes that are connected to the "transaction" edge. The optional arguments are used to configure the query builder of the edge.
type TransactionReceiptSelect ¶
type TransactionReceiptSelect struct { *TransactionReceiptQuery // contains filtered or unexported fields }
TransactionReceiptSelect is the builder for selecting fields of TransactionReceipt entities.
func (*TransactionReceiptSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*TransactionReceiptSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TransactionReceiptSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TransactionReceiptSelect) Scan ¶
func (trs *TransactionReceiptSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TransactionReceiptSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TransactionReceiptUpdate ¶
type TransactionReceiptUpdate struct {
// contains filtered or unexported fields
}
TransactionReceiptUpdate is the builder for updating TransactionReceipt entities.
func (*TransactionReceiptUpdate) ClearBlock ¶
func (tru *TransactionReceiptUpdate) ClearBlock() *TransactionReceiptUpdate
ClearBlock clears the "block" edge to the Block entity.
func (*TransactionReceiptUpdate) ClearTransaction ¶
func (tru *TransactionReceiptUpdate) ClearTransaction() *TransactionReceiptUpdate
ClearTransaction clears the "transaction" edge to the Transaction entity.
func (*TransactionReceiptUpdate) Exec ¶
func (tru *TransactionReceiptUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionReceiptUpdate) ExecX ¶
func (tru *TransactionReceiptUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionReceiptUpdate) Mutation ¶
func (tru *TransactionReceiptUpdate) Mutation() *TransactionReceiptMutation
Mutation returns the TransactionReceiptMutation object of the builder.
func (*TransactionReceiptUpdate) Save ¶
func (tru *TransactionReceiptUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TransactionReceiptUpdate) SaveX ¶
func (tru *TransactionReceiptUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TransactionReceiptUpdate) SetBlock ¶
func (tru *TransactionReceiptUpdate) SetBlock(b *Block) *TransactionReceiptUpdate
SetBlock sets the "block" edge to the Block entity.
func (*TransactionReceiptUpdate) SetBlockID ¶
func (tru *TransactionReceiptUpdate) SetBlockID(id string) *TransactionReceiptUpdate
SetBlockID sets the "block" edge to the Block entity by ID.
func (*TransactionReceiptUpdate) SetL1OriginMessage ¶
func (tru *TransactionReceiptUpdate) SetL1OriginMessage(t *types.L2Message) *TransactionReceiptUpdate
SetL1OriginMessage sets the "l1_origin_message" field.
func (*TransactionReceiptUpdate) SetMessagesSent ¶
func (tru *TransactionReceiptUpdate) SetMessagesSent(t []*types.L1Message) *TransactionReceiptUpdate
SetMessagesSent sets the "messages_sent" field.
func (*TransactionReceiptUpdate) SetNillableBlockID ¶
func (tru *TransactionReceiptUpdate) SetNillableBlockID(id *string) *TransactionReceiptUpdate
SetNillableBlockID sets the "block" edge to the Block entity by ID if the given value is not nil.
func (*TransactionReceiptUpdate) SetStatus ¶
func (tru *TransactionReceiptUpdate) SetStatus(t transactionreceipt.Status) *TransactionReceiptUpdate
SetStatus sets the "status" field.
func (*TransactionReceiptUpdate) SetStatusData ¶
func (tru *TransactionReceiptUpdate) SetStatusData(s string) *TransactionReceiptUpdate
SetStatusData sets the "status_data" field.
func (*TransactionReceiptUpdate) SetTransaction ¶
func (tru *TransactionReceiptUpdate) SetTransaction(t *Transaction) *TransactionReceiptUpdate
SetTransaction sets the "transaction" edge to the Transaction entity.
func (*TransactionReceiptUpdate) SetTransactionHash ¶
func (tru *TransactionReceiptUpdate) SetTransactionHash(s string) *TransactionReceiptUpdate
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionReceiptUpdate) SetTransactionID ¶
func (tru *TransactionReceiptUpdate) SetTransactionID(id string) *TransactionReceiptUpdate
SetTransactionID sets the "transaction" edge to the Transaction entity by ID.
func (*TransactionReceiptUpdate) Where ¶
func (tru *TransactionReceiptUpdate) Where(ps ...predicate.TransactionReceipt) *TransactionReceiptUpdate
Where appends a list predicates to the TransactionReceiptUpdate builder.
type TransactionReceiptUpdateOne ¶
type TransactionReceiptUpdateOne struct {
// contains filtered or unexported fields
}
TransactionReceiptUpdateOne is the builder for updating a single TransactionReceipt entity.
func (*TransactionReceiptUpdateOne) ClearBlock ¶
func (truo *TransactionReceiptUpdateOne) ClearBlock() *TransactionReceiptUpdateOne
ClearBlock clears the "block" edge to the Block entity.
func (*TransactionReceiptUpdateOne) ClearTransaction ¶
func (truo *TransactionReceiptUpdateOne) ClearTransaction() *TransactionReceiptUpdateOne
ClearTransaction clears the "transaction" edge to the Transaction entity.
func (*TransactionReceiptUpdateOne) Exec ¶
func (truo *TransactionReceiptUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TransactionReceiptUpdateOne) ExecX ¶
func (truo *TransactionReceiptUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionReceiptUpdateOne) Mutation ¶
func (truo *TransactionReceiptUpdateOne) Mutation() *TransactionReceiptMutation
Mutation returns the TransactionReceiptMutation object of the builder.
func (*TransactionReceiptUpdateOne) Save ¶
func (truo *TransactionReceiptUpdateOne) Save(ctx context.Context) (*TransactionReceipt, error)
Save executes the query and returns the updated TransactionReceipt entity.
func (*TransactionReceiptUpdateOne) SaveX ¶
func (truo *TransactionReceiptUpdateOne) SaveX(ctx context.Context) *TransactionReceipt
SaveX is like Save, but panics if an error occurs.
func (*TransactionReceiptUpdateOne) Select ¶
func (truo *TransactionReceiptUpdateOne) Select(field string, fields ...string) *TransactionReceiptUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TransactionReceiptUpdateOne) SetBlock ¶
func (truo *TransactionReceiptUpdateOne) SetBlock(b *Block) *TransactionReceiptUpdateOne
SetBlock sets the "block" edge to the Block entity.
func (*TransactionReceiptUpdateOne) SetBlockID ¶
func (truo *TransactionReceiptUpdateOne) SetBlockID(id string) *TransactionReceiptUpdateOne
SetBlockID sets the "block" edge to the Block entity by ID.
func (*TransactionReceiptUpdateOne) SetL1OriginMessage ¶
func (truo *TransactionReceiptUpdateOne) SetL1OriginMessage(t *types.L2Message) *TransactionReceiptUpdateOne
SetL1OriginMessage sets the "l1_origin_message" field.
func (*TransactionReceiptUpdateOne) SetMessagesSent ¶
func (truo *TransactionReceiptUpdateOne) SetMessagesSent(t []*types.L1Message) *TransactionReceiptUpdateOne
SetMessagesSent sets the "messages_sent" field.
func (*TransactionReceiptUpdateOne) SetNillableBlockID ¶
func (truo *TransactionReceiptUpdateOne) SetNillableBlockID(id *string) *TransactionReceiptUpdateOne
SetNillableBlockID sets the "block" edge to the Block entity by ID if the given value is not nil.
func (*TransactionReceiptUpdateOne) SetStatus ¶
func (truo *TransactionReceiptUpdateOne) SetStatus(t transactionreceipt.Status) *TransactionReceiptUpdateOne
SetStatus sets the "status" field.
func (*TransactionReceiptUpdateOne) SetStatusData ¶
func (truo *TransactionReceiptUpdateOne) SetStatusData(s string) *TransactionReceiptUpdateOne
SetStatusData sets the "status_data" field.
func (*TransactionReceiptUpdateOne) SetTransaction ¶
func (truo *TransactionReceiptUpdateOne) SetTransaction(t *Transaction) *TransactionReceiptUpdateOne
SetTransaction sets the "transaction" edge to the Transaction entity.
func (*TransactionReceiptUpdateOne) SetTransactionHash ¶
func (truo *TransactionReceiptUpdateOne) SetTransactionHash(s string) *TransactionReceiptUpdateOne
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionReceiptUpdateOne) SetTransactionID ¶
func (truo *TransactionReceiptUpdateOne) SetTransactionID(id string) *TransactionReceiptUpdateOne
SetTransactionID sets the "transaction" edge to the Transaction entity by ID.
type TransactionReceiptUpsert ¶
TransactionReceiptUpsert is the "OnConflict" setter.
func (*TransactionReceiptUpsert) SetL1OriginMessage ¶
func (u *TransactionReceiptUpsert) SetL1OriginMessage(v *types.L2Message) *TransactionReceiptUpsert
SetL1OriginMessage sets the "l1_origin_message" field.
func (*TransactionReceiptUpsert) SetMessagesSent ¶
func (u *TransactionReceiptUpsert) SetMessagesSent(v []*types.L1Message) *TransactionReceiptUpsert
SetMessagesSent sets the "messages_sent" field.
func (*TransactionReceiptUpsert) SetStatus ¶
func (u *TransactionReceiptUpsert) SetStatus(v transactionreceipt.Status) *TransactionReceiptUpsert
SetStatus sets the "status" field.
func (*TransactionReceiptUpsert) SetStatusData ¶
func (u *TransactionReceiptUpsert) SetStatusData(v string) *TransactionReceiptUpsert
SetStatusData sets the "status_data" field.
func (*TransactionReceiptUpsert) SetTransactionHash ¶
func (u *TransactionReceiptUpsert) SetTransactionHash(v string) *TransactionReceiptUpsert
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionReceiptUpsert) UpdateL1OriginMessage ¶
func (u *TransactionReceiptUpsert) UpdateL1OriginMessage() *TransactionReceiptUpsert
UpdateL1OriginMessage sets the "l1_origin_message" field to the value that was provided on create.
func (*TransactionReceiptUpsert) UpdateMessagesSent ¶
func (u *TransactionReceiptUpsert) UpdateMessagesSent() *TransactionReceiptUpsert
UpdateMessagesSent sets the "messages_sent" field to the value that was provided on create.
func (*TransactionReceiptUpsert) UpdateStatus ¶
func (u *TransactionReceiptUpsert) UpdateStatus() *TransactionReceiptUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*TransactionReceiptUpsert) UpdateStatusData ¶
func (u *TransactionReceiptUpsert) UpdateStatusData() *TransactionReceiptUpsert
UpdateStatusData sets the "status_data" field to the value that was provided on create.
func (*TransactionReceiptUpsert) UpdateTransactionHash ¶
func (u *TransactionReceiptUpsert) UpdateTransactionHash() *TransactionReceiptUpsert
UpdateTransactionHash sets the "transaction_hash" field to the value that was provided on create.
type TransactionReceiptUpsertBulk ¶
type TransactionReceiptUpsertBulk struct {
// contains filtered or unexported fields
}
TransactionReceiptUpsertBulk is the builder for "upsert"-ing a bulk of TransactionReceipt nodes.
func (*TransactionReceiptUpsertBulk) DoNothing ¶
func (u *TransactionReceiptUpsertBulk) DoNothing() *TransactionReceiptUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TransactionReceiptUpsertBulk) Exec ¶
func (u *TransactionReceiptUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionReceiptUpsertBulk) ExecX ¶
func (u *TransactionReceiptUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionReceiptUpsertBulk) Ignore ¶
func (u *TransactionReceiptUpsertBulk) Ignore() *TransactionReceiptUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TransactionReceipt.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TransactionReceiptUpsertBulk) SetL1OriginMessage ¶
func (u *TransactionReceiptUpsertBulk) SetL1OriginMessage(v *types.L2Message) *TransactionReceiptUpsertBulk
SetL1OriginMessage sets the "l1_origin_message" field.
func (*TransactionReceiptUpsertBulk) SetMessagesSent ¶
func (u *TransactionReceiptUpsertBulk) SetMessagesSent(v []*types.L1Message) *TransactionReceiptUpsertBulk
SetMessagesSent sets the "messages_sent" field.
func (*TransactionReceiptUpsertBulk) SetStatus ¶
func (u *TransactionReceiptUpsertBulk) SetStatus(v transactionreceipt.Status) *TransactionReceiptUpsertBulk
SetStatus sets the "status" field.
func (*TransactionReceiptUpsertBulk) SetStatusData ¶
func (u *TransactionReceiptUpsertBulk) SetStatusData(v string) *TransactionReceiptUpsertBulk
SetStatusData sets the "status_data" field.
func (*TransactionReceiptUpsertBulk) SetTransactionHash ¶
func (u *TransactionReceiptUpsertBulk) SetTransactionHash(v string) *TransactionReceiptUpsertBulk
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionReceiptUpsertBulk) Update ¶
func (u *TransactionReceiptUpsertBulk) Update(set func(*TransactionReceiptUpsert)) *TransactionReceiptUpsertBulk
Update allows overriding fields `UPDATE` values. See the TransactionReceiptCreateBulk.OnConflict documentation for more info.
func (*TransactionReceiptUpsertBulk) UpdateL1OriginMessage ¶
func (u *TransactionReceiptUpsertBulk) UpdateL1OriginMessage() *TransactionReceiptUpsertBulk
UpdateL1OriginMessage sets the "l1_origin_message" field to the value that was provided on create.
func (*TransactionReceiptUpsertBulk) UpdateMessagesSent ¶
func (u *TransactionReceiptUpsertBulk) UpdateMessagesSent() *TransactionReceiptUpsertBulk
UpdateMessagesSent sets the "messages_sent" field to the value that was provided on create.
func (*TransactionReceiptUpsertBulk) UpdateNewValues ¶
func (u *TransactionReceiptUpsertBulk) UpdateNewValues() *TransactionReceiptUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TransactionReceipt.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(transactionreceipt.FieldID) }), ). Exec(ctx)
func (*TransactionReceiptUpsertBulk) UpdateStatus ¶
func (u *TransactionReceiptUpsertBulk) UpdateStatus() *TransactionReceiptUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*TransactionReceiptUpsertBulk) UpdateStatusData ¶
func (u *TransactionReceiptUpsertBulk) UpdateStatusData() *TransactionReceiptUpsertBulk
UpdateStatusData sets the "status_data" field to the value that was provided on create.
func (*TransactionReceiptUpsertBulk) UpdateTransactionHash ¶
func (u *TransactionReceiptUpsertBulk) UpdateTransactionHash() *TransactionReceiptUpsertBulk
UpdateTransactionHash sets the "transaction_hash" field to the value that was provided on create.
type TransactionReceiptUpsertOne ¶
type TransactionReceiptUpsertOne struct {
// contains filtered or unexported fields
}
TransactionReceiptUpsertOne is the builder for "upsert"-ing
one TransactionReceipt node.
func (*TransactionReceiptUpsertOne) DoNothing ¶
func (u *TransactionReceiptUpsertOne) DoNothing() *TransactionReceiptUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TransactionReceiptUpsertOne) Exec ¶
func (u *TransactionReceiptUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionReceiptUpsertOne) ExecX ¶
func (u *TransactionReceiptUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionReceiptUpsertOne) ID ¶
func (u *TransactionReceiptUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TransactionReceiptUpsertOne) IDX ¶
func (u *TransactionReceiptUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*TransactionReceiptUpsertOne) Ignore ¶
func (u *TransactionReceiptUpsertOne) Ignore() *TransactionReceiptUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TransactionReceipt.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TransactionReceiptUpsertOne) SetL1OriginMessage ¶
func (u *TransactionReceiptUpsertOne) SetL1OriginMessage(v *types.L2Message) *TransactionReceiptUpsertOne
SetL1OriginMessage sets the "l1_origin_message" field.
func (*TransactionReceiptUpsertOne) SetMessagesSent ¶
func (u *TransactionReceiptUpsertOne) SetMessagesSent(v []*types.L1Message) *TransactionReceiptUpsertOne
SetMessagesSent sets the "messages_sent" field.
func (*TransactionReceiptUpsertOne) SetStatus ¶
func (u *TransactionReceiptUpsertOne) SetStatus(v transactionreceipt.Status) *TransactionReceiptUpsertOne
SetStatus sets the "status" field.
func (*TransactionReceiptUpsertOne) SetStatusData ¶
func (u *TransactionReceiptUpsertOne) SetStatusData(v string) *TransactionReceiptUpsertOne
SetStatusData sets the "status_data" field.
func (*TransactionReceiptUpsertOne) SetTransactionHash ¶
func (u *TransactionReceiptUpsertOne) SetTransactionHash(v string) *TransactionReceiptUpsertOne
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionReceiptUpsertOne) Update ¶
func (u *TransactionReceiptUpsertOne) Update(set func(*TransactionReceiptUpsert)) *TransactionReceiptUpsertOne
Update allows overriding fields `UPDATE` values. See the TransactionReceiptCreate.OnConflict documentation for more info.
func (*TransactionReceiptUpsertOne) UpdateL1OriginMessage ¶
func (u *TransactionReceiptUpsertOne) UpdateL1OriginMessage() *TransactionReceiptUpsertOne
UpdateL1OriginMessage sets the "l1_origin_message" field to the value that was provided on create.
func (*TransactionReceiptUpsertOne) UpdateMessagesSent ¶
func (u *TransactionReceiptUpsertOne) UpdateMessagesSent() *TransactionReceiptUpsertOne
UpdateMessagesSent sets the "messages_sent" field to the value that was provided on create.
func (*TransactionReceiptUpsertOne) UpdateNewValues ¶
func (u *TransactionReceiptUpsertOne) UpdateNewValues() *TransactionReceiptUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.TransactionReceipt.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(transactionreceipt.FieldID) }), ). Exec(ctx)
func (*TransactionReceiptUpsertOne) UpdateStatus ¶
func (u *TransactionReceiptUpsertOne) UpdateStatus() *TransactionReceiptUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*TransactionReceiptUpsertOne) UpdateStatusData ¶
func (u *TransactionReceiptUpsertOne) UpdateStatusData() *TransactionReceiptUpsertOne
UpdateStatusData sets the "status_data" field to the value that was provided on create.
func (*TransactionReceiptUpsertOne) UpdateTransactionHash ¶
func (u *TransactionReceiptUpsertOne) UpdateTransactionHash() *TransactionReceiptUpsertOne
UpdateTransactionHash sets the "transaction_hash" field to the value that was provided on create.
type TransactionReceiptWhereInput ¶
type TransactionReceiptWhereInput struct { Not *TransactionReceiptWhereInput `json:"not,omitempty"` Or []*TransactionReceiptWhereInput `json:"or,omitempty"` And []*TransactionReceiptWhereInput `json:"and,omitempty"` // "id" field predicates. ID *string `json:"id,omitempty"` IDNEQ *string `json:"idNEQ,omitempty"` IDIn []string `json:"idIn,omitempty"` IDNotIn []string `json:"idNotIn,omitempty"` IDGT *string `json:"idGT,omitempty"` IDGTE *string `json:"idGTE,omitempty"` IDLT *string `json:"idLT,omitempty"` IDLTE *string `json:"idLTE,omitempty"` // "transaction_hash" field predicates. TransactionHash *string `json:"transactionHash,omitempty"` TransactionHashNEQ *string `json:"transactionHashNEQ,omitempty"` TransactionHashIn []string `json:"transactionHashIn,omitempty"` TransactionHashNotIn []string `json:"transactionHashNotIn,omitempty"` TransactionHashGT *string `json:"transactionHashGT,omitempty"` TransactionHashGTE *string `json:"transactionHashGTE,omitempty"` TransactionHashLT *string `json:"transactionHashLT,omitempty"` TransactionHashLTE *string `json:"transactionHashLTE,omitempty"` TransactionHashContains *string `json:"transactionHashContains,omitempty"` TransactionHashHasPrefix *string `json:"transactionHashHasPrefix,omitempty"` TransactionHashHasSuffix *string `json:"transactionHashHasSuffix,omitempty"` TransactionHashEqualFold *string `json:"transactionHashEqualFold,omitempty"` TransactionHashContainsFold *string `json:"transactionHashContainsFold,omitempty"` // "status" field predicates. Status *transactionreceipt.Status `json:"status,omitempty"` StatusNEQ *transactionreceipt.Status `json:"statusNEQ,omitempty"` StatusIn []transactionreceipt.Status `json:"statusIn,omitempty"` StatusNotIn []transactionreceipt.Status `json:"statusNotIn,omitempty"` // "status_data" field predicates. StatusData *string `json:"statusData,omitempty"` StatusDataNEQ *string `json:"statusDataNEQ,omitempty"` StatusDataIn []string `json:"statusDataIn,omitempty"` StatusDataNotIn []string `json:"statusDataNotIn,omitempty"` StatusDataGT *string `json:"statusDataGT,omitempty"` StatusDataGTE *string `json:"statusDataGTE,omitempty"` StatusDataLT *string `json:"statusDataLT,omitempty"` StatusDataLTE *string `json:"statusDataLTE,omitempty"` StatusDataContains *string `json:"statusDataContains,omitempty"` StatusDataHasPrefix *string `json:"statusDataHasPrefix,omitempty"` StatusDataHasSuffix *string `json:"statusDataHasSuffix,omitempty"` StatusDataEqualFold *string `json:"statusDataEqualFold,omitempty"` StatusDataContainsFold *string `json:"statusDataContainsFold,omitempty"` // "block" edge predicates. HasBlock *bool `json:"hasBlock,omitempty"` HasBlockWith []*BlockWhereInput `json:"hasBlockWith,omitempty"` // "transaction" edge predicates. HasTransaction *bool `json:"hasTransaction,omitempty"` HasTransactionWith []*TransactionWhereInput `json:"hasTransactionWith,omitempty"` }
TransactionReceiptWhereInput represents a where input for filtering TransactionReceipt queries.
func (*TransactionReceiptWhereInput) Filter ¶
func (i *TransactionReceiptWhereInput) Filter(q *TransactionReceiptQuery) (*TransactionReceiptQuery, error)
Filter applies the TransactionReceiptWhereInput filter on the TransactionReceiptQuery builder.
func (*TransactionReceiptWhereInput) P ¶
func (i *TransactionReceiptWhereInput) P() (predicate.TransactionReceipt, error)
P returns a predicate for filtering transactionreceipts. An error is returned if the input is empty or invalid.
type TransactionReceipts ¶
type TransactionReceipts []*TransactionReceipt
TransactionReceipts is a parsable slice of TransactionReceipt.
type TransactionSelect ¶
type TransactionSelect struct { *TransactionQuery // contains filtered or unexported fields }
TransactionSelect is the builder for selecting fields of Transaction entities.
func (*TransactionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Scan ¶
func (ts *TransactionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TransactionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TransactionUpdate ¶
type TransactionUpdate struct {
// contains filtered or unexported fields
}
TransactionUpdate is the builder for updating Transaction entities.
func (*TransactionUpdate) AddEventIDs ¶
func (tu *TransactionUpdate) AddEventIDs(ids ...string) *TransactionUpdate
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*TransactionUpdate) AddEvents ¶
func (tu *TransactionUpdate) AddEvents(e ...*Event) *TransactionUpdate
AddEvents adds the "events" edges to the Event entity.
func (*TransactionUpdate) ClearBlock ¶
func (tu *TransactionUpdate) ClearBlock() *TransactionUpdate
ClearBlock clears the "block" edge to the Block entity.
func (*TransactionUpdate) ClearEntryPointSelector ¶
func (tu *TransactionUpdate) ClearEntryPointSelector() *TransactionUpdate
ClearEntryPointSelector clears the value of the "entry_point_selector" field.
func (*TransactionUpdate) ClearEvents ¶
func (tu *TransactionUpdate) ClearEvents() *TransactionUpdate
ClearEvents clears all "events" edges to the Event entity.
func (*TransactionUpdate) ClearNonce ¶
func (tu *TransactionUpdate) ClearNonce() *TransactionUpdate
ClearNonce clears the value of the "nonce" field.
func (*TransactionUpdate) ClearReceipt ¶
func (tu *TransactionUpdate) ClearReceipt() *TransactionUpdate
ClearReceipt clears the "receipt" edge to the TransactionReceipt entity.
func (*TransactionUpdate) ClearSignature ¶
func (tu *TransactionUpdate) ClearSignature() *TransactionUpdate
ClearSignature clears the value of the "signature" field.
func (*TransactionUpdate) Exec ¶
func (tu *TransactionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionUpdate) ExecX ¶
func (tu *TransactionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionUpdate) Mutation ¶
func (tu *TransactionUpdate) Mutation() *TransactionMutation
Mutation returns the TransactionMutation object of the builder.
func (*TransactionUpdate) RemoveEventIDs ¶
func (tu *TransactionUpdate) RemoveEventIDs(ids ...string) *TransactionUpdate
RemoveEventIDs removes the "events" edge to Event entities by IDs.
func (*TransactionUpdate) RemoveEvents ¶
func (tu *TransactionUpdate) RemoveEvents(e ...*Event) *TransactionUpdate
RemoveEvents removes "events" edges to Event entities.
func (*TransactionUpdate) Save ¶
func (tu *TransactionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TransactionUpdate) SaveX ¶
func (tu *TransactionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TransactionUpdate) SetBlock ¶
func (tu *TransactionUpdate) SetBlock(b *Block) *TransactionUpdate
SetBlock sets the "block" edge to the Block entity.
func (*TransactionUpdate) SetBlockID ¶
func (tu *TransactionUpdate) SetBlockID(id string) *TransactionUpdate
SetBlockID sets the "block" edge to the Block entity by ID.
func (*TransactionUpdate) SetCalldata ¶
func (tu *TransactionUpdate) SetCalldata(s []string) *TransactionUpdate
SetCalldata sets the "calldata" field.
func (*TransactionUpdate) SetContractAddress ¶
func (tu *TransactionUpdate) SetContractAddress(s string) *TransactionUpdate
SetContractAddress sets the "contract_address" field.
func (*TransactionUpdate) SetEntryPointSelector ¶
func (tu *TransactionUpdate) SetEntryPointSelector(s string) *TransactionUpdate
SetEntryPointSelector sets the "entry_point_selector" field.
func (*TransactionUpdate) SetNillableBlockID ¶
func (tu *TransactionUpdate) SetNillableBlockID(id *string) *TransactionUpdate
SetNillableBlockID sets the "block" edge to the Block entity by ID if the given value is not nil.
func (*TransactionUpdate) SetNillableEntryPointSelector ¶
func (tu *TransactionUpdate) SetNillableEntryPointSelector(s *string) *TransactionUpdate
SetNillableEntryPointSelector sets the "entry_point_selector" field if the given value is not nil.
func (*TransactionUpdate) SetNillableNonce ¶
func (tu *TransactionUpdate) SetNillableNonce(s *string) *TransactionUpdate
SetNillableNonce sets the "nonce" field if the given value is not nil.
func (*TransactionUpdate) SetNillableReceiptID ¶
func (tu *TransactionUpdate) SetNillableReceiptID(id *string) *TransactionUpdate
SetNillableReceiptID sets the "receipt" edge to the TransactionReceipt entity by ID if the given value is not nil.
func (*TransactionUpdate) SetNonce ¶
func (tu *TransactionUpdate) SetNonce(s string) *TransactionUpdate
SetNonce sets the "nonce" field.
func (*TransactionUpdate) SetReceipt ¶
func (tu *TransactionUpdate) SetReceipt(t *TransactionReceipt) *TransactionUpdate
SetReceipt sets the "receipt" edge to the TransactionReceipt entity.
func (*TransactionUpdate) SetReceiptID ¶
func (tu *TransactionUpdate) SetReceiptID(id string) *TransactionUpdate
SetReceiptID sets the "receipt" edge to the TransactionReceipt entity by ID.
func (*TransactionUpdate) SetSignature ¶
func (tu *TransactionUpdate) SetSignature(s []string) *TransactionUpdate
SetSignature sets the "signature" field.
func (*TransactionUpdate) SetTransactionHash ¶
func (tu *TransactionUpdate) SetTransactionHash(s string) *TransactionUpdate
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionUpdate) Where ¶
func (tu *TransactionUpdate) Where(ps ...predicate.Transaction) *TransactionUpdate
Where appends a list predicates to the TransactionUpdate builder.
type TransactionUpdateOne ¶
type TransactionUpdateOne struct {
// contains filtered or unexported fields
}
TransactionUpdateOne is the builder for updating a single Transaction entity.
func (*TransactionUpdateOne) AddEventIDs ¶
func (tuo *TransactionUpdateOne) AddEventIDs(ids ...string) *TransactionUpdateOne
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*TransactionUpdateOne) AddEvents ¶
func (tuo *TransactionUpdateOne) AddEvents(e ...*Event) *TransactionUpdateOne
AddEvents adds the "events" edges to the Event entity.
func (*TransactionUpdateOne) ClearBlock ¶
func (tuo *TransactionUpdateOne) ClearBlock() *TransactionUpdateOne
ClearBlock clears the "block" edge to the Block entity.
func (*TransactionUpdateOne) ClearEntryPointSelector ¶
func (tuo *TransactionUpdateOne) ClearEntryPointSelector() *TransactionUpdateOne
ClearEntryPointSelector clears the value of the "entry_point_selector" field.
func (*TransactionUpdateOne) ClearEvents ¶
func (tuo *TransactionUpdateOne) ClearEvents() *TransactionUpdateOne
ClearEvents clears all "events" edges to the Event entity.
func (*TransactionUpdateOne) ClearNonce ¶
func (tuo *TransactionUpdateOne) ClearNonce() *TransactionUpdateOne
ClearNonce clears the value of the "nonce" field.
func (*TransactionUpdateOne) ClearReceipt ¶
func (tuo *TransactionUpdateOne) ClearReceipt() *TransactionUpdateOne
ClearReceipt clears the "receipt" edge to the TransactionReceipt entity.
func (*TransactionUpdateOne) ClearSignature ¶
func (tuo *TransactionUpdateOne) ClearSignature() *TransactionUpdateOne
ClearSignature clears the value of the "signature" field.
func (*TransactionUpdateOne) Exec ¶
func (tuo *TransactionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TransactionUpdateOne) ExecX ¶
func (tuo *TransactionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionUpdateOne) Mutation ¶
func (tuo *TransactionUpdateOne) Mutation() *TransactionMutation
Mutation returns the TransactionMutation object of the builder.
func (*TransactionUpdateOne) RemoveEventIDs ¶
func (tuo *TransactionUpdateOne) RemoveEventIDs(ids ...string) *TransactionUpdateOne
RemoveEventIDs removes the "events" edge to Event entities by IDs.
func (*TransactionUpdateOne) RemoveEvents ¶
func (tuo *TransactionUpdateOne) RemoveEvents(e ...*Event) *TransactionUpdateOne
RemoveEvents removes "events" edges to Event entities.
func (*TransactionUpdateOne) Save ¶
func (tuo *TransactionUpdateOne) Save(ctx context.Context) (*Transaction, error)
Save executes the query and returns the updated Transaction entity.
func (*TransactionUpdateOne) SaveX ¶
func (tuo *TransactionUpdateOne) SaveX(ctx context.Context) *Transaction
SaveX is like Save, but panics if an error occurs.
func (*TransactionUpdateOne) Select ¶
func (tuo *TransactionUpdateOne) Select(field string, fields ...string) *TransactionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TransactionUpdateOne) SetBlock ¶
func (tuo *TransactionUpdateOne) SetBlock(b *Block) *TransactionUpdateOne
SetBlock sets the "block" edge to the Block entity.
func (*TransactionUpdateOne) SetBlockID ¶
func (tuo *TransactionUpdateOne) SetBlockID(id string) *TransactionUpdateOne
SetBlockID sets the "block" edge to the Block entity by ID.
func (*TransactionUpdateOne) SetCalldata ¶
func (tuo *TransactionUpdateOne) SetCalldata(s []string) *TransactionUpdateOne
SetCalldata sets the "calldata" field.
func (*TransactionUpdateOne) SetContractAddress ¶
func (tuo *TransactionUpdateOne) SetContractAddress(s string) *TransactionUpdateOne
SetContractAddress sets the "contract_address" field.
func (*TransactionUpdateOne) SetEntryPointSelector ¶
func (tuo *TransactionUpdateOne) SetEntryPointSelector(s string) *TransactionUpdateOne
SetEntryPointSelector sets the "entry_point_selector" field.
func (*TransactionUpdateOne) SetNillableBlockID ¶
func (tuo *TransactionUpdateOne) SetNillableBlockID(id *string) *TransactionUpdateOne
SetNillableBlockID sets the "block" edge to the Block entity by ID if the given value is not nil.
func (*TransactionUpdateOne) SetNillableEntryPointSelector ¶
func (tuo *TransactionUpdateOne) SetNillableEntryPointSelector(s *string) *TransactionUpdateOne
SetNillableEntryPointSelector sets the "entry_point_selector" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableNonce ¶
func (tuo *TransactionUpdateOne) SetNillableNonce(s *string) *TransactionUpdateOne
SetNillableNonce sets the "nonce" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableReceiptID ¶
func (tuo *TransactionUpdateOne) SetNillableReceiptID(id *string) *TransactionUpdateOne
SetNillableReceiptID sets the "receipt" edge to the TransactionReceipt entity by ID if the given value is not nil.
func (*TransactionUpdateOne) SetNonce ¶
func (tuo *TransactionUpdateOne) SetNonce(s string) *TransactionUpdateOne
SetNonce sets the "nonce" field.
func (*TransactionUpdateOne) SetReceipt ¶
func (tuo *TransactionUpdateOne) SetReceipt(t *TransactionReceipt) *TransactionUpdateOne
SetReceipt sets the "receipt" edge to the TransactionReceipt entity.
func (*TransactionUpdateOne) SetReceiptID ¶
func (tuo *TransactionUpdateOne) SetReceiptID(id string) *TransactionUpdateOne
SetReceiptID sets the "receipt" edge to the TransactionReceipt entity by ID.
func (*TransactionUpdateOne) SetSignature ¶
func (tuo *TransactionUpdateOne) SetSignature(s []string) *TransactionUpdateOne
SetSignature sets the "signature" field.
func (*TransactionUpdateOne) SetTransactionHash ¶
func (tuo *TransactionUpdateOne) SetTransactionHash(s string) *TransactionUpdateOne
SetTransactionHash sets the "transaction_hash" field.
type TransactionUpsert ¶
TransactionUpsert is the "OnConflict" setter.
func (*TransactionUpsert) ClearEntryPointSelector ¶
func (u *TransactionUpsert) ClearEntryPointSelector() *TransactionUpsert
ClearEntryPointSelector clears the value of the "entry_point_selector" field.
func (*TransactionUpsert) ClearNonce ¶
func (u *TransactionUpsert) ClearNonce() *TransactionUpsert
ClearNonce clears the value of the "nonce" field.
func (*TransactionUpsert) ClearSignature ¶
func (u *TransactionUpsert) ClearSignature() *TransactionUpsert
ClearSignature clears the value of the "signature" field.
func (*TransactionUpsert) SetCalldata ¶
func (u *TransactionUpsert) SetCalldata(v []string) *TransactionUpsert
SetCalldata sets the "calldata" field.
func (*TransactionUpsert) SetContractAddress ¶
func (u *TransactionUpsert) SetContractAddress(v string) *TransactionUpsert
SetContractAddress sets the "contract_address" field.
func (*TransactionUpsert) SetEntryPointSelector ¶
func (u *TransactionUpsert) SetEntryPointSelector(v string) *TransactionUpsert
SetEntryPointSelector sets the "entry_point_selector" field.
func (*TransactionUpsert) SetNonce ¶
func (u *TransactionUpsert) SetNonce(v string) *TransactionUpsert
SetNonce sets the "nonce" field.
func (*TransactionUpsert) SetSignature ¶
func (u *TransactionUpsert) SetSignature(v []string) *TransactionUpsert
SetSignature sets the "signature" field.
func (*TransactionUpsert) SetTransactionHash ¶
func (u *TransactionUpsert) SetTransactionHash(v string) *TransactionUpsert
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionUpsert) UpdateCalldata ¶
func (u *TransactionUpsert) UpdateCalldata() *TransactionUpsert
UpdateCalldata sets the "calldata" field to the value that was provided on create.
func (*TransactionUpsert) UpdateContractAddress ¶
func (u *TransactionUpsert) UpdateContractAddress() *TransactionUpsert
UpdateContractAddress sets the "contract_address" field to the value that was provided on create.
func (*TransactionUpsert) UpdateEntryPointSelector ¶
func (u *TransactionUpsert) UpdateEntryPointSelector() *TransactionUpsert
UpdateEntryPointSelector sets the "entry_point_selector" field to the value that was provided on create.
func (*TransactionUpsert) UpdateNonce ¶
func (u *TransactionUpsert) UpdateNonce() *TransactionUpsert
UpdateNonce sets the "nonce" field to the value that was provided on create.
func (*TransactionUpsert) UpdateSignature ¶
func (u *TransactionUpsert) UpdateSignature() *TransactionUpsert
UpdateSignature sets the "signature" field to the value that was provided on create.
func (*TransactionUpsert) UpdateTransactionHash ¶
func (u *TransactionUpsert) UpdateTransactionHash() *TransactionUpsert
UpdateTransactionHash sets the "transaction_hash" field to the value that was provided on create.
type TransactionUpsertBulk ¶
type TransactionUpsertBulk struct {
// contains filtered or unexported fields
}
TransactionUpsertBulk is the builder for "upsert"-ing a bulk of Transaction nodes.
func (*TransactionUpsertBulk) ClearEntryPointSelector ¶
func (u *TransactionUpsertBulk) ClearEntryPointSelector() *TransactionUpsertBulk
ClearEntryPointSelector clears the value of the "entry_point_selector" field.
func (*TransactionUpsertBulk) ClearNonce ¶
func (u *TransactionUpsertBulk) ClearNonce() *TransactionUpsertBulk
ClearNonce clears the value of the "nonce" field.
func (*TransactionUpsertBulk) ClearSignature ¶
func (u *TransactionUpsertBulk) ClearSignature() *TransactionUpsertBulk
ClearSignature clears the value of the "signature" field.
func (*TransactionUpsertBulk) DoNothing ¶
func (u *TransactionUpsertBulk) DoNothing() *TransactionUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TransactionUpsertBulk) Exec ¶
func (u *TransactionUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionUpsertBulk) ExecX ¶
func (u *TransactionUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionUpsertBulk) Ignore ¶
func (u *TransactionUpsertBulk) Ignore() *TransactionUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Transaction.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TransactionUpsertBulk) SetCalldata ¶
func (u *TransactionUpsertBulk) SetCalldata(v []string) *TransactionUpsertBulk
SetCalldata sets the "calldata" field.
func (*TransactionUpsertBulk) SetContractAddress ¶
func (u *TransactionUpsertBulk) SetContractAddress(v string) *TransactionUpsertBulk
SetContractAddress sets the "contract_address" field.
func (*TransactionUpsertBulk) SetEntryPointSelector ¶
func (u *TransactionUpsertBulk) SetEntryPointSelector(v string) *TransactionUpsertBulk
SetEntryPointSelector sets the "entry_point_selector" field.
func (*TransactionUpsertBulk) SetNonce ¶
func (u *TransactionUpsertBulk) SetNonce(v string) *TransactionUpsertBulk
SetNonce sets the "nonce" field.
func (*TransactionUpsertBulk) SetSignature ¶
func (u *TransactionUpsertBulk) SetSignature(v []string) *TransactionUpsertBulk
SetSignature sets the "signature" field.
func (*TransactionUpsertBulk) SetTransactionHash ¶
func (u *TransactionUpsertBulk) SetTransactionHash(v string) *TransactionUpsertBulk
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionUpsertBulk) Update ¶
func (u *TransactionUpsertBulk) Update(set func(*TransactionUpsert)) *TransactionUpsertBulk
Update allows overriding fields `UPDATE` values. See the TransactionCreateBulk.OnConflict documentation for more info.
func (*TransactionUpsertBulk) UpdateCalldata ¶
func (u *TransactionUpsertBulk) UpdateCalldata() *TransactionUpsertBulk
UpdateCalldata sets the "calldata" field to the value that was provided on create.
func (*TransactionUpsertBulk) UpdateContractAddress ¶
func (u *TransactionUpsertBulk) UpdateContractAddress() *TransactionUpsertBulk
UpdateContractAddress sets the "contract_address" field to the value that was provided on create.
func (*TransactionUpsertBulk) UpdateEntryPointSelector ¶
func (u *TransactionUpsertBulk) UpdateEntryPointSelector() *TransactionUpsertBulk
UpdateEntryPointSelector sets the "entry_point_selector" field to the value that was provided on create.
func (*TransactionUpsertBulk) UpdateNewValues ¶
func (u *TransactionUpsertBulk) UpdateNewValues() *TransactionUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Transaction.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(transaction.FieldID) }), ). Exec(ctx)
func (*TransactionUpsertBulk) UpdateNonce ¶
func (u *TransactionUpsertBulk) UpdateNonce() *TransactionUpsertBulk
UpdateNonce sets the "nonce" field to the value that was provided on create.
func (*TransactionUpsertBulk) UpdateSignature ¶
func (u *TransactionUpsertBulk) UpdateSignature() *TransactionUpsertBulk
UpdateSignature sets the "signature" field to the value that was provided on create.
func (*TransactionUpsertBulk) UpdateTransactionHash ¶
func (u *TransactionUpsertBulk) UpdateTransactionHash() *TransactionUpsertBulk
UpdateTransactionHash sets the "transaction_hash" field to the value that was provided on create.
type TransactionUpsertOne ¶
type TransactionUpsertOne struct {
// contains filtered or unexported fields
}
TransactionUpsertOne is the builder for "upsert"-ing
one Transaction node.
func (*TransactionUpsertOne) ClearEntryPointSelector ¶
func (u *TransactionUpsertOne) ClearEntryPointSelector() *TransactionUpsertOne
ClearEntryPointSelector clears the value of the "entry_point_selector" field.
func (*TransactionUpsertOne) ClearNonce ¶
func (u *TransactionUpsertOne) ClearNonce() *TransactionUpsertOne
ClearNonce clears the value of the "nonce" field.
func (*TransactionUpsertOne) ClearSignature ¶
func (u *TransactionUpsertOne) ClearSignature() *TransactionUpsertOne
ClearSignature clears the value of the "signature" field.
func (*TransactionUpsertOne) DoNothing ¶
func (u *TransactionUpsertOne) DoNothing() *TransactionUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TransactionUpsertOne) Exec ¶
func (u *TransactionUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionUpsertOne) ExecX ¶
func (u *TransactionUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionUpsertOne) ID ¶
func (u *TransactionUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TransactionUpsertOne) IDX ¶
func (u *TransactionUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*TransactionUpsertOne) Ignore ¶
func (u *TransactionUpsertOne) Ignore() *TransactionUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Transaction.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TransactionUpsertOne) SetCalldata ¶
func (u *TransactionUpsertOne) SetCalldata(v []string) *TransactionUpsertOne
SetCalldata sets the "calldata" field.
func (*TransactionUpsertOne) SetContractAddress ¶
func (u *TransactionUpsertOne) SetContractAddress(v string) *TransactionUpsertOne
SetContractAddress sets the "contract_address" field.
func (*TransactionUpsertOne) SetEntryPointSelector ¶
func (u *TransactionUpsertOne) SetEntryPointSelector(v string) *TransactionUpsertOne
SetEntryPointSelector sets the "entry_point_selector" field.
func (*TransactionUpsertOne) SetNonce ¶
func (u *TransactionUpsertOne) SetNonce(v string) *TransactionUpsertOne
SetNonce sets the "nonce" field.
func (*TransactionUpsertOne) SetSignature ¶
func (u *TransactionUpsertOne) SetSignature(v []string) *TransactionUpsertOne
SetSignature sets the "signature" field.
func (*TransactionUpsertOne) SetTransactionHash ¶
func (u *TransactionUpsertOne) SetTransactionHash(v string) *TransactionUpsertOne
SetTransactionHash sets the "transaction_hash" field.
func (*TransactionUpsertOne) Update ¶
func (u *TransactionUpsertOne) Update(set func(*TransactionUpsert)) *TransactionUpsertOne
Update allows overriding fields `UPDATE` values. See the TransactionCreate.OnConflict documentation for more info.
func (*TransactionUpsertOne) UpdateCalldata ¶
func (u *TransactionUpsertOne) UpdateCalldata() *TransactionUpsertOne
UpdateCalldata sets the "calldata" field to the value that was provided on create.
func (*TransactionUpsertOne) UpdateContractAddress ¶
func (u *TransactionUpsertOne) UpdateContractAddress() *TransactionUpsertOne
UpdateContractAddress sets the "contract_address" field to the value that was provided on create.
func (*TransactionUpsertOne) UpdateEntryPointSelector ¶
func (u *TransactionUpsertOne) UpdateEntryPointSelector() *TransactionUpsertOne
UpdateEntryPointSelector sets the "entry_point_selector" field to the value that was provided on create.
func (*TransactionUpsertOne) UpdateNewValues ¶
func (u *TransactionUpsertOne) UpdateNewValues() *TransactionUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Transaction.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(transaction.FieldID) }), ). Exec(ctx)
func (*TransactionUpsertOne) UpdateNonce ¶
func (u *TransactionUpsertOne) UpdateNonce() *TransactionUpsertOne
UpdateNonce sets the "nonce" field to the value that was provided on create.
func (*TransactionUpsertOne) UpdateSignature ¶
func (u *TransactionUpsertOne) UpdateSignature() *TransactionUpsertOne
UpdateSignature sets the "signature" field to the value that was provided on create.
func (*TransactionUpsertOne) UpdateTransactionHash ¶
func (u *TransactionUpsertOne) UpdateTransactionHash() *TransactionUpsertOne
UpdateTransactionHash sets the "transaction_hash" field to the value that was provided on create.
type TransactionWhereInput ¶
type TransactionWhereInput struct { Not *TransactionWhereInput `json:"not,omitempty"` Or []*TransactionWhereInput `json:"or,omitempty"` And []*TransactionWhereInput `json:"and,omitempty"` // "id" field predicates. ID *string `json:"id,omitempty"` IDNEQ *string `json:"idNEQ,omitempty"` IDIn []string `json:"idIn,omitempty"` IDNotIn []string `json:"idNotIn,omitempty"` IDGT *string `json:"idGT,omitempty"` IDGTE *string `json:"idGTE,omitempty"` IDLT *string `json:"idLT,omitempty"` IDLTE *string `json:"idLTE,omitempty"` // "contract_address" field predicates. ContractAddress *string `json:"contractAddress,omitempty"` ContractAddressNEQ *string `json:"contractAddressNEQ,omitempty"` ContractAddressIn []string `json:"contractAddressIn,omitempty"` ContractAddressNotIn []string `json:"contractAddressNotIn,omitempty"` ContractAddressGT *string `json:"contractAddressGT,omitempty"` ContractAddressGTE *string `json:"contractAddressGTE,omitempty"` ContractAddressLT *string `json:"contractAddressLT,omitempty"` ContractAddressLTE *string `json:"contractAddressLTE,omitempty"` ContractAddressContains *string `json:"contractAddressContains,omitempty"` ContractAddressHasPrefix *string `json:"contractAddressHasPrefix,omitempty"` ContractAddressHasSuffix *string `json:"contractAddressHasSuffix,omitempty"` ContractAddressEqualFold *string `json:"contractAddressEqualFold,omitempty"` ContractAddressContainsFold *string `json:"contractAddressContainsFold,omitempty"` // "entry_point_selector" field predicates. EntryPointSelector *string `json:"entryPointSelector,omitempty"` EntryPointSelectorNEQ *string `json:"entryPointSelectorNEQ,omitempty"` EntryPointSelectorIn []string `json:"entryPointSelectorIn,omitempty"` EntryPointSelectorNotIn []string `json:"entryPointSelectorNotIn,omitempty"` EntryPointSelectorGT *string `json:"entryPointSelectorGT,omitempty"` EntryPointSelectorGTE *string `json:"entryPointSelectorGTE,omitempty"` EntryPointSelectorLT *string `json:"entryPointSelectorLT,omitempty"` EntryPointSelectorLTE *string `json:"entryPointSelectorLTE,omitempty"` EntryPointSelectorContains *string `json:"entryPointSelectorContains,omitempty"` EntryPointSelectorHasPrefix *string `json:"entryPointSelectorHasPrefix,omitempty"` EntryPointSelectorHasSuffix *string `json:"entryPointSelectorHasSuffix,omitempty"` EntryPointSelectorIsNil bool `json:"entryPointSelectorIsNil,omitempty"` EntryPointSelectorNotNil bool `json:"entryPointSelectorNotNil,omitempty"` EntryPointSelectorEqualFold *string `json:"entryPointSelectorEqualFold,omitempty"` EntryPointSelectorContainsFold *string `json:"entryPointSelectorContainsFold,omitempty"` // "transaction_hash" field predicates. TransactionHash *string `json:"transactionHash,omitempty"` TransactionHashNEQ *string `json:"transactionHashNEQ,omitempty"` TransactionHashIn []string `json:"transactionHashIn,omitempty"` TransactionHashNotIn []string `json:"transactionHashNotIn,omitempty"` TransactionHashGT *string `json:"transactionHashGT,omitempty"` TransactionHashGTE *string `json:"transactionHashGTE,omitempty"` TransactionHashLT *string `json:"transactionHashLT,omitempty"` TransactionHashLTE *string `json:"transactionHashLTE,omitempty"` TransactionHashContains *string `json:"transactionHashContains,omitempty"` TransactionHashHasPrefix *string `json:"transactionHashHasPrefix,omitempty"` TransactionHashHasSuffix *string `json:"transactionHashHasSuffix,omitempty"` TransactionHashEqualFold *string `json:"transactionHashEqualFold,omitempty"` TransactionHashContainsFold *string `json:"transactionHashContainsFold,omitempty"` // "nonce" field predicates. Nonce *string `json:"nonce,omitempty"` NonceNEQ *string `json:"nonceNEQ,omitempty"` NonceIn []string `json:"nonceIn,omitempty"` NonceNotIn []string `json:"nonceNotIn,omitempty"` NonceGT *string `json:"nonceGT,omitempty"` NonceGTE *string `json:"nonceGTE,omitempty"` NonceLT *string `json:"nonceLT,omitempty"` NonceLTE *string `json:"nonceLTE,omitempty"` NonceContains *string `json:"nonceContains,omitempty"` NonceHasPrefix *string `json:"nonceHasPrefix,omitempty"` NonceHasSuffix *string `json:"nonceHasSuffix,omitempty"` NonceIsNil bool `json:"nonceIsNil,omitempty"` NonceNotNil bool `json:"nonceNotNil,omitempty"` NonceEqualFold *string `json:"nonceEqualFold,omitempty"` NonceContainsFold *string `json:"nonceContainsFold,omitempty"` // "block" edge predicates. HasBlock *bool `json:"hasBlock,omitempty"` HasBlockWith []*BlockWhereInput `json:"hasBlockWith,omitempty"` // "receipt" edge predicates. HasReceipt *bool `json:"hasReceipt,omitempty"` HasReceiptWith []*TransactionReceiptWhereInput `json:"hasReceiptWith,omitempty"` // "events" edge predicates. HasEvents *bool `json:"hasEvents,omitempty"` HasEventsWith []*EventWhereInput `json:"hasEventsWith,omitempty"` }
TransactionWhereInput represents a where input for filtering Transaction queries.
func (*TransactionWhereInput) Filter ¶
func (i *TransactionWhereInput) Filter(q *TransactionQuery) (*TransactionQuery, error)
Filter applies the TransactionWhereInput filter on the TransactionQuery builder.
func (*TransactionWhereInput) P ¶
func (i *TransactionWhereInput) P() (predicate.Transaction, error)
P returns a predicate for filtering transactions. An error is returned if the input is empty or invalid.
type Transactions ¶
type Transactions []*Transaction
Transactions is a parsable slice of Transaction.
type Tx ¶
type Tx struct { // Balance is the client for interacting with the Balance builders. Balance *BalanceClient // Block is the client for interacting with the Block builders. Block *BlockClient // Contract is the client for interacting with the Contract builders. Contract *ContractClient // Event is the client for interacting with the Event builders. Event *EventClient // Transaction is the client for interacting with the Transaction builders. Transaction *TransactionClient // TransactionReceipt is the client for interacting with the TransactionReceipt builders. TransactionReceipt *TransactionReceiptClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- balance.go
- balance_create.go
- balance_delete.go
- balance_query.go
- balance_update.go
- block.go
- block_create.go
- block_delete.go
- block_query.go
- block_update.go
- client.go
- config.go
- context.go
- contract.go
- contract_create.go
- contract_delete.go
- contract_query.go
- contract_update.go
- ent.go
- event.go
- event_create.go
- event_delete.go
- event_query.go
- event_update.go
- generate.go
- gql_collection.go
- gql_edge.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- mutation.go
- runtime.go
- transaction.go
- transaction_create.go
- transaction_delete.go
- transaction_query.go
- transaction_update.go
- transactionreceipt.go
- transactionreceipt_create.go
- transactionreceipt_delete.go
- transactionreceipt_query.go
- transactionreceipt_update.go
- tx.go
- tx_client.go