2018-01-26 21:26:09 +01:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
|
|
|
|
//
|
|
|
|
// 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_H
|
|
|
|
|
2018-04-13 04:26:33 +02:00
|
|
|
/// Database Schema
|
|
|
|
///
|
2018-01-26 21:26:09 +01:00
|
|
|
namespace ircd::m::dbs
|
|
|
|
{
|
2018-02-08 22:23:01 +01:00
|
|
|
struct init;
|
2018-03-03 07:03:06 +01:00
|
|
|
struct write_opts;
|
2018-02-08 22:23:01 +01:00
|
|
|
|
2018-09-15 10:12:47 +02:00
|
|
|
// General confs
|
|
|
|
extern conf::item<bool> events_cache_enable;
|
|
|
|
extern conf::item<bool> events_cache_comp_enable;
|
2018-12-17 21:47:39 +01:00
|
|
|
extern conf::item<size_t> events_mem_write_buffer_size;
|
|
|
|
extern conf::item<size_t> events_sst_write_buffer_size;
|
2018-09-15 10:12:47 +02:00
|
|
|
|
2018-02-08 22:23:01 +01:00
|
|
|
// Database instance
|
|
|
|
extern std::shared_ptr<db::database> events;
|
|
|
|
|
|
|
|
// Event property columns
|
|
|
|
constexpr const auto event_columns{event::size()};
|
|
|
|
extern std::array<db::column, event_columns> event_column;
|
|
|
|
|
|
|
|
// Event metadata columns
|
2018-05-04 22:58:49 +02:00
|
|
|
extern db::column event_idx; // event_id => event_idx
|
2019-02-06 02:15:17 +01:00
|
|
|
extern db::column event_json; // event_idx => full json
|
2019-02-14 22:11:37 +01:00
|
|
|
extern db::index event_refs; // event_idx | ref_type, event_idx
|
2018-05-05 04:47:39 +02:00
|
|
|
extern db::index room_head; // room_id | event_id => event_idx
|
2019-01-15 22:00:15 +01:00
|
|
|
extern db::index room_events; // room_id | depth, event_idx => node_id
|
2018-05-04 22:58:49 +02:00
|
|
|
extern db::index room_joined; // room_id | origin, member => event_idx
|
|
|
|
extern db::index room_state; // room_id | type, state_key => event_idx
|
|
|
|
extern db::column state_node; // node_id => state::node
|
2018-02-08 22:23:01 +01:00
|
|
|
|
|
|
|
// Lowlevel util
|
2019-02-14 22:11:37 +01:00
|
|
|
enum class ref :uint8_t;
|
2019-02-06 02:18:53 +01:00
|
|
|
constexpr size_t EVENT_REFS_KEY_MAX_SIZE {sizeof(event::idx) + sizeof(event::idx)};
|
2019-02-14 22:11:37 +01:00
|
|
|
constexpr size_t ref_shift {8 * (sizeof(event::idx) - sizeof(ref))};
|
|
|
|
constexpr event::idx ref_mask {0xFFUL << ref_shift};
|
|
|
|
string_view event_refs_key(const mutable_buffer &out, const event::idx &tgt, const ref &type, const event::idx &referer);
|
|
|
|
std::tuple<ref, event::idx> event_refs_key(const string_view &amalgam);
|
|
|
|
string_view reflect(const ref &);
|
2019-02-08 11:49:13 +01:00
|
|
|
|
2018-05-05 04:47:39 +02:00
|
|
|
constexpr size_t ROOM_HEAD_KEY_MAX_SIZE {id::MAX_SIZE + 1 + id::MAX_SIZE};
|
|
|
|
string_view room_head_key(const mutable_buffer &out, const id::room &, const id::event &);
|
|
|
|
string_view room_head_key(const string_view &amalgam);
|
|
|
|
|
2018-05-02 01:51:35 +02:00
|
|
|
constexpr size_t ROOM_STATE_KEY_MAX_SIZE {id::MAX_SIZE + 256 + 256};
|
2018-03-04 08:39:24 +01:00
|
|
|
string_view room_state_key(const mutable_buffer &out, const id::room &, const string_view &type, const string_view &state_key);
|
|
|
|
string_view room_state_key(const mutable_buffer &out, const id::room &, const string_view &type);
|
2018-04-12 23:08:48 +02:00
|
|
|
std::pair<string_view, string_view> room_state_key(const string_view &amalgam);
|
2018-03-04 08:39:24 +01:00
|
|
|
|
2018-05-02 01:51:35 +02:00
|
|
|
constexpr size_t ROOM_JOINED_KEY_MAX_SIZE {id::MAX_SIZE + 256 + id::MAX_SIZE};
|
2018-04-15 23:40:10 +02:00
|
|
|
string_view room_joined_key(const mutable_buffer &out, const id::room &, const string_view &origin, const id::user &member);
|
|
|
|
string_view room_joined_key(const mutable_buffer &out, const id::room &, const string_view &origin);
|
|
|
|
std::pair<string_view, string_view> room_joined_key(const string_view &amalgam);
|
2018-03-04 09:08:30 +01:00
|
|
|
|
2018-05-02 01:51:35 +02:00
|
|
|
constexpr size_t ROOM_EVENTS_KEY_MAX_SIZE {id::MAX_SIZE + 1 + 8 + 8};
|
2018-04-18 04:14:39 +02:00
|
|
|
string_view room_events_key(const mutable_buffer &out, const id::room &, const uint64_t &depth, const event::idx &);
|
2018-02-13 23:21:57 +01:00
|
|
|
string_view room_events_key(const mutable_buffer &out, const id::room &, const uint64_t &depth);
|
2018-04-18 04:14:39 +02:00
|
|
|
std::pair<uint64_t, event::idx> room_events_key(const string_view &amalgam);
|
|
|
|
|
|
|
|
// [GET] the state root for an event (with as much information as you have)
|
|
|
|
string_view state_root(const mutable_buffer &out, const id::room &, const event::idx &, const uint64_t &depth);
|
|
|
|
string_view state_root(const mutable_buffer &out, const id::room &, const event::id &, const uint64_t &depth);
|
|
|
|
string_view state_root(const mutable_buffer &out, const id::room &, const event::idx &);
|
|
|
|
string_view state_root(const mutable_buffer &out, const id::room &, const event::id &);
|
|
|
|
string_view state_root(const mutable_buffer &out, const event::idx &);
|
|
|
|
string_view state_root(const mutable_buffer &out, const event::id &);
|
2018-02-08 22:23:01 +01:00
|
|
|
string_view state_root(const mutable_buffer &out, const event &);
|
|
|
|
|
|
|
|
// [SET (txn)] Basic write suite
|
2018-03-03 07:03:06 +01:00
|
|
|
string_view write(db::txn &, const event &, const write_opts &);
|
2018-05-05 00:14:19 +02:00
|
|
|
void blacklist(db::txn &, const event::id &, const write_opts &);
|
2018-01-26 21:26:09 +01:00
|
|
|
}
|
|
|
|
|
2019-02-14 22:11:37 +01:00
|
|
|
/// Options that affect the dbs::write() of an event to the transaction.
|
2018-03-03 07:03:06 +01:00
|
|
|
struct ircd::m::dbs::write_opts
|
|
|
|
{
|
2019-02-14 22:11:37 +01:00
|
|
|
static const std::bitset<256> event_refs_all;
|
|
|
|
|
|
|
|
/// Operation code
|
2018-03-25 07:46:43 +02:00
|
|
|
db::op op {db::op::SET};
|
2019-02-14 22:11:37 +01:00
|
|
|
|
|
|
|
/// Principal's index number. Most codepaths do not permit zero; must set.
|
|
|
|
uint64_t event_idx {0};
|
|
|
|
|
|
|
|
/// Whether the event_id should be indexed in event_idx (you want yes).
|
|
|
|
bool event_id {true};
|
|
|
|
|
|
|
|
/// Whether the event.source can be used directly for event_json. Defaults
|
|
|
|
/// to false unless the caller wants to avoid a redundant re-stringify.
|
|
|
|
bool json_source {false};
|
|
|
|
|
|
|
|
/// Selection of what reference types to manipulate in event_refs. Refs
|
|
|
|
/// will not be made if it is not appropriate for the event anyway, so
|
|
|
|
/// this defaults to all bits. User can disable one or more ref types
|
|
|
|
/// by clearing a bit.
|
|
|
|
std::bitset<256> event_refs {event_refs_all};
|
|
|
|
|
|
|
|
/// User can supply a view of already-generated keys with event_refs_key().
|
|
|
|
/// This vector will be checked first before generating that key, which
|
|
|
|
/// can avoid any index() queries internally to generate it.
|
|
|
|
vector_view<const string_view> event_refs_hint;
|
|
|
|
|
|
|
|
/// Whether the present state table `room_state` should be updated by
|
|
|
|
/// this operation if appropriate.
|
2018-03-03 07:03:06 +01:00
|
|
|
bool present {true};
|
2019-02-14 22:11:37 +01:00
|
|
|
|
|
|
|
/// Whether the history state btree `state_node` + `room_events` value
|
|
|
|
/// should be updated by this operation if appropriate.
|
2018-03-04 08:39:24 +01:00
|
|
|
bool history {true};
|
2019-02-14 22:11:37 +01:00
|
|
|
|
|
|
|
/// The state btree root to perform the update on.
|
|
|
|
string_view root_in;
|
|
|
|
|
|
|
|
/// After the update is performed, the new state btree root is returned
|
|
|
|
/// into this buffer.
|
|
|
|
mutable_buffer root_out;
|
|
|
|
|
|
|
|
/// Whether the event should be added to the room_head, indicating that
|
|
|
|
/// it has not yet been referenced at the time of this write. Defaults
|
|
|
|
/// to true, but if this is an older event this opt should be rethought.
|
2019-02-06 02:15:17 +01:00
|
|
|
bool room_head {true};
|
2019-02-14 22:11:37 +01:00
|
|
|
|
|
|
|
/// Whether the event removes the prev_events it references from the
|
|
|
|
/// room_head. This defaults to true and should almost always be true.
|
2019-02-06 02:15:17 +01:00
|
|
|
bool room_refs {true};
|
2019-02-14 22:11:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/// Types of references indexed by event_refs. This is a single byte integer,
|
|
|
|
/// which should be plenty of namespace. Internally event_refs_key() and
|
|
|
|
/// event_refs store this in a high order byte of an event::idx integer. This
|
|
|
|
/// is an alternative to having separate columns for each type of reference.
|
|
|
|
enum class ircd::m::dbs::ref
|
|
|
|
:uint8_t
|
|
|
|
{
|
|
|
|
// DAG
|
|
|
|
PREV = 0x00,
|
|
|
|
AUTH = 0x01,
|
|
|
|
|
|
|
|
// m.receipt
|
|
|
|
M_RECEIPT__M_READ = 0x10,
|
|
|
|
|
|
|
|
// m.relates_to
|
|
|
|
M_RELATES__M_REPLY = 0x20,
|
2018-03-03 07:03:06 +01:00
|
|
|
};
|
|
|
|
|
2018-04-13 04:26:33 +02:00
|
|
|
/// Database Schema Descriptors
|
|
|
|
///
|
2018-02-08 22:23:01 +01:00
|
|
|
namespace ircd::m::dbs::desc
|
2018-01-26 21:26:09 +01:00
|
|
|
{
|
2018-02-08 22:23:01 +01:00
|
|
|
// Full description
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::description events;
|
2018-01-26 21:26:09 +01:00
|
|
|
|
2018-04-13 04:26:33 +02:00
|
|
|
//
|
2018-02-08 22:23:01 +01:00
|
|
|
// Direct columns
|
2018-04-13 04:26:33 +02:00
|
|
|
//
|
|
|
|
|
2018-11-03 02:01:03 +01:00
|
|
|
extern conf::item<size_t> events___event__bloom__bits;
|
2018-11-02 17:01:23 +01:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__content__block__size;
|
2019-01-24 22:34:34 +01:00
|
|
|
extern conf::item<size_t> events__content__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__content__cache__size;
|
|
|
|
extern conf::item<size_t> events__content__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_content;
|
2018-09-03 05:32:34 +02:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__depth__block__size;
|
2018-10-21 09:19:42 +02:00
|
|
|
extern conf::item<size_t> events__depth__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__depth__cache__size;
|
|
|
|
extern conf::item<size_t> events__depth__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_depth;
|
2018-09-03 05:32:34 +02:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__event_id__block__size;
|
2019-01-24 22:34:34 +01:00
|
|
|
extern conf::item<size_t> events__event_id__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__event_id__cache__size;
|
|
|
|
extern conf::item<size_t> events__event_id__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_event_id;
|
2018-09-03 05:32:34 +02:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__origin_server_ts__block__size;
|
2018-10-21 09:19:42 +02:00
|
|
|
extern conf::item<size_t> events__origin_server_ts__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__origin_server_ts__cache__size;
|
|
|
|
extern conf::item<size_t> events__origin_server_ts__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_origin_server_ts;
|
2018-09-03 05:32:34 +02:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__room_id__block__size;
|
2019-01-24 22:34:34 +01:00
|
|
|
extern conf::item<size_t> events__room_id__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__room_id__cache__size;
|
|
|
|
extern conf::item<size_t> events__room_id__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_room_id;
|
2018-09-03 05:32:34 +02:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__sender__block__size;
|
2019-01-24 22:34:34 +01:00
|
|
|
extern conf::item<size_t> events__sender__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__sender__cache__size;
|
|
|
|
extern conf::item<size_t> events__sender__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_sender;
|
2018-09-03 05:32:34 +02:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__state_key__block__size;
|
2019-01-24 22:34:34 +01:00
|
|
|
extern conf::item<size_t> events__state_key__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__state_key__cache__size;
|
|
|
|
extern conf::item<size_t> events__state_key__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_state_key;
|
2018-09-03 05:32:34 +02:00
|
|
|
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__type__block__size;
|
2019-01-24 22:34:34 +01:00
|
|
|
extern conf::item<size_t> events__type__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__type__cache__size;
|
|
|
|
extern conf::item<size_t> events__type__cache_comp__size;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events_type;
|
2018-02-08 22:23:01 +01:00
|
|
|
|
2018-04-13 04:26:33 +02:00
|
|
|
//
|
2018-02-08 22:23:01 +01:00
|
|
|
// Metadata columns
|
2018-04-13 04:26:33 +02:00
|
|
|
//
|
2018-03-04 09:08:30 +01:00
|
|
|
|
2018-04-18 04:14:39 +02:00
|
|
|
// events index
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__event_idx__block__size;
|
2018-10-16 22:40:03 +02:00
|
|
|
extern conf::item<size_t> events__event_idx__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__event_idx__cache__size;
|
|
|
|
extern conf::item<size_t> events__event_idx__cache_comp__size;
|
2018-11-03 02:01:03 +01:00
|
|
|
extern conf::item<size_t> events__event_idx__bloom__bits;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events__event_idx;
|
2018-04-18 04:14:39 +02:00
|
|
|
|
2019-01-15 22:01:29 +01:00
|
|
|
// events cache
|
|
|
|
extern conf::item<size_t> events__event_json__block__size;
|
|
|
|
extern conf::item<size_t> events__event_json__meta_block__size;
|
|
|
|
extern conf::item<size_t> events__event_json__cache__size;
|
|
|
|
extern conf::item<size_t> events__event_json__cache_comp__size;
|
|
|
|
extern conf::item<size_t> events__event_json__bloom__bits;
|
|
|
|
extern const db::descriptor events__event_json;
|
|
|
|
|
2019-02-14 22:11:37 +01:00
|
|
|
// events graphing
|
2019-02-06 02:18:53 +01:00
|
|
|
extern conf::item<size_t> events__event_refs__block__size;
|
|
|
|
extern conf::item<size_t> events__event_refs__meta_block__size;
|
|
|
|
extern conf::item<size_t> events__event_refs__cache__size;
|
|
|
|
extern conf::item<size_t> events__event_refs__cache_comp__size;
|
|
|
|
extern const db::prefix_transform events__event_refs__pfx;
|
2019-02-07 06:26:57 +01:00
|
|
|
extern const db::comparator events__event_refs__cmp;
|
2019-02-06 02:18:53 +01:00
|
|
|
extern const db::descriptor events__event_refs;
|
|
|
|
|
2018-05-05 04:47:39 +02:00
|
|
|
// room head mapping sequence
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__room_head__block__size;
|
2018-10-16 22:40:03 +02:00
|
|
|
extern conf::item<size_t> events__room_head__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__room_head__cache__size;
|
2018-05-05 04:47:39 +02:00
|
|
|
extern const db::prefix_transform events__room_head__pfx;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events__room_head;
|
2018-05-05 04:47:39 +02:00
|
|
|
|
2018-04-13 04:26:33 +02:00
|
|
|
// room events sequence
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__room_events__block__size;
|
2018-10-16 22:40:03 +02:00
|
|
|
extern conf::item<size_t> events__room_events__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__room_events__cache__size;
|
|
|
|
extern conf::item<size_t> events__room_events__cache_comp__size;
|
2018-02-08 22:23:01 +01:00
|
|
|
extern const db::prefix_transform events__room_events__pfx;
|
2018-02-09 00:15:48 +01:00
|
|
|
extern const db::comparator events__room_events__cmp;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events__room_events;
|
2018-03-04 09:08:30 +01:00
|
|
|
|
2018-04-13 04:26:33 +02:00
|
|
|
// room present joined members sequence
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__room_joined__block__size;
|
2018-10-16 22:40:03 +02:00
|
|
|
extern conf::item<size_t> events__room_joined__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__room_joined__cache__size;
|
|
|
|
extern conf::item<size_t> events__room_joined__cache_comp__size;
|
2018-11-03 02:01:03 +01:00
|
|
|
extern conf::item<size_t> events__room_joined__bloom__bits;
|
2018-04-15 23:40:10 +02:00
|
|
|
extern const db::prefix_transform events__room_joined__pfx;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events__room_joined;
|
2018-03-04 08:39:24 +01:00
|
|
|
|
2018-04-16 23:20:50 +02:00
|
|
|
// room present state mapping sequence
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__room_state__block__size;
|
2018-10-16 22:40:03 +02:00
|
|
|
extern conf::item<size_t> events__room_state__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__room_state__cache__size;
|
|
|
|
extern conf::item<size_t> events__room_state__cache_comp__size;
|
2018-11-03 02:01:03 +01:00
|
|
|
extern conf::item<size_t> events__room_state__bloom__bits;
|
2018-04-16 23:20:50 +02:00
|
|
|
extern const db::prefix_transform events__room_state__pfx;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events__room_state;
|
2018-04-16 23:20:50 +02:00
|
|
|
|
2018-04-13 04:26:33 +02:00
|
|
|
// state btree node key-value store
|
2018-09-18 08:35:38 +02:00
|
|
|
extern conf::item<size_t> events__state_node__block__size;
|
2018-10-16 22:40:03 +02:00
|
|
|
extern conf::item<size_t> events__state_node__meta_block__size;
|
2018-09-03 05:32:34 +02:00
|
|
|
extern conf::item<size_t> events__state_node__cache__size;
|
|
|
|
extern conf::item<size_t> events__state_node__cache_comp__size;
|
2018-11-03 02:01:03 +01:00
|
|
|
extern conf::item<size_t> events__state_node__bloom__bits;
|
2018-09-20 00:38:37 +02:00
|
|
|
extern const db::descriptor events__state_node;
|
2018-01-26 21:26:09 +01:00
|
|
|
}
|
|
|
|
|
2018-05-06 03:54:02 +02:00
|
|
|
// Internal interface; not for public.
|
|
|
|
namespace ircd::m::dbs
|
|
|
|
{
|
|
|
|
void _index__room_state(db::txn &, const event &, const write_opts &);
|
|
|
|
void _index__room_events(db::txn &, const event &, const write_opts &, const string_view &);
|
|
|
|
void _index__room_joined(db::txn &, const event &, const write_opts &);
|
|
|
|
void _index__room_head(db::txn &, const event &, const write_opts &);
|
|
|
|
string_view _index_state(db::txn &, const event &, const write_opts &);
|
|
|
|
string_view _index_redact(db::txn &, const event &, const write_opts &);
|
2019-01-15 22:00:15 +01:00
|
|
|
string_view _index_other(db::txn &, const event &, const write_opts &);
|
|
|
|
string_view _index_room(db::txn &, const event &, const write_opts &);
|
2019-02-14 22:11:37 +01:00
|
|
|
void _index_event_refs_m_receipt_m_read(db::txn &, const event &, const write_opts &);
|
|
|
|
void _index_event_refs_m_relates_m_reply(db::txn &, const event &, const write_opts &);
|
|
|
|
void _index_event_refs_auth(db::txn &, const event &, const write_opts &);
|
|
|
|
void _index_event_refs_prev(db::txn &, const event &, const write_opts &);
|
2019-02-06 04:04:13 +01:00
|
|
|
void _index_event_refs(db::txn &, const event &, const write_opts &);
|
|
|
|
void _index_event_id(db::txn &, const event &, const write_opts &);
|
2019-01-23 23:39:04 +01:00
|
|
|
void _index_event(db::txn &, const event &, const write_opts &);
|
2019-01-24 20:26:31 +01:00
|
|
|
void _append_json(db::txn &, const event &, const write_opts &);
|
|
|
|
void _append_cols(db::txn &, const event &, const write_opts &);
|
2018-05-06 03:54:02 +02:00
|
|
|
}
|
|
|
|
|
2018-02-08 22:23:01 +01:00
|
|
|
struct ircd::m::dbs::init
|
|
|
|
{
|
2018-04-09 21:56:43 +02:00
|
|
|
init(std::string dbopts = {});
|
2018-02-08 22:23:01 +01:00
|
|
|
~init() noexcept;
|
|
|
|
};
|