20 #include <ripple/app/main/Application.h>
21 #include <ripple/app/rdb/RelationalDBInterface.h>
22 #include <ripple/core/ConfigSections.h>
23 #include <ripple/nodestore/DatabaseShard.h>
45 bool use_sqlite =
false;
46 bool use_postgres =
false;
55 if (!rdb_section.empty())
57 if (boost::iequals(
get(rdb_section,
"backend"),
"sqlite"))
63 Throw<std::runtime_error>(
64 "Invalid rdb_section backend value: " +
65 get(rdb_section,
"backend"));
78 else if (use_postgres)
Holds a collection of configuration values.
std::unique_ptr< RelationalDBInterface > getRelationalDBInterfaceSqlite(Application &app, Config const &config, JobQueue &jobQueue)
static std::unique_ptr< RelationalDBInterface > init(Application &app, Config const &config, JobQueue &jobQueue)
init Creates and returns appropriate interface based on config.
std::unique_ptr< RelationalDBInterface > getRelationalDBInterfacePostgres(Application &app, Config const &config, JobQueue &jobQueue)
A pool of threads to perform work.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
T & get(EitherAmount &amt)
Section & section(std::string const &name)
Returns the section with the given name.