diff --git a/include/ircd/db/column.h b/include/ircd/db/column.h index 2cf6d413b..21ec63b48 100644 --- a/include/ircd/db/column.h +++ b/include/ircd/db/column.h @@ -39,8 +39,7 @@ namespace ircd::db std::string read(column &, const string_view &key, const gopts & = {}); // [SET] Write data to the db - void write(column &, const string_view &key, const string_view &value, const sopts & = {}); - void write(column &, const string_view &key, const mutable_buffer &, const sopts & = {}); + void write(column &, const string_view &key, const const_buffer &value, const sopts & = {}); // [SET] Remove data from the db. not_found is never thrown. void del(column &, const string_view &key, const sopts & = {}); diff --git a/ircd/db.cc b/ircd/db.cc index 9fb704de4..7ac3b1827 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -4084,21 +4084,7 @@ ircd::db::del(column &column, void ircd::db::write(column &column, const string_view &key, - const mutable_buffer &buf, - const sopts &sopts) -{ - const string_view val - { - reinterpret_cast(data(buf)), size(buf) - }; - - write(column, key, val, sopts); -} - -void -ircd::db::write(column &column, - const string_view &key, - const string_view &val, + const const_buffer &val, const sopts &sopts) { database &d(column); @@ -4107,8 +4093,8 @@ ircd::db::write(column &column, name(d), sequence(d), name(c), - key.size(), - val.size()); + size(key), + size(val)); auto opts(make_opts(sopts)); throw_on_error