repository

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHeaderCheckedPredicateSQL added in v0.0.3

func CreateHeaderCheckedPredicateSQL(boolColumns []string, recheckHeaders constants.TransformerExecution) string

Builds a SQL string that checks if any column should be checked/rechecked. Defaults to FALSE when no columns are provided. Ex: ["columnA", "columnB"] => "NOT (columnA!=0 AND columnB!=0)"

[] => "FALSE"

func GetCheckedColumnNames

func GetCheckedColumnNames(db *postgres.DB) ([]string, error)

func MarkHeaderChecked

func MarkHeaderChecked(headerID int64, db *postgres.DB, checkedHeadersColumn string) error

func MarkHeaderCheckedInTransaction

func MarkHeaderCheckedInTransaction(headerID int64, tx *sqlx.Tx, checkedHeadersColumn string) error

func MissingHeaders

func MissingHeaders(startingBlockNumber, endingBlockNumber int64, db *postgres.DB, notCheckedSQL string) ([]core.Header, error)

Treats a header as missing if it's not in the headers table, or not checked for some log type

Types

type StorageRepository

type StorageRepository interface {
	Create(blockNumber int, blockHash string, metadata utils.StorageValueMetadata, value interface{}) error
	SetDB(db *postgres.DB)
}

Jump to

Keyboard shortcuts

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