mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd:Ⓜ️ Add init argument to pass dbopts.
This commit is contained in:
parent
1268d90fb0
commit
963853ee10
2 changed files with 4 additions and 3 deletions
|
@ -100,6 +100,6 @@ namespace ircd::m::dbs::desc
|
|||
|
||||
struct ircd::m::dbs::init
|
||||
{
|
||||
init();
|
||||
init(std::string dbopts = {});
|
||||
~init() noexcept;
|
||||
};
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue