data

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullBlock

type FullBlock struct {
	Block    types.Block
	Receipts []types.Receipt
	Uncles   []types.Block
	// contains filtered or unexported fields
}

func (*FullBlock) RegisterStorables

func (fb *FullBlock) RegisterStorables()

RegisterStorables instantiates all the storables defined via code with the requested raw data Only the storables that are registered will be executed when the Store function is called

func (*FullBlock) Store

func (fb *FullBlock) Store(db *sql.DB, m *metrics.Provider) error

Store will open a database transaction and execute all the registered Storables in the said transaction

type Storable

type Storable interface {
	ToDB(tx *sql.Tx) error
}

Storable role: a Storable serves as a means of transforming raw data and inserting it into the database input: raw Ethereum data + a database transaction output: processed/derived/enhanced data stored directly to the db

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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