Index

dkQueryBase

Purpose:

dkQueryBase is an abstract base class for query objects that can be associated with zero or more datastores. With the help of its datastores, query objects performs query processing tasks, such as preparing and executing a query, monitoring the status of query execution, and storing the results. DKCombinedQuery is an example of a concrete implementation of dkQueryBase. The result of a query is usually a DKAny object containing DKResults.

Class summary:

class dkQueryBase
{
  public:
   dkQueryBase ();
   dkQueryBase (const dkQueryBase& query);
   virtual ~dkQueryBase();
 
   virtual void prepare(const DKNVPair* params = 0) = 0;
   virtual void execute(const DKNVPair* params = 0) = 0;
   virtual DKQueryStatus status() = 0;
   virtual DKAny result(DKBoolean fDelete = TRUE) = 0;
   virtual dkResultSetCursor* resultSetCursor() = 0;
   virtual unsigned long numberOfResults() = 0;
};

Members:

Constructors and destructor
dkQueryBase ();
   dkQueryBase (const dkQueryBase& query);
   virtual ~dkQueryBase();
 

Member functions

prepare
Stages or prepares the query.
virtual void prepare(const DKNVPair *params = 0) = 0;

execute
Execute the query. execute() supports an optional scope parameter supplied in DLNVPair. If this is specified, the query scope is used to filter the returned query results. The result is obtained by calling result().
virtual void execute(const DKNVPair *params = 0) = 0;

status
Gets the status of a query.
virtual DKQueryStatus status() = 0;

result
Returns the result pointer to the caller. The result is a DKAny object, which contains a pointer to the DKResults object. The DKResults object is a collection of DKAny objects. The value of any of these DKAny objects is a pointer to a DKDDO object, which represents a document or folder.
virtual DKAny result(DKBoolean fDelete = TRUE) = 0;
 

resultSetCursor
Returns the query result in a dkResultSetCursor object.
virtual dkResultSetCursor* resultSetCursor() = 0;
 

numberOfResults
Gets the number of query results.
virtual unsigned long numberOfResults() = 0;
 

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.