repository

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: AGPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNotCheckedSQL

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

Builds a SQL string that checks if any column value is 0, given the column names. 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

func RecheckHeaders

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

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