This query expression has similar meaning as ibis::qDiscreteRange, however, it stores the values as unsigned 64-bit integers. More...
#include <qExpr.h>
Public Member Functions | |
const char * | colName () const |
Name of the column involved. | |
virtual qUIntHod * | dup () const |
Duplicate thy self. | |
virtual bool | empty () const |
Is the current range empty? | |
const ibis::array_t< uint64_t > & | getValues () const |
Reference to the values. | |
ibis::array_t< uint64_t > & | getValues () |
Reference to the values. | |
virtual bool | inRange (double val) const |
Is the argument val one of the values stored ? Return true or false. | |
virtual bool | inRange (uint64_t val) const |
Is the argument val one of the values stored ? Return true or false. | |
virtual double | leftBound () const |
The lower bound of the range. | |
virtual uint32_t | nItems () const |
Count the number of items in the query expression. | |
virtual void | print (std::ostream &) const |
Print a short version of the expression. | |
virtual void | printFull (std::ostream &) const |
Print a long version of the expression. | |
qUIntHod () | |
Default constructor. | |
qUIntHod (const char *col, uint64_t v1) | |
Constructor. Take a single number. | |
qUIntHod (const char *col, const char *nums) | |
Constructor. | |
template<typename T > | |
qUIntHod (const char *col, const std::vector< T > &nums) | |
Constructor. | |
qUIntHod (const qUIntHod &ih) | |
Copy constructor. | |
qUIntHod (const char *col, uint64_t v1, uint64_t v2) | |
Constructor. Take two numbers. | |
template<typename T > | |
qUIntHod (const char *col, const ibis::array_t< T > &nums) | |
Constructor. | |
virtual void | restrictRange (double, double) |
Reduce the range to be no more than [left, right]. | |
virtual double | rightBound () const |
The upper bound of the range. | |
virtual | ~qUIntHod () |
Destructor. |
This query expression has similar meaning as ibis::qDiscreteRange, however, it stores the values as unsigned 64-bit integers.
This is primarily useful for matching 64-bit integers.
ibis::qUIntHod::qUIntHod | ( | const char * | col, |
const char * | nums | ||
) |
Constructor.
This Constructor takes a list of values in a string. The values are extracted using the function ibis::util::readUInt.
References ibis::array_t< T >::deduplicate(), ibis::util::delimiters, ibis::gVerbose, ibis::array_t< T >::push_back(), and ibis::util::readUInt().
ibis::qUIntHod::qUIntHod | ( | const char * | col, |
const std::vector< T > & | nums | ||
) |
Constructor.
It converts all incoming values into 64-bit unsigned integers. This conversion process may fail for certain data types.
References ibis::util::copy(), and ibis::array_t< T >::deduplicate().
ibis::qUIntHod::qUIntHod | ( | const char * | col, |
const ibis::array_t< T > & | nums | ||
) |
Constructor.
It converts all incoming values into 64-bit signed integers, which may fail for certain data types.
References ibis::util::copy(), and ibis::array_t< T >::deduplicate().
bool ibis::qUIntHod::inRange | ( | double | val | ) | const [inline, virtual] |
Is the argument val one of the values stored ? Return true or false.
It uses a binary search if there are more than 32 elements and uses linear search otherwise.
Implements ibis::qRange.
Referenced by ibis::part::doCompare(), and ibis::part::doCount().
bool ibis::qUIntHod::inRange | ( | uint64_t | val | ) | const [inline, virtual] |
Is the argument val one of the values stored ? Return true or false.
It uses a binary search if there are more than 32 elements and uses linear search otherwise.
void ibis::qUIntHod::printFull | ( | std::ostream & | out | ) | const [virtual] |
Print a long version of the expression.
This function appends 'ULL' to each number so that they are guaranteed to be translated to the same type query expression is the output is sent back to the parser again.
Reimplemented from ibis::qExpr.
![]() |