Aktualizr
C++ SOTA Client
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SQLStorageBase Class Reference
Inheritance diagram for SQLStorageBase:
[legend]
Collaboration diagram for SQLStorageBase:
[legend]

Public Member Functions

 SQLStorageBase (boost::filesystem::path sqldb_path, bool readonly, std::vector< std::string > schema_migrations, std::vector< std::string > schema_rollback_migrations, std::string current_schema, int current_schema_version)
 
std::string getTableSchemaFromDb (const std::string &tablename)
 
bool dbMigrateForward (int version_from, int version_to=0)
 
bool dbMigrateBackward (int version_from, int version_to=0)
 
bool dbMigrate ()
 
DbVersion getVersion ()
 
boost::filesystem::path dbPath () const
 

Protected Member Functions

SQLite3Guard dbConnection () const
 
bool dbInsertBackMigrations (SQLite3Guard &db, int version_latest)
 

Protected Attributes

boost::filesystem::path sqldb_path_
 
bool readonly_ {false}
 
StorageLock lock
 
std::shared_ptr< std::mutex > mutex_
 
const std::vector< std::string > schema_migrations_
 
std::vector< std::string > schema_rollback_migrations_
 
const std::string current_schema_
 
const int current_schema_version_
 

Detailed Description

Definition at line 33 of file sqlstorage_base.h.


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