diff --git a/include/ircd/db/column.h b/include/ircd/db/column.h index 4a9185a99..99b49522b 100644 --- a/include/ircd/db/column.h +++ b/include/ircd/db/column.h @@ -61,6 +61,7 @@ namespace ircd::db template<> uint64_t property(column &, const string_view &name); // Information about a column + const database::descriptor &describe(const column &); const std::string &name(const column &); uint32_t id(const column &); size_t file_count(column &); diff --git a/include/ircd/db/database.h b/include/ircd/db/database.h index af0729010..a4921efed 100644 --- a/include/ircd/db/database.h +++ b/include/ircd/db/database.h @@ -117,6 +117,7 @@ namespace ircd::db { std::shared_ptr shared_from(const database::column &); std::shared_ptr shared_from(database::column &); + const database::descriptor &describe(const database::column &); const std::string &name(const database::column &); uint32_t id(const database::column &); void drop(database::column &); // Request to erase column from db diff --git a/ircd/db.cc b/ircd/db.cc index 9f0f4a47c..f6be067d8 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -885,6 +885,12 @@ ircd::db::name(const database::column &c) return c.name; } +const ircd::db::database::descriptor & +ircd::db::describe(const database::column &c) +{ + return c.descriptor; +} + // // database::column // @@ -2493,6 +2499,13 @@ ircd::db::name(const column &column) return name(c); } +const ircd::db::database::descriptor & +ircd::db::describe(const column &column) +{ + const database::column &c(column); + return describe(c); +} + void ircd::db::flush(column &column, const bool &blocking)