PTLib  Version 2.10.11
PODBC::Row Class Reference

This class functions as a simple wrapper of the PODBCStmt class to fetch/Save data to the Datasource. More...

#include <podbc.h>

Inheritance diagram for PODBC::Row:
PObject

Public Member Functions

 Row (PODBCStmt *stmt)
 Constructor Create a Dummy row of data to act as a Record Marker. More...
 
FieldColumn (PINDEX col)
 Retrieve Field Data given the specifed column. More...
 
FieldColumn (PString name)
 Retreive Field Data given the Column Name. More...
 
PStringArray ColumnNames ()
 Retrieve the Column Names. More...
 
PINDEX Columns ()
 Columns. More...
 
PINDEX Rows ()
 Rows The Number of Rows. More...
 
Fieldoperator[] (PINDEX col)
 Retrieve Field Data given specified column. More...
 
Fieldoperator[] (PString col)
 Retrieve Field Data given the column Name. More...
 
PBoolean Navigate (PINDEX row)
 Navigate to Specified Row. More...
 
void SetNewRow ()
 SetNewRow Set New Row for input. More...
 
PBoolean Post ()
 Post the Row back to the Database. More...
 
PBoolean Delete (PINDEX row=0)
 Delete the Current Record from the RecordSet. More...
 
- Public Member Functions inherited from PObject
virtual ~PObject ()
 
virtual PObjectClone () const
 Create a copy of the class on the heap. More...
 
virtual PINDEX HashFunction () const
 This function yields a hash value required by the PDictionary class. More...
 
virtual const char * GetClass (unsigned ancestor=0) const
 Get the current dynamic type of the object instance. More...
 
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. More...
 
virtual Comparison Compare (const PObject &obj) const
 Compare the two objects and return their relative rank. More...
 
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
 Determine the byte wise comparison of two objects. More...
 
bool operator== (const PObject &obj) const
 Compare the two objects. More...
 
bool operator!= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator< (const PObject &obj) const
 Compare the two objects. More...
 
bool operator> (const PObject &obj) const
 Compare the two objects. More...
 
bool operator<= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator>= (const PObject &obj) const
 Compare the two objects. More...
 
virtual void PrintOn (ostream &strm) const
 Output the contents of the object to the stream. More...
 
virtual void ReadFrom (istream &strm)
 Input the contents of the object from the stream. More...
 

Public Attributes

PODBCRecordrec
 
PINDEX CurRow
 Record Structure. More...
 
PBoolean NewRow
 Current Row. More...
 
PINDEX RowCount
 Flag to Indicate New Row (requires either Post or Delete) More...
 

Protected Attributes

PArray< FieldFields
 Number of Rows. More...
 

Additional Inherited Members

- Public Types inherited from PObject
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
 Result of the comparison operation performed by the Compare() function. More...
 
- Static Public Member Functions inherited from PObject
static const char * Class ()
 Get the name of the class as a C string. More...
 
static Comparison InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
 Internal function caled from CompareObjectMemoryDirect() More...
 
- Protected Member Functions inherited from PObject
 PObject ()
 Constructor for PObject, made protected so cannot ever create one on its own. More...
 

Detailed Description

This class functions as a simple wrapper of the PODBCStmt class to fetch/Save data to the Datasource.

Data is fetched on a need to basis and not cached except to create a new row.

Constructor & Destructor Documentation

§ Row()

PODBC::Row::Row ( PODBCStmt stmt)

Constructor Create a Dummy row of data to act as a Record Marker.

Template Field are created and Stored in a PARRAY.

Member Function Documentation

§ Column() [1/2]

Field& PODBC::Row::Column ( PINDEX  col)

Retrieve Field Data given the specifed column.

Note: Columns atart at 1 and not exceed PODBCStmt::GetColumnCount()

§ Column() [2/2]

Field& PODBC::Row::Column ( PString  name)

Retreive Field Data given the Column Name.

§ ColumnNames()

PStringArray PODBC::Row::ColumnNames ( )

Retrieve the Column Names.

§ Columns()

PINDEX PODBC::Row::Columns ( )

Columns.

The Number of Columns in the RecordSet

§ Delete()

PBoolean PODBC::Row::Delete ( PINDEX  row = 0)

Delete the Current Record from the RecordSet.

§ Navigate()

PBoolean PODBC::Row::Navigate ( PINDEX  row)

Navigate to Specified Row.

§ operator[]() [1/2]

Field& PODBC::Row::operator[] ( PINDEX  col)

Retrieve Field Data given specified column.

§ operator[]() [2/2]

Field& PODBC::Row::operator[] ( PString  col)

Retrieve Field Data given the column Name.

§ Post()

PBoolean PODBC::Row::Post ( )

Post the Row back to the Database.

When Row::NewRow is true the data can be posted back to the Database; If Edit Invoked then releasea the RowHandler for Navigation.

§ Rows()

PINDEX PODBC::Row::Rows ( )

Rows The Number of Rows.

§ SetNewRow()

void PODBC::Row::SetNewRow ( )

SetNewRow Set New Row for input.

Member Data Documentation

§ CurRow

PINDEX PODBC::Row::CurRow

Record Structure.

§ Fields

PArray<Field> PODBC::Row::Fields
protected

Number of Rows.

§ NewRow

PBoolean PODBC::Row::NewRow

Current Row.

§ rec

PODBCRecord* PODBC::Row::rec

§ RowCount

PINDEX PODBC::Row::RowCount

Flag to Indicate New Row (requires either Post or Delete)


The documentation for this class was generated from the following file: