db

package
v0.0.0-...-20154b5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBStore

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

func NewDBStore

func NewDBStore(ds sqlutil.DataSource, logger logger.Logger) *DBStore

func (*DBStore) GetLatestOffset

func (s *DBStore) GetLatestOffset(ctx context.Context, eventAccountAddress, eventHandle, eventFieldName string) (uint64, error)

func (*DBStore) GetTransmitterSequenceNum

func (s *DBStore) GetTransmitterSequenceNum(ctx context.Context, transmitterAddress string) (uint64, error)

func (*DBStore) GetTxVersionByID

func (s *DBStore) GetTxVersionByID(ctx context.Context, id uint64) (uint64, error)

func (*DBStore) InsertEvents

func (s *DBStore) InsertEvents(ctx context.Context, records []EventRecord) error

func (*DBStore) QueryEvents

func (s *DBStore) QueryEvents(ctx context.Context, eventAccountAddress, eventHandle, eventFieldName string, expressions []query.Expression, limitAndSort query.LimitAndSort) ([]EventRecord, error)

func (*DBStore) UpdateTransmitterSequence

func (s *DBStore) UpdateTransmitterSequence(ctx context.Context, transmitterAddress string, sequenceNumber uint64) error

type EventRecord

type EventRecord struct {
	ID                  uint64
	EventAccountAddress string
	EventHandle         string
	EventFieldName      string
	EventOffset         uint64
	TxVersion           uint64
	BlockHeight         string
	BlockHash           []byte
	BlockTimestamp      uint64
	Data                map[string]any
}

Jump to

Keyboard shortcuts

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