sbIDatabaseQueryCallback Interface Reference

A more complex callback object that can be used to read each row of the results in turn. More...

import "sbIDatabaseQuery.idl";

List of all members.

Public Member Functions

void onQueryError (in PRInt32 dbError, in AString dbGUID, in AString strQuery)
 Called if the query has an error.
void onQueryStart (in AString dbGUID, in AString strQuery)
 Called for each query that executes.
void onQueryRow (in sbIDatabaseResult dbResultObject, in PRInt32 dbRowResult, in PRInt32 dbRowTotal)
 Called as each row is added to the result set.
void onQueryEnd (in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery)
 Called when the query has completed.


Detailed Description

A more complex callback object that can be used to read each row of the results in turn.

This interface is meant to be implemented as a callback by client code.

Clients that simply need to be informed when a query has completed may implement this interface and pass it to sbIDatabaseQuery::addCallback().

For persistent queries, the callback will be called every time the system detects that the queried table has been changed and has executed the query again.

NOTE: The callback methods are called from a database thread.

See also:
sbIDatabaseSimpleQueryCallback, sbIDatabaseQuery

Definition at line 90 of file sbIDatabaseQuery.idl.


Member Function Documentation

void sbIDatabaseQueryCallback::onQueryEnd ( in sbIDatabaseResult  dbResultObject,
in AString  dbGUID,
in AString  strQuery 
)

Called when the query has completed.

NOTE: The onQueryEnd() method is called from a database thread.

Parameters:
dbResultObject The result object of the completed query
dbGUID The guid of the database bring queried
strQuery The query string that executed
See also:
sbIDatabaseQuery

void sbIDatabaseQueryCallback::onQueryError ( in PRInt32  dbError,
in AString  dbGUID,
in AString  strQuery 
)

Called if the query has an error.

NOTE: The onQueryError() method is called from a database thread.

Parameters:
dbError The error code from SQLITE (equivalent to the return from sbIDatabaseQuery::execute)
dbGUID The guid of the database bring queried
strQuery The query string that executed
See also:
sbIDatabaseQuery

void sbIDatabaseQueryCallback::onQueryRow ( in sbIDatabaseResult  dbResultObject,
in PRInt32  dbRowResult,
in PRInt32  dbRowTotal 
)

Called as each row is added to the result set.

NOTE: The onQueryRow() method is called from a database thread.

Parameters:
dbResultObject The result object of the completed query
dbRowResult The current row filled in the result object
dbRowTotal The total rows to be filled in the result object
See also:
sbIDatabaseQuery

void sbIDatabaseQueryCallback::onQueryStart ( in AString  dbGUID,
in AString  strQuery 
)

Called for each query that executes.

NOTE: The onQueryStart() method is called from a database thread.

Parameters:
dbGUID The guid of the database bring queried
strQuery The query string that executed
See also:
sbIDatabaseQuery


The documentation for this interface was generated from the following file:
Generated on Mon Aug 21 21:01:55 2006 for Songbird by  doxygen 1.4.7