StormByte C++ Library: Database module 0.0.9999
StormByte-Database is a StormByte library module for handling database connections
|
Abstract database class for database handling. More...
#include <database.hxx>
Public Member Functions | |
Database ()=default | |
Database (const Database &)=delete | |
Database (Database &&)=default | |
Database & | operator= (const Database &)=delete |
Database & | operator= (Database &&)=default |
virtual | ~Database ()=default |
virtual void | Connect ()=0 |
virtual void | Disconnect ()=0 |
std::unique_ptr< Query > | PrepareQuery (const std::string &query) |
void | SilentQuery (const std::string &query) |
void | PrepareSTMT (const std::string &name, const std::string &query) |
void | PrepareAll (const std::map< std::string, std::string > &queries) |
PreparedSTMT & | GetPreparedSTMT (const std::string &name) const |
virtual void | BeginTransaction () |
virtual void | BeginExclusiveTransaction () |
virtual void | CommitTransaction () |
virtual void | RollbackTransaction () |
virtual const std::string | LastError () const =0 |
Protected Member Functions | |
virtual std::unique_ptr< PreparedSTMT > | InternalPrepare (const std::string &name, const std::string &query)=0 |
virtual std::unique_ptr< Query > | InternalQuery (const std::string &query)=0 |
Protected Attributes | |
std::map< std::string, std::unique_ptr< PreparedSTMT > > | m_prepared_stmts |
Prepared statements. | |
Abstract database class for database handling.
|
default |
Default constructor.
|
delete |
Default copy constructor (deleted)
|
default |
Default move constructor
|
virtualdefault |
Default destructor.
|
inlinevirtual |
Begins an exclusive transaction
|
inlinevirtual |
Begins a transaction
|
inlinevirtual |
Commits the transaction
|
pure virtual |
Connects to the database.
Implemented in StormByte::Database::SQLite::SQLite3.
|
pure virtual |
Disconnects from the database.
Implemented in StormByte::Database::SQLite::SQLite3.
|
inline |
Gets a prepared statement
name | The name of the prepared statement |
|
protectedpure virtual |
Prepares a statement
name | The name of the prepared statement |
query | The query to prepare |
|
protectedpure virtual |
Executes a query
query | The query to execute. |
|
pure virtual |
|
delete |
Default copy assignment operator (deleted)
|
default |
Default move assignment operator
|
inline |
Prepares all the statements
queries | The queries to prepare |
|
inline |
Executes a query
query | The query to execute. |
|
inline |
Prepares a statement
name | The name of the prepared statement |
query | The query to prepare |
|
inlinevirtual |
Rolls back the transaction
|
inline |
Executes a query without returning any result
query | The query to execute. |