1#include <xrpld/app/main/Application.h>
2#include <xrpld/app/rdb/RelationalDatabase.h>
3#include <xrpld/core/ConfigSections.h>
16 bool use_sqlite =
false;
19 if (!rdb_section.empty())
21 if (boost::iequals(
get(rdb_section,
"backend"),
"sqlite"))
27 Throw<std::runtime_error>(
28 "Invalid rdb_section backend value: " +
29 get(rdb_section,
"backend"));
Section & section(std::string const &name)
Returns the section with the given name.
A pool of threads to perform work.
static std::unique_ptr< RelationalDatabase > init(Application &app, Config const &config, JobQueue &jobQueue)
init Creates and returns an appropriate RelationalDatabase instance based on configuration.
Holds a collection of configuration values.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::unique_ptr< RelationalDatabase > getSQLiteDatabase(Application &app, Config const &config, JobQueue &jobQueue)
T get(Section const §ion, std::string const &name, T const &defaultValue=T{})
Retrieve a key/value pair from a section.