ddc
Public Member Functions | Public Attributes | List of all members
CRunQueryData Class Reference

#include <BranchServer.h>

Collaboration diagram for CRunQueryData:
Collaboration graph
[legend]

Public Member Functions

 CRunQueryData (const string &_Query="", const string &_ResultFormat="JSON", size_t _Start=0, size_t _Limit=10, int _TimeOut=10, string *_pErrorStr=NULL)
 
virtual ~CRunQueryData ()
 
void Init (const string &_Query="", const string &_ResultFormat="JSON", size_t _Start=0, size_t _Limit=10, int _TimeOut=10, string *_pErrorStr=NULL, const string &_ReqPath="", const NavHint &_Hint=NavHint())
 
void Clear ()
 
CQueryQuery () const
 
CQueryOptionsQueryOptions () const
 
bool IsPruneQuery () const
 
void toString (string &Response, size_t WorkerId=0, const DDCVersionT &vCompat=DDCVersion)
 

Public Attributes

string sQuery
 query string More...
 
string sResultFormat
 result format (string) More...
 
size_t StartHitNo
 first hit to return More...
 
size_t ResultLimit
 max number of hits to return More...
 
int TimeOut
 query timeout (seconds) More...
 
int iInternalError
 internal error code More...
 
int iNetworkError
 network error code More...
 
size_t EndHitNo
 final hit number returned More...
 
size_t HitsCount
 total number of hits More...
 
size_t RelevantDocsCount
 ? More...
 
CSelectedHosts SelectedHosts
 maps immediate subcorpora to selected sub-subcorpora More...
 
string HitDistrib
 ? More...
 
string DocDistrib
 ? More...
 
string HitsKey
 key for response body data (json only) More...
 
string ResponseBody
 response body data More...
 
string * pErrorStr
 error string pointer (empty or NULL for success) More...
 
string ReqPath
 request path (>=v2.2.8) More...
 
NavHintKey navKey
 navigation hint key More...
 
NavHint navHint
 user- or cache-supplied navigation hint More...
 
CQueryCompilerpQCompiler
 query compiler for parsing input queries (parsed query is pQCompiler->m_pQuery) More...
 

Detailed Description

DDC branch server 'run_query' paramter & intermediate result-type

Constructor & Destructor Documentation

◆ CRunQueryData()

CRunQueryData::CRunQueryData ( const string &  _Query = "",
const string &  _ResultFormat = "JSON",
size_t  _Start = 0,
size_t  _Limit = 10,
int  _TimeOut = 10,
string *  _pErrorStr = NULL 
)

constructor

References pQCompiler, sQuery, sResultFormat, and Trim().

Here is the call graph for this function:

◆ ~CRunQueryData()

CRunQueryData::~CRunQueryData ( )
virtual

destructor

References pQCompiler.

Member Function Documentation

◆ Init()

void CRunQueryData::Init ( const string &  _Query = "",
const string &  _ResultFormat = "JSON",
size_t  _Start = 0,
size_t  _Limit = 10,
int  _TimeOut = 10,
string *  _pErrorStr = NULL,
const string &  _ReqPath = "",
const NavHint _Hint = NavHint() 
)

◆ Clear()

void CRunQueryData::Clear ( )

◆ Query()

CQuery* CRunQueryData::Query ( ) const
inline

convenience method for accessing compiled query

References CQueryCompiler::m_pQuery.

◆ QueryOptions()

CQueryOptions* CRunQueryData::QueryOptions ( ) const
inline

convenience method for accessing compiled query

Referenced by CDDCBranchServer::ReadSelectedHosts(), and CDDCBranchServer::RunGetFirstHits().

Here is the caller graph for this function:

◆ IsPruneQuery()

bool CRunQueryData::IsPruneQuery ( ) const
inline

is this a prune-query?

References DDCVersion().

Referenced by CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), and CDDCBranchServer::RunGetFirstHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

void CRunQueryData::toString ( string &  Response,
size_t  WorkerId = 0,
const DDCVersionT vCompat = DDCVersion 
)

populate response string Response

References DDC_ResultJson, DocDistrib, EndHitNo, Format(), CConcSession::GetResultFormatByString(), HitDistrib, HitsCount, HitsKey, iInternalError, iNetworkError, jsonStr(), navHint, pErrorStr, RelevantDocsCount, ResponseBody, sResultFormat, and NavHint::toString().

Referenced by CDDCBranchServer::handle__run_query().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ sQuery

string CRunQueryData::sQuery

◆ sResultFormat

string CRunQueryData::sResultFormat

◆ StartHitNo

size_t CRunQueryData::StartHitNo

◆ ResultLimit

size_t CRunQueryData::ResultLimit

◆ TimeOut

int CRunQueryData::TimeOut

◆ iInternalError

int CRunQueryData::iInternalError

◆ iNetworkError

int CRunQueryData::iNetworkError

◆ EndHitNo

size_t CRunQueryData::EndHitNo

◆ HitsCount

size_t CRunQueryData::HitsCount

◆ RelevantDocsCount

size_t CRunQueryData::RelevantDocsCount

◆ SelectedHosts

CSelectedHosts CRunQueryData::SelectedHosts

◆ HitDistrib

string CRunQueryData::HitDistrib

◆ DocDistrib

string CRunQueryData::DocDistrib

◆ HitsKey

string CRunQueryData::HitsKey

◆ ResponseBody

string CRunQueryData::ResponseBody

◆ pErrorStr

string* CRunQueryData::pErrorStr

error string pointer (empty or NULL for success)

Referenced by Clear(), Init(), and toString().

◆ ReqPath

string CRunQueryData::ReqPath

◆ navKey

NavHintKey CRunQueryData::navKey

◆ navHint

NavHint CRunQueryData::navHint

◆ pQCompiler

CQueryCompiler* CRunQueryData::pQCompiler

query compiler for parsing input queries (parsed query is pQCompiler->m_pQuery)

Referenced by Clear(), CRunQueryData(), Init(), CDDCBranchServer::ReadSelectedHosts(), and ~CRunQueryData().


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