All table definitions, read from the SYSTEM_TABLE file (one 80-character line per column).
More...
#include <Catalog.hpp>
|
| static Catalog | load (const std::filesystem::path &dataDir) |
| | Reads SYSTEM_TABLE from a data directory.
|
| |
All table definitions, read from the SYSTEM_TABLE file (one 80-character line per column).
Definition at line 47 of file Catalog.hpp.
◆ dataFile()
| std::filesystem::path tinysql::Catalog::dataFile |
( |
const TableSchema & |
table | ) |
const |
The file holding a table's rows.
- Parameters
-
- Returns
SYSTEM_TABLE for the catalogue itself; <name>_DATA for every other table.
Definition at line 125 of file Catalog.cpp.
◆ load()
| Catalog tinysql::Catalog::load |
( |
const std::filesystem::path & |
dataDir | ) |
|
|
static |
Reads SYSTEM_TABLE from a data directory.
- Parameters
-
| dataDir | The directory holding SYSTEM_TABLE and the data files. |
- Returns
- The catalogue with every table it defines.
- Exceptions
-
| SqlError | If the file cannot be opened or a line is malformed. |
Definition at line 74 of file Catalog.cpp.
◆ table()
| const TableSchema & tinysql::Catalog::table |
( |
std::string_view |
name | ) |
const |
Finds a table by name.
- Parameters
-
| name | The table name (case-insensitive). |
- Returns
- The table's definition.
- Exceptions
-
Definition at line 116 of file Catalog.cpp.
◆ tables()
| const std::vector< TableSchema > & tinysql::Catalog::tables |
( |
| ) |
const |
|
inline |
All tables, in the order they appear in SYSTEM_TABLE.
- Returns
- The table definitions.
Definition at line 63 of file Catalog.hpp.
◆ dataDir_
| std::filesystem::path tinysql::Catalog::dataDir_ |
|
private |
◆ tables_
Every table, in file order.
Definition at line 72 of file Catalog.hpp.
The documentation for this class was generated from the following files: