#include <DB_Table_Stock_V1.h>
|
| enum | COLUMN {
COL_STOCKID = 0,
COL_HELDAT = 1,
COL_PURCHASEDATE = 2,
COL_STOCKNAME = 3,
COL_SYMBOL = 4,
COL_NUMSHARES = 5,
COL_PURCHASEPRICE = 6,
COL_NOTES = 7,
COL_CURRENTPRICE = 8,
COL_VALUE = 9,
COL_COMMISSION = 10
} |
| |
| enum | { NUM_COLUMNS = 11
} |
| |
| typedef DB_Table_STOCK_V1 | Self |
| |
| typedef std::vector< Self::Data * > | Cache |
| | A container to hold a list of Data record pointers for the table in memory. More...
|
| |
| typedef std::map< int64, Self::Data * > | Index_By_Id |
| |
| typedef STOCKID | PRIMARY |
| |
◆ Cache
A container to hold a list of Data record pointers for the table in memory.
◆ Index_By_Id
◆ PRIMARY
◆ Self
◆ anonymous enum
◆ COLUMN
| Enumerator |
|---|
| COL_STOCKID | |
| COL_HELDAT | |
| COL_PURCHASEDATE | |
| COL_STOCKNAME | |
| COL_SYMBOL | |
| COL_NUMSHARES | |
| COL_PURCHASEPRICE | |
| COL_NOTES | |
| COL_CURRENTPRICE | |
| COL_VALUE | |
| COL_COMMISSION | |
◆ ~DB_Table_STOCK_V1()
| DB_Table_STOCK_V1::~DB_Table_STOCK_V1 |
( |
| ) |
|
|
inline |
Destructor: clears any data records stored in memory.
◆ DB_Table_STOCK_V1()
| DB_Table_STOCK_V1::DB_Table_STOCK_V1 |
( |
| ) |
|
|
inline |
◆ all()
| const Data_Set DB_Table_STOCK_V1::all |
( |
wxSQLite3Database * |
db, |
|
|
const COLUMN |
col = COLUMN(0), |
|
|
const bool |
asc = true |
|
) |
| |
|
inline |
Return a list of Data records (Data_Set) derived directly from the database.
The Data_Set is sorted based on the column number.
◆ clone()
Create a copy of the Data record and add to memory table (cache)
◆ column_to_name()
| static wxString DB_Table_STOCK_V1::column_to_name |
( |
const COLUMN |
col | ) |
|
|
inlinestatic |
Returns the column name as a string.
◆ create()
Create a new Data record and add to memory table (cache)
◆ destroy_cache()
| void DB_Table_STOCK_V1::destroy_cache |
( |
| ) |
|
|
inline |
Removes all records stored in memory (cache) for the table.
◆ ensure()
| bool DB_Table_STOCK_V1::ensure |
( |
wxSQLite3Database * |
db | ) |
|
|
inline |
Creates the database table if the table does not exist.
◆ ensure_data()
| void DB_Table_STOCK_V1::ensure_data |
( |
wxSQLite3Database * |
db | ) |
|
|
inline |
◆ ensure_index()
| bool DB_Table_STOCK_V1::ensure_index |
( |
wxSQLite3Database * |
db | ) |
|
|
inline |
◆ get()
| Self::Data* DB_Table_STOCK_V1::get |
( |
const int64 |
id, |
|
|
wxSQLite3Database * |
db |
|
) |
| |
|
inline |
Search the memory table (Cache) for the data record.
If not found in memory, search the database and update the cache.
◆ get_one()
template<typename... Args>
| Self::Data* DB_Table_STOCK_V1::get_one |
( |
const Args &... |
args | ) |
|
|
inline |
◆ get_record()
| Self::Data* DB_Table_STOCK_V1::get_record |
( |
const int64 |
id, |
|
|
wxSQLite3Database * |
db |
|
) |
| |
|
inline |
Search the database for the data record, bypassing the cache.
◆ name()
| wxString DB_Table_STOCK_V1::name |
( |
| ) |
const |
|
inlinevirtual |
◆ name_to_column()
| static COLUMN DB_Table_STOCK_V1::name_to_column |
( |
const wxString & |
name | ) |
|
|
inlinestatic |
Returns the column number from the given column name.
◆ num_columns()
| size_t DB_Table_STOCK_V1::num_columns |
( |
| ) |
const |
|
inlinevirtual |
◆ remove() [1/2]
| bool DB_Table_STOCK_V1::remove |
( |
const int64 |
id, |
|
|
wxSQLite3Database * |
db |
|
) |
| |
|
inline |
Remove the Data record from the database and the memory table (cache)
◆ remove() [2/2]
| bool DB_Table_STOCK_V1::remove |
( |
Self::Data * |
entity, |
|
|
wxSQLite3Database * |
db |
|
) |
| |
|
inline |
Remove the Data record from the database and the memory table (cache)
◆ save()
| bool DB_Table_STOCK_V1::save |
( |
Self::Data * |
entity, |
|
|
wxSQLite3Database * |
db, |
|
|
bool |
force_insert = false |
|
) |
| |
|
inline |
Saves the Data record to the database table.
Either create a new record or update the existing record. Remove old record from the memory table (cache)
◆ cache_
| Cache DB_Table_STOCK_V1::cache_ |
◆ fake_
| Data* DB_Table_STOCK_V1::fake_ |
◆ index_by_id_
The documentation for this struct was generated from the following file: