relation

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relation

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

func NewRelation

func NewRelation(cfgFile string) (*Relation, error)

func (*Relation) Add added in v1.4.0

func (r *Relation) Add(obj []types.Schema)

func (*Relation) BatchUpdate added in v1.2.0

func (r *Relation) BatchUpdate(fn func(txn *sqlx.Tx) error) error

func (*Relation) Blocks

func (r *Relation) Blocks(limit int, offset int) ([]types.Hash, error)

func (*Relation) BlocksByAccount added in v1.4.0

func (r *Relation) BlocksByAccount(address types.Address, limit int, offset int) ([]types.Hash, error)

func (*Relation) BlocksCount

func (r *Relation) BlocksCount() (uint64, error)

func (*Relation) BlocksCountByType

func (r *Relation) BlocksCountByType() (map[string]uint64, error)

func (*Relation) Close

func (r *Relation) Close() error

func (*Relation) DB added in v1.4.0

func (r *Relation) DB() *sqlx.DB

func (*Relation) Delete added in v1.4.0

func (r *Relation) Delete(obj types.Schema)

func (*Relation) EmptyStore added in v1.2.0

func (r *Relation) EmptyStore() error

func (*Relation) Get added in v1.4.0

func (r *Relation) Get(dest interface{}, query string) error

func (*Relation) Queryx added in v1.4.0

func (r *Relation) Queryx(query string) (*sqlx.Rows, error)

func (*Relation) Register added in v1.4.0

func (r *Relation) Register(t types.Schema) error

func (*Relation) Select added in v1.4.0

func (r *Relation) Select(dest interface{}, query string) error

type Store

type Store interface {
	Blocks(limit int, offset int) ([]types.Hash, error)
	BlocksByAccount(address types.Address, limit int, offset int) ([]types.Hash, error)
	BlocksCount() (uint64, error)
	BlocksCountByType() (map[string]uint64, error)

	Select(dest interface{}, query string) error
	Get(dest interface{}, query string) error
	Queryx(query string) (*sqlx.Rows, error)
	DB() *sqlx.DB
	Close() error
	EmptyStore() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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