Scan predicate and control specification. More...
#include <ScanSpec.h>
Public Member Functions | |
ScanSpec () | |
ScanSpec (CharArena &arena) | |
ScanSpec (CharArena &arena, const ScanSpec &) | |
ScanSpec (const uint8_t **bufp, size_t *remainp) | |
const string | render_hql (const string &table) const |
Renders scan spec as an HQL SELECT statement. More... | |
void | clear () |
void | base_copy (ScanSpec &other) const |
Initialize another ScanSpec object with this copy sans the intervals. More... | |
bool | cacheable () const |
const char * | cache_key () const |
void | add_column (CharArena &arena, const string &str) |
void | add_row (CharArena &arena, const string &str) |
void | set_row_regexp (CharArena &arena, const char *regexp) |
void | set_value_regexp (CharArena &arena, const char *regexp) |
void | add_row_interval (CharArena &arena, const string &start, bool start_inclusive, const string &end, bool end_inclusive) |
void | add_cell (CharArena &arena, const string &row, const string &column) |
void | add_cell_interval (CharArena &arena, const string &start_row, const string &start_column, bool start_inclusive, const string &end_row, const string &end_column, bool end_inclusive) |
void | add_column_predicate (CharArena &arena, const string &column_family, const char *column_qualifier, uint32_t operation, const char *value, uint32_t value_len=0) |
void | set_time_interval (int64_t start, int64_t end) |
void | set_start_time (int64_t start) |
void | set_end_time (int64_t end) |
Public Member Functions inherited from Hypertable::Serializable | |
virtual size_t | encoded_length () const |
Returns serialized object length. More... | |
virtual void | encode (uint8_t **bufp) const |
Writes serialized representation of object to a buffer. More... | |
virtual void | decode (const uint8_t **bufp, size_t *remainp) |
Reads serialized representation of object from a buffer. More... | |
Static Public Member Functions | |
static void | parse_column (const char *column_str, string &family, const char **qualifier, size_t *qualifier_len, bool *has_qualifier, bool *is_regexp, bool *is_prefix) |
Parses a column string into column family, qualifier and whether the qualifier is a regexp or not. More... | |
Public Attributes | |
int32_t | row_limit {} |
int32_t | cell_limit {} |
int32_t | cell_limit_per_family {} |
int32_t | row_offset {} |
int32_t | cell_offset {} |
uint32_t | max_versions {} |
CstrColumns | columns |
RowIntervals | row_intervals |
CellIntervals | cell_intervals |
ColumnPredicates | column_predicates |
pair< int64_t, int64_t > | time_interval |
const char * | row_regexp {} |
const char * | value_regexp {} |
bool | return_deletes {} |
bool | keys_only {} |
bool | scan_and_filter_rows {} |
bool | do_not_cache {} |
bool | and_column_predicates {} |
TableParts | rebuild_indices |
Private Member Functions | |
uint8_t | encoding_version () const override |
Returns encoding version. More... | |
size_t | encoded_length_internal () const override |
Returns internal serialized length. More... | |
void | encode_internal (uint8_t **bufp) const override |
Writes serialized representation of object to a buffer. More... | |
void | decode_internal (uint8_t version, const uint8_t **bufp, size_t *remainp) override |
Reads serialized representation of object from a buffer. More... | |
Related Functions | |
(Note that these are not member functions.) | |
ostream & | operator<< (ostream &os, const ScanSpec &scan_spec) |
Additional Inherited Members |
Scan predicate and control specification.
Definition at line 56 of file ScanSpec.h.
|
inline |
Definition at line 58 of file ScanSpec.h.
|
inline |
Definition at line 59 of file ScanSpec.h.
Definition at line 392 of file ScanSpec.cc.
|
inline |
Definition at line 66 of file ScanSpec.h.
|
inline |
Definition at line 204 of file ScanSpec.h.
|
inline |
Definition at line 215 of file ScanSpec.h.
|
inline |
Definition at line 148 of file ScanSpec.h.
|
inline |
Definition at line 232 of file ScanSpec.h.
|
inline |
Definition at line 168 of file ScanSpec.h.
|
inline |
Definition at line 190 of file ScanSpec.h.
|
inline |
Initialize another ScanSpec object with this copy sans the intervals.
This function performs a shallow copy of the column_predicate vector. If other.column_predicate is destroyed, the pointers of the column predicates might become invalid.
Definition at line 100 of file ScanSpec.h.
|
inline |
Definition at line 139 of file ScanSpec.h.
|
inline |
Definition at line 123 of file ScanSpec.h.
|
inline |
Definition at line 73 of file ScanSpec.h.
|
overrideprivatevirtual |
Reads serialized representation of object from a buffer.
version | Encoding version |
bufp | Address of destination buffer pointer (advanced by call) |
remainp | Address of integer holding amount of serialized object remaining |
Implements Hypertable::Serializable.
Definition at line 128 of file ScanSpec.cc.
|
overrideprivatevirtual |
Writes serialized representation of object to a buffer.
bufp | Address of destination buffer pointer (advanced by call) |
Encoding is as follows:
Encoding | Description |
---|---|
i32 | Row offset |
i32 | Row limit |
i32 | Cell offset |
i32 | Cell limit |
i32 | Cell limit per column family |
i32 | Max versions |
i64 | Start time |
i64 | End time |
i64 | End time |
i32 | Column count |
For each column ... | |
vstr | Column |
i32 | Row interval count |
For each row interval ... | |
RowInterval | Row interval |
i32 | Cell interval count |
For each cell interval ... | |
CellInterval | Cell interval |
i32 | Column predicate count |
For each column predicate ... | |
ColumnPredicate | Column Preciate |
vstr | Row regex |
vstr | Value regex |
bool | return deletes flag |
bool | keys only flag |
bool | scan and filter rows flag |
bool | do not cache flag |
bool | and column predicates flag |
Implements Hypertable::Serializable.
Definition at line 101 of file ScanSpec.cc.
|
overrideprivatevirtual |
Returns internal serialized length.
Implements Hypertable::Serializable.
Definition at line 43 of file ScanSpec.cc.
|
overrideprivatevirtual |
Returns encoding version.
Implements Hypertable::Serializable.
Definition at line 39 of file ScanSpec.cc.
|
static |
Parses a column string into column family, qualifier and whether the qualifier is a regexp or not.
column_str | column specified string |
family | family name |
qualifier | Address of qualifier return pointer |
qualifier_len | Address of qualifier return length |
has_qualifier | Output parameter set if column_str has qualifer |
is_regexp | true if the qualifier string is a regexp |
is_prefix | true if the qualifier string is a prefix search |
Definition at line 428 of file ScanSpec.cc.
const string ScanSpec::render_hql | ( | const string & | table | ) | const |
Renders scan spec as an HQL SELECT statement.
table | Name of table being selected |
Definition at line 166 of file ScanSpec.cc.
|
inline |
Definition at line 264 of file ScanSpec.h.
|
inline |
Definition at line 178 of file ScanSpec.h.
|
inline |
Definition at line 260 of file ScanSpec.h.
|
inline |
Definition at line 255 of file ScanSpec.h.
|
inline |
Definition at line 184 of file ScanSpec.h.
|
related |
Definition at line 302 of file ScanSpec.cc.
bool Hypertable::Lib::ScanSpec::and_column_predicates {} |
Definition at line 285 of file ScanSpec.h.
CellIntervals Hypertable::Lib::ScanSpec::cell_intervals |
Definition at line 276 of file ScanSpec.h.
int32_t Hypertable::Lib::ScanSpec::cell_limit {} |
Definition at line 269 of file ScanSpec.h.
int32_t Hypertable::Lib::ScanSpec::cell_limit_per_family {} |
Definition at line 270 of file ScanSpec.h.
int32_t Hypertable::Lib::ScanSpec::cell_offset {} |
Definition at line 272 of file ScanSpec.h.
ColumnPredicates Hypertable::Lib::ScanSpec::column_predicates |
Definition at line 277 of file ScanSpec.h.
CstrColumns Hypertable::Lib::ScanSpec::columns |
Definition at line 274 of file ScanSpec.h.
bool Hypertable::Lib::ScanSpec::do_not_cache {} |
Definition at line 284 of file ScanSpec.h.
bool Hypertable::Lib::ScanSpec::keys_only {} |
Definition at line 282 of file ScanSpec.h.
uint32_t Hypertable::Lib::ScanSpec::max_versions {} |
Definition at line 273 of file ScanSpec.h.
TableParts Hypertable::Lib::ScanSpec::rebuild_indices |
Definition at line 286 of file ScanSpec.h.
bool Hypertable::Lib::ScanSpec::return_deletes {} |
Definition at line 281 of file ScanSpec.h.
RowIntervals Hypertable::Lib::ScanSpec::row_intervals |
Definition at line 275 of file ScanSpec.h.
int32_t Hypertable::Lib::ScanSpec::row_limit {} |
Definition at line 268 of file ScanSpec.h.
int32_t Hypertable::Lib::ScanSpec::row_offset {} |
Definition at line 271 of file ScanSpec.h.
const char* Hypertable::Lib::ScanSpec::row_regexp {} |
Definition at line 279 of file ScanSpec.h.
bool Hypertable::Lib::ScanSpec::scan_and_filter_rows {} |
Definition at line 283 of file ScanSpec.h.
pair<int64_t,int64_t> Hypertable::Lib::ScanSpec::time_interval |
Definition at line 278 of file ScanSpec.h.
const char* Hypertable::Lib::ScanSpec::value_regexp {} |
Definition at line 280 of file ScanSpec.h.