22 #ifndef HYPERTABLE_KEYSPEC_H
23 #define HYPERTABLE_KEYSPEC_H
25 #include <boost/noncopyable.hpp>
56 explicit KeySpec(
const char *r,
const char *cf,
const char *cq,
57 int64_t ts = AUTO_ASSIGN, uint8_t flag_=FLAG_INSERT)
62 explicit KeySpec(
const char *r,
const char *cf,
63 int64_t ts = AUTO_ASSIGN, uint8_t flag_=FLAG_INSERT)
80 const char *r = (
const char *)
row;
89 "Invalid row key - must be followed by a '\\0' character");
93 "allowed (offset=%d)", (
int)strlen(r));
95 if (r[0] == (
char)0xff && r[1] == (
char)0xff)
97 "character sequence 0xff 0xff");
103 " by a '\\0' character");
106 " not allowed (offset=%d)", (
int)strlen(cq));
109 if (
flag > FLAG_DELETE_ROW &&
flag < FLAG_INSERT) {
112 if (
flag > FLAG_DELETE_COLUMN_FAMILY &&
flag < FLAG_INSERT) {
113 if (
flag == FLAG_DELETE_CELL_VERSION &&
timestamp == AUTO_ASSIGN)
120 "Invalid timestamp %lld (reserved for Hypertable use)",
121 (
Lld)TIMESTAMP_NULL);
193 #endif // HYPERTABLE_KEYSPEC_H
KeySpec(const char *r, const char *cf, const char *cq, int64_t ts=AUTO_ASSIGN, uint8_t flag_=FLAG_INSERT)
Helper class for building a KeySpec.
void set_column_family(const std::string &cf)
static const uint32_t FLAG_DELETE_ROW
void set_flag(uint8_t flag_)
static const uint32_t FLAG_INSERT
const char * column_qualifier
void set_row(const std::string &row)
static const uint32_t FLAG_DELETE_CELL
size_t column_qualifier_len
static const uint32_t FLAG_DELETE_COLUMN_FAMILY
static const int64_t TIMESTAMP_MIN
void set_timestamp(int64_t timestamp)
std::ostream & operator<<(std::ostream &os, const crontab_entry &entry)
Helper function to write crontab_entry to an ostream.
static const int64_t TIMESTAMP_NULL
KeySpec(const char *r, const char *cf, int64_t ts=AUTO_ASSIGN, uint8_t flag_=FLAG_INSERT)
std::vector< String > m_strings
void set_column_qualifier(const std::string &cq)
long long int Lld
Shortcut for printf formats.
static const int64_t TIMESTAMP_MAX
static const int64_t TIMESTAMP_AUTO
#define HT_THROWF(_code_, _fmt_,...)
void sanity_check() const
A String class based on std::string.
void clear()
Clears the state.
static const int64_t AUTO_ASSIGN
const char * column_family
Error codes, Exception handling, error logging.
#define HT_THROW(_code_, _msg_)
static const uint32_t FLAG_DELETE_CELL_VERSION