Search Toolkit Book for CQueryFuncPromoteBase
class CQueryFuncPromoteBase More...
#include <gui/objutils/query_func_promote.hpp>
class CQueryFuncPromoteBase
Base class for query execution functions. The base class holds the type-promotion rules needed to convert types appropriately to allow for different kinds of comparisons.
Definition at line 54 of file query_func_promote.hpp.
◆ TEvalResult ◆ CQueryFuncPromoteBase() ◆ AddPromoteTypes() ◆ GetArgCountMax() ◆ GetArgCountMin() ◆ GetCaseSensitive() NStr::ECase CQueryFuncPromoteBase::GetCaseSensitive ( ) const inline ◆ GetPromotedType() ◆ GetQueryNodeValue()Get the user object for node 'qnode' or NULL if not created.
Definition at line 54 of file query_func_promote.cpp.
References CTreeNode< TValue, TKeyGetterP >::GetValue().
Referenced by CQueryFuncAssignment::Evaluate(), CQueryFuncFunction::Evaluate(), CQueryFuncPromoteAndOr::Evaluate(), CQueryFuncPromoteLogic::Evaluate(), CQueryFuncPromoteEq::Evaluate(), CQueryFuncPromoteIn::Evaluate(), CQueryFuncLike::Evaluate(), CQueryFuncPromoteGtLt::Evaluate(), CQueryFuncPromoteBetween::Evaluate(), MakeQueryNodeValue(), PreProcess(), and ResolveAndPromote().
◆ GetStringMatching() ◆ MakeQueryNodeValue() ◆ PreProcess()Resolve, if possible, the data type for the query node tr and, for operator nodes (e.g.
==, <), determine if possible types to be used for comparison (not always possible for untyped data from data source)
Definition at line 238 of file query_func_promote.cpp.
References CQueryNodeValue::AddPromotedType(), NStr::Compare(), QueryValueType::eBool, CQueryParseNode::eBoolConst, QueryValueType::eBoolResult, QueryValueType::eFieldBool, QueryValueType::eFieldFloat, QueryValueType::eFieldInt, QueryValueType::eFieldSeqID, QueryValueType::eFieldString, QueryValueType::eFloat, CQueryParseNode::eFloatConst, CQueryParseNode::eFrom, CQueryParseNode::eFunction, CQueryParseNode::eIdentifier, QueryValueType::eInt, CQueryParseNode::eIntConst, CQueryParseNode::eList, NStr::eNocase, CQueryParseNode::eSelect, QueryValueType::eString, CQueryParseNode::eString, QueryValueType::eStringBool, QueryValueType::eStringFloat, QueryValueType::eStringInt, QueryValueType::eUndefined, CQueryParseNode::eWhere, GetArgCountMax(), GetArgCountMin(), CQueryParseNode::GetBool(), CQueryNodeValue::GetDataType(), CQueryParseNode::GetDouble(), CQueryExec::GetIdentifier(), CQueryParseNode::GetInt(), CQueryParseNode::GetNodeTypeAsString(), CQueryParseNode::GetOrig(), GetPromotedType(), CQueryNodeValue::GetQueryNode(), GetQueryNodeValue(), CQueryParseNode::GetStrValue(), CQueryParseNode::GetType(), CQueryParseNode::GetUserObject(), CTreeNode< TValue, TKeyGetterP >::GetValue(), CQueryExec::HasIdentifier(), i, CQueryExec::IdentifierType(), CQueryNodeValue::IsDataField(), CQueryParseNode::IsLogic(), CQueryParseNode::IsValue(), CQueryNodeValue::m_Bool, CQueryNodeValue::m_Double, CQueryNodeValue::m_Int, CPromoteRule::m_PromotedType, CQueryFunctionBase::m_QExec, CQueryNodeValue::m_String, CQueryFunctionBase::MakeArgVector(), msg(), NCBI_THROW, CQueryNodeValue::PromoteTo(), CQueryNodeValue::SetDataType(), CQueryNodeValue::SetFieldID(), CQueryNodeValue::SetIsDataField(), CQueryNodeValue::SetScope(), CQueryParseNode::SetUserObject(), NStr::SizetToString(), NStr::StringToBool(), NStr::StringToDouble(), and NStr::StringToInt().
Referenced by CQueryExecPreProcessFunc::operator()().
◆ ResolveAndPromote()For the operator in 'qnode', retrive from data source (if ncessary) the data values arg1 and arg2 and promote the values, if needed, to the required type needed for comparison.
Definition at line 519 of file query_func_promote.cpp.
References QueryValueType::eUndefined, CQueryNodeValue::GetDataType(), GetPromotedType(), CQueryNodeValue::GetPromoteType(), GetQueryNodeValue(), CTreeNode< TValue, TKeyGetterP >::GetValue(), CQueryNodeValue::HasPromoteType(), CQueryNodeValue::IsDataField(), CPromoteRule::m_CompareOperator, CPromoteRule::m_Type1, CPromoteRule::m_Type2, msg(), NCBI_THROW, CQueryNodeValue::PromoteTo(), ResolveFieldValue(), SetCompareType(), and CQueryNodeValue::SetValue().
Referenced by CQueryFuncPromoteEq::Evaluate(), CQueryFuncPromoteIn::Evaluate(), CQueryFuncLike::Evaluate(), CQueryFuncPromoteGtLt::Evaluate(), and CQueryFuncPromoteBetween::Evaluate().
◆ ResolveFieldValue()Get the value of a field from the data source and store the result in the CQueryNodeValue object.
Returns true on success.
Definition at line 70 of file query_func_promote.cpp.
References QueryValueType::eFieldBool, QueryValueType::eFieldInt, QueryValueType::eFieldSeqID, QueryValueType::eFieldString, QueryValueType::eUndefined, CQueryNodeValue::GetDataType(), CQueryNodeValue::GetFieldID(), CQueryNodeValue::IsDataField(), CQueryNodeValue::m_Bool, CQueryNodeValue::m_Double, CQueryNodeValue::m_Int, CQueryFunctionBase::m_QExec, CQueryNodeValue::m_String, and CQueryExec::ResolveIdentifier().
Referenced by ResolveAndPromote(), and SetCompareType().
◆ SetCaseSensitive() void CQueryFuncPromoteBase::SetCaseSensitive ( NStr::ECase e ) inline ◆ SetCompareType()Given data for a node, determine its underlying data type (e.g.
if its a string, can it also be converted to a bool? int? float?). Returns false when field not present in data source.
Definition at line 143 of file query_func_promote.cpp.
References QueryValueType::eFieldBool, QueryValueType::eFieldFloat, QueryValueType::eFieldInt, QueryValueType::eFieldSeqID, QueryValueType::eFieldString, FastStringToBool(), NStr::fConvErr_NoThrow, CQueryNodeValue::GetDataType(), CQueryNodeValue::IsDataField(), isdigit(), CQueryNodeValue::m_Bool, CQueryNodeValue::m_Double, CQueryNodeValue::m_Int, CQueryNodeValue::m_String, ResolveFieldValue(), CQueryNodeValue::SetDataType(), NStr::StringToDouble(), NStr::StringToInt(), and tolower().
Referenced by CQueryFuncFunction::Evaluate(), and ResolveAndPromote().
◆ SetStringMatching() ◆ m_CaseSensitive ◆ m_PromoteRules std::vector<CPromoteRule> CQueryFuncPromoteBase::m_PromoteRules protected ◆ m_StringMatchAlgoThe documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4