Commit aa0d3577 authored by Giorgio Azzinnaro's avatar Giorgio Azzinnaro

Db impl

parent 05b4c9e4
......@@ -20,11 +20,29 @@
#include "db.h"
template<typename Message>
profanedb::storage::Db<Message>::Db()
profanedb::Db<Message>::Db(
std::shared_ptr< profanedb::boot::Schema<Message> > schema,
std::shared_ptr<profanedb::vault::Storage> storage)
: schema(schema)
, storage(storage)
{
}
template<typename Message>
profanedb::storage::Db<Message>::~Db()
profanedb::Db<Message>::~Db()
{
}
template<typename Message>
const Message & profanedb::Db<Message>::Get(const protobuf::Key & key) const
{
this->schema->
}
bool profanedb::Db<Message>::Put(const Message & message)
{
}
bool profanedb::Db<Message>::Delete(const protobuf::Key & key)
{
}
......@@ -32,12 +32,14 @@ template<typename Message>
class Db
{
public:
Db();
Db(
std::shared_ptr< boot::Schema<Message> > schema,
std::shared_ptr<vault::Storage> storage);
~Db();
virtual const Message & Get(const protobuf::Key & key) const = 0;
virtual bool Put(const Message & message) = 0;
virtual bool Delete(const protobuf::Key & key) = 0;
virtual const Message & Get(const protobuf::Key & key) const;
virtual bool Put(const Message & message);
virtual bool Delete(const protobuf::Key & key);
private:
std::shared_ptr< boot::Schema<Message> > schema;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment