The C++ version of an object stored in a database. More...
#include <database_test_object.h>
Public Member Functions | |
DatabaseTestObject () | |
Constructs the fields, then calls initFields() followed by initPermissions() More... | |
DatabaseTestObject (const DatabaseTestObject *other) | |
Copy-constructs the fields based on the copied instance fields, then calls initFields() More... | |
void | initFields () |
Places all the fields in the fields_ vector and sets foreign keys and sequences. More... | |
void | initPermissions () |
Initializes permissions for the fields. More... | |
Public Member Functions inherited from database_interface::DBClass | |
DBClass () | |
DBFieldBase * | getField (size_t i) |
const DBFieldBase * | getField (size_t i) const |
DBFieldBase * | getField (std::string name) |
const DBFieldBase * | getField (std::string name) const |
bool | getForeignKey (std::string table, const DBFieldBase *&key) const |
Returns the name of the foreign key column in a given table that references our primary key. More... | |
bool | getForeignKey (std::string table, DBFieldBase *&key) |
size_t | getNumFields () const |
DBFieldBase * | getPrimaryKeyField () |
const DBFieldBase * | getPrimaryKeyField () const |
void | setAllFieldsReadFromDatabase (bool sync) |
void | setAllFieldsWriteToDatabase (bool sync) |
Public Attributes | |
DBField< std::vector< char > > | binary_field_ |
DBField< double > | double_field_ |
DBField< int > | foreign_field_ |
DBField< int > | pk_field_ |
DBField< std::string > | string_field_ |
DBField< std::vector < std::string > > | tags_field_ |
Additional Inherited Members | |
Protected Attributes inherited from database_interface::DBClass | |
std::vector< DBFieldBase * > | fields_ |
The addresses of all the other fields. More... | |
std::map< std::string, DBFieldBase * > | foreign_keys_ |
List of foreign keys in OTHER tables that reference our PRIMARY KEY. More... | |
DBFieldBase * | primary_key_field_ |
The address of the field that acts as a primary key. More... | |
The C++ version of an object stored in a database.
Note that:
Definition at line 48 of file database_test_object.h.
|
inline |
Constructs the fields, then calls initFields() followed by initPermissions()
Note that:
Definition at line 110 of file database_test_object.h.
|
inline |
Copy-constructs the fields based on the copied instance fields, then calls initFields()
The data itself in the fields, as well as the permissions, gets copied in the field copy construction.
Definition at line 127 of file database_test_object.h.
|
inline |
Places all the fields in the fields_ vector and sets foreign keys and sequences.
Note that:
Definition at line 70 of file database_test_object.h.
|
inline |
Initializes permissions for the fields.
Note that:
Definition at line 94 of file database_test_object.h.
DBField< std::vector<char> > database_interface::DatabaseTestObject::binary_field_ |
Definition at line 58 of file database_test_object.h.
DBField<double> database_interface::DatabaseTestObject::double_field_ |
Definition at line 54 of file database_test_object.h.
DBField<int> database_interface::DatabaseTestObject::foreign_field_ |
Definition at line 60 of file database_test_object.h.
DBField<int> database_interface::DatabaseTestObject::pk_field_ |
Definition at line 52 of file database_test_object.h.
DBField<std::string> database_interface::DatabaseTestObject::string_field_ |
Definition at line 55 of file database_test_object.h.
DBField< std::vector<std::string> > database_interface::DatabaseTestObject::tags_field_ |
Definition at line 56 of file database_test_object.h.