CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReflogDatabase Class Reference

#include <reflog_sql.h>

Inheritance diagram for ReflogDatabase:
Collaboration diagram for ReflogDatabase:

Public Member Functions

bool CreateEmptyDatabase ()
 
bool CheckSchemaCompatibility ()
 
bool LiveSchemaUpgradeIfNecessary ()
 
bool CompactDatabase () const
 
bool InsertInitialValues (const std::string &repo_name)
 
- Public Member Functions inherited from sqlite::Database< ReflogDatabase >
bool IsEqualSchema (const float value, const float compare) const
 
bool BeginTransaction () const
 
bool CommitTransaction () const
 
GetProperty (const std::string &key) const
 
GetPropertyDefault (const std::string &key, const T default_value) const
 
bool SetProperty (const std::string &key, const T value)
 
bool HasProperty (const std::string &key) const
 
sqlite3 * sqlite_db () const
 
const std::string & filename () const
 
float schema_version () const
 
unsigned schema_revision () const
 
bool read_write () const
 
unsigned GetModifiedRowCount () const
 
double GetFreePageRatio () const
 
void GetMemStatistics (MemStatistics *stats) const
 
bool Vacuum () const
 
void PrintSqlError (const std::string &error_msg)
 
std::string GetLastErrorMsg () const
 
void TakeFileOwnership ()
 
void DropFileOwnership ()
 
bool OwnsFile () const
 
void EnforceSchema (float version, unsigned revision)
 

Static Public Attributes

static const float kLatestSchema = 1.0
 
static const float kLatestSupportedSchema = 1.0
 
static const unsigned kLatestSchemaRevision = 0
 
static const std::string kFqrnKey = "fqrn"
 
- Static Public Attributes inherited from sqlite::Database< ReflogDatabase >
static const float kSchemaEpsilon
 

Protected Member Functions

 ReflogDatabase (const std::string &filename, const OpenMode open_mode)
 
- Protected Member Functions inherited from sqlite::Database< ReflogDatabase >
 Database (const std::string &filename, const OpenMode open_mode)
 
bool Initialize ()
 
bool CreatePropertiesTable ()
 
bool PrepareCommonQueries ()
 
bool OpenDatabase (const int sqlite_open_flags)
 
bool Configure ()
 
bool FileReadAhead ()
 
void ReadSchemaRevision ()
 
bool StoreSchemaRevision ()
 
void set_schema_version (const float ver)
 
void set_schema_revision (const unsigned rev)
 

Friends

class sqlite::Database< ReflogDatabase >
 

Additional Inherited Members

- Public Types inherited from sqlite::Database< ReflogDatabase >
enum  OpenMode
 
- Static Public Member Functions inherited from sqlite::Database< ReflogDatabase >
static ReflogDatabaseCreate (const std::string &filename)
 
static ReflogDatabaseOpen (const std::string &filename, const OpenMode open_mode)
 

Detailed Description

This file is part of the CernVM File System.

Definition at line 13 of file reflog_sql.h.

Constructor & Destructor Documentation

ReflogDatabase::ReflogDatabase ( const std::string &  filename,
const OpenMode  open_mode 
)
inlineprotected

Definition at line 34 of file reflog_sql.h.

Member Function Documentation

bool ReflogDatabase::CheckSchemaCompatibility ( )

Definition at line 34 of file reflog_sql.cc.

Here is the call graph for this function:

bool ReflogDatabase::CompactDatabase ( ) const
inline

Definition at line 26 of file reflog_sql.h.

bool ReflogDatabase::CreateEmptyDatabase ( )

Definition at line 26 of file reflog_sql.cc.

Here is the call graph for this function:

bool ReflogDatabase::InsertInitialValues ( const std::string &  repo_name)

Definition at line 46 of file reflog_sql.cc.

Here is the call graph for this function:

bool ReflogDatabase::LiveSchemaUpgradeIfNecessary ( )

Definition at line 40 of file reflog_sql.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class sqlite::Database< ReflogDatabase >
friend

Definition at line 33 of file reflog_sql.h.

Member Data Documentation

const std::string ReflogDatabase::kFqrnKey = "fqrn"
static

Database Schema ChangeLog:

Schema Version 1.0 -> Revision 0: initial revision

Definition at line 20 of file reflog_sql.h.

Referenced by manifest::Reflog::fqrn(), and InsertInitialValues().

const float ReflogDatabase::kLatestSchema = 1.0
static

This file is part of the CernVM File System.

Definition at line 15 of file reflog_sql.h.

const unsigned ReflogDatabase::kLatestSchemaRevision = 0
static

Definition at line 18 of file reflog_sql.h.

Referenced by LiveSchemaUpgradeIfNecessary().

const float ReflogDatabase::kLatestSupportedSchema = 1.0
static

Definition at line 16 of file reflog_sql.h.

Referenced by CheckSchemaCompatibility().


The documentation for this class was generated from the following files: