CernVM-FS
2.12.0
|
#include <history_sql.h>
Public Member Functions | |
bool | CreateEmptyDatabase () |
bool | InsertInitialValues (const std::string &repository_name) |
bool | ContainsRecycleBin () const |
bool | CheckSchemaCompatibility () |
bool | LiveSchemaUpgradeIfNecessary () |
bool | CompactDatabase () const |
Public Member Functions inherited from sqlite::Database< HistoryDatabase > | |
bool | IsEqualSchema (const float value, const float compare) const |
bool | BeginTransaction () const |
bool | CommitTransaction () const |
T | GetProperty (const std::string &key) const |
T | 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 = 3 |
static const std::string | kFqrnKey = "fqrn" |
Static Public Attributes inherited from sqlite::Database< HistoryDatabase > | |
static const float | kSchemaEpsilon |
Protected Member Functions | |
HistoryDatabase (const std::string &filename, const OpenMode open_mode) | |
Protected Member Functions inherited from sqlite::Database< HistoryDatabase > | |
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) |
Private Member Functions | |
bool | CreateTagsTable () |
bool | CreateRecycleBinTable () |
bool | CreateBranchesTable () |
bool | UpgradeSchemaRevision_10_1 () |
bool | UpgradeSchemaRevision_10_2 () |
bool | UpgradeSchemaRevision_10_3 () |
Friends | |
class | sqlite::Database< HistoryDatabase > |
Additional Inherited Members | |
Public Types inherited from sqlite::Database< HistoryDatabase > | |
enum | OpenMode |
Static Public Member Functions inherited from sqlite::Database< HistoryDatabase > | |
static HistoryDatabase * | Create (const std::string &filename) |
static HistoryDatabase * | Open (const std::string &filename, const OpenMode open_mode) |
This class wraps the database structure of the History SQLite database files. For that it inherits from sqlite::Database<>, please look there for further details.
Definition at line 20 of file history_sql.h.
|
inlineprotected |
Definition at line 41 of file history_sql.h.
bool history::HistoryDatabase::CheckSchemaCompatibility | ( | ) |
|
inline |
Definition at line 36 of file history_sql.h.
bool history::HistoryDatabase::ContainsRecycleBin | ( | ) | const |
|
private |
Definition at line 66 of file history_sql.cc.
Referenced by CreateEmptyDatabase(), and UpgradeSchemaRevision_10_3().
bool history::HistoryDatabase::CreateEmptyDatabase | ( | ) |
This method creates a new database file and initializes the database schema.
Definition at line 35 of file history_sql.cc.
|
private |
Definition at line 58 of file history_sql.cc.
Referenced by CreateEmptyDatabase(), and UpgradeSchemaRevision_10_2().
|
private |
Definition at line 48 of file history_sql.cc.
Referenced by CreateEmptyDatabase().
bool history::HistoryDatabase::InsertInitialValues | ( | const std::string & | repository_name | ) |
bool history::HistoryDatabase::LiveSchemaUpgradeIfNecessary | ( | ) |
|
private |
Definition at line 128 of file history_sql.cc.
Referenced by LiveSchemaUpgradeIfNecessary().
|
private |
Definition at line 144 of file history_sql.cc.
Referenced by LiveSchemaUpgradeIfNecessary().
|
private |
Definition at line 159 of file history_sql.cc.
Referenced by LiveSchemaUpgradeIfNecessary().
|
friend |
Definition at line 40 of file history_sql.h.
|
static |
Database Schema ChangeLog:
Schema Version 1.0 -> Revision 3: deprecate (flush) table 'recycle_bin' add table 'branches' add column 'branch' to table tags -> Revision 2: add table 'recycle_bin' -> Revision 1: add field 'size'
Definition at line 27 of file history_sql.h.
Referenced by InsertInitialValues().
|
static |
Definition at line 22 of file history_sql.h.
Referenced by CheckSchemaCompatibility(), and LiveSchemaUpgradeIfNecessary().
|
static |
Definition at line 25 of file history_sql.h.
Referenced by LiveSchemaUpgradeIfNecessary().
|
static |
Definition at line 23 of file history_sql.h.
Referenced by CheckSchemaCompatibility().