#include <Code/IO/GoDBRecordSet.h>
Public Member Functions |
| void | AddObject (const OriginalObjectType &object) |
| | Add a new Object of OriginalObjectType (exp: GoDBprojectRow) in the m_RowContainer and set the bool to false.
|
| std::vector< std::string > | GetColumnNamesContainer () |
| RowContainerType * | GetRowContainer () |
| | GoDBRecordSet () |
| void | InsertObject (const int &pos, const OriginalObjectType &object) |
| void | PopulateFromDB () |
| | help read content from DB: select all the fields for a given table (TableName)in the database and fills the m_RowContainer with the results: each row from the database will fill an InternalObjectType with true and an OriginalObjectType (exp; GoProjectRow). if there is a need to add a condition on the selection ( add a WHERE), have to use the function SetWhereString( std::string whereString ) from the same class.
|
| bool | SaveInDB (bool Update=false) |
| void | SetConnector (vtkMySQLDatabase *iDatabaseConnector) |
| void | SetDataBaseName (const std::string &iDataBaseName) |
| void | SetPassword (const std::string &iPassword) |
| void | SetServerName (const std::string &iServerName) |
| void | SetTableName (const std::string &iTableName) |
| void | SetUser (const std::string &iUser) |
| void | SetWhereString (const std::string &whereString) |
| | is there to be used in case there is a "WHERE" condition to add for the selection in PopulateFromDB()
|
| | ~GoDBRecordSet () |
Private Member Functions |
| void | PopulateColumnNamesContainer () |
| | fills the vector m_ColumnNamesContainer with the column names gotten from the database and in the same order as the query results will be given:(only way to retrieve which query->datavalue corresponds to which field).
|
| bool | SaveEachRow (vtkSQLQuery *query, bool Update=false) |
| bool | SaveRows (vtkSQLQuery *query, const std::string &what, const myIteratorType &start, const myIteratorType &end) |
| | uses the INSERT or REPLACE query to save all the objects GoDB..Row currently in the m_RowContainer located between start and end
|
| bool | UpdateRows (vtkSQLQuery *query, const myIteratorType &start, const myIteratorType &end) |
| | uses the INSERT or REPLACE query to save all the objects GoDB..Row currently in the m_RowContainer located between start and end
|
Detailed Description
template<class TObject>
class GoDBRecordSet< TObject >
Definition at line 50 of file GoDBRecordSet.h.
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
Add a new Object of OriginalObjectType (exp: GoDBprojectRow) in the m_RowContainer and set the bool to false.
Definition at line 76 of file GoDBRecordSet.h.
template<class TObject >
| std::vector< std::string > GoDBRecordSet< TObject >::GetColumnNamesContainer |
( |
| ) |
|
|
inline |
fills the vector m_ColumnNamesContainer with the column names gotten from the database and in the same order as the query results will be given:(only way to retrieve which query->datavalue corresponds to which field).
Definition at line 409 of file GoDBRecordSet.h.
help read content from DB: select all the fields for a given table (TableName)in the database and fills the m_RowContainer with the results: each row from the database will fill an InternalObjectType with true and an OriginalObjectType (exp; GoProjectRow). if there is a need to add a condition on the selection ( add a WHERE), have to use the function SetWhereString( std::string whereString ) from the same class.
Definition at line 125 of file GoDBRecordSet.h.
template<class TObject >
| bool GoDBRecordSet< TObject >::SaveEachRow |
( |
vtkSQLQuery * |
query, |
|
|
bool |
Update = false |
|
) |
| |
|
private |
uses the INSERT or REPLACE query to save all the objects GoDB..Row currently in the m_RowContainer located between start and end
Definition at line 312 of file GoDBRecordSet.h.
template<class TObject >
| void GoDBRecordSet< TObject >::SetConnector |
( |
vtkMySQLDatabase * |
iDatabaseConnector | ) |
|
|
inline |
template<class TObject >
| void GoDBRecordSet< TObject >::SetDataBaseName |
( |
const std::string & |
iDataBaseName | ) |
|
|
inline |
template<class TObject >
| void GoDBRecordSet< TObject >::SetPassword |
( |
const std::string & |
iPassword | ) |
|
|
inline |
template<class TObject >
| void GoDBRecordSet< TObject >::SetServerName |
( |
const std::string & |
iServerName | ) |
|
|
inline |
template<class TObject >
| void GoDBRecordSet< TObject >::SetTableName |
( |
const std::string & |
iTableName | ) |
|
|
inline |
template<class TObject >
| void GoDBRecordSet< TObject >::SetUser |
( |
const std::string & |
iUser | ) |
|
|
inline |
template<class TObject >
| void GoDBRecordSet< TObject >::SetWhereString |
( |
const std::string & |
whereString | ) |
|
|
inline |
uses the INSERT or REPLACE query to save all the objects GoDB..Row currently in the m_RowContainer located between start and end
Definition at line 367 of file GoDBRecordSet.h.
Member Data Documentation
template<class TObject >
| std::vector< std::string > GoDBRecordSet< TObject >::m_ColumnNamesContainer |
|
private |
The documentation for this class was generated from the following file: