1#ifndef DATABASE_TABLE_H
2#define DATABASE_TABLE_H
4#include <vkdb/concepts.h>
5#include <vkdb/lsm_tree.h>
6#include <vkdb/friendly_builder.h>
14static const FilePath TAG_COLUMNS_FILENAME{
"tag_columns.metadata"};
20using DatabaseName = std::string;
26using TableName = std::string;
49 explicit Table(
const FilePath& db_path,
const TableName&
name);
116 void clear() const noexcept;
130 [[nodiscard]] TableName
name() const noexcept;
137 [[nodiscard]] TagColumns
tagColumns() const noexcept;
144 [[nodiscard]] FilePath
path() const noexcept;
160 [[nodiscard]]
bool been_populated() const noexcept;
168 void save_tag_columns() const;
176 void load_tag_columns();
183 [[nodiscard]] FilePath tag_columns_path() const noexcept;
199 DatabaseName db_path_;
211 TagColumns tag_columns_;
Friendly query builder for querying a Table.
Represents a table in vkdb.
void clear() const noexcept
Clear the table.
Table & addTagColumn(const TagKey &tag_column)
Add a tag column.
TableName name() const noexcept
Get the name of the table.
Table & setTagColumns(const TagColumns &tag_columns) noexcept
Set the TagColumns object.
Table(Table &&) noexcept=default
Move-construct a new Table object.
TagColumns tagColumns() const noexcept
Get the TagColumns object.
FilePath path() const noexcept
Get the path to the table directory.
FriendlyQueryBuilder< double > query() noexcept
Get a FriendlyQueryBuilder object.
Table & removeTagColumn(const TagKey &tag_column)
Remove a tag column.
Table()=delete
Deleted default constructor.