Persistence for Validators

This commit is contained in:
Vinnie Falco
2013-09-12 21:38:29 -07:00
parent 9b40bc6835
commit c631cc5f92
18 changed files with 971 additions and 239 deletions

View File

@@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
/*
Copyright (c) 2011-2013, OpenCoin, Inc.
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED
#define RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED
namespace Validators
{
/** Database persistence for Validators using SQLite */
class StoreSqdb : public Store
{
public:
explicit StoreSqdb (Journal journal = Journal());
~StoreSqdb ();
Error open (File const& file);
void insert (SourceDesc& desc);
void update (SourceDesc& desc, bool updateFetchResults);
private:
void report (Error const& error, char const* fileName, int lineNumber);
bool select (SourceDesc& desc);
void selectList (SourceDesc& desc);
Error init ();
Journal m_journal;
sqdb::session m_session;
};
}
#endif