29 namespace fs = boost::filesystem;
30 namespace po = boost::program_options;
59 if (_name == entry.name)
66 BOOST_THROW_EXCEPTION(
67 eth::InvalidDatabaseKind() <<
errinfo_comment(
"invalid database name supplied: " + _name));
105 static std::string
const description = [] {
114 return "Select database implementation. Available options are: " + names +
".";
117 po::options_description opts(
"DATABASE OPTIONS", _lineLength);
118 auto add = opts.add_options();
121 po::value<std::string>()->value_name(
"<name>")->default_value(
"leveldb")->notifier(
126 po::value<std::string>()
127 ->value_name(
"<path>")
130 "Database path (for non-memory database options)\n");
155 return std::unique_ptr<DatabaseFace>(
new LevelDB(_path));
158 return std::unique_ptr<DatabaseFace>(
new RocksDB(_path));
163 return std::unique_ptr<DatabaseFace>(
new MemoryDB());