0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-28 14:58:20 +02:00

ircd:Ⓜ️ Add init argument to pass dbopts.

This commit is contained in:
Jason Volk 2018-04-09 12:56:43 -07:00
parent 1268d90fb0
commit 963853ee10
2 changed files with 4 additions and 3 deletions

View file

@ -100,6 +100,6 @@ namespace ircd::m::dbs::desc
struct ircd::m::dbs::init
{
init();
init(std::string dbopts = {});
~init() noexcept;
};

View file

@ -50,10 +50,11 @@ ircd::m::dbs::room_state
/// Initializes the m::dbs subsystem; sets up the events database. Held/called
/// by m::init. Most of the extern variables in m::dbs are not ready until
/// this call completes.
ircd::m::dbs::init::init()
ircd::m::dbs::init::init(std::string dbopts)
{
// Open the events database
events = std::make_shared<database>("events"s, ""s, desc::events);
static const auto dbname{"events"};
events = std::make_shared<database>(dbname, std::move(dbopts), desc::events);
// Cache the columns for the event tuple in order for constant time lookup
assert(event_columns == event::size());