mysql

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 10 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 {
	*gorm.DB
	// contains filtered or unexported fields
}

Database data

func New

func New(connection, tablePrefix string, multiStatements bool, maxPacket uint32) (*Database, error)

New instance

func (*Database) Available

func (d *Database) Available() bool

Available implementation

func (*Database) DuplicateError

func (d *Database) DuplicateError(err error) bool

DuplicateError implementation

func (*Database) EarliestBlock

func (d *Database) EarliestBlock() (*big.Int, bool, error)

EarliestBlock implementation

func (*Database) LatestSenderNonce

func (d *Database) LatestSenderNonce(sender mint.PublicKey) (uint64, error)

LatestSenderNonce implementation

func (*Database) ListEnqueuedApprovements

func (d *Database) ListEnqueuedApprovements(max uint16) ([]*types.Approvement, error)

ListEnqueuedApprovements implementation

func (*Database) ListEnqueuedSendings

func (d *Database) ListEnqueuedSendings(max uint16) ([]*types.Sending, error)

ListEnqueuedSendings implementation

func (*Database) ListStaleApprovements

func (d *Database) ListStaleApprovements(elderThanBlockID *big.Int, max uint16) ([]*types.Approvement, error)

ListStaleApprovements implementation

func (*Database) ListStaleSendings

func (d *Database) ListStaleSendings(elderThanBlockID *big.Int, max uint16) ([]*types.Sending, error)

ListStaleSendings implementation

func (*Database) ListUnnotifiedApprovements

func (d *Database) ListUnnotifiedApprovements(max uint16) ([]*types.Approvement, error)

ListUnnotifiedApprovements implementation

func (*Database) ListUnnotifiedSendings

func (d *Database) ListUnnotifiedSendings(max uint16) ([]*types.Sending, error)

ListUnnotifiedSendings implementation

func (*Database) ListWallets

func (d *Database) ListWallets() ([]*types.Wallet, error)

ListWallets implementation

func (*Database) MaxPacketError

func (d *Database) MaxPacketError(err error) bool

MaxPacketError implementation

func (*Database) Migrate

func (d *Database) Migrate() error

Migrate implementation

func (*Database) PutApprovement

func (d *Database) PutApprovement(v *types.Approvement) error

PutApprovement implementation

func (*Database) PutSending

func (d *Database) PutSending(v *types.Sending) error

PutSending implementation

func (*Database) PutWallet

func (d *Database) PutWallet(v *types.Wallet) error

PutWallet implementation

func (*Database) SetApprovementConfirmed

func (d *Database) SetApprovementConfirmed(dig mint.Digest, from mint.PublicKey, block *big.Int) error

SetApprovementConfirmed implementation

func (*Database) SetSendingConfirmed

func (d *Database) SetSendingConfirmed(dig mint.Digest, from mint.PublicKey, block *big.Int) error

SetSendingConfirmed implementation

func (*Database) UpdateApprovement

func (d *Database) UpdateApprovement(v *types.Approvement) error

UpdateApprovement implementation

func (*Database) UpdateSending

func (d *Database) UpdateSending(v *types.Sending) error

UpdateSending implementation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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