Hyper API for C++
0.0.17231
Hyper client library for C++ applications
|
Go to the documentation of this file.
5 #ifndef TABLEAU_HYPER_CATALOG_HPP
6 #define TABLEAU_HYPER_CATALOG_HPP
10 #include <hyperapi/impl/infra.hpp>
11 #include <hyperapi/hyperapi.h>
14 #include <unordered_set>
void createSchemaIfNotExists(const SchemaName &schemaName) const
Creates a SQL schema with the given name.
void createTable(const hyperapi::TableDefinition &table_definition) const
Creates a SQL table with the given table definition.
Connection & getConnection() const noexcept
Returns the underlying connection.
TableDefinition getTableDefinition(const TableName &tableName) const
Gets the table definition for an existing table.
void dropDatabase(const std::string &databasePath)
Drops the database with the given path.
std::unordered_set< TableName > getTableNames(const SchemaName &schema) const
Gets the names of all tables in the given schema.
void attachDatabase(const std::string &databasePath, const DatabaseName &databaseName)
Attaches a database file databasePath to the underlying connection under the name databaseName.
The catalog class gives access to the metadata of the attached databases of a connection.
Defines a Hyper connection.
std::unordered_set< SchemaName > getSchemaNames() const
Gets the name of all schemas in the first database in the database search path.
void dropDatabaseIfExists(const std::string &databasePath)
Drops the database with the given path.
The primary namespace of the Hyper API for C++.
void detachAllDatabases()
Detaches all databases from the underlying connection.
void createDatabase(const std::string &databasePath)
Creates a database file with the given path.
void createTableIfNotExists(const hyperapi::TableDefinition &table_definition) const
Creates a SQL table with the given table definition.
Represents an escaped SQL schema name.
bool hasTable(const TableName &table) const
Checks whether a table with the given name exists.
void createDatabaseIfNotExists(const std::string &databasePath)
Creates a database file with the given path if it doesn't exist yet.
void detachDatabase(const DatabaseName &databaseName)
Detaches a database from the underlying connection.
Represents an escaped SQL table name.
void createSchema(const SchemaName &schemaName) const
Creates a SQL schema with the given name.
Represents an escaped SQL database name.