![]() |
MAK Data Logger API Documentation for DIS
|
A table is simply a table name and a list of column entries (DtDatabaseColumn). More...
Collaboration diagram for DtDatabaseTable:Public Types | |
| typedef std::list < DtDatabaseColumn > | ColumnList |
| Various useful types. More... | |
| typedef ColumnList::iterator | iterator |
| typedef ColumnList::const_iterator | const_iterator |
Public Member Functions | |
| DtDatabaseTable (const DtString &tableName) | |
| constructor More... | |
| virtual | ~DtDatabaseTable () |
| destructor More... | |
| virtual bool | isShared () const |
| Share this table object is shared, a shared table can have calls to create without destroying the original data. More... | |
| virtual void | setShared (bool shared) |
| virtual bool | hasTableBeenCreated () const |
| Check to see if a table has been created using this object. More... | |
| virtual void | setTableCreated (bool created) |
| virtual DtDatabaseColumn & | addColumn (const DtDatabaseColumn &column) |
| Makes a copy of the column argument and puts it on the column entries list. More... | |
| virtual void | removeColumn (iterator column) |
| Remove a column by iterator. More... | |
| virtual void | clearColumns () |
| Remove all columns. More... | |
| virtual void | resetValues () |
| Set all values to null. More... | |
| virtual bool | isEmpty (bool checkPrimaryKey) const |
| Check to see if this table has any values. More... | |
| unsigned int | autoIncrementKey () |
| Get a new auto increment key which will be unique for this table. More... | |
| unsigned int | lastLocalAutoIncrementKey () const |
| Get the last auto increment key calculated. More... | |
| virtual DtString | createCSVList (size_t index, bool skipNull, int maxColumnWidth) const |
| Return a comma separated value list. More... | |
| virtual const DtString & | tableName () const |
| returns the table's name More... | |
| virtual void | setName (const DtString &tableName) |
| Set the table name. More... | |
| virtual size_t | rowCount () const |
| Iterate throw each column and get the maximum value count. More... | |
| virtual iterator | getColumn (const DtString &columnName) |
| Get a iterator to a column with a given name. More... | |
| virtual const_iterator | getColumn (const DtString &columnName) const |
| Get a iterator to a column with a given name. More... | |
| virtual iterator | begin () |
| Get an iterator to the first column. More... | |
| virtual const_iterator | begin () const |
| Get an iterator to the first column. More... | |
| virtual iterator | end () |
| Get an iterator to after the last column. More... | |
| virtual const_iterator | end () const |
| Get an iterator to after the last column. More... | |
Protected Attributes | |
| DtString | myName |
| ColumnList | myColumns |
| unsigned int | myLocalAutoIncrementKey |
| bool | mySharedFlag |
| bool | myCreatedFlag |
A table is simply a table name and a list of column entries (DtDatabaseColumn).
This class provides the infrastructure and interface for specific SQL tables. It also provides methods for generating a comma- separated list of column names (for use in INSERT commands) and a properly formatted argument string for table creation (CREATE TABLE).
| typedef std::list<DtDatabaseColumn> DtDatabaseTable::ColumnList |
Various useful types.
| typedef ColumnList::const_iterator DtDatabaseTable::const_iterator |
| typedef ColumnList::iterator DtDatabaseTable::iterator |
|
explicit |
constructor
|
virtual |
destructor
|
virtual |
Makes a copy of the column argument and puts it on the column entries list.
| DtInvalidInput | if a column with the same name exists. |
| unsigned int DtDatabaseTable::autoIncrementKey | ( | ) |
Get a new auto increment key which will be unique for this table.
|
virtual |
Get an iterator to the first column.
|
virtual |
Get an iterator to the first column.
|
virtual |
Remove all columns.
|
virtual |
Return a comma separated value list.
|
virtual |
Get an iterator to after the last column.
|
virtual |
Get an iterator to after the last column.
|
virtual |
Get a iterator to a column with a given name.
|
virtual |
Get a iterator to a column with a given name.
|
virtual |
Check to see if a table has been created using this object.
|
virtual |
Check to see if this table has any values.
|
virtual |
Share this table object is shared, a shared table can have calls to create without destroying the original data.
| unsigned int DtDatabaseTable::lastLocalAutoIncrementKey | ( | ) | const |
Get the last auto increment key calculated.
if autoIncrementKey has not been called this function will return a Zero.
|
virtual |
Remove a column by iterator.
| DtInvalidInput | if the iterator is invalid. |
|
virtual |
Set all values to null.
|
virtual |
Iterate throw each column and get the maximum value count.
|
virtual |
Set the table name.
|
virtual |
|
virtual |
|
virtual |
returns the table's name
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |