mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Persistence for Validators
This commit is contained in:
41
src/ripple/validators/impl/StoreSqdb.h
Normal file
41
src/ripple/validators/impl/StoreSqdb.h
Normal 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
|
||||
Reference in New Issue
Block a user