Botan 3.13.0
Crypto and TLS for C&
Botan::SQL_Database::Table_Schema Class Reference

#include <database.h>

Public Member Functions

const std::vector< Column > & columns () const
Table_Schemaif_not_exists ()
bool is_if_not_exists () const
const std::string & name () const
 Table_Schema (std::string name, std::vector< Column > columns)

Detailed Description

The name and columns of a table, used with create_table

Definition at line 282 of file database.h.

Constructor & Destructor Documentation

◆ Table_Schema()

Botan::SQL_Database::Table_Schema::Table_Schema ( std::string name,
std::vector< Column > columns )
inline

Declare a table

Parameters
namethe name of the table
columnsthe columns of the table

Definition at line 289 of file database.h.

289 :
290 m_name(std::move(name)), m_columns(std::move(columns)) {}
const std::string & name() const
Definition database.h:305
const std::vector< Column > & columns() const
Definition database.h:311

References columns(), and name().

Referenced by if_not_exists().

Member Function Documentation

◆ columns()

const std::vector< Column > & Botan::SQL_Database::Table_Schema::columns ( ) const
inline

Query the columns of the table

Returns
the columns of the table

Definition at line 311 of file database.h.

311{ return m_columns; }

Referenced by Botan::Sqlite3_Database::create_table(), and Table_Schema().

◆ if_not_exists()

Table_Schema & Botan::SQL_Database::Table_Schema::if_not_exists ( )
inline

Only create the table if it does not already exist

Returns
reference to this

Definition at line 296 of file database.h.

296 {
297 m_if_not_exists = true;
298 return *this;
299 }

References Table_Schema().

◆ is_if_not_exists()

bool Botan::SQL_Database::Table_Schema::is_if_not_exists ( ) const
inline

Query whether creation is conditional

Returns
true if if_not_exists was called

Definition at line 317 of file database.h.

317{ return m_if_not_exists; }

Referenced by Botan::Sqlite3_Database::create_table().

◆ name()

const std::string & Botan::SQL_Database::Table_Schema::name ( ) const
inline

Query the table name

Returns
the name of the table

Definition at line 305 of file database.h.

305{ return m_name; }

Referenced by Botan::Sqlite3_Database::create_table(), and Table_Schema().


The documentation for this class was generated from the following file: