0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Related Functions | List of all members
Hypertable::Lib::ScanSpec Class Reference

Scan predicate and control specification. More...

#include <ScanSpec.h>

Inheritance diagram for Hypertable::Lib::ScanSpec:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::Lib::ScanSpec:
Collaboration graph
[legend]

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

Detailed Description

Scan predicate and control specification.

Definition at line 56 of file ScanSpec.h.

Constructor & Destructor Documentation

Hypertable::Lib::ScanSpec::ScanSpec ( )
inline

Definition at line 58 of file ScanSpec.h.

Hypertable::Lib::ScanSpec::ScanSpec ( CharArena arena)
inline

Definition at line 59 of file ScanSpec.h.

ScanSpec::ScanSpec ( CharArena arena,
const ScanSpec ss 
)

Definition at line 392 of file ScanSpec.cc.

Hypertable::Lib::ScanSpec::ScanSpec ( const uint8_t **  bufp,
size_t *  remainp 
)
inline

Definition at line 66 of file ScanSpec.h.

Member Function Documentation

void Hypertable::Lib::ScanSpec::add_cell ( CharArena arena,
const string &  row,
const string &  column 
)
inline

Definition at line 204 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::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 
)
inline

Definition at line 215 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::add_column ( CharArena arena,
const string &  str 
)
inline

Definition at line 148 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::add_column_predicate ( CharArena arena,
const string &  column_family,
const char *  column_qualifier,
uint32_t  operation,
const char *  value,
uint32_t  value_len = 0 
)
inline

Definition at line 232 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::add_row ( CharArena arena,
const string &  str 
)
inline

Definition at line 168 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::add_row_interval ( CharArena arena,
const string &  start,
bool  start_inclusive,
const string &  end,
bool  end_inclusive 
)
inline

Definition at line 190 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::base_copy ( ScanSpec other) const
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.

const char* Hypertable::Lib::ScanSpec::cache_key ( ) const
inline

Definition at line 139 of file ScanSpec.h.

bool Hypertable::Lib::ScanSpec::cacheable ( ) const
inline

Definition at line 123 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::clear ( )
inline

Definition at line 73 of file ScanSpec.h.

void ScanSpec::decode_internal ( uint8_t  version,
const uint8_t **  bufp,
size_t *  remainp 
)
overrideprivatevirtual

Reads serialized representation of object from a buffer.

Parameters
versionEncoding version
bufpAddress of destination buffer pointer (advanced by call)
remainpAddress of integer holding amount of serialized object remaining
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 128 of file ScanSpec.cc.

void ScanSpec::encode_internal ( uint8_t **  bufp) const
overrideprivatevirtual

Writes serialized representation of object to a buffer.

Parameters
bufpAddress of destination buffer pointer (advanced by call)

Encoding is as follows:

EncodingDescription
i32Row offset
i32Row limit
i32Cell offset
i32Cell limit
i32Cell limit per column family
i32Max versions
i64Start time
i64End time
i64End time
i32Column count
For each column ...
vstrColumn
i32Row interval count
For each row interval ...
RowIntervalRow interval
i32Cell interval count
For each cell interval ...
CellIntervalCell interval
i32Column predicate count
For each column predicate ...
ColumnPredicateColumn Preciate
vstrRow regex
vstrValue regex
boolreturn deletes flag
boolkeys only flag
boolscan and filter rows flag
booldo not cache flag
booland column predicates flag

Implements Hypertable::Serializable.

Definition at line 101 of file ScanSpec.cc.

size_t ScanSpec::encoded_length_internal ( ) const
overrideprivatevirtual

Returns internal serialized length.

Returns
Internal serialized length
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 43 of file ScanSpec.cc.

uint8_t ScanSpec::encoding_version ( ) const
overrideprivatevirtual

Returns encoding version.

Returns
Encoding version

Implements Hypertable::Serializable.

Definition at line 39 of file ScanSpec.cc.

void ScanSpec::parse_column ( const char *  column_str,
string &  family,
const char **  qualifier,
size_t *  qualifier_len,
bool *  has_qualifier,
bool *  is_regexp,
bool *  is_prefix 
)
static

Parses a column string into column family, qualifier and whether the qualifier is a regexp or not.

Parameters
column_strcolumn specified string
familyfamily name
qualifierAddress of qualifier return pointer
qualifier_lenAddress of qualifier return length
has_qualifierOutput parameter set if column_str has qualifer
is_regexptrue if the qualifier string is a regexp
is_prefixtrue 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.

Parameters
tableName of table being selected
Returns
HQL SELECT statement.

Definition at line 166 of file ScanSpec.cc.

void Hypertable::Lib::ScanSpec::set_end_time ( int64_t  end)
inline

Definition at line 264 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::set_row_regexp ( CharArena arena,
const char *  regexp 
)
inline

Definition at line 178 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::set_start_time ( int64_t  start)
inline

Definition at line 260 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::set_time_interval ( int64_t  start,
int64_t  end 
)
inline

Definition at line 255 of file ScanSpec.h.

void Hypertable::Lib::ScanSpec::set_value_regexp ( CharArena arena,
const char *  regexp 
)
inline

Definition at line 184 of file ScanSpec.h.

Friends And Related Function Documentation

ostream & operator<< ( ostream &  os,
const ScanSpec scan_spec 
)
related

Definition at line 302 of file ScanSpec.cc.

Member Data Documentation

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.


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