mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::db: Enumerate all deltas.
This commit is contained in:
parent
c50461c4c6
commit
92548464d3
4 changed files with 20 additions and 0 deletions
|
@ -132,6 +132,11 @@ namespace ircd::db
|
|||
struct ircd::db::cell::delta
|
||||
:std::tuple<op, cell *, string_view>
|
||||
{
|
||||
enum
|
||||
{
|
||||
OP, CELL, VAL,
|
||||
};
|
||||
|
||||
delta(cell &c, const string_view &val, const enum op &op = op::SET)
|
||||
:std::tuple<enum op, cell *, string_view>{op, &c, val}
|
||||
{}
|
||||
|
|
|
@ -157,6 +157,11 @@ struct ircd::db::column
|
|||
struct ircd::db::column::delta
|
||||
:std::tuple<op, string_view, string_view>
|
||||
{
|
||||
enum
|
||||
{
|
||||
OP, KEY, VAL,
|
||||
};
|
||||
|
||||
delta(const string_view &key, const string_view &val, const enum op &op = op::SET)
|
||||
:std::tuple<enum op, string_view, string_view>{op, key, val}
|
||||
{}
|
||||
|
|
|
@ -53,6 +53,11 @@ namespace ircd::db
|
|||
struct ircd::db::delta
|
||||
:std::tuple<op, string_view, string_view, string_view>
|
||||
{
|
||||
enum
|
||||
{
|
||||
OP, COL, KEY, VAL,
|
||||
};
|
||||
|
||||
delta(const string_view &col, const string_view &key, const string_view &val = {}, const enum op &op = op::SET)
|
||||
:std::tuple<enum op, string_view, string_view, string_view>{op, col, key, val}
|
||||
{}
|
||||
|
|
|
@ -112,6 +112,11 @@ namespace ircd::db
|
|||
struct ircd::db::row::delta
|
||||
:std::tuple<op, row *>
|
||||
{
|
||||
enum
|
||||
{
|
||||
OP, ROW
|
||||
};
|
||||
|
||||
delta(row &r, const enum op &op = op::SET)
|
||||
:std::tuple<enum op, row *>{op, &r}
|
||||
{}
|
||||
|
|
Loading…
Reference in a new issue