database

package
v0.0.0-...-ed99955 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Cf *config.Config

	Mutex sync.Mutex
	// contains filtered or unexported fields
}

func NewDataBase

func NewDataBase(c *config.Config) *Database

func (*Database) CommitDBTx

func (d *Database) CommitDBTx(tx transaction.Transaction)

func (*Database) Connect

func (d *Database) Connect() (*sqlx.DB, error)

connect will create an active DB connection

func (Database) CreateRoot

func (d Database) CreateRoot() error

createRoot Transaction channels start with a rootTx transaction always

func (*Database) CreateTables

func (d *Database) CreateTables()

func (*Database) DB_init

func (d *Database) DB_init()

func (*Database) GetDAGSize

func (d *Database) GetDAGSize() int

func (*Database) HaveTx

func (d *Database) HaveTx(hash string) bool

type Graph

type Graph struct {
	Transactions []transaction.Transaction `json:"transactions"`
}

Graph is a collection of transactions

Jump to

Keyboard shortcuts

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