0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::db: Defriend row / cell related.

This commit is contained in:
Jason Volk 2019-01-24 10:53:07 -08:00
parent d7fa6ff04c
commit 227ec4add8
2 changed files with 7 additions and 7 deletions

View file

@ -15,9 +15,11 @@ namespace ircd::db
{
struct cell;
// Util
const std::string &name(const cell &);
uint64_t sequence(const cell &);
template<class pos> bool seek(cell &c, const pos &p, gopts = {});
std::ostream &operator<<(std::ostream &s, const cell &c);
}
/// A cell is a single key-value element existing within a column. This structure
@ -90,10 +92,6 @@ struct ircd::db::cell
cell &operator=(cell &&) noexcept;
cell &operator=(const cell &) = delete;
~cell() noexcept;
friend std::ostream &operator<<(std::ostream &s, const cell &c);
template<class pos> friend bool seek(cell &c, const pos &p, gopts = {});
};
namespace ircd::db

View file

@ -15,6 +15,9 @@ namespace ircd::db
{
struct row;
// [GET] Seek all cells to key
size_t seek(row &, const string_view &, const gopts &opts = {});
// [SET] Delete row from DB (convenience to an op::DELETE delta)
void del(row &, const sopts & = {});
}
@ -48,6 +51,7 @@ struct ircd::db::row
// [GET] Get cell (or throw)
const cell &operator[](const size_t &column) const;
const cell &operator[](const string_view &column) const;
cell &operator[](const size_t &column);
cell &operator[](const string_view &column);
@ -62,8 +66,6 @@ struct ircd::db::row
const vector_view<cell> &buf = {},
gopts opts = {})
__attribute__((stack_protect));
friend size_t seek(row &, const string_view &, const gopts &opts = {});
};
namespace ircd::db