Helper class for building a ScanSpec. More...
#include <ScanSpec.h>
Public Member Functions | |
ScanSpecBuilder (size_t page_size=8192) | |
Constructor. More... | |
ScanSpecBuilder (const ScanSpec &ss, size_t page_size=8192) | |
Copy constructor from a ScanSpec. More... | |
ScanSpecBuilder & | operator= (const ScanSpec &ss) |
void | set_row_limit (int32_t n) |
Sets the maximum number of rows to return in the scan. More... | |
void | set_cell_limit (int32_t n) |
Sets the maximum number of cells to return. More... | |
void | set_cell_limit_per_family (int32_t n) |
Sets the maximum number of cells to return per column family. More... | |
void | set_row_offset (int32_t n) |
Sets the number of rows to be skipped at the beginning of the query. More... | |
void | set_cell_offset (int32_t n) |
Sets the number of cells to be skipped at the beginning of the query. More... | |
void | set_max_versions (uint32_t n) |
Sets the maximum number of revisions of each cell to return in the scan. More... | |
void | set_row_regexp (const char *regexp) |
Sets the regexp to filter rows by. More... | |
void | set_value_regexp (const char *regexp) |
Sets the regexp to filter cell values by. More... | |
void | add_column (const string &str) |
Adds a column family to be returned by the scan. More... | |
void | reserve_columns (size_t s) |
void | add_column_predicate (const string &column_family, const char *column_qualifier, uint32_t operation, const char *value, uint32_t value_len=0) |
Adds a column predicate to the scan. More... | |
void | reserve_column_predicates (size_t s) |
void | add_row (const string &str) |
Adds a row to be returned in the scan. More... | |
void | reserve_rows (size_t s) |
void | add_row_interval (const string &start, bool start_inclusive, const string &end, bool end_inclusive) |
Adds a row interval to be returned in the scan. More... | |
void | add_cell (const string &row, const string &column) |
Adds a cell to be returned in the scan. More... | |
void | reserve_cells (size_t s) |
void | add_cell_interval (const string &start_row, const string &start_column, bool start_inclusive, const string &end_row, const string &end_column, bool end_inclusive) |
Adds a cell interval to be returned in the scan. More... | |
void | set_time_interval (int64_t start, int64_t end) |
Sets the time interval of the scan. More... | |
void | set_start_time (int64_t start) |
void | set_end_time (int64_t end) |
void | set_keys_only (bool val) |
Return only keys (no values) More... | |
void | set_return_deletes (bool val) |
Internal use only. More... | |
void | set_scan_and_filter_rows (bool val) |
Scan and filter rows. More... | |
void | set_do_not_cache (bool val) |
Don't cache. More... | |
void | set_rebuild_indices (TableParts parts) |
Rebuild indices. More... | |
void | set_and_column_predicates (bool val) |
AND together the column predicates. More... | |
void | clear () |
Clears the state. More... | |
ScanSpec & | get () |
Returns the built ScanSpec object. More... | |
Private Attributes | |
CharArena | m_arena |
ScanSpec | m_scan_spec |
Helper class for building a ScanSpec.
This class manages the allocation of all string members.
Definition at line 318 of file ScanSpec.h.
|
inline |
Constructor.
page_size | Page size for memory arena |
Definition at line 323 of file ScanSpec.h.
|
inline |
Copy constructor from a ScanSpec.
ss | ScanSpec to copy |
page_size | Page size for memory arena |
Definition at line 329 of file ScanSpec.h.
|
inline |
Adds a cell to be returned in the scan.
row | row key |
column | column spec of the form <family>[:<qualifier>] |
Definition at line 467 of file ScanSpec.h.
|
inline |
Adds a cell interval to be returned in the scan.
start_row | start row |
start_column | start column spec of the form <family>[:<qualifier>] |
start_inclusive | true if interval should include start row |
end_row | end row |
end_column | end column spec of the form <family>[:<qualifier>] |
end_inclusive | true if interval should include end row |
Definition at line 485 of file ScanSpec.h.
|
inline |
Adds a column family to be returned by the scan.
str | column family name |
Definition at line 408 of file ScanSpec.h.
|
inline |
Adds a column predicate to the scan.
column_family | the column family |
column_qualifier | Column qualifier |
operation | the operation (e.g. ColumnPredicate::EXACT_MATCH or ColumnPredicate::PREFIX_MATCH) |
value | the cell value |
value_len | the length of the value, in bytes. If 0 then the length will automatically be assigned using strlen(value) |
Definition at line 426 of file ScanSpec.h.
|
inline |
Adds a row to be returned in the scan.
str | row key |
Definition at line 441 of file ScanSpec.h.
|
inline |
Adds a row interval to be returned in the scan.
start | start row |
start_inclusive | true if interval should include start row |
end | end row |
end_inclusive | true if interval should include end row |
Definition at line 455 of file ScanSpec.h.
|
inline |
Clears the state.
Definition at line 555 of file ScanSpec.h.
|
inline |
Returns the built ScanSpec object.
Definition at line 566 of file ScanSpec.h.
|
inline |
Definition at line 332 of file ScanSpec.h.
|
inline |
Definition at line 471 of file ScanSpec.h.
|
inline |
Definition at line 433 of file ScanSpec.h.
|
inline |
Definition at line 412 of file ScanSpec.h.
|
inline |
Definition at line 445 of file ScanSpec.h.
|
inline |
AND together the column predicates.
Definition at line 548 of file ScanSpec.h.
|
inline |
Sets the maximum number of cells to return.
n | cell limit |
Definition at line 349 of file ScanSpec.h.
|
inline |
Sets the maximum number of cells to return per column family.
n | cell limit per column family |
Definition at line 356 of file ScanSpec.h.
|
inline |
Sets the number of cells to be skipped at the beginning of the query.
n | cell offset |
Definition at line 375 of file ScanSpec.h.
|
inline |
Don't cache.
Definition at line 535 of file ScanSpec.h.
|
inline |
Definition at line 507 of file ScanSpec.h.
|
inline |
Return only keys (no values)
Definition at line 514 of file ScanSpec.h.
|
inline |
Sets the maximum number of revisions of each cell to return in the scan.
n | maximum revisions |
Definition at line 387 of file ScanSpec.h.
|
inline |
Rebuild indices.
parts | Describes which indices to rebuild |
Definition at line 541 of file ScanSpec.h.
|
inline |
Internal use only.
Definition at line 521 of file ScanSpec.h.
|
inline |
Sets the maximum number of rows to return in the scan.
n | row limit |
Definition at line 342 of file ScanSpec.h.
|
inline |
Sets the number of rows to be skipped at the beginning of the query.
n | row offset |
Definition at line 363 of file ScanSpec.h.
|
inline |
Sets the regexp to filter rows by.
regexp | row regexp |
Definition at line 394 of file ScanSpec.h.
|
inline |
Scan and filter rows.
Definition at line 528 of file ScanSpec.h.
|
inline |
Definition at line 503 of file ScanSpec.h.
|
inline |
Sets the time interval of the scan.
Time values represent number of nanoseconds from 1970-01-00 00:00:00.000000000.
start | start time in nanoseconds |
end | end time in nanoseconds |
Definition at line 499 of file ScanSpec.h.
|
inline |
Sets the regexp to filter cell values by.
regexp | value regexp |
Definition at line 401 of file ScanSpec.h.
|
private |
Definition at line 569 of file ScanSpec.h.
|
private |
Definition at line 570 of file ScanSpec.h.