Status getSqliteJournalMode(const fs::path& sqlite_db) {
  TableRows result;
  auto status = genTableRowsForSqliteTable(
      sqlite_db, "PRAGMA journal_mode;", result, true);
  if (!status.ok()) {
    return status;
  }
  if (result.empty()) {
    VLOG(1) << "PRAGMA query returned empty results";
    return Status(1, "Could not retrieve journal mode");
  }
  auto resultmap = static_cast<Row>(*result[0]);
  if (resultmap.find("journal_mode") == resultmap.end()) {
    VLOG(1) << "journal_mode not found PRAGMA query results";
    return Status(1, "Could not retrieve journal mode");
  }
  return Status(Status::kSuccessCode,
                boost::algorithm::to_lower_copy(resultmap["journal_mode"]));
}
Status getSqliteJournalMode(const fs::path& sqlite_db) {
  TableRows result;
  auto status = genTableRowsForSqliteTable(
      sqlite_db, "PRAGMA journal_mode;", result, true);
  if (!status.ok()) {
    return status;
  }
  if (result.empty()) {
    VLOG(1) << "PRAGMA query returned empty results";
    return Status(1, "Could not retrieve journal mode");
  }
  auto resultmap = static_cast<Row>(*result[0]);
  if (resultmap.find("journal_mode") == resultmap.end()) {
    VLOG(1) << "journal_mode not found PRAGMA query results";
    return Status(1, "Could not retrieve journal mode");
  }
  return Status(Status::kSuccessCode,
                boost::algorithm::to_lower_copy(resultmap["journal_mode"]));
}