5 #ifndef CVMFS_HISTORY_SQL_H_
6 #define CVMFS_HISTORY_SQL_H_
95 template <
class MixinT>
106 result.
name = MixinT::RetrieveString(0);
110 result.
revision = MixinT::RetrieveInt64(2);
111 result.
timestamp = MixinT::RetrieveInt64(3);
113 result.
size = MixinT::RetrieveInt64(6);
114 result.
branch = MixinT::RetrieveString(7);
133 bool BindName(
const std::string &name);
140 bool BindName(
const std::string &name);
202 template <
class MixinT,
int offset = 0>
206 return MixinT::BindInt64(offset + 1, target_tag.
revision) &&
207 MixinT::BindText(offset + 2, target_tag.
name);
246 #endif // CVMFS_HISTORY_SQL_H_
History::Tag RetrieveTag() const
bool BindTimestamp(const time_t timestamp)
static const float kLatestSchema
unsigned RetrieveCount() const
SqlFindTag(const HistoryDatabase *database)
bool CreateEmptyDatabase()
const std::string & filename() const
bool CheckSchema(const HistoryDatabase *database) const
static const float kLatestSupportedSchema
bool CheckSchemaCompatibility()
static const std::string db_placeholders
bool CreateRecycleBinTable()
SqlFindTagByDate(const HistoryDatabase *database)
const history::History * history() const
shash::Any RetrieveHash() const
Database(const std::string &filename, const OpenMode open_mode)
SqlInsertTag(const HistoryDatabase *database)
bool UpgradeSchemaRevision_10_1()
SqlCountTags(const HistoryDatabase *database)
SqlListRollbackTags(const HistoryDatabase *database)
bool CompactDatabase() const
SqlFindBranchHead(const HistoryDatabase *database)
bool InsertInitialValues(const std::string &repository_name)
bool BindBranchName(const std::string &branch_name)
SqlRecycleBinFlush(const HistoryDatabase *database)
static const unsigned int kFlagCatalog
bool BindName(const std::string &name)
bool BindTargetTag(const History::Tag &target_tag)
const char kSuffixCatalog
bool BindTag(const History::Tag &tag)
SqlListTags(const HistoryDatabase *database)
bool BindBranch(const History::Branch &branch)
SqlInsertBranch(const HistoryDatabase *database)
static const unsigned kLatestSchemaRevision
shash::Any RetrieveHash()
bool LiveSchemaUpgradeIfNecessary()
SqlGetHashes(const HistoryDatabase *database)
HistoryDatabase(const std::string &filename, const OpenMode open_mode)
static const std::string kFqrnKey
bool BindName(const std::string &name)
bool UpgradeSchemaRevision_10_2()
Any MkFromHexPtr(const HexPtr hex, const char suffix)
SqlRemoveTag(const HistoryDatabase *database)
bool ContainsRecycleBin() const
bool CreateBranchesTable()
History::Branch RetrieveBranch() const
SqlRecycleBinList(const HistoryDatabase *database)
SqlRollbackTag(const HistoryDatabase *database)
bool UpgradeSchemaRevision_10_3()
SqlListBranches(const HistoryDatabase *database)