#include <mcs.hh>
This class gives you direct access to the value of a table. Direct access means that you can use setFirst(), setLast(), setWhere() method of Query to find a specific record. While you can retrieve the values from the table with the usual rec() method you can also update the table. To update you need to move the record pointer to the record you want to update, then insert the new values using the rec() method, and call the update() method. Finally you can insert new records setting values in the internal array of Data through the newRec() method, and call insert();
Definition at line 6014 of file mcs.hh.
Public Member Functions | |
void | insert () |
Insert a new record. | |
void | loadTable () |
Reload the table. | |
Record & | newRec () |
Return a reference to a Record object for insert. | |
Table & | operator= (const Table &) |
Declared to avoid using of default assignment operator. | |
void | replace () |
Insert (or replace) a new record. | |
Table (DBConn *db, string table, string fieldkey) | |
Constructor. | |
Table (const Table &) | |
Declared to avoid using of default copy constructor. | |
void | update () |
Update the current record. | |
~Table () | |
Destructor. | |
Private Member Functions | |
void | insert_or_update (int op) |
Private Attributes | |
string | lfieldkey |
Name of the index field. | |
string | ltable |
Table name. | |
MCS_DEBUG_ALLOC | |
Record | newrec |
Array of values for insert. | |
unsigned int | posfieldkey |
Position of the index field. |
mcs::Table::Table | ( | const Table & | ) |
Declared to avoid using of default copy constructor.
mcs::Table::Table | ( | DBConn * | db, | |
string | table, | |||
string | fieldkey | |||
) |
void mcs::Table::insert | ( | ) |
Record & mcs::Table::newRec | ( | ) |
Declared to avoid using of default assignment operator.
void mcs::Table::replace | ( | ) |
void mcs::Table::update | ( | ) |
string mcs::Table::lfieldkey [private] |
string mcs::Table::ltable [private] |
Record mcs::Table::newrec [private] |
unsigned int mcs::Table::posfieldkey [private] |
![]() |
MCS (My Customizable Server) ver. 0.3.3-alpha3
|