store: rework to allow for 'init'

Rework the error handling / exception for read-only / writable and new
database.
This commit is contained in:
Dirk-Jan C. Binnema
2020-02-06 20:24:38 +02:00
parent f51846eefc
commit aa10da0a63
5 changed files with 35 additions and 74 deletions

View File

@ -444,34 +444,6 @@ Mu::size_to_string (const std::string& val, bool is_first)
return str;
}
std::string
Mu::quoted (const std::string& str)
{
std::string res{"\""};
for (auto&& c : str) {
if (c == '\\' || c == '\"')
res += '\\';
res += c;
}
return res + '"';
}
// std::string
// Mu::quoted (const char* str)
// {
// if (!str)
// return str;
// char *s{g_strescape(str, NULL)};
// auto res = format("\"%s\"", s ? s : "");
// g_free(s);
// return res;
// }
void
Mu::assert_equal(const std::string& s1, const std::string& s2)
{