|
Money Manager EX
An easy to use, money management application built with wxWidgets
|
#include <DB_Table_Attachment_V1.h>
Inheritance diagram for DB_Table_ATTACHMENT_V1:
Collaboration diagram for DB_Table_ATTACHMENT_V1:Classes | |
| struct | ATTACHMENTID |
| struct | Data |
| Data is a single record in the database table. More... | |
| struct | Data_Set |
| A container to hold list of Data records for the table. More... | |
| struct | DESCRIPTION |
| struct | FILENAME |
| struct | REFID |
| struct | REFTYPE |
Public Types | |
| enum | COLUMN { COL_ATTACHMENTID = 0, COL_REFTYPE = 1, COL_REFID = 2, COL_DESCRIPTION = 3, COL_FILENAME = 4 } |
| enum | { NUM_COLUMNS = 5 } |
| typedef DB_Table_ATTACHMENT_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 ATTACHMENTID | PRIMARY |
Public Member Functions | |
| ~DB_Table_ATTACHMENT_V1 () | |
| Destructor: clears any data records stored in memory. More... | |
| void | destroy_cache () |
| Removes all records stored in memory (cache) for the table. More... | |
| bool | ensure (wxSQLite3Database *db) |
| Creates the database table if the table does not exist. More... | |
| bool | ensure_index (wxSQLite3Database *db) |
| void | ensure_data (wxSQLite3Database *db) |
| size_t | num_columns () const |
| wxString | name () const |
| Name of the table. More... | |
| DB_Table_ATTACHMENT_V1 () | |
| Self::Data * | create () |
| Create a new Data record and add to memory table (cache) More... | |
| Self::Data * | clone (const Data *e) |
| Create a copy of the Data record and add to memory table (cache) More... | |
| bool | save (Self::Data *entity, wxSQLite3Database *db, bool force_insert=false) |
| Saves the Data record to the database table. More... | |
| bool | remove (const int64 id, wxSQLite3Database *db) |
| Remove the Data record from the database and the memory table (cache) More... | |
| bool | remove (Self::Data *entity, wxSQLite3Database *db) |
| Remove the Data record from the database and the memory table (cache) More... | |
| template<typename... Args> | |
| Self::Data * | get_one (const Args &... args) |
| Self::Data * | get (const int64 id, wxSQLite3Database *db) |
| Search the memory table (Cache) for the data record. More... | |
| Self::Data * | get_record (const int64 id, wxSQLite3Database *db) |
| Search the database for the data record, bypassing the cache. More... | |
| const Data_Set | all (wxSQLite3Database *db, const COLUMN col=COLUMN(0), const bool asc=true) |
| Return a list of Data records (Data_Set) derived directly from the database. More... | |
Public Member Functions inherited from DB_Table | |
| DB_Table () | |
| virtual | ~DB_Table () |
| virtual wxString | query () const |
| bool | exists (wxSQLite3Database *db) const |
| void | drop (wxSQLite3Database *db) const |
Static Public Member Functions | |
| static wxString | column_to_name (const COLUMN col) |
| Returns the column name as a string. More... | |
| static COLUMN | name_to_column (const wxString &name) |
| Returns the column number from the given column name. More... | |
Static Public Member Functions inherited from DB_Table | |
| static int64 | newId () |
Public Attributes | |
| Cache | cache_ |
| Index_By_Id | index_by_id_ |
| Data * | fake_ |
Public Attributes inherited from DB_Table | |
| wxString | query_ |
| size_t | hit_ |
| size_t | miss_ |
| size_t | skip_ |
| typedef std::vector<Self::Data*> DB_Table_ATTACHMENT_V1::Cache |
A container to hold a list of Data record pointers for the table in memory.
| typedef std::map<int64, Self::Data*> DB_Table_ATTACHMENT_V1::Index_By_Id |
|
inline |
Destructor: clears any data records stored in memory.
|
inline |
|
inline |
Create a copy of the Data record and add to memory table (cache)
|
inlinestatic |
Returns the column name as a string.
|
inline |
Create a new Data record and add to memory table (cache)
|
inline |
Removes all records stored in memory (cache) for the table.
|
inline |
Creates the database table if the table does not exist.
|
inline |
|
inline |
|
inline |
Search the memory table (Cache) for the data record.
If not found in memory, search the database and update the cache.
|
inline |
|
inline |
Search the database for the data record, bypassing the cache.
|
inlinevirtual |
Name of the table.
Implements DB_Table.
|
inlinestatic |
Returns the column number from the given column name.
|
inlinevirtual |
Implements DB_Table.
|
inline |
Remove the Data record from the database and the memory table (cache)
|
inline |
Remove the Data record from the database and the memory table (cache)
|
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 DB_Table_ATTACHMENT_V1::cache_ |
| Data* DB_Table_ATTACHMENT_V1::fake_ |
| Index_By_Id DB_Table_ATTACHMENT_V1::index_by_id_ |