Lines Matching defs:metadata
29 #include "store/metadata.hpp"
44 /// Fetches an integer column from a statement of the 'metadata' table.
64 throw store::integrity_error(F("The '%s' column in 'metadata' table "
73 /// Constructs a new metadata object.
77 store::metadata::metadata(const int schema_version_, const int64_t timestamp_) :
86 /// \return The timestamp in this metadata entry.
88 store::metadata::timestamp(void) const
96 /// \return The schema version in this metadata entry.
98 store::metadata::schema_version(void) const
104 /// Reads the latest metadata entry from the database.
106 /// \param db The database from which to read the metadata from.
108 /// \return The current metadata of the database. It is not OK for the metadata
112 /// \throw store::integrity_error If the metadata in the database is empty,
114 store::metadata
115 store::metadata::fetch_latest(sqlite::database& db)
119 "SELECT schema_version, timestamp FROM metadata "
122 throw store::integrity_error("The 'metadata' table is empty");
132 return metadata(schema_version_, timestamp_);
134 throw store::integrity_error(F("Invalid metadata schema: %s") %