mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::db: Public functions to get the descriptor for a column.
This commit is contained in:
parent
44f3d2cd27
commit
46588d0ae8
3 changed files with 15 additions and 0 deletions
|
@ -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 &);
|
||||
|
|
|
@ -117,6 +117,7 @@ namespace ircd::db
|
|||
{
|
||||
std::shared_ptr<const database::column> shared_from(const database::column &);
|
||||
std::shared_ptr<database::column> 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
|
||||
|
|
13
ircd/db.cc
13
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)
|
||||
|
|
Loading…
Reference in a new issue