5 #ifndef CVMFS_HISTORY_SQLITE_H_
6 #define CVMFS_HISTORY_SQLITE_H_
64 const std::string &
fqrn);
92 bool Insert(
const Tag &tag);
93 bool Remove(
const std::string &name);
94 bool Exists(
const std::string &name)
const;
95 bool GetByName(
const std::string &name, Tag *tag)
const;
96 bool GetByDate(
const time_t timestamp, Tag *tag)
const;
97 bool List(std::vector<Tag> *tags)
const;
99 virtual bool GetBranchHead(
const std::string &branch_name, Tag *tag)
const;
100 virtual bool ExistsBranch(
const std::string &branch_name)
const;
103 virtual bool ListBranches(std::vector<Branch> *branches)
const;
118 bool Rollback(
const Tag &updated_target_tag);
131 std::vector<Tag> *tags)
const;
140 bool GetHashes(std::vector<shash::Any> *hashes)
const;
152 const bool read_write);
153 bool OpenDatabase(
const std::string &file_name,
const bool read_write);
158 template <
class SqlListingT>
159 bool RunListing(std::vector<Tag> *list, SqlListingT *sql)
const;
182 #endif // CVMFS_HISTORY_SQLITE_H_
void TakeDatabaseFileOwnership()
UniquePtr< SqlCountTags > count_tags_
UniquePtr< SqlListRollbackTags > list_rollback_tags_
static SqliteHistory * Open(const std::string &file_name)
UniquePtr< SqlListTags > list_tags_
UniquePtr< SqlGetHashes > get_hashes_
bool Rollback(const Tag &updated_target_tag)
const history::History * history() const
virtual bool ListBranches(std::vector< Branch > *branches) const
virtual bool PruneBranches()
bool CommitTransaction() const
const std::string & fqrn() const
bool Remove(const std::string &name)
bool List(std::vector< Tag > *tags) const
bool Exists(const std::string &name) const
static SqliteHistory * OpenWritable(const std::string &file_name)
bool BeginTransaction() const
bool OpenDatabase(const std::string &file_name, const bool read_write)
bool GetByDate(const time_t timestamp, Tag *tag) const
UniquePtr< SqlInsertBranch > insert_branch_
UniquePtr< SqlRemoveTag > remove_tag_
UniquePtr< SqlFindTag > find_tag_
bool GetByName(const std::string &name, Tag *tag) const
void DropDatabaseFileOwnership()
bool CreateDatabase(const std::string &file_name, const std::string &fqrn)
UniquePtr< SqlRecycleBinFlush > recycle_empty_
bool RunListing(std::vector< Tag > *list, SqlListingT *sql) const
UniquePtr< SqlFindBranchHead > find_branch_head_
bool Insert(const Tag &tag)
bool OwnsDatabaseFile() const
UniquePtr< SqlListBranches > list_branches_
shash::Any previous_revision() const
bool SetPreviousRevision(const shash::Any &history_hash)
UniquePtr< SqlFindTagByDate > find_tag_by_date_
std::string filename() const
bool ListTagsAffectedByRollback(const std::string &target_tag_name, std::vector< Tag > *tags) const
virtual bool GetBranchHead(const std::string &branch_name, Tag *tag) const
UniquePtr< SqlInsertTag > insert_tag_
bool ListRecycleBin(std::vector< shash::Any > *hashes) const
static SqliteHistory * Create(const std::string &file_name, const std::string &fqrn)
virtual bool ExistsBranch(const std::string &branch_name) const
UniquePtr< HistoryDatabase > database_
UniquePtr< SqlRollbackTag > rollback_tag_
bool GetHashes(std::vector< shash::Any > *hashes) const
static const std::string kPreviousRevisionKey
virtual bool InsertBranch(const Branch &branch)
unsigned GetNumberOfTags() const
UniquePtr< SqlRecycleBinList > recycle_list_