22 #ifndef HYPERTABLE_KEY_H
23 #define HYPERTABLE_KEY_H
27 #include <boost/shared_array.hpp>
28 #include <boost/detail/endian.hpp>
53 bool ascending=
true) {
56 #ifdef HT_LITTLE_ENDIAN
57 *(*bufp)++ = (uint8_t)(val >> 56);
58 *(*bufp)++ = (uint8_t)(val >> 48);
59 *(*bufp)++ = (uint8_t)(val >> 40);
60 *(*bufp)++ = (uint8_t)(val >> 32);
61 *(*bufp)++ = (uint8_t)(val >> 24);
62 *(*bufp)++ = (uint8_t)(val >> 16);
63 *(*bufp)++ = (uint8_t)(val >> 8);
64 *(*bufp)++ = (uint8_t)val;
66 memcpy(*bufp, &val, 8);
72 bool ascending=
true) {
74 #ifdef HT_LITTLE_ENDIAN
75 val = ((int64_t)*(*bufp)++ << 56);
76 val |= ((int64_t)(*(*bufp)++) << 48);
77 val |= ((int64_t)(*(*bufp)++) << 40);
78 val |= ((int64_t)(*(*bufp)++) << 32);
79 val |= ((int64_t)(*(*bufp)++) << 24);
80 val |= (*(*bufp)++ << 16);
81 val |= (*(*bufp)++ << 8);
84 memcpy(&val, *bufp, 8);
87 return (ascending ? ~val : val);
151 inline std::ostream &
159 bool time_order_asc =
true);
162 const char *row, uint8_t column_family_code,
163 const char *column_qualifier,
166 bool time_order_asc =
true);
169 bool time_order_asc =
true);
173 #endif // HYPERTABLE_KEY_H
static int64_t decode_ts64(const uint8_t **bufp, bool ascending=true)
static const uint32_t FLAG_INSERT
static const uint8_t HAVE_REVISION
A dynamic, resizable memory buffer.
Key()
Constructor (for implicit construction).
static const uint8_t HAVE_TIMESTAMP
std::ostream & operator<<(std::ostream &os, const crontab_entry &entry)
Helper function to write crontab_entry to an ostream.
bool load(const SerializedKey &key)
Parses the opaque key and loads the components into the member variables.
static const uint8_t TS_CHRONOLOGICAL
static const uint8_t AUTO_TIMESTAMP
void create_key_and_append(DynamicBuffer &dst_buf, const Key &key, bool time_order_asc)
size_t len_column_family() const
Provides access to internal components of opaque key.
uint32_t column_qualifier_len
static void encode_ts64(uint8_t **bufp, int64_t val, bool ascending=true)
static const char * END_ROOT_ROW
A serializable ByteString.
uint8_t column_family_code
static const int64_t AUTO_ASSIGN
const char * column_qualifier
static const char * END_ROW_MARKER
static const uint8_t REV_IS_TS