Index

DKResults

Purpose:

DKResults is subclass of dkQueryableCollection, therefore it supports sorting and bidirectional iterator and it is queryable. Element members of DKResults are always DKDDO objects, which represent a hit from a query. The iterator created by this class is DKSequentialIterator.

DKResults also inherits the interface from the sequential collection. As DKResults always has DKDDO collection members, its destructor can destroy the elements implicitly, that is, the user does not need to delete each member. However, the end user must still manage memory for each member after the following operations: removeElementAt(), removeAllElements() and replaceElementAt().

Class summary:

class DKResults: public dkQueryableCollection
{
public:
   dkResults(const dkDatastore& ds);
   virtual DKResults();
   virtual dkIterator *createIterator() const;
 
   virtual DKAny evaluate (const char  asterisk;query,
                           const short  ql_type,
                           const DKNVPair *params = 0);
 
};

Members:

Constructors and destructor
   dkResults (const dkDatastore& ds);
   virtual DKResults();

Member functions

evaluate
Executes the query of the given query language type (with the optional parameter list) and returns the result as a DKResults object. As a side-effect, the collection members will be sorted by their IDs in ascending order. All iterators will be invalidated after this operation.
   virtual DKAny evaluate (const char  asterisk;query,
                           const short  ql_type,
                           const DKNVPair *params = 0);

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