AbstractDataProviderRecordIterator.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// assume local scope for variables, do not use "$" signs
// require type definitions everywhere
// enable all warnings
namespace DataProvider {
const DP_SEARCH_OP_REGEX = "regex";
const DP_SEARCH_OP_LT = "<";
const DP_SEARCH_OP_LE = "<=";
const DP_SEARCH_OP_GT = ">";
const DP_SEARCH_OP_GE = ">=";
const DP_SEARCH_OP_NE = "!=";
const DP_SEARCH_OP_EQ = "=";
const DP_SEARCH_OP_BETWEEN = "between";
const DP_SEARCH_OP_IN = "in";
const DP_SEARCH_OP_NOT = "not";
public struct SearchOperatorInfo {
string op;
auto arg;
};
const DefaultGenericSearchOpMap = ...;
hash<SearchOperatorInfo> dp_make_op(string op, auto arg);
hash<SearchOperatorInfo> dp_op_regex(string str);
hash<SearchOperatorInfo> dp_op_like(string str);
hash<SearchOperatorInfo> dp_op_lt(auto arg);
hash<SearchOperatorInfo> dp_op_le(auto arg);
hash<SearchOperatorInfo> dp_op_gt(auto arg);
hash<SearchOperatorInfo> dp_op_ge(auto arg);
hash<SearchOperatorInfo> dp_op_ne(auto arg);
hash<SearchOperatorInfo> dp_op_eq(auto arg);
hash<SearchOperatorInfo> dp_op_between(auto l, auto r);
hash<SearchOperatorInfo> dp_op_in();
hash<SearchOperatorInfo> dp_op_in(list<auto> args);
hash<SearchOperatorInfo> dp_op_not(hash<auto> arg);
class AbstractDataProviderRecordIterator : public AbstractIterator {
public:
bool supportsBulkApi();
*AbstractDataProviderBulkRecordInterface getBulkApi();
*hash<string, AbstractDataField> getRecordType();
abstract hash<auto> getValue();
protected:
auto doMemberGate(string key);
public:
protected:
static bool matchGeneric(hash<auto> record, *hash<auto> where_cond);
public:
protected:
static bool evalOperator(string field, hash<auto> cmd, hash<auto> op, hash<auto> record);
public:
protected:
static bool matchGenericValue(auto expects, auto val);
public:
};
};
DataProvider::DP_SEARCH_OP_BETWEEN
const DP_SEARCH_OP_BETWEEN
Identifies the generic data provider "between" operator for use in generic search criteria...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:74
DataProvider::AbstractDataProviderRecordIterator::matchGeneric
static bool matchGeneric(hash< auto > record, *hash< auto > where_cond)
Checks if the current record matches the search criteria.
DataProvider::DP_SEARCH_OP_LT
const DP_SEARCH_OP_LT
Identifies the generic data provider less than (<) operator for use in generic search criteria...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:44
DataProvider::dp_op_ne
hash< SearchOperatorInfo > dp_op_ne(auto arg)
returns an SearchOperatorInfo hash for the "!=" or "<>" operator with the given argument ...
DataProvider::dp_op_gt
hash< SearchOperatorInfo > dp_op_gt(auto arg)
returns an SearchOperatorInfo hash for the ">" operator with the given argument
DataProvider::AbstractDataProviderRecordIterator::evalOperator
static bool evalOperator(string field, hash< auto > cmd, hash< auto > op, hash< auto > record)
Evaluates a generic search operator on the field value and record and returns the result...
DataProvider::dp_op_regex
hash< SearchOperatorInfo > dp_op_regex(string str)
returns an SearchOperatorInfo hash for regular expression matches
DataProvider::AbstractDataProviderRecordIterator
Defines the abstract class for data provider iterators; the destructor releases the iterator...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:276
DataProvider::SearchOperatorInfo::op
string op
the operator string code
Definition: AbstractDataProviderRecordIterator.qc.dox.h:89
DataProvider::AbstractDataProviderRecordIterator::doMemberGate
auto doMemberGate(string key)
Returns the value of the given field in the current record, if the iterator is valid.
DataProvider::DP_SEARCH_OP_EQ
const DP_SEARCH_OP_EQ
Identifies the generic data provider equals operator (=) for use in generic search criteria...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:69
DataProvider::dp_op_not
hash< SearchOperatorInfo > dp_op_not(hash< auto > arg)
returns an SearchOperatorInfo hash for the "not" operator
DataProvider::DP_SEARCH_OP_GE
const DP_SEARCH_OP_GE
Identifies the generic data provider greater than or equals operator (>=) for use in generic search c...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:59
DataProvider::DP_SEARCH_OP_GT
const DP_SEARCH_OP_GT
Identifies the generic data provider greater than operator (>) for use in generic search criteria...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:54
DataProvider::dp_op_eq
hash< SearchOperatorInfo > dp_op_eq(auto arg)
returns an SearchOperatorInfo hash for the "=" operator with the given argument
DataProvider::dp_make_op
hash< SearchOperatorInfo > dp_make_op(string op, auto arg)
returns an SearchOperatorInfo hash
DataProvider::SearchOperatorInfo
Generic operator info hash as returned by all generic search operator functions.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:88
DataProvider::AbstractDataProviderRecordIterator::getRecordType
*hash< string, AbstractDataField > getRecordType()
Returns the record description, if available.
DataProvider::dp_op_like
hash< SearchOperatorInfo > dp_op_like(string str)
returns an SearchOperatorInfo hash for the SQL-like "like" operator with the given argument ...
DataProvider::AbstractDataProviderRecordIterator::supportsBulkApi
bool supportsBulkApi()
Returns True if the iterator supports bulk operation.
DataProvider::dp_op_lt
hash< SearchOperatorInfo > dp_op_lt(auto arg)
returns an SearchOperatorInfo hash for the "<" operator with the given argument
DataProvider::dp_op_between
hash< SearchOperatorInfo > dp_op_between(auto l, auto r)
returns an SearchOperatorInfo hash for the "between" operator with the given arguments ...
DataProvider::dp_op_le
hash< SearchOperatorInfo > dp_op_le(auto arg)
returns an SearchOperatorInfo hash for the "<=" operator with the given argument
DataProvider::AbstractDataProviderBulkRecordInterface
Defines the abstract class for data provider iterators; the destructor releases the iterator...
Definition: AbstractDataProviderBulkRecordInterface.qc.dox.h:33
DataProvider::SearchOperatorInfo::arg
auto arg
optional argument
Definition: AbstractDataProviderRecordIterator.qc.dox.h:90
DataProvider::dp_op_in
hash< SearchOperatorInfo > dp_op_in()
returns an SearchOperatorInfo hash for the "in" operator with all arguments passed to the function ...
DataProvider::DefaultGenericSearchOpMap
const DefaultGenericSearchOpMap
a hash of valid operators for use in generic search criteria
Definition: AbstractDataProviderRecordIterator.qc.dox.h:94
DataProvider::DP_SEARCH_OP_REGEX
const DP_SEARCH_OP_REGEX
Identifies the regex operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:39
DataProvider::DP_SEARCH_OP_LE
const DP_SEARCH_OP_LE
Identifies the generic data provider less than or equals (<=) operator for use in generic search crit...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:49
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
DataProvider::AbstractDataProviderRecordIterator::getValue
abstract hash< auto > getValue()
returns a single record if the iterator is valid
DataProvider::DP_SEARCH_OP_IN
const DP_SEARCH_OP_IN
Identifies the generic data provider "in" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:79
DataProvider::DP_SEARCH_OP_NOT
const DP_SEARCH_OP_NOT
Identifies the generic data provider "not" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:84
DataProvider::dp_op_ge
hash< SearchOperatorInfo > dp_op_ge(auto arg)
returns an SearchOperatorInfo hash for the ">=" operator with the given argument
DataProvider::DP_SEARCH_OP_NE
const DP_SEARCH_OP_NE
Identifies the generic data provider not equals operator (!= or <>) for use in generic search criteri...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:64
DataProvider::AbstractDataProviderRecordIterator::getBulkApi
*AbstractDataProviderBulkRecordInterface getBulkApi()
Returns the bulk data interface if supported.
DataProvider::AbstractDataProviderRecordIterator::matchGenericValue
static bool matchGenericValue(auto expects, auto val)
Match a single value.