mirror of
https://github.com/matrix-construct/construct
synced 2024-11-04 21:08:57 +01:00
ircd:Ⓜ️:dbs: Expose the internal indexer interface.
This commit is contained in:
parent
c98481c334
commit
dd04a50743
2 changed files with 19 additions and 10 deletions
|
@ -140,6 +140,18 @@ namespace ircd::m::dbs::desc
|
|||
extern const database::descriptor events__state_node;
|
||||
}
|
||||
|
||||
// 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 &);
|
||||
string_view _index_ephem(db::txn &, const event &, const write_opts &);
|
||||
}
|
||||
|
||||
struct ircd::m::dbs::init
|
||||
{
|
||||
init(std::string dbopts = {});
|
||||
|
|
|
@ -98,16 +98,9 @@ noexcept
|
|||
events = {};
|
||||
}
|
||||
|
||||
namespace ircd::m::dbs
|
||||
{
|
||||
static void _index__room_state(db::txn &, const event &, const write_opts &);
|
||||
static void _index__room_events(db::txn &, const event &, const write_opts &, const string_view &);
|
||||
static void _index__room_joined(db::txn &, const event &, const write_opts &);
|
||||
static void _index__room_head(db::txn &, const event &, const write_opts &);
|
||||
static string_view _index_state(db::txn &, const event &, const write_opts &);
|
||||
static string_view _index_redact(db::txn &, const event &, const write_opts &);
|
||||
static string_view _index_ephem(db::txn &, const event &, const write_opts &);
|
||||
}
|
||||
//
|
||||
// Basic write suite
|
||||
//
|
||||
|
||||
void
|
||||
ircd::m::dbs::blacklist(db::txn &txn,
|
||||
|
@ -165,6 +158,10 @@ ircd::m::dbs::write(db::txn &txn,
|
|||
return _index_ephem(txn, event, opts);
|
||||
}
|
||||
|
||||
//
|
||||
// Internal interface
|
||||
//
|
||||
|
||||
ircd::string_view
|
||||
ircd::m::dbs::_index_ephem(db::txn &txn,
|
||||
const event &event,
|
||||
|
|
Loading…
Reference in a new issue