xapian-db: improve errors, fix warnings

This commit is contained in:
Dirk-Jan C. Binnema
2024-08-21 06:18:37 +03:00
parent c58eacc0d5
commit 407c6ed4d1
2 changed files with 19 additions and 15 deletions

View File

@ -51,12 +51,6 @@ XapianDb::read_only() const
return !std::holds_alternative<Xapian::WritableDatabase>(db_);
}
const std::string&
XapianDb::path() const
{
return path_;
}
void
XapianDb::set_timestamp(const std::string_view key)
{
@ -102,8 +96,7 @@ make_db(const std::string& db_path, Flavor flavor)
XapianDb::XapianDb(const std::string& db_path, Flavor flavor):
path_(make_path(db_path, flavor)),
db_(make_db(path_, flavor)),
batch_size_{Config(*this).get<Config::Id::BatchSize>()} // default
{
batch_size_{Config(*this).get<Config::Id::BatchSize>()/*default*/} {
if (flavor == Flavor::CreateOverwrite)
set_timestamp(MetadataIface::created_key);