Commit Graph

11 Commits

Author SHA1 Message Date
Avi Kivity
58e64ea231 db: add helpers for finding/inserting a row or partition 2014-12-28 10:03:17 +02:00
Avi Kivity
de349cd205 db: store keys and values as serialized bytes, not boost::any
While less efficient, it's similar to what origin does, so will be easier
to follow.
2014-12-28 10:03:17 +02:00
Avi Kivity
ab26aef422 db: add data_type::less()
Compares two values belonging to a data type.
2014-12-28 10:03:17 +02:00
Avi Kivity
415b0f13ec db: add data_type::deserialize(bytes) helper 2014-12-28 10:03:17 +02:00
Avi Kivity
b3a189158b db: add helpers to convert strings to bytes 2014-12-28 10:03:17 +02:00
Avi Kivity
8bde5630f5 db: move row and partition classes around
Make 'data_type' visible to them.
2014-12-28 10:03:17 +02:00
Avi Kivity
36649c4b7d db: implement std::hash<data_type> 2014-12-28 10:03:17 +02:00
Avi Kivity
2733813c87 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.
2014-12-28 10:01:41 +02:00
Avi Kivity
858e910fe3 db: implement std::hash<data_type> 2014-12-24 14:18:21 +02:00
Avi Kivity
26461bee58 db: add a "bytes" type, corresponding to ByteBuffer (serialized values)
Using sstring can lead to confusion with UTF8 strings.
2014-12-24 12:16:04 +02:00
Avi Kivity
641c859903 db: add in-memory database
Simplistic database using std::map<> to hold rows, and boost::any to
hold values.

Supports:
  - multiple key spaces
  - multiple column families
  - a few data types

Does not support:
  - container data types
  - secondary indexes
  - composites
  - validators
2014-12-23 18:41:29 +02:00