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

utility struct for iterating over hit occurrences More...

#include <QCount.h>

Inheritance diagram for CQKeys:
Inheritance graph
[legend]
Collaboration diagram for CQKeys:
Collaboration graph
[legend]

Public Types

typedef set< vector< string > > StringTupleSet
 typedef for target value-tuples More...
 

Public Member Functions

 CQKeys (CQCount *qCount=NULL, size_t CountLimit=DDCDefaultCountSampleSize)
 bison constructor More...
 
 CQKeys (CQCount *qCount, size_t CountLimit, const vector< string > &IndexNames)
 bison constructor More...
 
virtual ~CQKeys (void)
 Default destructor. More...
 
virtual bool Compile (CQueryCompiler *compiler)
 Compile index-dependent query properties. More...
 
virtual void Evaluate ()
 evaluate query: top-level (sanity checks only) More...
 
virtual BYTE GetMatchId () const
 get nontrivial match-id: local > qCount More...
 
virtual BYTE SetMatchId (BYTE matchId)
 Set match-id, returns new value. More...
 
virtual string toString ()
 DEBUG: return a canonical string form for this query More...
 
virtual string jsonClass ()
 
virtual string jsonData ()
 
virtual void ClearNode ()
 clears all daugher nodes More...
 
virtual void Clear (bool deep=true)
 clear query contents. if deep is true, propagates operation to daughters More...
 
virtual ddcObjectList Children () const
 
virtual void DisownChildren ()
 
- Public Member Functions inherited from CQuery
 CQuery (const string &label=string(""))
 Default constructor. More...
 
virtual ~CQuery (void)
 
virtual bool CheckSatisfiable (CQueryCompiler *compiler)
 
virtual bool CompileOptions (CQueryCompiler *compiler=NULL)
 
virtual bool Negated ()
 For sanity checks. Default just returns false. More...
 
virtual bool Negate ()
 Toggle negation flag, returns new value. Default throws an exception. More...
 
virtual bool HasMatchId () const
 Returns true iff this query uses a nontrival match-id operator; default checks (this->GetMatchId() != 0) More...
 
virtual bool RootOK ()
 Is this query an admissible root of a compiled parse tree (default returns !this->Negated()) More...
 
virtual string optionsToString ()
 DEBUG: return canonical option string More...
 
virtual string optionsToJson ()
 return json format option string More...
 
virtual string toJson ()
 
void SetCompiler (CQueryCompiler *compiler)
 
virtual void ClearOptions ()
 deletes m_Options if non-NULL More...
 
virtual void SetOptions (CQueryOptions *opts)
 set global query options ; deletes any pre-existing m_Options More...
 
- Public Member Functions inherited from ddcObject
 ddcObject ()
 Default constructor. More...
 
virtual ~ddcObject ()
 virtual destructor does nothing More...
 
template<typename Visit >
ddcObjectTraverse (Visit &visit)
 
template<typename Visit >
ddcObjectTraverse (Visit &visit) const
 
template<typename Visit >
ddcObjectTraverseR (Visit &visit)
 
template<typename Visit >
ddcObjectTraverseR (Visit &visit) const
 
virtual ddcObjectList Descendants () const
 

Public Attributes

CQCountm_qCount
 underlying count() query supplying keys More...
 
size_t m_CountLimit
 limit for m_qCount subquery More...
 
vector< string > m_IndexNames
 target index-tuple More...
 
BYTE m_MatchId
 match-id of anchor token (0 for any) More...
 
vector< CQTokSet * > m_dtrs
 pseudo-private: temporary sub-queries for each CQCountKeyExprToken key-expression in m_qCount->m_keys->m_Exprs More...
 
CQuerym_proxy
 pseudo-private: proxy query for join of independent attributes (WITH) More...
 
- Public Attributes inherited from CQuery
string m_Label
 arbitrary name for this query node (e.g. string from which it was parsed) More...
 
CQueryCompilerm_Compiler
 associated query compiler (only set on Compile()) More...
 
CQueryNodem_Node
 underlying CQueryNode (DDC-v1.x API) More...
 
CQueryOptionsm_Options
 root-level options (root queries only) More...
 
- Public Attributes inherited from ddcObject
void * m_User
 user data associated with this object (for use e.g. by perl wrappers) More...
 

Detailed Description

utility struct for iterating over hit occurrences

keys-query

Member Typedef Documentation

◆ StringTupleSet

typedef set< vector<string> > CQKeys::StringTupleSet

typedef for target value-tuples

Constructor & Destructor Documentation

◆ CQKeys() [1/2]

CQKeys::CQKeys ( CQCount qCount = NULL,
size_t  CountLimit = DDCDefaultCountSampleSize 
)
inline

bison constructor

◆ CQKeys() [2/2]

CQKeys::CQKeys ( CQCount qCount,
size_t  CountLimit,
const vector< string > &  IndexNames 
)
inline

bison constructor

◆ ~CQKeys()

CQKeys::~CQKeys ( void  )
virtual

Default destructor.

Member Function Documentation

◆ Compile()

bool CQKeys::Compile ( CQueryCompiler compiler)
virtual

Compile index-dependent query properties.

Reimplemented from CQuery.

References CConcSession::ClearQueryResults(), errNone, errParseError, CConcSession::GetHits(), globalCountKeyDelim, KEYSDEBUG, CQueryResult::m_Hits, CQueryCompiler::m_pHolder, CConcSession::m_ResultLimit, and stringSplitE().

Here is the call graph for this function:

◆ Evaluate()

void CQKeys::Evaluate ( )
virtual

evaluate query: top-level (sanity checks only)

Reimplemented from CQuery.

◆ GetMatchId()

BYTE CQKeys::GetMatchId ( ) const
virtual

get nontrivial match-id: local > qCount

Reimplemented from CQuery.

◆ SetMatchId()

virtual BYTE CQKeys::SetMatchId ( BYTE  matchId)
inlinevirtual

Set match-id, returns new value.

Reimplemented from CQuery.

◆ toString()

string CQKeys::toString ( void  )
virtual

DEBUG: return a canonical string form for this query

Reimplemented from CQuery.

References DDCDefaultCountSampleSize, and Format().

Here is the call graph for this function:

◆ jsonClass()

virtual string CQKeys::jsonClass ( void  )
inlinevirtual

class-name for json strinfication

  • default implementation returns C++ class name

Reimplemented from CQuery.

References GenerateCountString().

Here is the call graph for this function:

◆ jsonData()

string CQKeys::jsonData ( void  )
virtual

instance data for json stringification

  • default implementation returns "NODATA":1, for strict syntax compliance

Reimplemented from CQuery.

References DDCDefaultCountSampleSize, Format(), and jsonArray().

Here is the call graph for this function:

◆ ClearNode()

void CQKeys::ClearNode ( )
virtual

clears all daugher nodes

Reimplemented from CQuery.

References CQuery::ClearNode().

Here is the call graph for this function:

◆ Clear()

void CQKeys::Clear ( bool  deep = true)
virtual

clear query contents. if deep is true, propagates operation to daughters

Reimplemented from CQuery.

◆ Children()

ddcObjectList CQKeys::Children ( ) const
virtual

get a list of direct non-NULL CQuery direct daughters of this node

  • default just returns an empty list

Reimplemented from CQuery.

References CQuery::Children().

Here is the call graph for this function:

◆ DisownChildren()

void CQKeys::DisownChildren ( )
virtual

"disown" any direct child nodes, preventing their destruction if the current object is deleted

  • default implementation does nothing

Reimplemented from CQuery.

References CQuery::DisownChildren().

Here is the call graph for this function:

Member Data Documentation

◆ m_qCount

CQCount* CQKeys::m_qCount

underlying count() query supplying keys

◆ m_CountLimit

size_t CQKeys::m_CountLimit

limit for m_qCount subquery

◆ m_IndexNames

vector<string> CQKeys::m_IndexNames

target index-tuple

◆ m_MatchId

BYTE CQKeys::m_MatchId

match-id of anchor token (0 for any)

◆ m_dtrs

vector<CQTokSet*> CQKeys::m_dtrs

pseudo-private: temporary sub-queries for each CQCountKeyExprToken key-expression in m_qCount->m_keys->m_Exprs

◆ m_proxy

CQuery* CQKeys::m_proxy

pseudo-private: proxy query for join of independent attributes (WITH)


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