37 #ifndef _DATABASE_TEST_OBJECT_H_
38 #define _DATABASE_TEST_OBJECT_H_
42 namespace database_interface {
void setWriteToDatabase(bool sync)
DBField< double > double_field_
DatabaseTestObject()
Constructs the fields, then calls initFields() followed by initPermissions()
std::map< std::string, DBFieldBase * > foreign_keys_
List of foreign keys in OTHER tables that reference our PRIMARY KEY.
void setReadFromDatabase(bool sync)
Specialized version for std::string data type, trivial conversion to/from string. ...
The base class for a field of a class stored in the database, corresponding to a column in a table...
The base class for all C++ classes that can be stored in the database.
The C++ version of an object stored in a database.
DBField< std::string > string_field_
DatabaseTestObject(const DatabaseTestObject *other)
Copy-constructs the fields based on the copied instance fields, then calls initFields() ...
void setAllFieldsReadFromDatabase(bool sync)
void initPermissions()
Initializes permissions for the fields.
void setAllFieldsWriteToDatabase(bool sync)
void setSequenceName(std::string seq)
std::vector< DBFieldBase * > fields_
The addresses of all the other fields.
void initFields()
Places all the fields in the fields_ vector and sets foreign keys and sequences.
DBField< int > foreign_field_
DBField< std::vector< std::string > > tags_field_
DBField< std::vector< char > > binary_field_
DBFieldBase * primary_key_field_
The address of the field that acts as a primary key.