# Functions
ActionStockUnits adds stock purchase/redeem related transactions to the database.
AddAccount adds the given account to the database.
AddCategory adds the given category to the database.
No description provided by the author
AddAccount adds the given account to the database.
AddTransaction adds a transaction to the database.
DeleteTransaction deletes a transaction from the database and updates the account balance.
FetchAccounts fetches account records for the given ledger from the database and returns a slice of Account struct.
FetchCategories fetches category records for the given ledger from the database and returns a slice of Category struct.
FetchCategoryStatsData returns a slice of StatsData struct for the given period for the given category for the given count.
FetchIncomeExpenseStatsData returns a slice of StatsData of either income or expense for the given period for given count.
No description provided by the author
FetchStocks fetches stock records for the given ledger from the database and returns a slice of Stock struct.
FormatAccounts takes a slice of Account struct and returns a slice of string with account names prefixed with appropriate spaces to give it a nested list look.
FormatCategories takes a slice of Category struct and returns a slice of string with category names prefixed with appropriate spaces to give it a nested list look.
getAccountBalance calculates the total balance for a given account accumulates balances from all child accounts if its a placeholder account.
GetAccountID returns the account id of the given account.
GetAccountType returns the account type of the given account.
GetCategoryID returns the category id of the given category name.
GetCategoryType returns the category type of the given category name.
GetChildAccountIDs returns a slice of IDs of all the child accounts for the given account.
GetChildCategoryIDs returns a slice of IDs of all the child categories for the given category.
No description provided by the author
No description provided by the author
GetSplitsForTransaction fetches all split transactions for a given transaction id and returns them as a slice of SplitTransaction.
GetStockCodesList returns a slice of string with stock codes.
GetStockID returns the stock id of the given stock.
GetStockNamesList returns a slice of string with stock names.
GetStockType returns the stock type of the given stock.
GetTransaction returns a transaction matching given transaction id in a Transaction struct.
GetTransactionsForAccount fetches transactions for the given account from the database and returns them as a slice of Transaction struct.
GetTransactionsForCategory fetches transactions for the given category from the database and returns them as a slice of Transaction struct.
GetTransactionsForKeywords fetches transactions matching the keywords and returns them as a slice of Transaction struct.
GetTransactionsForStock fetches transactions for the given stock from the database and returns them as a slice of StockTransaction struct.
No description provided by the author
IsPlaceHolderAccount returns true if the given account is a placeholder account, false otherwise.
IsPlaceHolderCategory returns true if the given category is a placeholder category, false otherwise.
No description provided by the author
No description provided by the author
TransferFunds adds transfer transactions contained in a slice of Transaction struct to database.
No description provided by the author
No description provided by the author
# Structs
An Account is a representation of a record from the accounts table.
A Category is a representation of a record from the categories table.
No description provided by the author
No description provided by the author
A SplitTransaction is a representation of a record from the split_transactions table.
A StatsData represents a period and an amount of money.
A stock is a representation of a record from the stocks table.
No description provided by the author
A Transaction is a representation of a record from the transactions table.