db

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: GPL-3.0 Imports: 3 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 interface {
	InitDB() error
	Close() error
	AddTransaction(txn *core.Transaction) error
	DeleteTransaction(txnID string) error
	FindTag(tag string) (int, error)
	AddTag(tag string) error
	SafeAddTag(tag string) error
	SafeAddTagToAccount(account, tag string) error
	AddTagToAccount(accountID string, tag int) error
	DeleteTagFromAccount(account, tag string) error
	FindCurrency(cur string) (*core.Currency, error)
	AddCurrency(cur *core.Currency) error
	SafeAddCurrency(cur *core.Currency) error
	FindAccount(code string) (*core.Account, error)
	AddAccount(*core.Account) error
	SafeAddAccount(*core.Account) error
	FindUser(pubKey string) (*core.User, error)
	AddUser(usr *core.User) error
	SafeAddUser(usr *core.User) error
	GetTB(date time.Time) (*[]core.TBAccount, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
}

Database wraps all database operations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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