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";

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

Public Member Functions

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

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().

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

See Also
sbIDatabaseSimpleQueryCallback, sbIDatabaseQuery

Definition at line 84 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
dbResultObjectThe result object of the completed query
dbGUIDThe guid of the database bring queried
strQueryThe query string that executed
See Also
sbIDatabaseQuery
void sbIDatabaseQueryCallback::onQueryError ( in long  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
dbErrorThe error code from SQLITE (equivalent to the return from sbIDatabaseQuery::execute)
dbGUIDThe guid of the database bring queried
strQueryThe query string that executed
See Also
sbIDatabaseQuery
void sbIDatabaseQueryCallback::onQueryRow ( in sbIDatabaseResult  dbResultObject,
in unsigned long  dbRowResult,
in unsigned long  dbRowTotal 
)

Called as each row is added to the result set.

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

Parameters
dbResultObjectThe result object of the completed query
dbRowResultThe current row filled in the result object
dbRowTotalThe 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
dbGUIDThe guid of the database bring queried
strQueryThe query string that executed
See Also
sbIDatabaseQuery

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