database

package
v0.0.0-...-9b4e82f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 10 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDatabase

func InitDatabase(enableDb, enableDbWrite bool, host, port, username, password, database string) error

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}
var Db *Database

func (*Database) Exec

func (d *Database) Exec(commandName, exec string, args ...interface{}) error

func (*Database) Execute

func (d *Database) Execute(writes []interface{}, deletes []interface{}) error

func (*Database) GetEffects

func (d *Database) GetEffects() ([]objects.Effect, error)

func (*Database) GetItems

func (d *Database) GetItems() ([]objects.Item, error)

func (*Database) GetLedgers

func (d *Database) GetLedgers() ([]objects.Ledger, error)

func (*Database) GetNotification

func (d *Database) GetNotification() ([]objects.Notification, error)

func (*Database) GetPortfolios

func (d *Database) GetPortfolios() ([]objects.Portfolio, error)

func (*Database) GetRecords

func (d *Database) GetRecords() ([]objects.Record, error)

func (*Database) GetStocks

func (d *Database) GetStocks() ([]objects.Stock, error)

func (*Database) GetUsers

func (d *Database) GetUsers() ([]objects.User, error)

func (*Database) InitLedger

func (d *Database) InitLedger() error

func (*Database) InitNotification

func (d *Database) InitNotification() error

func (*Database) InitPortfolio

func (d *Database) InitPortfolio() error

func (*Database) InitRecord

func (d *Database) InitRecord() error

func (*Database) InitStocks

func (d *Database) InitStocks() error

func (*Database) MakeHistoryLimitQuery

func (d *Database) MakeHistoryLimitQuery(table, uuid, field string, limit int) ([][]interface{}, error)

func (*Database) MakeHistoryTimeQuery

func (d *Database) MakeHistoryTimeQuery(table, uuid, timeLength, field, intervalLength string) ([][]interface{}, error)

func (*Database) MakePortfolioHistoryLimitQuery

func (d *Database) MakePortfolioHistoryLimitQuery(uuid, field string, limit int) ([][]interface{}, error)

func (*Database) MakePortfolioHistoryTimeQuery

func (d *Database) MakePortfolioHistoryTimeQuery(uuid, timeLength, field, intervalLength string) ([][]interface{}, error)

func (*Database) MakeStockHistoryLimitQuery

func (d *Database) MakeStockHistoryLimitQuery(uuid, field string, limit int) ([][]interface{}, error)

func (*Database) MakeStockHistoryTimeQuery

func (d *Database) MakeStockHistoryTimeQuery(uuid, timeLength, field, intervalLength string) ([][]interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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