2019-05-11 23:15:14 +02:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2019 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_ROOM_JOINED_H
|
|
|
|
|
|
|
|
namespace ircd::m::dbs
|
|
|
|
{
|
2023-02-18 03:37:46 +01:00
|
|
|
using room_joined_tuple = std::tuple<string_view, string_view>;
|
|
|
|
|
2019-05-11 23:15:14 +02:00
|
|
|
constexpr size_t ROOM_JOINED_KEY_MAX_SIZE
|
|
|
|
{
|
|
|
|
id::MAX_SIZE + event::ORIGIN_MAX_SIZE + id::MAX_SIZE
|
|
|
|
};
|
|
|
|
|
|
|
|
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);
|
2023-02-18 03:37:46 +01:00
|
|
|
room_joined_tuple room_joined_key(const string_view &amalgam);
|
2019-05-11 23:15:14 +02:00
|
|
|
|
2023-02-11 04:43:00 +01:00
|
|
|
void _index_room_joined(db::txn &, const event &, const opts &);
|
2020-03-25 19:06:29 +01:00
|
|
|
|
2019-05-11 23:15:14 +02:00
|
|
|
// room_id | origin, member => event_idx
|
2019-06-11 21:55:14 +02:00
|
|
|
extern db::domain room_joined;
|
2019-05-11 23:15:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace ircd::m::dbs::desc
|
|
|
|
{
|
2020-10-02 04:04:48 +02:00
|
|
|
extern conf::item<std::string> room_joined__comp;
|
2020-03-25 19:06:29 +01:00
|
|
|
extern conf::item<size_t> room_joined__block__size;
|
|
|
|
extern conf::item<size_t> room_joined__meta_block__size;
|
|
|
|
extern conf::item<size_t> room_joined__cache__size;
|
|
|
|
extern conf::item<size_t> room_joined__cache_comp__size;
|
|
|
|
extern conf::item<size_t> room_joined__bloom__bits;
|
|
|
|
extern const db::prefix_transform room_joined__pfx;
|
|
|
|
extern const db::descriptor room_joined;
|
2019-05-11 23:15:14 +02:00
|
|
|
}
|