CDatabaseResult Class Reference

#include <DatabaseResult.h>

Inheritance diagram for CDatabaseResult:
[legend]
Collaboration diagram for CDatabaseResult:
[legend]

Public Member Functions

 CDatabaseResult (PRBool aRequiresLocking=PR_FALSE)
 
virtual ~CDatabaseResult ()
 
NS_DECL_ISUPPORTS
NS_DECL_SBIDATABASERESULT
nsresult 
AddRow (const std::vector< nsString > &vCellValues)
 
nsresult DeleteRow (PRUint32 dbRow)
 
nsresult SetColumnNames (const std::vector< nsString > &vColumnNames)
 
nsresult SetColumnName (PRUint32 dbColumn, const nsString &strColumnName)
 
nsresult SetRowCell (PRUint32 dbRow, PRUint32 dbCell, const nsString &strCellValue)
 
nsresult SetRowCells (PRUint32 dbRow, const std::vector< nsString > &vCellValues)
 
PRUint32 GetColumnIndexFromName (const nsAString &strColumnName)
 
void RebuildColumnResolveMap ()
 
- Public Member Functions inherited from sbIDatabaseResult
unsigned long getColumnCount ()
 The number of columns in the result. More...
 
AString getColumnName (in unsigned long aColumnIndex)
 The name of a particular column. More...
 
unsigned long getColumnIndex (in AString aColumnName)
 The index of a particular column. More...
 
unsigned long getRowCount ()
 The number of rows in the result. More...
 
AString getRowCell (in unsigned long aRowIndex, in unsigned long aColumnIndex)
 Retrieve the value of a cell at a particular row and column. More...
 
AString getRowCellByColumn (in unsigned long aRowIndex, in AString aColumnName)
 Retrieve the value of a cell at a particular row for a named column. More...
 
wstring getColumnNamePtr (in unsigned long aColumnIndex)
 [noscript] Get the internal pointer to the column name. More...
 
wstring getRowCellPtr (in unsigned long aRowIndex, in unsigned long aColumnIndex)
 [noscript] Get the internal pointer to the cell value. More...
 
wstring getRowCellByColumnPtr (in unsigned long aRowIndex, in AString aColumnName)
 [noscript] Get the internal pointer to the cell value (by named column). More...
 
void clearResultSet ()
 [noscript] Free the internally allocated resources of this results object. More...
 

Protected Types

typedef std::vector< nsString > dbcolumnnames_t
 
typedef std::deque
< std::vector< nsString > > 
dbrowcells_t
 
typedef std::map< nsString,
PRUint32 > 
dbcolumnresolvemap_t
 

Protected Attributes

PRPackedBool m_RequiresLocking
 
PRLock * m_pLock
 
dbcolumnnames_t m_ColumnNames
 
dbrowcells_t m_RowCells
 
dbcolumnresolvemap_t m_ColumnResolveMap
 

Friends

class CDatabaseQuery
 
class QueryProcessorThread
 

Detailed Description

Definition at line 60 of file DatabaseResult.h.

Member Typedef Documentation

typedef std::vector<nsString> CDatabaseResult::dbcolumnnames_t
protected

Definition at line 84 of file DatabaseResult.h.

typedef std::map<nsString, PRUint32> CDatabaseResult::dbcolumnresolvemap_t
protected

Definition at line 86 of file DatabaseResult.h.

typedef std::deque< std::vector<nsString> > CDatabaseResult::dbrowcells_t
protected

Definition at line 85 of file DatabaseResult.h.

Constructor & Destructor Documentation

CDatabaseResult::CDatabaseResult ( PRBool  aRequiresLocking = PR_FALSE)
explicit

Definition at line 76 of file DatabaseResult.cpp.

CDatabaseResult::~CDatabaseResult ( )
virtual

Definition at line 93 of file DatabaseResult.cpp.

Member Function Documentation

nsresult CDatabaseResult::AddRow ( const std::vector< nsString > &  vCellValues)

Definition at line 264 of file DatabaseResult.cpp.

Here is the call graph for this function:

nsresult CDatabaseResult::DeleteRow ( PRUint32  dbRow)

Definition at line 279 of file DatabaseResult.cpp.

Here is the call graph for this function:

PRUint32 CDatabaseResult::GetColumnIndexFromName ( const nsAString &  strColumnName)

Definition at line 364 of file DatabaseResult.cpp.

Here is the call graph for this function:

void CDatabaseResult::RebuildColumnResolveMap ( )

Definition at line 392 of file DatabaseResult.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult CDatabaseResult::SetColumnName ( PRUint32  dbColumn,
const nsString &  strColumnName 
)

Definition at line 319 of file DatabaseResult.cpp.

Here is the call graph for this function:

nsresult CDatabaseResult::SetColumnNames ( const std::vector< nsString > &  vColumnNames)

Definition at line 304 of file DatabaseResult.cpp.

Here is the call graph for this function:

nsresult CDatabaseResult::SetRowCell ( PRUint32  dbRow,
PRUint32  dbCell,
const nsString &  strCellValue 
)

Definition at line 334 of file DatabaseResult.cpp.

Here is the call graph for this function:

nsresult CDatabaseResult::SetRowCells ( PRUint32  dbRow,
const std::vector< nsString > &  vCellValues 
)

Definition at line 349 of file DatabaseResult.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class CDatabaseQuery
friend

Definition at line 62 of file DatabaseResult.h.

friend class QueryProcessorThread
friend

Definition at line 63 of file DatabaseResult.h.

Member Data Documentation

dbcolumnnames_t CDatabaseResult::m_ColumnNames
protected

Definition at line 92 of file DatabaseResult.h.

dbcolumnresolvemap_t CDatabaseResult::m_ColumnResolveMap
protected

Definition at line 94 of file DatabaseResult.h.

PRLock* CDatabaseResult::m_pLock
protected

Definition at line 90 of file DatabaseResult.h.

PRPackedBool CDatabaseResult::m_RequiresLocking
protected

Definition at line 88 of file DatabaseResult.h.

dbrowcells_t CDatabaseResult::m_RowCells
protected

Definition at line 93 of file DatabaseResult.h.


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