20 #include <ripple/app/main/Application.h>
21 #include <ripple/app/rdb/RelationalDatabase.h>
22 #include <ripple/core/ConfigSections.h>
23 #include <ripple/nodestore/DatabaseShard.h>
39 bool use_sqlite =
false;
40 bool use_postgres =
false;
49 if (!rdb_section.empty())
51 if (boost::iequals(
get(rdb_section,
"backend"),
"sqlite"))
57 Throw<std::runtime_error>(
58 "Invalid rdb_section backend value: " +
59 get(rdb_section,
"backend"));
72 else if (use_postgres)
Holds a collection of configuration values.
static std::unique_ptr< RelationalDatabase > init(Application &app, Config const &config, JobQueue &jobQueue)
init Creates and returns an appropriate RelationalDatabase instance based on configuration.
std::unique_ptr< RelationalDatabase > getPostgresDatabase(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)
std::unique_ptr< RelationalDatabase > getSQLiteDatabase(Application &app, Config const &config, JobQueue &jobQueue)
Section & section(std::string const &name)
Returns the section with the given name.