#include <spdVerTable.h>
Public Member Functions | |
long int | getMaxVersionNumber () |
long int | getNextVersionNumber () |
std::string | createSelectQuery () |
template<class num> | |
void | getValues (std::vector< num > &values) |
void | getValues (std::vector< std::string > &values) |
long int | update (const std::vector< unsigned long int > &values) |
long int | update (const std::vector< long int > &values) |
long int | update (const std::vector< float > &values) |
long int | update (const std::vector< std::string > &values) |
template<class T> | |
bool | compareWithDb (const std::vector< T > &values) |
template<class T> | |
long int | createNewVersion (const std::vector< T > &values) |
unsigned int | getVersionNumber () |
void | setVersionNumber (long int newVersion) |
std::string | getTableName () |
std::string | getVersionField () |
std::vector< std::string > | getFields () |
std::vector< spdDbTypes > | getTypes () |
void | setTableSettings (const std::string &table, const std::string &versionField, const std::vector< std::string > &fields) |
void | setTableSettings (const std::string &table, const std::string &versionField, const std::vector< std::string > &fields, const std::vector< spdDbTypes > &types) |
SpdVerTable (const std::string &table, const std::string &versionField, const std::vector< std::string > &fields) | |
SpdVerTable (const std::string &table, const std::string &versionField, const std::vector< std::string > &fields, const std::vector< spdDbTypes > &types) | |
SpdVerTable (void) | |
~SpdVerTable (void) | |
Private Member Functions | |
template<class num> | |
std::string | createInsertQuery (long int newVersion, const std::vector< num > &values) |
std::string | createInsertQuery (long int newVersion, const std::vector< std::string > &values) |
template<class T> | |
void | getIntResults (ResultSet *rs, std::vector< T > &values) |
template<class T> | |
void | getUIntResults (ResultSet *rs, std::vector< T > &values) |
template<class T> | |
void | getFloatResults (ResultSet *rs, std::vector< T > &values) |
void | getStringResults (ResultSet *rs, std::vector< std::string > &values) |
Private Attributes | |
std::vector< std::string > | fields |
std::vector< spdDbTypes > | types |
std::string | versionField |
std::string | tableName |
long int | version |
This class is supposed to be able to manage a versioning table. It needs to be initialized with the table name, versioning field and the field list.
SpdVerTable::SpdVerTable | ( | const std::string & | table, | |
const std::string & | versionField, | |||
const std::vector< std::string > & | fields | |||
) |
SpdVerTable::SpdVerTable | ( | const std::string & | table, | |
const std::string & | versionField, | |||
const std::vector< std::string > & | fields, | |||
const std::vector< spdDbTypes > & | types | |||
) |
SpdVerTable::SpdVerTable | ( | void | ) |
SpdVerTable::~SpdVerTable | ( | void | ) |
std::string SpdVerTable::createInsertQuery | ( | long int | newVersion, | |
const std::vector< num > & | values | |||
) | [inline, private] |
std::string SpdVerTable::createInsertQuery | ( | long int | newVersion, | |
const std::vector< std::string > & | values | |||
) | [private] |
void SpdVerTable::getIntResults | ( | ResultSet * | rs, | |
std::vector< T > & | values | |||
) | [inline, private] |
void SpdVerTable::getUIntResults | ( | ResultSet * | rs, | |
std::vector< T > & | values | |||
) | [inline, private] |
void SpdVerTable::getFloatResults | ( | ResultSet * | rs, | |
std::vector< T > & | values | |||
) | [inline, private] |
void SpdVerTable::getStringResults | ( | ResultSet * | rs, | |
std::vector< std::string > & | values | |||
) | [private] |
long int SpdVerTable::getMaxVersionNumber | ( | ) |
long int SpdVerTable::getNextVersionNumber | ( | ) |
std::string SpdVerTable::createSelectQuery | ( | ) |
void SpdVerTable::getValues | ( | std::vector< T > & | values | ) | [inline] |
void SpdVerTable::getValues | ( | std::vector< std::string > & | values | ) |
long int SpdVerTable::update | ( | const std::vector< unsigned long int > & | values | ) |
long int SpdVerTable::update | ( | const std::vector< long int > & | values | ) |
long int SpdVerTable::update | ( | const std::vector< float > & | values | ) |
long int SpdVerTable::update | ( | const std::vector< std::string > & | values | ) |
bool SpdVerTable::compareWithDb | ( | const std::vector< T > & | values | ) | [inline] |
long int SpdVerTable::createNewVersion | ( | const std::vector< T > & | values | ) | [inline] |
unsigned int SpdVerTable::getVersionNumber | ( | ) | [inline] |
void SpdVerTable::setVersionNumber | ( | long int | newVersion | ) | [inline] |
std::string SpdVerTable::getTableName | ( | ) | [inline] |
std::string SpdVerTable::getVersionField | ( | ) | [inline] |
std::vector<std::string> SpdVerTable::getFields | ( | ) | [inline] |
std::vector<spdDbTypes> SpdVerTable::getTypes | ( | ) | [inline] |
void SpdVerTable::setTableSettings | ( | const std::string & | table, | |
const std::string & | versionField, | |||
const std::vector< std::string > & | fields | |||
) |
void SpdVerTable::setTableSettings | ( | const std::string & | table, | |
const std::string & | versionField, | |||
const std::vector< std::string > & | fields, | |||
const std::vector< spdDbTypes > & | types | |||
) |
std::vector<std::string> SpdVerTable::fields [private] |
std::vector<spdDbTypes> SpdVerTable::types [private] |
std::string SpdVerTable::versionField [private] |
std::string SpdVerTable::tableName [private] |
long int SpdVerTable::version [private] |