db

package
v0.0.0-...-b75b873 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseTradeLogs    = "base_trade_logs"
	BaseTransferLogs = "base_transfer_logs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	GetLastStoredBlock(table string) (int64, error)
	GetUniqueTokenAddressByRangeForTrade(table string, from, to int64) ([]string, error)
	GetUniqueTokenAddressByRangeForTransfer(table string, from, to int64) ([]string, error)
}

type Postgres

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

func NewPostgres

func NewPostgres(db *sqlx.DB) *Postgres

func (*Postgres) GetLastStoredBlock

func (pg *Postgres) GetLastStoredBlock(table string) (int64, error)

func (*Postgres) GetUniqueTokenAddressByRangeForTrade

func (pg *Postgres) GetUniqueTokenAddressByRangeForTrade(table string, from, to int64) ([]string, error)

func (*Postgres) GetUniqueTokenAddressByRangeForTransfer

func (pg *Postgres) GetUniqueTokenAddressByRangeForTransfer(table string, from, to int64) ([]string, error)

Jump to

Keyboard shortcuts

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