Microsoft SQL Server backend. More...
#include <StormByte/database/mssql/mssql.hxx>


Public Member Functions | |
| MSSQL (const MSSQL &)=delete | |
| Deleted copy constructor. | |
| MSSQL (MSSQL &&other) noexcept | |
| Move constructor. | |
| MSSQL & | operator= (const MSSQL &)=delete |
| Deleted copy assignment. | |
| MSSQL & | operator= (MSSQL &&other) noexcept |
| Move assignment. | |
| ~MSSQL () noexcept override | |
| Disconnect and release the DB-Library process. | |
| ExpectedRows | Query (std::string_view query) noexcept override |
| Execute a SQL batch and collect its first result set. | |
| bool | SilentQuery (std::string_view query) noexcept override |
| Execute a SQL batch without returning rows. | |
Public Member Functions inherited from StormByte::Database::Database | |
| Database (const StormByte::Safe::Shared< Logger::Log > &logger) | |
| Construct with an optional logger. | |
| Database (const Database &)=delete | |
| Copy constructor (deleted). | |
| Database (Database &&other) noexcept | |
| Move constructor. | |
| Database & | operator= (const Database &)=delete |
| Copy assignment (deleted). | |
| Database & | operator= (Database &&other) noexcept |
| Move assignment. | |
| virtual | ~Database () noexcept |
| Destructor. | |
| StormByte::Safe::Shared< Telemetry > | GetTelemetry () const noexcept |
| Obtain the cumulative connection telemetry handle. | |
| bool | Connect () noexcept |
| Connect. | |
| void | Disconnect () noexcept |
| Disconnect. | |
| bool | IsConnected () const noexcept |
| Whether the connection is open. | |
| void | SetSslMode (SslMode mode) noexcept |
| TLS policy for the next Connect(). | |
| SslMode | GetSslMode () const noexcept |
| Current TLS policy. | |
| template<typename... Args> | |
| ExpectedRows | ExecuteSTMT (std::string_view name, Args &&...args) |
| Execute a prepared statement by name. | |
| Expected< Transaction, TransactionError > | BeginTransaction (IsolationLevel level=IsolationLevel::Default) |
| Begin a transaction. | |
| void | CommitTransaction () |
| Commit the current transaction. | |
| void | RollbackTransaction () |
| Roll back the current transaction. | |
Protected Member Functions | |
| MSSQL (std::string_view host, std::string_view user, std::string_view password, std::string_view database, int port, const StormByte::Safe::Shared< Logger::Log > &logger) | |
| Construct from copied connection settings. | |
| bool | DoSilentQuery (std::string_view query) noexcept override |
| Execute an internal no-result query. | |
Protected Member Functions inherited from StormByte::Database::Database | |
| void | SetTelemetry (StormByte::Safe::Shared< Telemetry > telemetry) noexcept |
| Replace the telemetry implementation, normally in a concrete backend constructor. | |
| void | RecordBackendEvent (BackendEvent event) noexcept |
| Record a categorized event reported by the active backend. | |
| Telemetry::OperationScope | TrackOperation (Operation operation) const noexcept |
| Start timing a Database operation without invoking user callbacks. | |
| void | ClearPreparedSTMTs () noexcept |
| Destroy all registered statements inside the Database module. | |
| void | PrepareSTMT (std::string_view name, std::string_view query) noexcept |
Register a prepared statement under name. | |
| void | DoPrepareSTMT (std::string_view name, std::string_view query) noexcept |
| Same as PrepareSTMT; kept for hook symmetry. | |
| virtual void | DoPreConnect () noexcept |
| Pre-connect hook. | |
| virtual void | DoPostConnect () noexcept |
| Post-connect hook. | |
| virtual void | DoPostDisconnect () noexcept |
| Post-disconnect hook. | |
Friends | |
| class | PreparedSTMT |
Additional Inherited Members | |
Protected Attributes inherited from StormByte::Database::Database | |
| StormByte::Safe::Shared< std::recursive_mutex > | m_operation_mutex |
| DLL-safe owner of the connection mutex. | |
| StormByte::Safe::Shared< Telemetry > | m_telemetry |
| Shared cumulative counters for this connection. | |
| bool | m_connected |
| Connection state. | |
| SslMode | m_ssl_mode |
| TLS policy for network backends. | |
| StormByte::Safe::Shared< Logger::Log > | m_logger |
| Shared logger, safe across the DLL boundary. | |
Microsoft SQL Server backend.
|
delete |
Deleted copy constructor.
|
noexcept |
Move constructor.
| other | Backend to move from. |
|
overridenoexcept |
Disconnect and release the DB-Library process.
|
protected |
Construct from copied connection settings.
| host | Server name or address. |
| user | SQL login; empty requests integrated authentication where supported. |
| password | SQL login password. |
| database | Initial database name. |
| port | TDS TCP port, normally 1433. |
| logger | Optional logger. |
|
overrideprotectedvirtualnoexcept |
Execute an internal no-result query.
| query | SQL text. |
Implements StormByte::Database::Database.
Deleted copy assignment.
Move assignment.
| other | Backend to move from. |
|
overridevirtualnoexcept |
Execute a SQL batch and collect its first result set.
| query | SQL text; embedded NUL is rejected. |
Implements StormByte::Database::Database.
|
overridevirtualnoexcept |
Execute a SQL batch without returning rows.
| query | SQL text. |
Implements StormByte::Database::Database.
|
friend |