db: add a "bytes" type, corresponding to ByteBuffer (serialized values)

Using sstring can lead to confusion with UTF8 strings.

The Java byte type is signed, so make bytes' internal type be signed as
well (even though Cassandra tries to treat it as unsigned).

While we should use int8_t, sstring is not perfectly compatible with this
yet, so add a FIXME and use char instead.
This commit is contained in:
Avi Kivity
2014-12-24 12:08:38 +02:00
parent bd6623c0cf
commit 2733813c87

View File

@@ -19,6 +19,9 @@
using bytes = basic_sstring<uint8_t, uint32_t, 31>;
// FIXME: should be int8_t
using bytes = basic_sstring<char, uint32_t, 31>;
struct row {
std::vector<boost::any> cells;
};