block

package
v0.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 5 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"
	// FieldUUID holds the string denoting the uuid field in the database.
	FieldUUID = "uuid"
	// FieldSourceChainID holds the string denoting the sourcechainid field in the database.
	FieldSourceChainID = "source_chain_id"
	// FieldBlockHeight holds the string denoting the blockheight field in the database.
	FieldBlockHeight = "block_height"
	// FieldBlockHash holds the string denoting the blockhash field in the database.
	FieldBlockHash = "block_hash"
	// FieldTimestamp holds the string denoting the timestamp field in the database.
	FieldTimestamp = "timestamp"
	// FieldCreatedAt holds the string denoting the createdat field in the database.
	FieldCreatedAt = "created_at"
	// EdgeMsgs holds the string denoting the msgs edge name in mutations.
	EdgeMsgs = "Msgs"
	// EdgeReceipts holds the string denoting the receipts edge name in mutations.
	EdgeReceipts = "Receipts"
	// Table holds the table name of the block in the database.
	Table = "blocks"
	// MsgsTable is the table that holds the Msgs relation/edge.
	MsgsTable = "msgs"
	// MsgsInverseTable is the table name for the Msg entity.
	// It exists in this package in order to avoid circular dependency with the "msg" package.
	MsgsInverseTable = "msgs"
	// MsgsColumn is the table column denoting the Msgs relation/edge.
	MsgsColumn = "block_msgs"
	// ReceiptsTable is the table that holds the Receipts relation/edge.
	ReceiptsTable = "receipts"
	// ReceiptsInverseTable is the table name for the Receipt entity.
	// It exists in this package in order to avoid circular dependency with the "receipt" package.
	ReceiptsInverseTable = "receipts"
	// ReceiptsColumn is the table column denoting the Receipts relation/edge.
	ReceiptsColumn = "block_receipts"
)

Variables

View Source
var (
	// DefaultUUID holds the default value on creation for the "UUID" field.
	DefaultUUID func() uuid.UUID
	// BlockHashValidator is a validator for the "BlockHash" field. It is called by the builders before save.
	BlockHashValidator func([]byte) error
	// DefaultTimestamp holds the default value on creation for the "Timestamp" field.
	DefaultTimestamp time.Time
	// DefaultCreatedAt holds the default value on creation for the "CreatedAt" field.
	DefaultCreatedAt time.Time
)

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 []byte) predicate.Block

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

func BlockHashEQ

func BlockHashEQ(v []byte) predicate.Block

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

func BlockHashGT

func BlockHashGT(v []byte) predicate.Block

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

func BlockHashGTE

func BlockHashGTE(v []byte) predicate.Block

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

func BlockHashIn

func BlockHashIn(vs ...[]byte) predicate.Block

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

func BlockHashLT

func BlockHashLT(v []byte) predicate.Block

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

func BlockHashLTE

func BlockHashLTE(v []byte) predicate.Block

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

func BlockHashNEQ

func BlockHashNEQ(v []byte) predicate.Block

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

func BlockHashNotIn

func BlockHashNotIn(vs ...[]byte) predicate.Block

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

func BlockHeight

func BlockHeight(v uint64) predicate.Block

BlockHeight applies equality check predicate on the "BlockHeight" field. It's identical to BlockHeightEQ.

func BlockHeightEQ

func BlockHeightEQ(v uint64) predicate.Block

BlockHeightEQ applies the EQ predicate on the "BlockHeight" field.

func BlockHeightGT

func BlockHeightGT(v uint64) predicate.Block

BlockHeightGT applies the GT predicate on the "BlockHeight" field.

func BlockHeightGTE

func BlockHeightGTE(v uint64) predicate.Block

BlockHeightGTE applies the GTE predicate on the "BlockHeight" field.

func BlockHeightIn

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

BlockHeightIn applies the In predicate on the "BlockHeight" field.

func BlockHeightLT

func BlockHeightLT(v uint64) predicate.Block

BlockHeightLT applies the LT predicate on the "BlockHeight" field.

func BlockHeightLTE

func BlockHeightLTE(v uint64) predicate.Block

BlockHeightLTE applies the LTE predicate on the "BlockHeight" field.

func BlockHeightNEQ

func BlockHeightNEQ(v uint64) predicate.Block

BlockHeightNEQ applies the NEQ predicate on the "BlockHeight" field.

func BlockHeightNotIn

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

BlockHeightNotIn applies the NotIn predicate on the "BlockHeight" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Block

CreatedAt applies equality check predicate on the "CreatedAt" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Block

CreatedAtEQ applies the EQ predicate on the "CreatedAt" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Block

CreatedAtGT applies the GT predicate on the "CreatedAt" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Block

CreatedAtGTE applies the GTE predicate on the "CreatedAt" field.

func CreatedAtIn

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

CreatedAtIn applies the In predicate on the "CreatedAt" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Block

CreatedAtLT applies the LT predicate on the "CreatedAt" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Block

CreatedAtLTE applies the LTE predicate on the "CreatedAt" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Block

CreatedAtNEQ applies the NEQ predicate on the "CreatedAt" field.

func CreatedAtNotIn

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

CreatedAtNotIn applies the NotIn predicate on the "CreatedAt" field.

func HasMsgs

func HasMsgs() predicate.Block

HasMsgs applies the HasEdge predicate on the "Msgs" edge.

func HasMsgsWith

func HasMsgsWith(preds ...predicate.Msg) predicate.Block

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

func HasReceipts

func HasReceipts() predicate.Block

HasReceipts applies the HasEdge predicate on the "Receipts" edge.

func HasReceiptsWith

func HasReceiptsWith(preds ...predicate.Receipt) predicate.Block

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

func ID

func ID(id int) predicate.Block

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Block

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Block

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Block

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Block

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Block

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Block

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) 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 SourceChainID

func SourceChainID(v uint64) predicate.Block

SourceChainID applies equality check predicate on the "SourceChainID" field. It's identical to SourceChainIDEQ.

func SourceChainIDEQ

func SourceChainIDEQ(v uint64) predicate.Block

SourceChainIDEQ applies the EQ predicate on the "SourceChainID" field.

func SourceChainIDGT

func SourceChainIDGT(v uint64) predicate.Block

SourceChainIDGT applies the GT predicate on the "SourceChainID" field.

func SourceChainIDGTE

func SourceChainIDGTE(v uint64) predicate.Block

SourceChainIDGTE applies the GTE predicate on the "SourceChainID" field.

func SourceChainIDIn

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

SourceChainIDIn applies the In predicate on the "SourceChainID" field.

func SourceChainIDLT

func SourceChainIDLT(v uint64) predicate.Block

SourceChainIDLT applies the LT predicate on the "SourceChainID" field.

func SourceChainIDLTE

func SourceChainIDLTE(v uint64) predicate.Block

SourceChainIDLTE applies the LTE predicate on the "SourceChainID" field.

func SourceChainIDNEQ

func SourceChainIDNEQ(v uint64) predicate.Block

SourceChainIDNEQ applies the NEQ predicate on the "SourceChainID" field.

func SourceChainIDNotIn

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

SourceChainIDNotIn applies the NotIn predicate on the "SourceChainID" field.

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 UUID

func UUID(v uuid.UUID) predicate.Block

UUID applies equality check predicate on the "UUID" field. It's identical to UUIDEQ.

func UUIDEQ

func UUIDEQ(v uuid.UUID) predicate.Block

UUIDEQ applies the EQ predicate on the "UUID" field.

func UUIDGT

func UUIDGT(v uuid.UUID) predicate.Block

UUIDGT applies the GT predicate on the "UUID" field.

func UUIDGTE

func UUIDGTE(v uuid.UUID) predicate.Block

UUIDGTE applies the GTE predicate on the "UUID" field.

func UUIDIn

func UUIDIn(vs ...uuid.UUID) predicate.Block

UUIDIn applies the In predicate on the "UUID" field.

func UUIDLT

func UUIDLT(v uuid.UUID) predicate.Block

UUIDLT applies the LT predicate on the "UUID" field.

func UUIDLTE

func UUIDLTE(v uuid.UUID) predicate.Block

UUIDLTE applies the LTE predicate on the "UUID" field.

func UUIDNEQ

func UUIDNEQ(v uuid.UUID) predicate.Block

UUIDNEQ applies the NEQ predicate on the "UUID" field.

func UUIDNotIn

func UUIDNotIn(vs ...uuid.UUID) predicate.Block

UUIDNotIn applies the NotIn predicate on the "UUID" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Block queries.

func ByBlockHeight

func ByBlockHeight(opts ...sql.OrderTermOption) OrderOption

ByBlockHeight orders the results by the BlockHeight field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the CreatedAt field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByMsgs

func ByMsgs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMsgs orders the results by Msgs terms.

func ByMsgsCount

func ByMsgsCount(opts ...sql.OrderTermOption) OrderOption

ByMsgsCount orders the results by Msgs count.

func ByReceipts

func ByReceipts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByReceipts orders the results by Receipts terms.

func ByReceiptsCount

func ByReceiptsCount(opts ...sql.OrderTermOption) OrderOption

ByReceiptsCount orders the results by Receipts count.

func BySourceChainID

func BySourceChainID(opts ...sql.OrderTermOption) OrderOption

BySourceChainID orders the results by the SourceChainID field.

func ByTimestamp

func ByTimestamp(opts ...sql.OrderTermOption) OrderOption

ByTimestamp orders the results by the Timestamp field.

func ByUUID

func ByUUID(opts ...sql.OrderTermOption) OrderOption

ByUUID orders the results by the UUID field.

Jump to

Keyboard shortcuts

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