This patch includes a helper function that executes a function for each entry
in a directory. It is future based and can include in the future, future-based
code to asychronously read, for instance, an sstable.
At the moment, it only scan all keyspaces and make sure they appear in the
keyspaces hash.
Both the database and keyspace classes gain a populate<T> factory that returns a
populated database. At this point, the names found are just listed, but not really
stored anywhere.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
In some cases, deserialize() can return a null object (if there were zero
input bytes).
In others, it cannot (for string or blob types).
Change the return type to optional<any> and adapt the deserialiation code
to deal with it.
Dynamic types come and go, so they need to be reference counted.
Switch data_type to using a shared_ptr<> for its implementation.
Since thread_ptr is not thread safe, the global primitive types must be
thread_local.
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