PTLib
Version 2.10.4
|
PODBC::Table
This is the main Class to access Data returned by a Select Query. More...
#include <podbc.h>
Public Member Functions | |
Constructor/Deconstructor | |
Table (PODBC *odbc, PString Query) | |
Constructor Using the HDBC and TableName/Select SQL Query creates a virtual Table in the OBDC driver. | |
~Table () | |
Deconstructor. | |
Data Storage | |
Row | NewRow () |
Add New Row. | |
PBoolean | DeleteRow (PINDEX row=0) |
Delete Row 0 indicates Current Row. | |
PBoolean | Post () |
Post Update back to Database. | |
Utilities | |
PINDEX | Rows () |
Rows. | |
PINDEX | Columns () |
Columns. | |
PStringArray | ColumnNames () |
ColumnNames. | |
Row & | RecordHandler () |
Obtain the Record Handler. | |
Row & | operator[] (PINDEX row) |
Row return the fetched row in the Cached RecordSet. | |
Field & | operator() (PINDEX row, PINDEX col) |
Returns the Field data at a predetermined position in the Resultant | |
Field & | Column (PINDEX col) |
Returns the indicated Column Holder for the RecordSet, This can be used for iterative Row calls. | |
Field & | Column (PString Name) |
Returns the indicated Column Holder Name for the RecordSet,. | |
![]() | |
virtual | ~PObject () |
virtual PObject * | Clone () const |
Create a copy of the class on the heap. | |
virtual PINDEX | HashFunction () const |
This function yields a hash value required by the PDictionary class. | |
virtual const char * | GetClass (unsigned ancestor=0) const |
Get the current dynamic type of the object instance. | |
PBoolean | IsClass (const char *cls) const |
virtual PBoolean | InternalIsDescendant (const char *clsName) const |
Determine if the dynamic type of the current instance is a descendent of the specified class. | |
virtual Comparison | Compare (const PObject &obj) const |
Compare the two objects and return their relative rank. | |
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
Determine the byte wise comparison of two objects. | |
bool | operator== (const PObject &obj) const |
Compare the two objects. | |
bool | operator!= (const PObject &obj) const |
Compare the two objects. | |
bool | operator< (const PObject &obj) const |
Compare the two objects. | |
bool | operator> (const PObject &obj) const |
Compare the two objects. | |
bool | operator<= (const PObject &obj) const |
Compare the two objects. | |
bool | operator>= (const PObject &obj) const |
Compare the two objects. | |
virtual void | PrintOn (ostream &strm) const |
Output the contents of the object to the stream. | |
virtual void | ReadFrom (istream &strm) |
Input the contents of the object from the stream. |
Protected Attributes | |
PODBCStmt | stmt |
PString | tableName |
ODBC Fetched Statement Info. | |
Row * | RowHandler |
Name of the Fetched Table (if used in Constructor) |
Additional Inherited Members | |
![]() | |
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } |
Result of the comparison operation performed by the Compare() function. More... | |
![]() | |
static const char * | Class () |
Get the name of the class as a C string. | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() | |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. | |
![]() |
PODBC::Table
This is the main Class to access Data returned by a Select Query.
The Table does not actually create the RecordSet but acts as a wrapper to the driver to access the cached data in the Driver.
Constructor
Using the HDBC and TableName/Select SQL Query creates a virtual Table in the OBDC driver.
PODBC::Table::~Table | ( | ) |
Deconstructor.
Field& PODBC::Table::Column | ( | PINDEX | col | ) |
Returns the indicated Column Holder for the RecordSet,
This can be used for iterative Row calls.
Returns the indicated Column Holder Name for the RecordSet,.
PStringArray PODBC::Table::ColumnNames | ( | ) |
ColumnNames.
Return the list of column Names of the Resultant RecordSet
PINDEX PODBC::Table::Columns | ( | ) |
Columns.
Returns the Number of Columns in the Resultant RecordSet
Field& PODBC::Table::operator() | ( | PINDEX | row, |
PINDEX | col | ||
) |
Returns the Field data at a predetermined position in the Resultant
RecordSet.
It Fetches the Row than isolates the Column from the fetched data.
Row& PODBC::Table::operator[] | ( | PINDEX | row | ) |
Row return the fetched row in the Cached RecordSet.
An Array of PODBC::Field
PBoolean PODBC::Table::Post | ( | ) |
Post Update back to Database.
Row& PODBC::Table::RecordHandler | ( | ) |
Obtain the Record Handler.
This can be used as a Template to obtain Record Information. A call to tablename[i] will update the recordHandler with the Values contained in i Record.
PINDEX PODBC::Table::Rows | ( | ) |
Rows.
Returns the Number of Rows in the Resultant RecordSet
|
protected |