mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::db: Defriend row / cell related.
This commit is contained in:
parent
d7fa6ff04c
commit
227ec4add8
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue