mirror of
https://github.com/matrix-construct/construct
synced 2024-09-29 20:28:52 +02: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
|
struct ircd::m::dbs::init
|
||||||
{
|
{
|
||||||
init();
|
init(std::string dbopts = {});
|
||||||
~init() noexcept;
|
~init() noexcept;
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,10 +50,11 @@ ircd::m::dbs::room_state
|
||||||
/// Initializes the m::dbs subsystem; sets up the events database. Held/called
|
/// 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
|
/// by m::init. Most of the extern variables in m::dbs are not ready until
|
||||||
/// this call completes.
|
/// this call completes.
|
||||||
ircd::m::dbs::init::init()
|
ircd::m::dbs::init::init(std::string dbopts)
|
||||||
{
|
{
|
||||||
// Open the events database
|
// 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
|
// Cache the columns for the event tuple in order for constant time lookup
|
||||||
assert(event_columns == event::size());
|
assert(event_columns == event::size());
|
||||||
|
|
Loading…
Reference in a new issue