// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2019 Jason Volk // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. #pragma once #define HAVE_IRCD_M_DBS_EVENT_COLUMN_H // These columns all store duplicate data from the original _event_json // but limited to a single specific property. The index key is an event_idx // (just like _event_json). These columns are useful for various optimizations // at the cost of the additional space consumed. namespace ircd::m::dbs { // Event property column max-count. The number of event columns may be // less by not initializing positions in the event_column array. constexpr const auto event_columns { event::size() }; void _index_event_cols(db::txn &, const event &, const opts &); // There is one position in this array corresponding to each property // in the m::event tuple, however, the db::column in this position may // be default-initialized if this column is not used. extern std::array event_column; } namespace ircd::m::dbs::desc { extern conf::item _event__comp; extern conf::item _event__bloom__bits; extern conf::item content__comp; extern conf::item content__block__size; extern conf::item content__meta_block__size; extern conf::item content__cache__size; extern conf::item content__cache_comp__size; extern conf::item content__file__size__max; extern conf::item content__compaction_trigger; extern const db::descriptor content; extern conf::item depth__comp; extern conf::item depth__block__size; extern conf::item depth__meta_block__size; extern conf::item depth__cache__size; extern conf::item depth__cache_comp__size; extern const db::descriptor depth; extern conf::item event_id__comp; extern conf::item event_id__block__size; extern conf::item event_id__meta_block__size; extern conf::item event_id__cache__size; extern conf::item event_id__cache_comp__size; extern const db::descriptor event_id; extern conf::item origin_server_ts__comp; extern conf::item origin_server_ts__block__size; extern conf::item origin_server_ts__meta_block__size; extern conf::item origin_server_ts__cache__size; extern conf::item origin_server_ts__cache_comp__size; extern const db::descriptor origin_server_ts; extern conf::item room_id__comp; extern conf::item room_id__block__size; extern conf::item room_id__meta_block__size; extern conf::item room_id__cache__size; extern conf::item room_id__cache_comp__size; extern const db::descriptor room_id; extern conf::item sender__comp; extern conf::item sender__block__size; extern conf::item sender__meta_block__size; extern conf::item sender__cache__size; extern conf::item sender__cache_comp__size; extern const db::descriptor sender; extern conf::item state_key__comp; extern conf::item state_key__block__size; extern conf::item state_key__meta_block__size; extern conf::item state_key__cache__size; extern conf::item state_key__cache_comp__size; extern const db::descriptor state_key; extern conf::item type__comp; extern conf::item type__block__size; extern conf::item type__meta_block__size; extern conf::item type__cache__size; extern conf::item type__cache_comp__size; extern const db::descriptor type; }