block

package
v0.0.0-...-1971f33 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the block type in the database.
	Label = "block"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldBlockHash holds the string denoting the block_hash field in the database.
	FieldBlockHash = "block_hash"
	// FieldParentBlockHash holds the string denoting the parent_block_hash field in the database.
	FieldParentBlockHash = "parent_block_hash"
	// FieldBlockNumber holds the string denoting the block_number field in the database.
	FieldBlockNumber = "block_number"
	// FieldStateRoot holds the string denoting the state_root field in the database.
	FieldStateRoot = "state_root"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldTimestamp holds the string denoting the timestamp field in the database.
	FieldTimestamp = "timestamp"
	// EdgeTransactions holds the string denoting the transactions edge name in mutations.
	EdgeTransactions = "transactions"
	// EdgeTransactionReceipts holds the string denoting the transaction_receipts edge name in mutations.
	EdgeTransactionReceipts = "transaction_receipts"
	// Table holds the table name of the block in the database.
	Table = "blocks"
	// TransactionsTable is the table that holds the transactions relation/edge.
	TransactionsTable = "transactions"
	// TransactionsInverseTable is the table name for the Transaction entity.
	// It exists in this package in order to avoid circular dependency with the "transaction" package.
	TransactionsInverseTable = "transactions"
	// TransactionsColumn is the table column denoting the transactions relation/edge.
	TransactionsColumn = "block_transactions"
	// TransactionReceiptsTable is the table that holds the transaction_receipts relation/edge.
	TransactionReceiptsTable = "transaction_receipts"
	// TransactionReceiptsInverseTable is the table name for the TransactionReceipt entity.
	// It exists in this package in order to avoid circular dependency with the "transactionreceipt" package.
	TransactionReceiptsInverseTable = "transaction_receipts"
	// TransactionReceiptsColumn is the table column denoting the transaction_receipts relation/edge.
	TransactionReceiptsColumn = "block_transaction_receipts"
)

Variables

Columns holds all SQL columns for block fields.

Functions

func And

func And(predicates ...predicate.Block) predicate.Block

And groups predicates with the AND operator between them.

func BlockHash

func BlockHash(v string) predicate.Block

BlockHash applies equality check predicate on the "block_hash" field. It's identical to BlockHashEQ.

func BlockHashContains

func BlockHashContains(v string) predicate.Block

BlockHashContains applies the Contains predicate on the "block_hash" field.

func BlockHashContainsFold

func BlockHashContainsFold(v string) predicate.Block

BlockHashContainsFold applies the ContainsFold predicate on the "block_hash" field.

func BlockHashEQ

func BlockHashEQ(v string) predicate.Block

BlockHashEQ applies the EQ predicate on the "block_hash" field.

func BlockHashEqualFold

func BlockHashEqualFold(v string) predicate.Block

BlockHashEqualFold applies the EqualFold predicate on the "block_hash" field.

func BlockHashGT

func BlockHashGT(v string) predicate.Block

BlockHashGT applies the GT predicate on the "block_hash" field.

func BlockHashGTE

func BlockHashGTE(v string) predicate.Block

BlockHashGTE applies the GTE predicate on the "block_hash" field.

func BlockHashHasPrefix

func BlockHashHasPrefix(v string) predicate.Block

BlockHashHasPrefix applies the HasPrefix predicate on the "block_hash" field.

func BlockHashHasSuffix

func BlockHashHasSuffix(v string) predicate.Block

BlockHashHasSuffix applies the HasSuffix predicate on the "block_hash" field.

func BlockHashIn

func BlockHashIn(vs ...string) predicate.Block

BlockHashIn applies the In predicate on the "block_hash" field.

func BlockHashLT

func BlockHashLT(v string) predicate.Block

BlockHashLT applies the LT predicate on the "block_hash" field.

func BlockHashLTE

func BlockHashLTE(v string) predicate.Block

BlockHashLTE applies the LTE predicate on the "block_hash" field.

func BlockHashNEQ

func BlockHashNEQ(v string) predicate.Block

BlockHashNEQ applies the NEQ predicate on the "block_hash" field.

func BlockHashNotIn

func BlockHashNotIn(vs ...string) predicate.Block

BlockHashNotIn applies the NotIn predicate on the "block_hash" field.

func BlockNumber

func BlockNumber(v uint64) predicate.Block

BlockNumber applies equality check predicate on the "block_number" field. It's identical to BlockNumberEQ.

func BlockNumberEQ

func BlockNumberEQ(v uint64) predicate.Block

BlockNumberEQ applies the EQ predicate on the "block_number" field.

func BlockNumberGT

func BlockNumberGT(v uint64) predicate.Block

BlockNumberGT applies the GT predicate on the "block_number" field.

func BlockNumberGTE

func BlockNumberGTE(v uint64) predicate.Block

BlockNumberGTE applies the GTE predicate on the "block_number" field.

func BlockNumberIn

func BlockNumberIn(vs ...uint64) predicate.Block

BlockNumberIn applies the In predicate on the "block_number" field.

func BlockNumberLT

func BlockNumberLT(v uint64) predicate.Block

BlockNumberLT applies the LT predicate on the "block_number" field.

func BlockNumberLTE

func BlockNumberLTE(v uint64) predicate.Block

BlockNumberLTE applies the LTE predicate on the "block_number" field.

func BlockNumberNEQ

func BlockNumberNEQ(v uint64) predicate.Block

BlockNumberNEQ applies the NEQ predicate on the "block_number" field.

func BlockNumberNotIn

func BlockNumberNotIn(vs ...uint64) predicate.Block

BlockNumberNotIn applies the NotIn predicate on the "block_number" field.

func HasTransactionReceipts

func HasTransactionReceipts() predicate.Block

HasTransactionReceipts applies the HasEdge predicate on the "transaction_receipts" edge.

func HasTransactionReceiptsWith

func HasTransactionReceiptsWith(preds ...predicate.TransactionReceipt) predicate.Block

HasTransactionReceiptsWith applies the HasEdge predicate on the "transaction_receipts" edge with a given conditions (other predicates).

func HasTransactions

func HasTransactions() predicate.Block

HasTransactions applies the HasEdge predicate on the "transactions" edge.

func HasTransactionsWith

func HasTransactionsWith(preds ...predicate.Transaction) predicate.Block

HasTransactionsWith applies the HasEdge predicate on the "transactions" edge with a given conditions (other predicates).

func ID

func ID(id string) predicate.Block

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id string) predicate.Block

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Block

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Block

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Block

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Block

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Block

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Block

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Block

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Block) predicate.Block

Or groups predicates with the OR operator between them.

func ParentBlockHash

func ParentBlockHash(v string) predicate.Block

ParentBlockHash applies equality check predicate on the "parent_block_hash" field. It's identical to ParentBlockHashEQ.

func ParentBlockHashContains

func ParentBlockHashContains(v string) predicate.Block

ParentBlockHashContains applies the Contains predicate on the "parent_block_hash" field.

func ParentBlockHashContainsFold

func ParentBlockHashContainsFold(v string) predicate.Block

ParentBlockHashContainsFold applies the ContainsFold predicate on the "parent_block_hash" field.

func ParentBlockHashEQ

func ParentBlockHashEQ(v string) predicate.Block

ParentBlockHashEQ applies the EQ predicate on the "parent_block_hash" field.

func ParentBlockHashEqualFold

func ParentBlockHashEqualFold(v string) predicate.Block

ParentBlockHashEqualFold applies the EqualFold predicate on the "parent_block_hash" field.

func ParentBlockHashGT

func ParentBlockHashGT(v string) predicate.Block

ParentBlockHashGT applies the GT predicate on the "parent_block_hash" field.

func ParentBlockHashGTE

func ParentBlockHashGTE(v string) predicate.Block

ParentBlockHashGTE applies the GTE predicate on the "parent_block_hash" field.

func ParentBlockHashHasPrefix

func ParentBlockHashHasPrefix(v string) predicate.Block

ParentBlockHashHasPrefix applies the HasPrefix predicate on the "parent_block_hash" field.

func ParentBlockHashHasSuffix

func ParentBlockHashHasSuffix(v string) predicate.Block

ParentBlockHashHasSuffix applies the HasSuffix predicate on the "parent_block_hash" field.

func ParentBlockHashIn

func ParentBlockHashIn(vs ...string) predicate.Block

ParentBlockHashIn applies the In predicate on the "parent_block_hash" field.

func ParentBlockHashLT

func ParentBlockHashLT(v string) predicate.Block

ParentBlockHashLT applies the LT predicate on the "parent_block_hash" field.

func ParentBlockHashLTE

func ParentBlockHashLTE(v string) predicate.Block

ParentBlockHashLTE applies the LTE predicate on the "parent_block_hash" field.

func ParentBlockHashNEQ

func ParentBlockHashNEQ(v string) predicate.Block

ParentBlockHashNEQ applies the NEQ predicate on the "parent_block_hash" field.

func ParentBlockHashNotIn

func ParentBlockHashNotIn(vs ...string) predicate.Block

ParentBlockHashNotIn applies the NotIn predicate on the "parent_block_hash" field.

func StateRoot

func StateRoot(v string) predicate.Block

StateRoot applies equality check predicate on the "state_root" field. It's identical to StateRootEQ.

func StateRootContains

func StateRootContains(v string) predicate.Block

StateRootContains applies the Contains predicate on the "state_root" field.

func StateRootContainsFold

func StateRootContainsFold(v string) predicate.Block

StateRootContainsFold applies the ContainsFold predicate on the "state_root" field.

func StateRootEQ

func StateRootEQ(v string) predicate.Block

StateRootEQ applies the EQ predicate on the "state_root" field.

func StateRootEqualFold

func StateRootEqualFold(v string) predicate.Block

StateRootEqualFold applies the EqualFold predicate on the "state_root" field.

func StateRootGT

func StateRootGT(v string) predicate.Block

StateRootGT applies the GT predicate on the "state_root" field.

func StateRootGTE

func StateRootGTE(v string) predicate.Block

StateRootGTE applies the GTE predicate on the "state_root" field.

func StateRootHasPrefix

func StateRootHasPrefix(v string) predicate.Block

StateRootHasPrefix applies the HasPrefix predicate on the "state_root" field.

func StateRootHasSuffix

func StateRootHasSuffix(v string) predicate.Block

StateRootHasSuffix applies the HasSuffix predicate on the "state_root" field.

func StateRootIn

func StateRootIn(vs ...string) predicate.Block

StateRootIn applies the In predicate on the "state_root" field.

func StateRootLT

func StateRootLT(v string) predicate.Block

StateRootLT applies the LT predicate on the "state_root" field.

func StateRootLTE

func StateRootLTE(v string) predicate.Block

StateRootLTE applies the LTE predicate on the "state_root" field.

func StateRootNEQ

func StateRootNEQ(v string) predicate.Block

StateRootNEQ applies the NEQ predicate on the "state_root" field.

func StateRootNotIn

func StateRootNotIn(vs ...string) predicate.Block

StateRootNotIn applies the NotIn predicate on the "state_root" field.

func StatusEQ

func StatusEQ(v Status) predicate.Block

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Block

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Block

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Block

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func Timestamp

func Timestamp(v time.Time) predicate.Block

Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ.

func TimestampEQ

func TimestampEQ(v time.Time) predicate.Block

TimestampEQ applies the EQ predicate on the "timestamp" field.

func TimestampGT

func TimestampGT(v time.Time) predicate.Block

TimestampGT applies the GT predicate on the "timestamp" field.

func TimestampGTE

func TimestampGTE(v time.Time) predicate.Block

TimestampGTE applies the GTE predicate on the "timestamp" field.

func TimestampIn

func TimestampIn(vs ...time.Time) predicate.Block

TimestampIn applies the In predicate on the "timestamp" field.

func TimestampLT

func TimestampLT(v time.Time) predicate.Block

TimestampLT applies the LT predicate on the "timestamp" field.

func TimestampLTE

func TimestampLTE(v time.Time) predicate.Block

TimestampLTE applies the LTE predicate on the "timestamp" field.

func TimestampNEQ

func TimestampNEQ(v time.Time) predicate.Block

TimestampNEQ applies the NEQ predicate on the "timestamp" field.

func TimestampNotIn

func TimestampNotIn(vs ...time.Time) predicate.Block

TimestampNotIn applies the NotIn predicate on the "timestamp" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusACCEPTED_ON_L1 Status = "ACCEPTED_ON_L1"
	StatusACCEPTED_ON_L2 Status = "ACCEPTED_ON_L2"
)

Status values.

func (Status) MarshalGQL

func (e Status) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Status) String

func (s Status) String() string

func (*Status) UnmarshalGQL

func (e *Status) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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