From 11607b39939d59868d5e4e0d6f0e7697920053a3 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 16 Jan 2019 13:47:45 -0800 Subject: [PATCH] ircd::m::dbs: Use conditional column constructors for event columns. --- ircd/m/dbs.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ircd/m/dbs.cc b/ircd/m/dbs.cc index 53f33ea79..bf58095b4 100644 --- a/ircd/m/dbs.cc +++ b/ircd/m/dbs.cc @@ -123,13 +123,15 @@ ircd::m::dbs::init::init(std::string dbopts) assert(event_columns == event::size()); std::array keys; //TODO: why did this happen? _key_transform(event{}, begin(keys), end(keys)); //TODO: how did this happen? + + // Construct global convenience references for the event property columns. for(size_t i(0); i < keys.size(); ++i) event_column[i] = db::column { - *events, keys[i] + *events, keys[i], std::nothrow }; - // Cache the columns for the metadata + // Construct global convenience references for the metadata columns event_idx = db::column{*events, desc::events__event_idx.name}; event_json = db::column{*events, desc::events__event_json.name}; room_head = db::index{*events, desc::events__room_head.name};