CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swissknife::FileStatsDatabase Class Reference

#include <swissknife_filestats.h>

Inheritance diagram for swissknife::FileStatsDatabase:
Collaboration diagram for swissknife::FileStatsDatabase:

Public Member Functions

bool CreateEmptyDatabase ()
 
int64_t StoreCatalog (int64_t num_entries, int64_t file_size)
 
int64_t StoreFile (int64_t catalog_id, int64_t object_id)
 
int64_t StoreObject (const void *hash, int hash_size, int64_t size)
 
int64_t StoreChunkedFile (int64_t catalog_id)
 
int64_t StoreChunk (const void *hash, int hash_size, int64_t size, int64_t file_id)
 
int64_t StoreSymlink (int64_t length)
 
void InitStatements ()
 
void DestroyStatements ()
 
- Public Member Functions inherited from sqlite::Database< FileStatsDatabase >
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 float kLatestSchema = 1
 
static unsigned kLatestSchemaRevision = 1
 
- Static Public Attributes inherited from sqlite::Database< FileStatsDatabase >
static const float kSchemaEpsilon
 

Protected Member Functions

 FileStatsDatabase (const std::string &filename, const OpenMode open_mode)
 
- Protected Member Functions inherited from sqlite::Database< FileStatsDatabase >
 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)
 

Protected Attributes

sqlite::Sqlquery_insert_catalog
 
sqlite::Sqlquery_insert_object
 
sqlite::Sqlquery_insert_file
 
sqlite::Sqlquery_insert_file_object
 
sqlite::Sqlquery_insert_symlink
 
sqlite::Sqlquery_lookup_object
 

Friends

class sqlite::Database< FileStatsDatabase >
 

Additional Inherited Members

- Public Types inherited from sqlite::Database< FileStatsDatabase >
enum  OpenMode
 
- Static Public Member Functions inherited from sqlite::Database< FileStatsDatabase >
static FileStatsDatabase * Create (const std::string &filename)
 
static FileStatsDatabase * Open (const std::string &filename, const OpenMode open_mode)
 

Detailed Description

Definition at line 24 of file swissknife_filestats.h.

Constructor & Destructor Documentation

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

Definition at line 51 of file swissknife_filestats.h.

Member Function Documentation

bool swissknife::FileStatsDatabase::CreateEmptyDatabase ( )

Definition at line 209 of file swissknife_filestats.cc.

Here is the call graph for this function:

void swissknife::FileStatsDatabase::DestroyStatements ( )

Definition at line 263 of file swissknife_filestats.cc.

void swissknife::FileStatsDatabase::InitStatements ( )

Definition at line 248 of file swissknife_filestats.cc.

int64_t swissknife::FileStatsDatabase::StoreCatalog ( int64_t  num_entries,
int64_t  file_size 
)

Definition at line 272 of file swissknife_filestats.cc.

int64_t swissknife::FileStatsDatabase::StoreChunk ( const void *  hash,
int  hash_size,
int64_t  size,
int64_t  file_id 
)

Definition at line 301 of file swissknife_filestats.cc.

int64_t swissknife::FileStatsDatabase::StoreChunkedFile ( int64_t  catalog_id)

Definition at line 294 of file swissknife_filestats.cc.

int64_t swissknife::FileStatsDatabase::StoreFile ( int64_t  catalog_id,
int64_t  object_id 
)

Definition at line 281 of file swissknife_filestats.cc.

int64_t swissknife::FileStatsDatabase::StoreObject ( const void *  hash,
int  hash_size,
int64_t  size 
)

Definition at line 312 of file swissknife_filestats.cc.

int64_t swissknife::FileStatsDatabase::StoreSymlink ( int64_t  length)

Definition at line 327 of file swissknife_filestats.cc.

Friends And Related Function Documentation

friend class sqlite::Database< FileStatsDatabase >
friend

Definition at line 50 of file swissknife_filestats.h.

Member Data Documentation

float swissknife::FileStatsDatabase::kLatestSchema = 1
static

Definition at line 40 of file swissknife_filestats.h.

unsigned swissknife::FileStatsDatabase::kLatestSchemaRevision = 1
static

Definition at line 41 of file swissknife_filestats.h.

sqlite::Sql* swissknife::FileStatsDatabase::query_insert_catalog
protected

Definition at line 44 of file swissknife_filestats.h.

sqlite::Sql* swissknife::FileStatsDatabase::query_insert_file
protected

Definition at line 46 of file swissknife_filestats.h.

sqlite::Sql* swissknife::FileStatsDatabase::query_insert_file_object
protected

Definition at line 47 of file swissknife_filestats.h.

sqlite::Sql* swissknife::FileStatsDatabase::query_insert_object
protected

Definition at line 45 of file swissknife_filestats.h.

sqlite::Sql* swissknife::FileStatsDatabase::query_insert_symlink
protected

Definition at line 48 of file swissknife_filestats.h.

sqlite::Sql* swissknife::FileStatsDatabase::query_lookup_object
protected

Definition at line 49 of file swissknife_filestats.h.


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