MarkLogic Connect
MarkLogic Connect Client API Collection
Public Types | Public Member Functions | Friends | List of all members
mlclient::ValuesResultSet Class Reference

Provides support for multiple values result lookups in a single hit. More...

#include <ValuesResultSet.hpp>

Public Types

typedef ValuesIterator const_iterator
 

Public Member Functions

MLCLIENT_API ValuesResultSet (IConnection *conn)
 Creates a ValuesResultSet linked to the provided connection instance. More...
 
MLCLIENT_API ValuesResultSet (const ValuesResultSet &other)=delete
 Delete copy constructor to prevent concurrent updates of same underlying data.
 
MLCLIENT_API void addLookup (const std::string &optionsName, const std::string &valuesName)
 Adds a values lexicon lookup to this batch process. More...
 
MLCLIENT_API const long getTotal () const
 Returns the total number of lookups we have results for. More...
 
MLCLIENT_API ValuesIteratorbegin ()
 Returns the iterator for this values result set. More...
 
MLCLIENT_API ValuesIteratorend ()
 Returns a reference to the end of the iterator for this values result set. More...
 
MLCLIENT_API bool fetch ()
 Uses the provided Connection to perform a request, and initialise this object and the list of values results. More...
 
MLCLIENT_API std::exception * getFetchException ()
 Returns the exception, if any, encountered by fetch(). nullptr is returned if no exception raised. More...
 

Friends

class ValuesIterator
 

Detailed Description

Provides support for multiple values result lookups in a single hit.

Member Typedef Documentation

A public typedef for the values iterator. This prevents recoding if we change the implementation in future.

Constructor & Destructor Documentation

MLCLIENT_API mlclient::ValuesResultSet::ValuesResultSet ( IConnection conn)

Creates a ValuesResultSet linked to the provided connection instance.

Parameters
connThe connection instance. This class does NOT delete this connection upon destruction.

Member Function Documentation

MLCLIENT_API void mlclient::ValuesResultSet::addLookup ( const std::string &  optionsName,
const std::string &  valuesName 
)

Adds a values lexicon lookup to this batch process.

Parameters
optionsNameThe search options to perform the lookup against
valuesNameThe values configuration named within the specified search options
MLCLIENT_API ValuesIterator* mlclient::ValuesResultSet::begin ( )

Returns the iterator for this values result set.

Returns
The iterator for this values result set
MLCLIENT_API ValuesIterator* mlclient::ValuesResultSet::end ( )

Returns a reference to the end of the iterator for this values result set.

Returns
A reference to the end of the iterator for this values result set
MLCLIENT_API bool mlclient::ValuesResultSet::fetch ( )

Uses the provided Connection to perform a request, and initialise this object and the list of values results.

Note
You can call the functions begin() and end() immediately after fetch() returns (they will block)
This function actually sends one request out per aggregate or lexicon lookup request
Returns
true if no errors were raised, false otherwise
MLCLIENT_API std::exception* mlclient::ValuesResultSet::getFetchException ( )

Returns the exception, if any, encountered by fetch(). nullptr is returned if no exception raised.

Returns
The exception instance pointer
MLCLIENT_API const long mlclient::ValuesResultSet::getTotal ( ) const

Returns the total number of lookups we have results for.

Returns
total The total number of lookups we have results for

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